From b9036ae804f1183afcf8324e1bbb7238e2e76c75 Mon Sep 17 00:00:00 2001 From: Sho Kaneko Date: Sun, 18 Aug 2024 16:02:43 +0800 Subject: [PATCH] example case with openapi on rust --- .DS_Store | Bin 0 -> 6148 bytes .gitignore | 4 - .openapi-generator-ignore | 7 + openapitools.json | 7 + target/.DS_Store | Bin 0 -> 6148 bytes .../.github/workflows/python.yml | 38 + target/python/binance_openapi/.gitignore | 66 + target/python/binance_openapi/.gitlab-ci.yml | 31 + .../binance_openapi/.openapi-generator-ignore | 23 + .../binance_openapi/.openapi-generator/FILES | 1649 ++ .../.openapi-generator/VERSION | 1 + target/python/binance_openapi/.travis.yml | 17 + target/python/binance_openapi/README.md | 973 + target/python/binance_openapi/docs/Account.md | 44 + .../docs/AccountBalancesInner.md | 31 + .../docs/AccountCommissionRates.md | 32 + .../python/binance_openapi/docs/AggTrade.md | 36 + .../ApiV3AccountCommissionGet200Response.md | 32 + ...AccountCommissionGet200ResponseDiscount.md | 33 + ...missionGet200ResponseStandardCommission.md | 33 + ...ntCommissionGet200ResponseTaxCommission.md | 33 + .../ApiV3AllOrderListGet200ResponseInner.md | 37 + ...OrderListGet200ResponseInnerOrdersInner.md | 31 + .../docs/ApiV3AvgPriceGet200Response.md | 31 + .../docs/ApiV3DepthGet200Response.md | 31 + .../docs/ApiV3ExchangeInfoGet200Response.md | 33 + ...changeInfoGet200ResponseRateLimitsInner.md | 32 + ...3ExchangeInfoGet200ResponseSymbolsInner.md | 50 + ...oGet200ResponseSymbolsInnerFiltersInner.md | 32 + .../ApiV3KlinesGet200ResponseInnerInner.md | 28 + .../ApiV3MyAllocationsGet200ResponseInner.md | 42 + ...V3MyPreventedMatchesGet200ResponseInner.md | 37 + .../ApiV3OpenOrderListGet200ResponseInner.md | 36 + ...OrderListGet200ResponseInnerOrdersInner.md | 31 + .../ApiV3OpenOrdersDelete200ResponseInner.md | 50 + .../ApiV3OrderCancelReplacePost200Response.md | 32 + ...celReplacePost200ResponseCancelResponse.md | 43 + ...lReplacePost200ResponseNewOrderResponse.md | 44 + .../docs/ApiV3OrderListGet200Response.md | 36 + ...ApiV3OrderListGet200ResponseOrdersInner.md | 31 + .../docs/ApiV3OrderOcoPost200Response.md | 37 + ...rderOcoPost200ResponseOrderReportsInner.md | 44 + ...ApiV3OrderOcoPost200ResponseOrdersInner.md | 31 + .../docs/ApiV3OrderPost200Response.md | 46 + .../ApiV3RateLimitOrderGet200ResponseInner.md | 33 + .../docs/ApiV3SorOrderPost200Response.md | 46 + .../ApiV3SorOrderPost200ResponseFillsInner.md | 35 + .../docs/ApiV3Ticker24hrGet200Response.md | 47 + .../ApiV3TickerBookTickerGet200Response.md | 33 + .../docs/ApiV3TickerGet200Response.md | 43 + .../docs/ApiV3TickerPriceGet200Response.md | 30 + .../ApiV3TickerTradingDayGet200Response.md | 43 + .../docs/ApiV3TimeGet200Response.md | 29 + .../ApiV3UserDataStreamPost200Response.md | 29 + .../binance_openapi/docs/AutoInvestApi.md | 1607 ++ target/python/binance_openapi/docs/BLVTApi.md | 549 + .../binance_openapi/docs/BnbBurnStatus.md | 30 + .../python/binance_openapi/docs/BookTicker.md | 33 + target/python/binance_openapi/docs/C2CApi.md | 104 + .../docs/CanceledMarginOrderDetail.md | 42 + .../python/binance_openapi/docs/ConvertApi.md | 811 + .../binance_openapi/docs/CryptoLoansApi.md | 1994 ++ .../python/binance_openapi/docs/DayTicker.md | 43 + .../binance_openapi/docs/DualInvestmentApi.md | 466 + target/python/binance_openapi/docs/Error.md | 30 + target/python/binance_openapi/docs/FiatApi.md | 200 + .../binance_openapi/docs/FuturesAlgoApi.md | 576 + .../python/binance_openapi/docs/FuturesApi.md | 290 + .../binance_openapi/docs/GiftCardApi.md | 542 + .../docs/IsolatedMarginAccountInfo.md | 32 + .../IsolatedMarginAccountInfoAssetsInner.md | 40 + ...edMarginAccountInfoAssetsInnerBaseAsset.md | 38 + ...dMarginAccountInfoAssetsInnerQuoteAsset.md | 38 + .../docs/IsolatedMarginStreamApi.md | 244 + .../python/binance_openapi/docs/MarginApi.md | 4215 ++++ .../binance_openapi/docs/MarginOcoOrder.md | 38 + .../docs/MarginOcoOrderOrderReportsInner.md | 42 + .../docs/MarginOcoOrderOrdersInner.md | 31 + .../binance_openapi/docs/MarginOrder.md | 40 + .../binance_openapi/docs/MarginOrderDetail.md | 46 + .../docs/MarginOrderResponseAck.md | 33 + .../docs/MarginOrderResponseFull.md | 44 + .../docs/MarginOrderResponseResult.md | 41 + .../binance_openapi/docs/MarginStreamApi.md | 244 + .../binance_openapi/docs/MarginTrade.md | 40 + .../docs/MarginTransferDetails.md | 30 + .../docs/MarginTransferDetailsRowsInner.md | 36 + .../python/binance_openapi/docs/MarketApi.md | 1106 ++ .../python/binance_openapi/docs/MiningApi.md | 1200 ++ target/python/binance_openapi/docs/MyTrade.md | 41 + target/python/binance_openapi/docs/NFTApi.md | 382 + .../python/binance_openapi/docs/OcoOrder.md | 37 + .../docs/OcoOrderOrderReportsInner.md | 44 + target/python/binance_openapi/docs/Order.md | 43 + .../binance_openapi/docs/OrderDetails.md | 50 + .../binance_openapi/docs/OrderResponseAck.md | 33 + .../binance_openapi/docs/OrderResponseFull.md | 46 + .../docs/OrderResponseFullFillsInner.md | 32 + .../docs/OrderResponseResult.md | 45 + target/python/binance_openapi/docs/PayApi.md | 100 + .../docs/PortfolioMarginApi.md | 1111 ++ .../binance_openapi/docs/PriceTicker.md | 30 + .../python/binance_openapi/docs/RebateApi.md | 100 + .../binance_openapi/docs/RepaymentInfo.md | 35 + .../binance_openapi/docs/RepaymentInfo2.md | 31 + ...iV1AccountApiRestrictionsGet200Response.md | 40 + ...V1AccountApiTradingStatusGet200Response.md | 29 + ...countApiTradingStatusGet200ResponseData.md | 33 + ...adingStatusGet200ResponseDataIndicators.md | 30 + ...et200ResponseDataIndicatorsBTCUSDTInner.md | 32 + ...tatusGet200ResponseDataTriggerCondition.md | 31 + .../docs/SapiV1AccountInfoGet200Response.md | 31 + .../SapiV1AccountSnapshotGet200Response.md | 31 + .../docs/SapiV1AccountStatusGet200Response.md | 29 + ...goFuturesHistoricalOrdersGet200Response.md | 30 + ...storicalOrdersGet200ResponseOrdersInner.md | 42 + ...iV1AlgoFuturesNewOrderVpPost200Response.md | 32 + ...piV1AlgoFuturesOpenOrdersGet200Response.md | 30 + ...uresOpenOrdersGet200ResponseOrdersInner.md | 42 + ...SapiV1AlgoFuturesOrderDelete200Response.md | 32 + ...apiV1AlgoFuturesSubOrdersGet200Response.md | 32 + ...esSubOrdersGet200ResponseSubOrdersInner.md | 42 + ...1AlgoSpotHistoricalOrdersGet200Response.md | 30 + ...storicalOrdersGet200ResponseOrdersInner.md | 41 + ...piV1AlgoSpotNewOrderTwapPost200Response.md | 32 + .../SapiV1AlgoSpotOpenOrdersGet200Response.md | 30 + ...SpotOpenOrdersGet200ResponseOrdersInner.md | 41 + .../SapiV1AlgoSpotOrderDelete200Response.md | 32 + .../SapiV1AlgoSpotSubOrdersGet200Response.md | 32 + ...otSubOrdersGet200ResponseSubOrdersInner.md | 42 + .../SapiV1AssetAssetDetailGet200Response.md | 29 + ...SapiV1AssetAssetDetailGet200ResponseCTR.md | 33 + .../SapiV1AssetAssetDividendGet200Response.md | 30 + ...setAssetDividendGet200ResponseRowsInner.md | 34 + ...piV1AssetConvertTransferPost200Response.md | 30 + ...onvertTransferQueryByPageGet200Response.md | 30 + ...nsferQueryByPageGet200ResponseRowsInner.md | 37 + ...setCustodyTransferHistoryGet200Response.md | 30 + ...yTransferHistoryGet200ResponseRowsInner.md | 33 + .../docs/SapiV1AssetDribbletGet200Response.md | 30 + ...etGet200ResponseUserAssetDribbletsInner.md | 33 + ...bletsInnerUserAssetDribbletDetailsInner.md | 34 + .../docs/SapiV1AssetDustBtcPost200Response.md | 32 + ...AssetDustBtcPost200ResponseDetailsInner.md | 35 + .../docs/SapiV1AssetDustPost200Response.md | 31 + ...tDustPost200ResponseTransferResultInner.md | 34 + ...ssetGetFundingAssetPost200ResponseInner.md | 34 + ...ferCloudMiningQueryByPageGet200Response.md | 30 + ...iningQueryByPageGet200ResponseRowsInner.md | 34 + .../SapiV1AssetTradeFeeGet200ResponseInner.md | 31 + .../docs/SapiV1AssetTransferGet200Response.md | 30 + ...iV1AssetTransferGet200ResponseRowsInner.md | 34 + .../SapiV1AssetTransferPost200Response.md | 29 + ...V1AssetWalletBalanceGet200ResponseInner.md | 31 + .../docs/SapiV1BlvtRedeemPost200Response.md | 34 + ...piV1BlvtRedeemRecordGet200ResponseInner.md | 35 + .../SapiV1BlvtSubscribePost200Response.md | 34 + ...SapiV1BlvtSubscribeRecordGet200Response.md | 35 + .../SapiV1BlvtTokenInfoGet200ResponseInner.md | 43 + ...oGet200ResponseInnerCurrentBasketsInner.md | 31 + .../SapiV1BlvtUserLimitGet200ResponseInner.md | 31 + ...MatchListUserOrderHistoryGet200Response.md | 33 + ...UserOrderHistoryGet200ResponseDataInner.md | 42 + ...1CapitalConfigGetallGet200ResponseInner.md | 42 + ...tallGet200ResponseInnerNetworkListInner.md | 46 + ...lContractConvertibleCoinsGet200Response.md | 31 + ...ertibleCoinsGet200ResponseExchangeRates.md | 31 + ...piV1CapitalDepositAddressGet200Response.md | 32 + ...alDepositAddressListGet200ResponseInner.md | 31 + ...apitalDepositCreditApplyPost200Response.md | 32 + ...CapitalDepositHisrecGet200ResponseInner.md | 39 + ...1CapitalDepositSubAddressGet200Response.md | 32 + ...italDepositSubHisrecGet200ResponseInner.md | 38 + ...lWithdrawAddressListGet200ResponseInner.md | 36 + ...piV1CapitalWithdrawApplyPost200Response.md | 29 + ...pitalWithdrawHistoryGet200ResponseInner.md | 41 + ...SapiV1ConvertAcceptQuotePost200Response.md | 31 + ...piV1ConvertAssetInfoGet200ResponseInner.md | 30 + ...1ConvertExchangeInfoGet200ResponseInner.md | 34 + .../SapiV1ConvertGetQuotePost200Response.md | 34 + ...1ConvertLimitCancelOrderPost200Response.md | 30 + ...V1ConvertLimitPlaceOrderPost200Response.md | 30 + ...nvertLimitQueryOpenOrdersGet200Response.md | 29 + ...tQueryOpenOrdersGet200ResponseListInner.md | 39 + .../SapiV1ConvertOrderStatusGet200Response.md | 37 + .../SapiV1ConvertTradeFlowGet200Response.md | 33 + ...ConvertTradeFlowGet200ResponseListInner.md | 38 + .../SapiV1DciProductAccountsGet200Response.md | 30 + ...ctAutoCompoundEditStatusPost200Response.md | 30 + .../SapiV1DciProductListGet200Response.md | 30 + ...V1DciProductListGet200ResponseListInner.md | 45 + ...SapiV1DciProductPositionsGet200Response.md | 30 + ...ProductPositionsGet200ResponseListInner.md | 41 + ...apiV1DciProductSubscribePost200Response.md | 41 + ...kingEthHistoryRateHistoryGet200Response.md | 30 + ...storyRateHistoryGet200ResponseRowsInner.md | 31 + ...hHistoryRedemptionHistoryGet200Response.md | 30 + ...edemptionHistoryGet200ResponseRowsInner.md | 36 + ...gEthHistoryRewardsHistoryGet200Response.md | 30 + ...ryRewardsHistoryGet200ResponseRowsInner.md | 34 + ...gEthHistoryStakingHistoryGet200Response.md | 30 + ...ryStakingHistoryGet200ResponseRowsInner.md | 34 + ...istoryWbethRewardsHistoryGet200Response.md | 31 + ...thRewardsHistoryGet200ResponseRowsInner.md | 33 + .../SapiV1EthStakingEthQuotaGet200Response.md | 30 + ...apiV1EthStakingEthRedeemPost200Response.md | 32 + ...WbethHistoryUnwrapHistoryGet200Response.md | 30 + ...oryUnwrapHistoryGet200ResponseRowsInner.md | 35 + ...ngWbethHistoryWrapHistoryGet200Response.md | 30 + ...storyWrapHistoryGet200ResponseRowsInner.md | 35 + ...apiV1EthStakingWbethWrapPost200Response.md | 31 + .../docs/SapiV1FiatOrdersGet200Response.md | 33 + ...SapiV1FiatOrdersGet200ResponseDataInner.md | 37 + .../docs/SapiV1FiatPaymentsGet200Response.md | 33 + ...piV1FiatPaymentsGet200ResponseDataInner.md | 38 + ...SapiV1FuturesHistDataLinkGet200Response.md | 29 + ...uresHistDataLinkGet200ResponseDataInner.md | 30 + .../SapiV1FuturesTransferGet200Response.md | 30 + ...1FuturesTransferGet200ResponseRowsInner.md | 34 + ...GiftcardBuyCodeTokenLimitGet200Response.md | 32 + ...cardBuyCodeTokenLimitGet200ResponseData.md | 31 + ...SapiV1GiftcardCreateCodePost200Response.md | 32 + ...V1GiftcardCreateCodePost200ResponseData.md | 31 + ...dCryptographyRsaPublicKeyGet200Response.md | 32 + ...SapiV1GiftcardRedeemCodePost200Response.md | 32 + ...V1GiftcardRedeemCodePost200ResponseData.md | 32 + .../SapiV1GiftcardVerifyGet200Response.md | 32 + .../SapiV1GiftcardVerifyGet200ResponseData.md | 31 + ...LendingAutoInvestAllAssetGet200Response.md | 30 + ...utoInvestHistoryListGet200ResponseInner.md | 46 + ...endingAutoInvestIndexInfoGet200Response.md | 32 + ...xInfoGet200ResponseAssetAllocationInner.md | 30 + ...utoInvestIndexUserSummaryGet200Response.md | 35 + ...mmaryGet200ResponseAssetAllocationInner.md | 30 + ...exUserSummaryGet200ResponseDetailsInner.md | 39 + ...1LendingAutoInvestOneOffPost200Response.md | 30 + ...toInvestOneOffPostDetailsParameterInner.md | 30 + ...ingAutoInvestOneOffStatusGet200Response.md | 30 + ...LendingAutoInvestPlanAddPost200Response.md | 30 + ...oInvestPlanAddPostDetailsParameterInner.md | 30 + ...AutoInvestPlanEditStatusPost200Response.md | 31 + ...V1LendingAutoInvestPlanIdGet200Response.md | 33 + ...AutoInvestPlanIdGet200ResponsePlanInner.md | 43 + ...anIdGet200ResponsePlanInnerDetailsInner.md | 42 + ...LendingAutoInvestPlanListGet200Response.md | 33 + ...toInvestPlanListGet200ResponsePlanInner.md | 50 + ...vestRebalanceHistoryGet200ResponseInner.md | 35 + ...200ResponseInnerTransactionDetailsInner.md | 32 + ...oInvestRedeemHistoryGet200ResponseInner.md | 37 + ...1LendingAutoInvestRedeemPost200Response.md | 29 + ...AutoInvestSourceAssetListGet200Response.md | 30 + ...ssetListGet200ResponseSourceAssetsInner.md | 33 + ...AutoInvestTargetAssetListGet200Response.md | 30 + ...tGet200ResponseAutoInvestAssetListInner.md | 30 + ...etListInnerRoiAndDimensionTypeListInner.md | 31 + ...stTargetAssetRoiListGet200ResponseInner.md | 30 + ...gCustomizedFixedPurchasePost200Response.md | 29 + ...V1LendingPositionChangedPost200Response.md | 31 + ...V1LendingProjectListGet200ResponseInner.md | 44 + ...gProjectPositionListGet200ResponseInner.md | 45 + .../SapiV1LoanAdjustLtvPost200Response.md | 33 + .../SapiV1LoanBorrowHistoryGet200Response.md | 30 + ...oanBorrowHistoryGet200ResponseRowsInner.md | 37 + .../docs/SapiV1LoanBorrowPost200Response.md | 34 + .../SapiV1LoanCollateralDataGet200Response.md | 30 + ...anCollateralDataGet200ResponseRowsInner.md | 34 + ...1LoanCustomizeMarginCallPost200Response.md | 30 + ...omizeMarginCallPost200ResponseRowsInner.md | 33 + .../SapiV1LoanIncomeGet200ResponseInner.md | 33 + .../SapiV1LoanLoanableDataGet200Response.md | 30 + ...LoanLoanableDataGet200ResponseRowsInner.md | 42 + ...1LoanLtvAdjustmentHistoryGet200Response.md | 30 + ...djustmentHistoryGet200ResponseRowsInner.md | 36 + .../SapiV1LoanOngoingOrdersGet200Response.md | 30 + ...oanOngoingOrdersGet200ResponseRowsInner.md | 36 + ...V1LoanRepayCollateralRateGet200Response.md | 32 + .../SapiV1LoanRepayHistoryGet200Response.md | 30 + ...LoanRepayHistoryGet200ResponseRowsInner.md | 37 + .../docs/SapiV1LoanRepayPost200Response.md | 35 + .../SapiV1LoanVipBorrowPost200Response.md | 36 + ...1LoanVipCollateralAccountGet200Response.md | 30 + ...ollateralAccountGet200ResponseRowsInner.md | 31 + ...piV1LoanVipCollateralDataGet200Response.md | 30 + ...ipCollateralDataGet200ResponseRowsInner.md | 37 + ...SapiV1LoanVipLoanableDataGet200Response.md | 30 + ...nVipLoanableDataGet200ResponseRowsInner.md | 38 + ...apiV1LoanVipOngoingOrdersGet200Response.md | 30 + ...VipOngoingOrdersGet200ResponseRowsInner.md | 42 + .../docs/SapiV1LoanVipRenewPost200Response.md | 34 + ...SapiV1LoanVipRepayHistoryGet200Response.md | 30 + ...nVipRepayHistoryGet200ResponseRowsInner.md | 34 + .../docs/SapiV1LoanVipRepayPost200Response.md | 35 + .../SapiV1LoanVipRequestDataGet200Response.md | 30 + ...anVipRequestDataGet200ResponseRowsInner.md | 37 + ...pRequestInterestRateGet200ResponseInner.md | 32 + ...SubaccountAccountSnapshotGet200Response.md | 31 + ...tSnapshotGet200ResponseSnapshotVosInner.md | 31 + ...pshotGet200ResponseSnapshotVosInnerData.md | 30 + ...sponseSnapshotVosInnerDataBalancesInner.md | 31 + ...nagedSubaccountAssetGet200ResponseInner.md | 34 + ...dSubaccountDepositAddressGet200Response.md | 32 + ...ManagedSubaccountDepositPost200Response.md | 29 + ...ubaccountFetchFutureAssetGet200Response.md | 31 + ...tureAssetGet200ResponseSnapshotVosInner.md | 31 + ...AssetGet200ResponseSnapshotVosInnerData.md | 30 + ...ResponseSnapshotVosInnerDataAssetsInner.md | 31 + ...sponseSnapshotVosInnerDataPositionInner.md | 32 + ...piV1ManagedSubaccountInfoGet200Response.md | 30 + ...00ResponseManagerSubUserInfoVoListInner.md | 39 + ...agedSubaccountMarginAssetGet200Response.md | 33 + ...arginAssetGet200ResponseUserAssetsInner.md | 34 + ...tQueryTransLogForInvestorGet200Response.md | 30 + ...sponseManagerSubTransferHistoryVosInner.md | 38 + ...edSubaccountQueryTransLogGet200Response.md | 30 + ...sponseManagerSubTransferHistoryVosInner.md | 38 + .../docs/SapiV1MarginAccountGet200Response.md | 36 + ...ginAccountGet200ResponseUserAssetsInner.md | 34 + ...apiV1MarginAllAssetsGet200ResponseInner.md | 34 + ...SapiV1MarginAllPairsGet200ResponseInner.md | 35 + ...1MarginAvailableInventoryGet200Response.md | 30 + ...nAvailableInventoryGet200ResponseAssets.md | 32 + .../SapiV1MarginBorrowRepayGet200Response.md | 30 + ...arginBorrowRepayGet200ResponseRowsInner.md | 36 + .../SapiV1MarginBorrowRepayPost200Response.md | 29 + ...iV1MarginCapitalFlowGet200ResponseInner.md | 35 + ...arginCollateralRatioGet200ResponseInner.md | 30 + ...atioGet200ResponseInnerCollateralsInner.md | 31 + ...arginCrossMarginDataGet200ResponseInner.md | 36 + ...MarginDelistScheduleGet200ResponseInner.md | 31 + ...changeSmallLiabilityGet200ResponseInner.md | 33 + ...angeSmallLiabilityHistoryGet200Response.md | 30 + ...LiabilityHistoryGet200ResponseRowsInner.md | 34 + ...MarginForceLiquidationRecGet200Response.md | 30 + ...ceLiquidationRecGet200ResponseRowsInner.md | 38 + ...piV1MarginInterestHistoryGet200Response.md | 30 + ...nInterestHistoryGet200ResponseRowsInner.md | 35 + ...nInterestRateHistoryGet200ResponseInner.md | 32 + ...arginIsolatedAccountLimitGet200Response.md | 30 + ...iV1MarginIsolatedAccountPost200Response.md | 30 + ...rginIsolatedAllPairsGet200ResponseInner.md | 34 + ...inIsolatedMarginDataGet200ResponseInner.md | 32 + ...dMarginDataGet200ResponseInnerDataInner.md | 31 + ...inIsolatedMarginTierGet200ResponseInner.md | 35 + ...arginLeverageBracketGet200ResponseInner.md | 31 + ...BracketGet200ResponseInnerBracketsInner.md | 33 + ...SapiV1MarginMaxBorrowableGet200Response.md | 30 + .../SapiV1MarginMaxLeveragePost200Response.md | 29 + ...piV1MarginMaxTransferableGet200Response.md | 30 + ...xtHourlyInterestRateGet200ResponseInner.md | 30 + ...1MarginOpenOrderListGet200ResponseInner.md | 37 + ...1MarginOpenOrdersDelete200ResponseInner.md | 49 + .../SapiV1MarginOrderListGet200Response.md | 37 + .../SapiV1MarginOrderOcoPost200Response.md | 40 + ...rderOcoPost200ResponseOrderReportsInner.md | 42 + ...arginOrderOcoPost200ResponseOrdersInner.md | 31 + .../docs/SapiV1MarginOrderPost200Response.md | 44 + .../SapiV1MarginPriceIndexGet200Response.md | 31 + ...MarginRateLimitOrderGet200ResponseInner.md | 33 + .../SapiV1MarginTradeCoeffGet200Response.md | 31 + .../SapiV1MarginTransferGet200Response.md | 30 + ...V1MarginTransferGet200ResponseRowsInner.md | 34 + ...HashTransferConfigCancelPost200Response.md | 31 + ...TransferConfigDetailsListGet200Response.md | 31 + ...sferConfigDetailsListGet200ResponseData.md | 31 + ...istGet200ResponseDataConfigDetailsInner.md | 36 + ...MiningHashTransferConfigPost200Response.md | 31 + ...HashTransferProfitDetailsGet200Response.md | 31 + ...TransferProfitDetailsGet200ResponseData.md | 31 + ...0ResponseDataProfitTransferDetailsInner.md | 35 + .../SapiV1MiningPaymentListGet200Response.md | 31 + ...piV1MiningPaymentListGet200ResponseData.md | 31 + ...stGet200ResponseDataAccountProfitsInner.md | 36 + .../SapiV1MiningPaymentOtherGet200Response.md | 31 + ...iV1MiningPaymentOtherGet200ResponseData.md | 31 + ...therGet200ResponseDataOtherProfitsInner.md | 33 + .../SapiV1MiningPaymentUidGet200Response.md | 31 + ...apiV1MiningPaymentUidGet200ResponseData.md | 31 + ...idGet200ResponseDataAccountProfitsInner.md | 34 + .../SapiV1MiningPubAlgoListGet200Response.md | 31 + ...iningPubAlgoListGet200ResponseDataInner.md | 32 + .../SapiV1MiningPubCoinListGet200Response.md | 31 + ...iningPubCoinListGet200ResponseDataInner.md | 33 + ...1MiningStatisticsUserListGet200Response.md | 31 + ...atisticsUserListGet200ResponseDataInner.md | 31 + ...serListGet200ResponseDataInnerListInner.md | 31 + ...iningStatisticsUserStatusGet200Response.md | 31 + ...gStatisticsUserStatusGet200ResponseData.md | 37 + ...UserStatusGet200ResponseDataProfitToday.md | 31 + .../SapiV1MiningWorkerDetailGet200Response.md | 31 + ...ningWorkerDetailGet200ResponseDataInner.md | 31 + ...t200ResponseDataInnerHashrateDatasInner.md | 31 + .../SapiV1MiningWorkerListGet200Response.md | 31 + ...apiV1MiningWorkerListGet200ResponseData.md | 31 + ...rListGet200ResponseDataWorkerDatasInner.md | 35 + .../SapiV1NftHistoryDepositGet200Response.md | 30 + ...ftHistoryDepositGet200ResponseListInner.md | 33 + ...iV1NftHistoryTransactionsGet200Response.md | 30 + ...toryTransactionsGet200ResponseListInner.md | 33 + ...tionsGet200ResponseListInnerTokensInner.md | 31 + .../SapiV1NftHistoryWithdrawGet200Response.md | 30 + ...tHistoryWithdrawGet200ResponseListInner.md | 35 + .../SapiV1NftUserGetAssetGet200Response.md | 30 + ...1NftUserGetAssetGet200ResponseListInner.md | 31 + .../SapiV1PayTransactionsGet200Response.md | 32 + ...1PayTransactionsGet200ResponseDataInner.md | 38 + ...Get200ResponseDataInnerFundsDetailInner.md | 30 + ...actionsGet200ResponseDataInnerPayerInfo.md | 32 + ...ionsGet200ResponseDataInnerReceiverInfo.md | 37 + ...esponseDataInnerReceiverInfoExtendInner.md | 31 + .../SapiV1PortfolioAccountGet200Response.md | 34 + ...folioAssetIndexPriceGet200ResponseInner.md | 31 + ...1PortfolioAutoCollectionPost200Response.md | 29 + ...tfolioCollateralRateGet200ResponseInner.md | 30 + ...folioInterestHistoryGet200ResponseInner.md | 33 + ...oMarginAssetLeverageGet200ResponseInner.md | 30 + .../SapiV1PortfolioPmLoanGet200Response.md | 30 + ...rtfolioRepayFuturesSwitchGet200Response.md | 29 + .../SapiV1PortfolioRepayPost200Response.md | 29 + .../SapiV1RebateTaxQueryGet200Response.md | 32 + .../SapiV1RebateTaxQueryGet200ResponseData.md | 32 + ...bateTaxQueryGet200ResponseDataDataInner.md | 32 + .../SapiV1SimpleEarnAccountGet200Response.md | 34 + ...leHistoryCollateralRecordGet200Response.md | 30 + ...CollateralRecordGet200ResponseRowsInner.md | 35 + ...lexibleHistoryRateHistoryGet200Response.md | 30 + ...storyRateHistoryGet200ResponseRowsInner.md | 32 + ...leHistoryRedemptionRecordGet200Response.md | 30 + ...RedemptionRecordGet200ResponseRowsInner.md | 35 + ...xibleHistoryRewardsRecordGet200Response.md | 30 + ...oryRewardsRecordGet200ResponseRowsInner.md | 33 + ...HistorySubscriptionRecordGet200Response.md | 30 + ...bscriptionRecordGet200ResponseRowsInner.md | 37 + ...iV1SimpleEarnFlexibleListGet200Response.md | 30 + ...EarnFlexibleListGet200ResponseRowsInner.md | 40 + ...sponseRowsInnerTierAnnualPercentageRate.md | 30 + ...FlexiblePersonalLeftQuotaGet200Response.md | 29 + ...impleEarnFlexiblePositionGet200Response.md | 30 + ...FlexiblePositionGet200ResponseRowsInner.md | 42 + ...SimpleEarnFlexibleRedeemPost200Response.md | 30 + ...pleEarnFlexibleSubscribePost200Response.md | 30 + ...exibleSubscriptionPreviewGet200Response.md | 34 + ...edHistoryRedemptionRecordGet200Response.md | 30 + ...RedemptionRecordGet200ResponseRowsInner.md | 37 + ...ockedHistoryRewardsRecordGet200Response.md | 30 + ...oryRewardsRecordGet200ResponseRowsInner.md | 33 + ...HistorySubscriptionRecordGet200Response.md | 30 + ...bscriptionRecordGet200ResponseRowsInner.md | 39 + ...apiV1SimpleEarnLockedListGet200Response.md | 30 + ...leEarnLockedListGet200ResponseRowsInner.md | 31 + ...LockedListGet200ResponseRowsInnerDetail.md | 38 + ...nLockedListGet200ResponseRowsInnerQuota.md | 30 + ...1SimpleEarnLockedPositionGet200Response.md | 30 + ...rnLockedPositionGet200ResponseRowsInner.md | 40 + ...impleEarnLockedSubscribePost200Response.md | 31 + ...dSubscriptionPreviewGet200ResponseInner.md | 38 + ...V1SpotDelistScheduleGet200ResponseInner.md | 30 + ...piV1SubAccountBlvtEnablePost200Response.md | 30 + ...SubAccountEoptionsEnablePost200Response.md | 30 + ...1SubAccountFuturesAccountGet200Response.md | 44 + ...FuturesAccountGet200ResponseAssetsInner.md | 37 + ...ountFuturesAccountSummaryGet200Response.md | 37 + ...ummaryGet200ResponseSubAccountListInner.md | 37 + ...1SubAccountFuturesEnablePost200Response.md | 30 + ...ntFuturesInternalTransferGet200Response.md | 31 + ...nalTransferGet200ResponseTransfersInner.md | 34 + ...tFuturesInternalTransferPost200Response.md | 30 + ...tFuturesPositionRiskGet200ResponseInner.md | 36 + ...ubAccountFuturesTransferPost200Response.md | 29 + .../SapiV1SubAccountListGet200Response.md | 29 + ...countListGet200ResponseSubAccountsInner.md | 33 + ...V1SubAccountMarginAccountGet200Response.md | 35 + ...AccountGet200ResponseMarginTradeCoeffVo.md | 31 + ...countMarginAccountSummaryGet200Response.md | 32 + ...ummaryGet200ResponseSubAccountListInner.md | 32 + ...V1SubAccountMarginEnablePost200Response.md | 30 + ...piV1SubAccountSpotSummaryGet200Response.md | 31 + ...0ResponseSpotSubUserAssetBtcVoListInner.md | 30 + ...piV1SubAccountStatusGet200ResponseInner.md | 35 + ...ubAccountApiIpRestrictionGet200Response.md | 32 + ...ApiIpRestrictionIpListDelete200Response.md | 32 + ...ntSubTransferHistoryGet200ResponseInner.md | 35 + ...ountTransactionStatisticsGet200Response.md | 35 + ...atisticsGet200ResponseTradeInfoVosInner.md | 36 + ...ansferSubUserHistoryGet200ResponseInner.md | 38 + ...untUniversalTransferGet200ResponseInner.md | 38 + ...AccountUniversalTransferPost200Response.md | 30 + ...AccountVirtualSubAccountPost200Response.md | 29 + .../docs/SapiV1SystemStatusGet200Response.md | 30 + ...V1UserDataStreamIsolatedPost200Response.md | 29 + .../SapiV2EthStakingAccountGet200Response.md | 32 + ...EthStakingAccountGet200ResponseHoldings.md | 30 + ...V2EthStakingAccountGet200ResponseProfit.md | 30 + ...SapiV2EthStakingEthStakePost200Response.md | 31 + ...iV2LoanFlexibleAdjustLtvPost200Response.md | 33 + ...LoanFlexibleBorrowHistoryGet200Response.md | 30 + ...bleBorrowHistoryGet200ResponseRowsInner.md | 34 + ...SapiV2LoanFlexibleBorrowPost200Response.md | 33 + ...oanFlexibleCollateralDataGet200Response.md | 30 + ...leCollateralDataGet200ResponseRowsInner.md | 33 + ...2LoanFlexibleLoanableDataGet200Response.md | 30 + ...ibleLoanableDataGet200ResponseRowsInner.md | 32 + ...xibleLtvAdjustmentHistoryGet200Response.md | 30 + ...djustmentHistoryGet200ResponseRowsInner.md | 35 + ...LoanFlexibleOngoingOrdersGet200Response.md | 30 + ...bleOngoingOrdersGet200ResponseRowsInner.md | 33 + ...2LoanFlexibleRepayHistoryGet200Response.md | 30 + ...ibleRepayHistoryGet200ResponseRowsInner.md | 34 + .../SapiV2LoanFlexibleRepayPost200Response.md | 35 + ...2SubAccountFuturesAccountGet200Response.md | 36 + ...ountFuturesAccountSummaryGet200Response.md | 30 + ...ccountFuturesPositionRiskGet200Response.md | 30 + ...bAccountApiIpRestrictionPost200Response.md | 32 + ...V3AssetGetUserAssetPost200ResponseInner.md | 35 + .../SapiV3SubAccountAssetsGet200Response.md | 29 + ...ccountAssetsGet200ResponseBalancesInner.md | 31 + .../SapiV4SubAccountAssetsGet200Response.md | 29 + ...ccountAssetsGet200ResponseBalancesInner.md | 31 + .../python/binance_openapi/docs/SavingsApi.md | 382 + .../binance_openapi/docs/SimpleEarnApi.md | 2146 ++ .../binance_openapi/docs/SnapshotFutures.md | 31 + .../docs/SnapshotFuturesSnapshotVosInner.md | 31 + .../SnapshotFuturesSnapshotVosInnerData.md | 30 + ...tFuturesSnapshotVosInnerDataAssetsInner.md | 31 + ...uturesSnapshotVosInnerDataPositionInner.md | 33 + .../binance_openapi/docs/SnapshotMargin.md | 31 + .../docs/SnapshotMarginSnapshotVosInner.md | 31 + .../SnapshotMarginSnapshotVosInnerData.md | 33 + ...rginSnapshotVosInnerDataUserAssetsInner.md | 34 + .../binance_openapi/docs/SnapshotSpot.md | 31 + .../docs/SnapshotSpotSnapshotVosInner.md | 31 + .../docs/SnapshotSpotSnapshotVosInnerData.md | 30 + ...otSpotSnapshotVosInnerDataBalancesInner.md | 31 + .../binance_openapi/docs/SpotAlgoApi.md | 470 + .../python/binance_openapi/docs/StakingApi.md | 1104 ++ .../python/binance_openapi/docs/StreamApi.md | 244 + .../binance_openapi/docs/SubAccountApi.md | 4143 ++++ .../docs/SubAccountCOINFuturesDetails.md | 35 + ...SubAccountCOINFuturesDetailsAssetsInner.md | 37 + .../docs/SubAccountCOINFuturesPositionRisk.md | 29 + ...ositionRiskDeliveryPositionRiskVosInner.md | 39 + .../docs/SubAccountCOINFuturesSummary.md | 29 + ...uturesSummaryDeliveryAccountSummaryResp.md | 33 + ...ryAccountSummaryRespSubAccountListInner.md | 33 + .../docs/SubAccountUSDTFuturesDetails.md | 29 + ...ountUSDTFuturesDetailsFutureAccountResp.md | 43 + .../docs/SubAccountUSDTFuturesPositionRisk.md | 29 + .../docs/SubAccountUSDTFuturesSummary.md | 29 + ...TFuturesSummaryFutureAccountSummaryResp.md | 37 + ...reAccountSummaryRespSubAccountListInner.md | 37 + target/python/binance_openapi/docs/Ticker.md | 47 + target/python/binance_openapi/docs/Trade.md | 35 + .../python/binance_openapi/docs/TradeApi.md | 2084 ++ .../binance_openapi/docs/Transaction.md | 29 + .../binance_openapi/docs/VIPLoansApi.md | 930 + .../python/binance_openapi/docs/WalletApi.md | 3064 +++ target/python/binance_openapi/git_push.sh | 57 + .../openapi_client/__init__.py | 574 + .../openapi_client/api/__init__.py | 32 + .../openapi_client/api/auto_invest_api.py | 6315 ++++++ .../openapi_client/api/blvt_api.py | 2068 ++ .../openapi_client/api/c2_c_api.py | 425 + .../openapi_client/api/convert_api.py | 3095 +++ .../openapi_client/api/crypto_loans_api.py | 7910 ++++++++ .../openapi_client/api/dual_investment_api.py | 1786 ++ .../openapi_client/api/fiat_api.py | 812 + .../openapi_client/api/futures_algo_api.py | 2291 +++ .../openapi_client/api/futures_api.py | 1148 ++ .../openapi_client/api/gift_card_api.py | 2002 ++ .../api/isolated_margin_stream_api.py | 811 + .../openapi_client/api/margin_api.py | 16131 ++++++++++++++++ .../openapi_client/api/margin_stream_api.py | 811 + .../openapi_client/api/market_api.py | 4462 +++++ .../openapi_client/api/mining_api.py | 4638 +++++ .../openapi_client/api/nft_api.py | 1501 ++ .../openapi_client/api/pay_api.py | 391 + .../api/portfolio_margin_api.py | 3971 ++++ .../openapi_client/api/rebate_api.py | 391 + .../openapi_client/api/savings_api.py | 1501 ++ .../openapi_client/api/simple_earn_api.py | 8341 ++++++++ .../openapi_client/api/spot_algo_api.py | 1820 ++ .../openapi_client/api/staking_api.py | 4206 ++++ .../openapi_client/api/stream_api.py | 811 + .../openapi_client/api/sub_account_api.py | 15968 +++++++++++++++ .../openapi_client/api/trade_api.py | 8688 +++++++++ .../openapi_client/api/vip_loans_api.py | 3585 ++++ .../openapi_client/api/wallet_api.py | 11606 +++++++++++ .../openapi_client/api_client.py | 781 + .../openapi_client/api_response.py | 21 + .../openapi_client/configuration.py | 483 + .../openapi_client/exceptions.py | 199 + .../openapi_client/models/__init__.py | 530 + .../openapi_client/models/account.py | 129 + .../models/account_balances_inner.py | 91 + .../models/account_commission_rates.py | 93 + .../openapi_client/models/agg_trade.py | 101 + ...i_v3_account_commission_get200_response.py | 105 + ...unt_commission_get200_response_discount.py | 93 + ...ion_get200_response_standard_commission.py | 93 + ...mmission_get200_response_tax_commission.py | 93 + ...v3_all_order_list_get200_response_inner.py | 111 + ...list_get200_response_inner_orders_inner.py | 91 + .../api_v3_avg_price_get200_response.py | 91 + .../models/api_v3_depth_get200_response.py | 92 + .../api_v3_exchange_info_get200_response.py | 111 + ..._info_get200_response_rate_limits_inner.py | 93 + ...ange_info_get200_response_symbols_inner.py | 137 + ...00_response_symbols_inner_filters_inner.py | 93 + ...i_v3_klines_get200_response_inner_inner.py | 143 + ...v3_my_allocations_get200_response_inner.py | 113 + ...prevented_matches_get200_response_inner.py | 103 + ...3_open_order_list_get200_response_inner.py | 109 + ...list_get200_response_inner_orders_inner.py | 91 + ...v3_open_orders_delete200_response_inner.py | 134 + ...3_order_cancel_replace_post200_response.py | 101 + ...eplace_post200_response_cancel_response.py | 115 + ...ace_post200_response_new_order_response.py | 118 + .../api_v3_order_list_get200_response.py | 109 + ...order_list_get200_response_orders_inner.py | 91 + .../api_v3_order_oco_post200_response.py | 119 + ...co_post200_response_order_reports_inner.py | 117 + ...order_oco_post200_response_orders_inner.py | 91 + .../models/api_v3_order_post200_response.py | 151 + ..._rate_limit_order_get200_response_inner.py | 95 + .../api_v3_sor_order_post200_response.py | 129 + ..._sor_order_post200_response_fills_inner.py | 99 + .../api_v3_ticker24hr_get200_response.py | 140 + ...i_v3_ticker_book_ticker_get200_response.py | 140 + .../models/api_v3_ticker_get200_response.py | 115 + .../api_v3_ticker_price_get200_response.py | 140 + ...i_v3_ticker_trading_day_get200_response.py | 140 + .../models/api_v3_time_get200_response.py | 87 + ...pi_v3_user_data_stream_post200_response.py | 87 + .../openapi_client/models/bnb_burn_status.py | 89 + .../openapi_client/models/book_ticker.py | 95 + .../models/canceled_margin_order_detail.py | 113 + .../openapi_client/models/day_ticker.py | 115 + .../openapi_client/models/error.py | 89 + .../models/isolated_margin_account_info.py | 101 + ...olated_margin_account_info_assets_inner.py | 117 + ...in_account_info_assets_inner_base_asset.py | 105 + ...n_account_info_assets_inner_quote_asset.py | 105 + .../openapi_client/models/margin_oco_order.py | 121 + .../margin_oco_order_order_reports_inner.py | 113 + .../models/margin_oco_order_orders_inner.py | 91 + .../openapi_client/models/margin_order.py | 109 + .../models/margin_order_detail.py | 121 + .../models/margin_order_response_ack.py | 95 + .../models/margin_order_response_full.py | 125 + .../models/margin_order_response_result.py | 111 + .../openapi_client/models/margin_trade.py | 109 + .../models/margin_transfer_details.py | 97 + .../margin_transfer_details_rows_inner.py | 101 + .../openapi_client/models/my_trade.py | 111 + .../openapi_client/models/oco_order.py | 119 + .../models/oco_order_order_reports_inner.py | 117 + .../openapi_client/models/order.py | 115 + .../openapi_client/models/order_details.py | 129 + .../models/order_response_ack.py | 95 + .../models/order_response_full.py | 129 + .../models/order_response_full_fills_inner.py | 93 + .../models/order_response_result.py | 119 + .../openapi_client/models/price_ticker.py | 89 + .../openapi_client/models/repayment_info.py | 99 + .../openapi_client/models/repayment_info2.py | 91 + ...ccount_api_restrictions_get200_response.py | 109 + ...ount_api_trading_status_get200_response.py | 91 + ...api_trading_status_get200_response_data.py | 103 + ..._status_get200_response_data_indicators.py | 95 + ..._response_data_indicators_btcusdt_inner.py | 93 + ..._get200_response_data_trigger_condition.py | 91 + .../sapi_v1_account_info_get200_response.py | 91 + ...api_v1_account_snapshot_get200_response.py | 151 + .../sapi_v1_account_status_get200_response.py | 87 + ...tures_historical_orders_get200_response.py | 97 + ...cal_orders_get200_response_orders_inner.py | 113 + ...o_futures_new_order_vp_post200_response.py | 93 + ...lgo_futures_open_orders_get200_response.py | 97 + ...pen_orders_get200_response_orders_inner.py | 113 + ...1_algo_futures_order_delete200_response.py | 93 + ...algo_futures_sub_orders_get200_response.py | 101 + ...orders_get200_response_sub_orders_inner.py | 113 + ..._spot_historical_orders_get200_response.py | 97 + ...cal_orders_get200_response_orders_inner.py | 111 + ...go_spot_new_order_twap_post200_response.py | 93 + ...1_algo_spot_open_orders_get200_response.py | 97 + ...pen_orders_get200_response_orders_inner.py | 111 + ...i_v1_algo_spot_order_delete200_response.py | 93 + ...v1_algo_spot_sub_orders_get200_response.py | 101 + ...orders_get200_response_sub_orders_inner.py | 113 + ...i_v1_asset_asset_detail_get200_response.py | 91 + ..._asset_asset_detail_get200_response_ctr.py | 95 + ...v1_asset_asset_dividend_get200_response.py | 97 + ...set_dividend_get200_response_rows_inner.py | 97 + ...asset_convert_transfer_post200_response.py | 89 + ..._transfer_query_by_page_get200_response.py | 97 + ...uery_by_page_get200_response_rows_inner.py | 103 + ...ustody_transfer_history_get200_response.py | 97 + ...sfer_history_get200_response_rows_inner.py | 95 + .../sapi_v1_asset_dribblet_get200_response.py | 97 + ...200_response_user_asset_dribblets_inner.py | 103 + ...inner_user_asset_dribblet_details_inner.py | 97 + ...sapi_v1_asset_dust_btc_post200_response.py | 101 + ...dust_btc_post200_response_details_inner.py | 99 + .../sapi_v1_asset_dust_post200_response.py | 99 + ..._post200_response_transfer_result_inner.py | 97 + ...et_funding_asset_post200_response_inner.py | 97 + ...ud_mining_query_by_page_get200_response.py | 97 + ...uery_by_page_get200_response_rows_inner.py | 97 + ...1_asset_trade_fee_get200_response_inner.py | 91 + .../sapi_v1_asset_transfer_get200_response.py | 97 + ...set_transfer_get200_response_rows_inner.py | 97 + ...sapi_v1_asset_transfer_post200_response.py | 87 + ...et_wallet_balance_get200_response_inner.py | 91 + .../sapi_v1_blvt_redeem_post200_response.py | 97 + ...lvt_redeem_record_get200_response_inner.py | 99 + ...sapi_v1_blvt_subscribe_post200_response.py | 97 + ...1_blvt_subscribe_record_get200_response.py | 99 + ...1_blvt_token_info_get200_response_inner.py | 123 + ...00_response_inner_current_baskets_inner.py | 91 + ...1_blvt_user_limit_get200_response_inner.py | 91 + ...list_user_order_history_get200_response.py | 103 + ...rder_history_get200_response_data_inner.py | 113 + ...tal_config_getall_get200_response_inner.py | 121 + ...et200_response_inner_network_list_inner.py | 121 + ...tract_convertible_coins_get200_response.py | 95 + ...le_coins_get200_response_exchange_rates.py | 91 + ...capital_deposit_address_get200_response.py | 93 + ...osit_address_list_get200_response_inner.py | 91 + ...l_deposit_credit_apply_post200_response.py | 93 + ...al_deposit_hisrec_get200_response_inner.py | 107 + ...tal_deposit_sub_address_get200_response.py | 93 + ...eposit_sub_hisrec_get200_response_inner.py | 105 + ...draw_address_list_get200_response_inner.py | 101 + ...capital_withdraw_apply_post200_response.py | 87 + ..._withdraw_history_get200_response_inner.py | 111 + ...1_convert_accept_quote_post200_response.py | 91 + ...onvert_asset_info_get200_response_inner.py | 89 + ...ert_exchange_info_get200_response_inner.py | 97 + ...i_v1_convert_get_quote_post200_response.py | 97 + ...ert_limit_cancel_order_post200_response.py | 89 + ...vert_limit_place_order_post200_response.py | 89 + ...limit_query_open_orders_get200_response.py | 95 + ..._open_orders_get200_response_list_inner.py | 107 + ...v1_convert_order_status_get200_response.py | 103 + ...i_v1_convert_trade_flow_get200_response.py | 103 + ...t_trade_flow_get200_response_list_inner.py | 105 + ...v1_dci_product_accounts_get200_response.py | 89 + ...o_compound_edit_status_post200_response.py | 89 + ...api_v1_dci_product_list_get200_response.py | 97 + ...product_list_get200_response_list_inner.py | 119 + ...1_dci_product_positions_get200_response.py | 97 + ...ct_positions_get200_response_list_inner.py | 111 + ..._dci_product_subscribe_post200_response.py | 111 + ...th_history_rate_history_get200_response.py | 97 + ...rate_history_get200_response_rows_inner.py | 91 + ...tory_redemption_history_get200_response.py | 97 + ...tion_history_get200_response_rows_inner.py | 101 + ...history_rewards_history_get200_response.py | 97 + ...ards_history_get200_response_rows_inner.py | 97 + ...history_staking_history_get200_response.py | 97 + ...king_history_get200_response_rows_inner.py | 97 + ...y_wbeth_rewards_history_get200_response.py | 99 + ...ards_history_get200_response_rows_inner.py | 95 + ...1_eth_staking_eth_quota_get200_response.py | 89 + ...eth_staking_eth_redeem_post200_response.py | 93 + ..._history_unwrap_history_get200_response.py | 97 + ...wrap_history_get200_response_rows_inner.py | 99 + ...th_history_wrap_history_get200_response.py | 97 + ...wrap_history_get200_response_rows_inner.py | 99 + ...eth_staking_wbeth_wrap_post200_response.py | 91 + .../sapi_v1_fiat_orders_get200_response.py | 103 + ..._fiat_orders_get200_response_data_inner.py | 103 + .../sapi_v1_fiat_payments_get200_response.py | 103 + ...iat_payments_get200_response_data_inner.py | 105 + ..._futures_hist_data_link_get200_response.py | 95 + ...st_data_link_get200_response_data_inner.py | 89 + ...api_v1_futures_transfer_get200_response.py | 97 + ...res_transfer_get200_response_rows_inner.py | 97 + ...rd_buy_code_token_limit_get200_response.py | 97 + ...y_code_token_limit_get200_response_data.py | 91 + ...1_giftcard_create_code_post200_response.py | 97 + ...tcard_create_code_post200_response_data.py | 91 + ...tography_rsa_public_key_get200_response.py | 93 + ...1_giftcard_redeem_code_post200_response.py | 97 + ...tcard_redeem_code_post200_response_data.py | 93 + ...sapi_v1_giftcard_verify_get200_response.py | 97 + ...v1_giftcard_verify_get200_response_data.py | 91 + ...g_auto_invest_all_asset_get200_response.py | 89 + ...vest_history_list_get200_response_inner.py | 121 + ..._auto_invest_index_info_get200_response.py | 101 + ..._get200_response_asset_allocation_inner.py | 89 + ...vest_index_user_summary_get200_response.py | 115 + ..._get200_response_asset_allocation_inner.py | 89 + ...r_summary_get200_response_details_inner.py | 107 + ...ng_auto_invest_one_off_post200_response.py | 89 + ...st_one_off_post_details_parameter_inner.py | 89 + ...o_invest_one_off_status_get200_response.py | 89 + ...g_auto_invest_plan_add_post200_response.py | 89 + ...t_plan_add_post_details_parameter_inner.py | 89 + ...nvest_plan_edit_status_post200_response.py | 91 + ...ing_auto_invest_plan_id_get200_response.py | 103 + ...vest_plan_id_get200_response_plan_inner.py | 123 + ...et200_response_plan_inner_details_inner.py | 113 + ...g_auto_invest_plan_list_get200_response.py | 103 + ...st_plan_list_get200_response_plan_inner.py | 129 + ...rebalance_history_get200_response_inner.py | 107 + ...esponse_inner_transaction_details_inner.py | 93 + ...st_redeem_history_get200_response_inner.py | 103 + ...ing_auto_invest_redeem_post200_response.py | 87 + ...nvest_source_asset_list_get200_response.py | 97 + ...ist_get200_response_source_assets_inner.py | 95 + ...nvest_target_asset_list_get200_response.py | 97 + ...0_response_auto_invest_asset_list_inner.py | 97 + ...inner_roi_and_dimension_type_list_inner.py | 91 + ...et_asset_roi_list_get200_response_inner.py | 89 + ...tomized_fixed_purchase_post200_response.py | 87 + ...nding_position_changed_post200_response.py | 91 + ...ding_project_list_get200_response_inner.py | 117 + ...ect_position_list_get200_response_inner.py | 120 + ...api_v1_loan_adjust_ltv_post200_response.py | 95 + ..._v1_loan_borrow_history_get200_response.py | 97 + ...rrow_history_get200_response_rows_inner.py | 103 + .../sapi_v1_loan_borrow_post200_response.py | 97 + ...v1_loan_collateral_data_get200_response.py | 97 + ...lateral_data_get200_response_rows_inner.py | 97 + ..._customize_margin_call_post200_response.py | 97 + ...margin_call_post200_response_rows_inner.py | 95 + ...pi_v1_loan_income_get200_response_inner.py | 95 + ...i_v1_loan_loanable_data_get200_response.py | 97 + ...oanable_data_get200_response_rows_inner.py | 113 + ..._ltv_adjustment_history_get200_response.py | 97 + ...ment_history_get200_response_rows_inner.py | 101 + ..._v1_loan_ongoing_orders_get200_response.py | 97 + ...going_orders_get200_response_rows_inner.py | 101 + ...n_repay_collateral_rate_get200_response.py | 93 + ...i_v1_loan_repay_history_get200_response.py | 97 + ...epay_history_get200_response_rows_inner.py | 103 + .../sapi_v1_loan_repay_post200_response.py | 137 + ...api_v1_loan_vip_borrow_post200_response.py | 101 + ..._vip_collateral_account_get200_response.py | 97 + ...eral_account_get200_response_rows_inner.py | 91 + ...oan_vip_collateral_data_get200_response.py | 97 + ...lateral_data_get200_response_rows_inner.py | 103 + ..._loan_vip_loanable_data_get200_response.py | 97 + ...oanable_data_get200_response_rows_inner.py | 105 + ...loan_vip_ongoing_orders_get200_response.py | 97 + ...going_orders_get200_response_rows_inner.py | 113 + ...sapi_v1_loan_vip_renew_post200_response.py | 97 + ..._loan_vip_repay_history_get200_response.py | 97 + ...epay_history_get200_response_rows_inner.py | 97 + ...sapi_v1_loan_vip_repay_post200_response.py | 99 + ...1_loan_vip_request_data_get200_response.py | 97 + ...request_data_get200_response_rows_inner.py | 103 + ...est_interest_rate_get200_response_inner.py | 93 + ...ccount_account_snapshot_get200_response.py | 99 + ...shot_get200_response_snapshot_vos_inner.py | 95 + ...get200_response_snapshot_vos_inner_data.py | 97 + ..._snapshot_vos_inner_data_balances_inner.py | 91 + ..._subaccount_asset_get200_response_inner.py | 97 + ...account_deposit_address_get200_response.py | 93 + ...ged_subaccount_deposit_post200_response.py | 87 + ...ount_fetch_future_asset_get200_response.py | 99 + ...sset_get200_response_snapshot_vos_inner.py | 95 + ...get200_response_snapshot_vos_inner_data.py | 105 + ...se_snapshot_vos_inner_data_assets_inner.py | 91 + ..._snapshot_vos_inner_data_position_inner.py | 93 + ...managed_subaccount_info_get200_response.py | 97 + ...nse_manager_sub_user_info_vo_list_inner.py | 107 + ...subaccount_margin_asset_get200_response.py | 103 + ...asset_get200_response_user_assets_inner.py | 97 + ..._trans_log_for_investor_get200_response.py | 97 + ..._manager_sub_transfer_history_vos_inner.py | 105 + ...account_query_trans_log_get200_response.py | 97 + ..._manager_sub_transfer_history_vos_inner.py | 105 + .../sapi_v1_margin_account_get200_response.py | 109 + ...count_get200_response_user_assets_inner.py | 97 + ...margin_all_assets_get200_response_inner.py | 97 + ..._margin_all_pairs_get200_response_inner.py | 99 + ...gin_available_inventory_get200_response.py | 93 + ...ilable_inventory_get200_response_assets.py | 93 + ..._v1_margin_borrow_repay_get200_response.py | 97 + ...borrow_repay_get200_response_rows_inner.py | 101 + ...v1_margin_borrow_repay_post200_response.py | 87 + ...rgin_capital_flow_get200_response_inner.py | 99 + ..._collateral_ratio_get200_response_inner.py | 97 + ...get200_response_inner_collaterals_inner.py | 91 + ...cross_margin_data_get200_response_inner.py | 101 + ...n_delist_schedule_get200_response_inner.py | 91 + ...e_small_liability_get200_response_inner.py | 95 + ...small_liability_history_get200_response.py | 97 + ...lity_history_get200_response_rows_inner.py | 97 + ...n_force_liquidation_rec_get200_response.py | 97 + ...uidation_rec_get200_response_rows_inner.py | 105 + ...margin_interest_history_get200_response.py | 97 + ...rest_history_get200_response_rows_inner.py | 99 + ...rest_rate_history_get200_response_inner.py | 93 + ..._isolated_account_limit_get200_response.py | 89 + ...argin_isolated_account_post200_response.py | 89 + ...solated_all_pairs_get200_response_inner.py | 97 + ...lated_margin_data_get200_response_inner.py | 101 + ...n_data_get200_response_inner_data_inner.py | 91 + ...lated_margin_tier_get200_response_inner.py | 99 + ..._leverage_bracket_get200_response_inner.py | 99 + ...et_get200_response_inner_brackets_inner.py | 95 + ...1_margin_max_borrowable_get200_response.py | 89 + ...v1_margin_max_leverage_post200_response.py | 87 + ...margin_max_transferable_get200_response.py | 89 + ...rly_interest_rate_get200_response_inner.py | 89 + ...n_open_order_list_get200_response_inner.py | 111 + ...in_open_orders_delete200_response_inner.py | 134 + ...pi_v1_margin_order_list_get200_response.py | 111 + ...pi_v1_margin_order_oco_post200_response.py | 125 + ...co_post200_response_order_reports_inner.py | 113 + ...order_oco_post200_response_orders_inner.py | 91 + .../sapi_v1_margin_order_post200_response.py | 151 + ...i_v1_margin_price_index_get200_response.py | 91 + ..._rate_limit_order_get200_response_inner.py | 95 + ...i_v1_margin_trade_coeff_get200_response.py | 91 + ...sapi_v1_margin_transfer_get200_response.py | 97 + ...gin_transfer_get200_response_rows_inner.py | 97 + ...transfer_config_cancel_post200_response.py | 91 + ...fer_config_details_list_get200_response.py | 95 + ...onfig_details_list_get200_response_data.py | 99 + ...t200_response_data_config_details_inner.py | 101 + ...g_hash_transfer_config_post200_response.py | 91 + ...transfer_profit_details_get200_response.py | 95 + ...fer_profit_details_get200_response_data.py | 99 + ...onse_data_profit_transfer_details_inner.py | 99 + ..._v1_mining_payment_list_get200_response.py | 95 + ...ining_payment_list_get200_response_data.py | 99 + ...200_response_data_account_profits_inner.py | 101 + ...v1_mining_payment_other_get200_response.py | 95 + ...ning_payment_other_get200_response_data.py | 99 + ...et200_response_data_other_profits_inner.py | 95 + ...i_v1_mining_payment_uid_get200_response.py | 95 + ...mining_payment_uid_get200_response_data.py | 99 + ...200_response_data_account_profits_inner.py | 97 + ...v1_mining_pub_algo_list_get200_response.py | 99 + ...ub_algo_list_get200_response_data_inner.py | 93 + ...v1_mining_pub_coin_list_get200_response.py | 99 + ...ub_coin_list_get200_response_data_inner.py | 95 + ...ng_statistics_user_list_get200_response.py | 99 + ...cs_user_list_get200_response_data_inner.py | 99 + ...t_get200_response_data_inner_list_inner.py | 91 + ..._statistics_user_status_get200_response.py | 95 + ...istics_user_status_get200_response_data.py | 110 + ...tatus_get200_response_data_profit_today.py | 91 + ...v1_mining_worker_detail_get200_response.py | 99 + ...orker_detail_get200_response_data_inner.py | 99 + ...esponse_data_inner_hashrate_datas_inner.py | 91 + ...i_v1_mining_worker_list_get200_response.py | 95 + ...mining_worker_list_get200_response_data.py | 99 + ...get200_response_data_worker_datas_inner.py | 99 + ..._v1_nft_history_deposit_get200_response.py | 97 + ...tory_deposit_get200_response_list_inner.py | 100 + ...ft_history_transactions_get200_response.py | 97 + ...transactions_get200_response_list_inner.py | 103 + ...get200_response_list_inner_tokens_inner.py | 91 + ...v1_nft_history_withdraw_get200_response.py | 97 + ...ory_withdraw_get200_response_list_inner.py | 99 + ...i_v1_nft_user_get_asset_get200_response.py | 97 + ...er_get_asset_get200_response_list_inner.py | 91 + ...api_v1_pay_transactions_get200_response.py | 101 + ...transactions_get200_response_data_inner.py | 121 + ..._response_data_inner_funds_detail_inner.py | 89 + ...s_get200_response_data_inner_payer_info.py | 93 + ...et200_response_data_inner_receiver_info.py | 111 + ...e_data_inner_receiver_info_extend_inner.py | 91 + ...pi_v1_portfolio_account_get200_response.py | 97 + ...asset_index_price_get200_response_inner.py | 91 + ...tfolio_auto_collection_post200_response.py | 87 + ...o_collateral_rate_get200_response_inner.py | 89 + ..._interest_history_get200_response_inner.py | 95 + ...in_asset_leverage_get200_response_inner.py | 89 + ...pi_v1_portfolio_pm_loan_get200_response.py | 89 + ...io_repay_futures_switch_get200_response.py | 87 + ...api_v1_portfolio_repay_post200_response.py | 87 + ...api_v1_rebate_tax_query_get200_response.py | 97 + ...1_rebate_tax_query_get200_response_data.py | 101 + ...x_query_get200_response_data_data_inner.py | 93 + ..._v1_simple_earn_account_get200_response.py | 97 + ...story_collateral_record_get200_response.py | 97 + ...teral_record_get200_response_rows_inner.py | 99 + ...le_history_rate_history_get200_response.py | 97 + ...rate_history_get200_response_rows_inner.py | 93 + ...story_redemption_record_get200_response.py | 97 + ...ption_record_get200_response_rows_inner.py | 99 + ..._history_rewards_record_get200_response.py | 97 + ...wards_record_get200_response_rows_inner.py | 95 + ...ory_subscription_record_get200_response.py | 97 + ...ption_record_get200_response_rows_inner.py | 103 + ...mple_earn_flexible_list_get200_response.py | 97 + ...lexible_list_get200_response_rows_inner.py | 113 + ..._rows_inner_tier_annual_percentage_rate.py | 89 + ...ble_personal_left_quota_get200_response.py | 87 + ..._earn_flexible_position_get200_response.py | 97 + ...ble_position_get200_response_rows_inner.py | 117 + ...e_earn_flexible_redeem_post200_response.py | 89 + ...arn_flexible_subscribe_post200_response.py | 89 + ...le_subscription_preview_get200_response.py | 97 + ...story_redemption_record_get200_response.py | 97 + ...ption_record_get200_response_rows_inner.py | 103 + ..._history_rewards_record_get200_response.py | 97 + ...wards_record_get200_response_rows_inner.py | 95 + ...ory_subscription_record_get200_response.py | 97 + ...ption_record_get200_response_rows_inner.py | 107 + ...simple_earn_locked_list_get200_response.py | 97 + ..._locked_list_get200_response_rows_inner.py | 99 + ..._list_get200_response_rows_inner_detail.py | 105 + ...d_list_get200_response_rows_inner_quota.py | 89 + ...le_earn_locked_position_get200_response.py | 97 + ...ked_position_get200_response_rows_inner.py | 109 + ..._earn_locked_subscribe_post200_response.py | 91 + ...scription_preview_get200_response_inner.py | 105 + ...t_delist_schedule_get200_response_inner.py | 89 + ...ub_account_blvt_enable_post200_response.py | 89 + ...ccount_eoptions_enable_post200_response.py | 89 + ...account_futures_account_get200_response.py | 125 + ...es_account_get200_response_assets_inner.py | 103 + ...futures_account_summary_get200_response.py | 111 + ..._get200_response_sub_account_list_inner.py | 103 + ...account_futures_enable_post200_response.py | 89 + ...tures_internal_transfer_get200_response.py | 99 + ...ransfer_get200_response_transfers_inner.py | 97 + ...ures_internal_transfer_post200_response.py | 89 + ...res_position_risk_get200_response_inner.py | 101 + ...count_futures_transfer_post200_response.py | 87 + ...api_v1_sub_account_list_get200_response.py | 95 + ...list_get200_response_sub_accounts_inner.py | 95 + ..._account_margin_account_get200_response.py | 111 + ...t_get200_response_margin_trade_coeff_vo.py | 91 + ..._margin_account_summary_get200_response.py | 101 + ..._get200_response_sub_account_list_inner.py | 93 + ..._account_margin_enable_post200_response.py | 89 + ...ub_account_spot_summary_get200_response.py | 99 + ...e_spot_sub_user_asset_btc_vo_list_inner.py | 89 + ...ub_account_status_get200_response_inner.py | 99 + ...ount_api_ip_restriction_get200_response.py | 93 + ..._restriction_ip_list_delete200_response.py | 93 + ..._transfer_history_get200_response_inner.py | 99 + ..._transaction_statistics_get200_response.py | 107 + ...cs_get200_response_trade_info_vos_inner.py | 101 + ..._sub_user_history_get200_response_inner.py | 105 + ...niversal_transfer_get200_response_inner.py | 105 + ...unt_universal_transfer_post200_response.py | 89 + ...nt_virtual_sub_account_post200_response.py | 87 + .../sapi_v1_system_status_get200_response.py | 89 + ...r_data_stream_isolated_post200_response.py | 87 + ..._v2_eth_staking_account_get200_response.py | 101 + ...taking_account_get200_response_holdings.py | 89 + ..._staking_account_get200_response_profit.py | 89 + ..._eth_staking_eth_stake_post200_response.py | 91 + ...an_flexible_adjust_ltv_post200_response.py | 95 + ...flexible_borrow_history_get200_response.py | 97 + ...rrow_history_get200_response_rows_inner.py | 97 + ...2_loan_flexible_borrow_post200_response.py | 95 + ...lexible_collateral_data_get200_response.py | 97 + ...lateral_data_get200_response_rows_inner.py | 95 + ..._flexible_loanable_data_get200_response.py | 97 + ...oanable_data_get200_response_rows_inner.py | 93 + ..._ltv_adjustment_history_get200_response.py | 97 + ...ment_history_get200_response_rows_inner.py | 99 + ...flexible_ongoing_orders_get200_response.py | 97 + ...going_orders_get200_response_rows_inner.py | 95 + ..._flexible_repay_history_get200_response.py | 97 + ...epay_history_get200_response_rows_inner.py | 97 + ...v2_loan_flexible_repay_post200_response.py | 99 + ...account_futures_account_get200_response.py | 137 + ...futures_account_summary_get200_response.py | 137 + ...t_futures_position_risk_get200_response.py | 137 + ...unt_api_ip_restriction_post200_response.py | 93 + ...t_get_user_asset_post200_response_inner.py | 99 + ...i_v3_sub_account_assets_get200_response.py | 95 + ...t_assets_get200_response_balances_inner.py | 91 + ...i_v4_sub_account_assets_get200_response.py | 95 + ...t_assets_get200_response_balances_inner.py | 91 + .../openapi_client/models/snapshot_futures.py | 99 + .../snapshot_futures_snapshot_vos_inner.py | 95 + ...napshot_futures_snapshot_vos_inner_data.py | 105 + ...es_snapshot_vos_inner_data_assets_inner.py | 91 + ..._snapshot_vos_inner_data_position_inner.py | 95 + .../openapi_client/models/snapshot_margin.py | 99 + .../snapshot_margin_snapshot_vos_inner.py | 95 + ...snapshot_margin_snapshot_vos_inner_data.py | 103 + ...apshot_vos_inner_data_user_assets_inner.py | 97 + .../openapi_client/models/snapshot_spot.py | 99 + .../snapshot_spot_snapshot_vos_inner.py | 95 + .../snapshot_spot_snapshot_vos_inner_data.py | 97 + ..._snapshot_vos_inner_data_balances_inner.py | 91 + .../sub_account_coin_futures_details.py | 107 + ...count_coin_futures_details_assets_inner.py | 103 + .../sub_account_coin_futures_position_risk.py | 95 + ...n_risk_delivery_position_risk_vos_inner.py | 107 + .../sub_account_coin_futures_summary.py | 91 + ...s_summary_delivery_account_summary_resp.py | 103 + ...unt_summary_resp_sub_account_list_inner.py | 95 + .../sub_account_usdt_futures_details.py | 91 + ...sdt_futures_details_future_account_resp.py | 123 + .../sub_account_usdt_futures_position_risk.py | 95 + .../sub_account_usdt_futures_summary.py | 91 + ...res_summary_future_account_summary_resp.py | 111 + ...unt_summary_resp_sub_account_list_inner.py | 103 + .../openapi_client/models/ticker.py | 123 + .../openapi_client/models/trade.py | 99 + .../openapi_client/models/transaction.py | 87 + .../binance_openapi/openapi_client/py.typed | 0 .../binance_openapi/openapi_client/rest.py | 257 + target/python/binance_openapi/pyproject.toml | 71 + .../python/binance_openapi/requirements.txt | 5 + target/python/binance_openapi/setup.cfg | 2 + target/python/binance_openapi/setup.py | 49 + .../binance_openapi/test-requirements.txt | 5 + .../python/binance_openapi/test/__init__.py | 0 .../binance_openapi/test/test_account.py | 104 + .../test/test_account_balances_inner.py | 56 + .../test/test_account_commission_rates.py | 58 + .../binance_openapi/test/test_agg_trade.py | 66 + ...i_v3_account_commission_get200_response.py | 82 + ...unt_commission_get200_response_discount.py | 54 + ...ion_get200_response_standard_commission.py | 58 + ...mmission_get200_response_tax_commission.py | 58 + ...v3_all_order_list_get200_response_inner.py | 72 + ...list_get200_response_inner_orders_inner.py | 56 + .../test_api_v3_avg_price_get200_response.py | 56 + .../test/test_api_v3_depth_get200_response.py | 72 + ...st_api_v3_exchange_info_get200_response.py | 156 + ..._info_get200_response_rate_limits_inner.py | 58 + ...ange_info_get200_response_symbols_inner.py | 126 + ...00_response_symbols_inner_filters_inner.py | 58 + ...i_v3_klines_get200_response_inner_inner.py | 50 + ...v3_my_allocations_get200_response_inner.py | 78 + ...prevented_matches_get200_response_inner.py | 68 + ...3_open_order_list_get200_response_inner.py | 70 + ...list_get200_response_inner_orders_inner.py | 56 + ...v3_open_orders_delete200_response_inner.py | 94 + ...3_order_cancel_replace_post200_response.py | 124 + ...eplace_post200_response_cancel_response.py | 79 + ...ace_post200_response_new_order_response.py | 86 + .../test_api_v3_order_list_get200_response.py | 70 + ...order_list_get200_response_orders_inner.py | 56 + .../test_api_v3_order_oco_post200_response.py | 72 + ...co_post200_response_order_reports_inner.py | 82 + ...order_oco_post200_response_orders_inner.py | 56 + .../test_api_v3_order_post200_response.py | 96 + ..._rate_limit_order_get200_response_inner.py | 59 + .../test_api_v3_sor_order_post200_response.py | 104 + ..._sor_order_post200_response_fills_inner.py | 64 + .../test_api_v3_ticker24hr_get200_response.py | 88 + ...i_v3_ticker_book_ticker_get200_response.py | 60 + .../test_api_v3_ticker_get200_response.py | 80 + ...est_api_v3_ticker_price_get200_response.py | 54 + ...i_v3_ticker_trading_day_get200_response.py | 80 + .../test/test_api_v3_time_get200_response.py | 52 + ...pi_v3_user_data_stream_post200_response.py | 52 + .../test/test_auto_invest_api.py | 150 + .../binance_openapi/test/test_blvt_api.py | 73 + .../test/test_bnb_burn_status.py | 54 + .../binance_openapi/test/test_book_ticker.py | 60 + .../binance_openapi/test/test_c2_c_api.py | 38 + .../test/test_canceled_margin_order_detail.py | 78 + .../binance_openapi/test/test_convert_api.py | 94 + .../test/test_crypto_loans_api.py | 178 + .../binance_openapi/test/test_day_ticker.py | 80 + .../test/test_dual_investment_api.py | 66 + .../python/binance_openapi/test/test_error.py | 54 + .../binance_openapi/test/test_fiat_api.py | 45 + .../test/test_futures_algo_api.py | 73 + .../binance_openapi/test/test_futures_api.py | 52 + .../test/test_gift_card_api.py | 73 + .../test/test_isolated_margin_account_info.py | 126 + ...olated_margin_account_info_assets_inner.py | 114 + ...in_account_info_assets_inner_base_asset.py | 70 + ...n_account_info_assets_inner_quote_asset.py | 70 + .../test/test_isolated_margin_stream_api.py | 52 + .../binance_openapi/test/test_margin_api.py | 353 + .../test/test_margin_oco_order.py | 78 + ...st_margin_oco_order_order_reports_inner.py | 78 + .../test_margin_oco_order_orders_inner.py | 56 + .../binance_openapi/test/test_margin_order.py | 74 + .../test/test_margin_order_detail.py | 86 + .../test/test_margin_order_response_ack.py | 60 + .../test/test_margin_order_response_full.py | 94 + .../test/test_margin_order_response_result.py | 76 + .../test/test_margin_stream_api.py | 52 + .../binance_openapi/test/test_margin_trade.py | 74 + .../test/test_margin_transfer_details.py | 74 + ...test_margin_transfer_details_rows_inner.py | 65 + .../binance_openapi/test/test_market_api.py | 136 + .../binance_openapi/test/test_mining_api.py | 122 + .../binance_openapi/test/test_my_trade.py | 76 + .../binance_openapi/test/test_nft_api.py | 59 + .../binance_openapi/test/test_oco_order.py | 68 + .../test_oco_order_order_reports_inner.py | 82 + .../python/binance_openapi/test/test_order.py | 80 + .../test/test_order_details.py | 92 + .../test/test_order_response_ack.py | 60 + .../test/test_order_response_full.py | 96 + .../test_order_response_full_fills_inner.py | 58 + .../test/test_order_response_result.py | 82 + .../binance_openapi/test/test_pay_api.py | 38 + .../test/test_portfolio_margin_api.py | 122 + .../binance_openapi/test/test_price_ticker.py | 54 + .../binance_openapi/test/test_rebate_api.py | 38 + .../test/test_repayment_info.py | 64 + .../test/test_repayment_info2.py | 56 + ...ccount_api_restrictions_get200_response.py | 73 + ...ount_api_trading_status_get200_response.py | 82 + ...api_trading_status_get200_response_data.py | 80 + ..._status_get200_response_data_indicators.py | 64 + ..._response_data_indicators_btcusdt_inner.py | 58 + ..._get200_response_data_trigger_condition.py | 56 + ...st_sapi_v1_account_info_get200_response.py | 56 + ...api_v1_account_snapshot_get200_response.py | 94 + ..._sapi_v1_account_status_get200_response.py | 52 + ...tures_historical_orders_get200_response.py | 86 + ...cal_orders_get200_response_orders_inner.py | 78 + ...o_futures_new_order_vp_post200_response.py | 58 + ...lgo_futures_open_orders_get200_response.py | 69 + ...pen_orders_get200_response_orders_inner.py | 78 + ...1_algo_futures_order_delete200_response.py | 58 + ...algo_futures_sub_orders_get200_response.py | 90 + ...orders_get200_response_sub_orders_inner.py | 77 + ..._spot_historical_orders_get200_response.py | 84 + ...cal_orders_get200_response_orders_inner.py | 76 + ...go_spot_new_order_twap_post200_response.py | 58 + ...1_algo_spot_open_orders_get200_response.py | 84 + ...pen_orders_get200_response_orders_inner.py | 76 + ...i_v1_algo_spot_order_delete200_response.py | 58 + ...v1_algo_spot_sub_orders_get200_response.py | 90 + ...orders_get200_response_sub_orders_inner.py | 78 + ...i_v1_asset_asset_detail_get200_response.py | 62 + ..._asset_asset_detail_get200_response_ctr.py | 60 + ...v1_asset_asset_dividend_get200_response.py | 70 + ...set_dividend_get200_response_rows_inner.py | 62 + ...asset_convert_transfer_post200_response.py | 54 + ..._transfer_query_by_page_get200_response.py | 76 + ...uery_by_page_get200_response_rows_inner.py | 68 + ...ustody_transfer_history_get200_response.py | 68 + ...sfer_history_get200_response_rows_inner.py | 60 + ..._sapi_v1_asset_dribblet_get200_response.py | 84 + ...200_response_user_asset_dribblets_inner.py | 76 + ...inner_user_asset_dribblet_details_inner.py | 62 + ...sapi_v1_asset_dust_btc_post200_response.py | 76 + ...dust_btc_post200_response_details_inner.py | 64 + ...est_sapi_v1_asset_dust_post200_response.py | 72 + ..._post200_response_transfer_result_inner.py | 62 + ...et_funding_asset_post200_response_inner.py | 62 + ...ud_mining_query_by_page_get200_response.py | 70 + ...uery_by_page_get200_response_rows_inner.py | 62 + ...1_asset_trade_fee_get200_response_inner.py | 56 + ..._sapi_v1_asset_transfer_get200_response.py | 70 + ...set_transfer_get200_response_rows_inner.py | 62 + ...sapi_v1_asset_transfer_post200_response.py | 52 + ...et_wallet_balance_get200_response_inner.py | 56 + ...st_sapi_v1_blvt_redeem_post200_response.py | 62 + ...lvt_redeem_record_get200_response_inner.py | 64 + ...sapi_v1_blvt_subscribe_post200_response.py | 62 + ...1_blvt_subscribe_record_get200_response.py | 64 + ...1_blvt_token_info_get200_response_inner.py | 90 + ...00_response_inner_current_baskets_inner.py | 56 + ...1_blvt_user_limit_get200_response_inner.py | 56 + ...list_user_order_history_get200_response.py | 92 + ...rder_history_get200_response_data_inner.py | 78 + ...tal_config_getall_get200_response_inner.py | 118 + ...et200_response_inner_network_list_inner.py | 86 + ...tract_convertible_coins_get200_response.py | 66 + ...le_coins_get200_response_exchange_rates.py | 56 + ...capital_deposit_address_get200_response.py | 58 + ...osit_address_list_get200_response_inner.py | 56 + ...l_deposit_credit_apply_post200_response.py | 58 + ...al_deposit_hisrec_get200_response_inner.py | 72 + ...tal_deposit_sub_address_get200_response.py | 58 + ...eposit_sub_hisrec_get200_response_inner.py | 70 + ...draw_address_list_get200_response_inner.py | 66 + ...capital_withdraw_apply_post200_response.py | 52 + ..._withdraw_history_get200_response_inner.py | 74 + ...1_convert_accept_quote_post200_response.py | 56 + ...onvert_asset_info_get200_response_inner.py | 54 + ...ert_exchange_info_get200_response_inner.py | 62 + ...i_v1_convert_get_quote_post200_response.py | 62 + ...ert_limit_cancel_order_post200_response.py | 54 + ...vert_limit_place_order_post200_response.py | 54 + ...limit_query_open_orders_get200_response.py | 78 + ..._open_orders_get200_response_list_inner.py | 72 + ...v1_convert_order_status_get200_response.py | 68 + ...i_v1_convert_trade_flow_get200_response.py | 84 + ...t_trade_flow_get200_response_list_inner.py | 70 + ...v1_dci_product_accounts_get200_response.py | 54 + ...o_compound_edit_status_post200_response.py | 54 + ...api_v1_dci_product_list_get200_response.py | 92 + ...product_list_get200_response_list_inner.py | 84 + ...1_dci_product_positions_get200_response.py | 84 + ...ct_positions_get200_response_list_inner.py | 76 + ..._dci_product_subscribe_post200_response.py | 75 + ...th_history_rate_history_get200_response.py | 64 + ...rate_history_get200_response_rows_inner.py | 56 + ...tory_redemption_history_get200_response.py | 74 + ...tion_history_get200_response_rows_inner.py | 66 + ...history_rewards_history_get200_response.py | 70 + ...ards_history_get200_response_rows_inner.py | 62 + ...history_staking_history_get200_response.py | 70 + ...king_history_get200_response_rows_inner.py | 62 + ...y_wbeth_rewards_history_get200_response.py | 70 + ...ards_history_get200_response_rows_inner.py | 60 + ...1_eth_staking_eth_quota_get200_response.py | 54 + ...eth_staking_eth_redeem_post200_response.py | 58 + ..._history_unwrap_history_get200_response.py | 72 + ...wrap_history_get200_response_rows_inner.py | 64 + ...th_history_wrap_history_get200_response.py | 72 + ...wrap_history_get200_response_rows_inner.py | 64 + ...eth_staking_wbeth_wrap_post200_response.py | 56 + ...est_sapi_v1_fiat_orders_get200_response.py | 82 + ..._fiat_orders_get200_response_data_inner.py | 68 + ...t_sapi_v1_fiat_payments_get200_response.py | 84 + ...iat_payments_get200_response_data_inner.py | 70 + ..._futures_hist_data_link_get200_response.py | 60 + ...st_data_link_get200_response_data_inner.py | 54 + ...api_v1_futures_transfer_get200_response.py | 70 + ...res_transfer_get200_response_rows_inner.py | 62 + ...rd_buy_code_token_limit_get200_response.py | 64 + ...y_code_token_limit_get200_response_data.py | 53 + ...1_giftcard_create_code_post200_response.py | 64 + ...tcard_create_code_post200_response_data.py | 56 + ...tography_rsa_public_key_get200_response.py | 58 + ...1_giftcard_redeem_code_post200_response.py | 66 + ...tcard_redeem_code_post200_response_data.py | 58 + ...sapi_v1_giftcard_verify_get200_response.py | 64 + ...v1_giftcard_verify_get200_response_data.py | 56 + ...g_auto_invest_all_asset_get200_response.py | 62 + ...vest_history_list_get200_response_inner.py | 86 + ..._auto_invest_index_info_get200_response.py | 66 + ..._get200_response_asset_allocation_inner.py | 54 + ...vest_index_user_summary_get200_response.py | 98 + ..._get200_response_asset_allocation_inner.py | 54 + ...r_summary_get200_response_details_inner.py | 72 + ...ng_auto_invest_one_off_post200_response.py | 54 + ...st_one_off_post_details_parameter_inner.py | 52 + ...o_invest_one_off_status_get200_response.py | 54 + ...g_auto_invest_plan_add_post200_response.py | 54 + ...t_plan_add_post_details_parameter_inner.py | 52 + ...nvest_plan_edit_status_post200_response.py | 56 + ...ing_auto_invest_plan_id_get200_response.py | 88 + ...vest_plan_id_get200_response_plan_inner.py | 112 + ...et200_response_plan_inner_details_inner.py | 78 + ...g_auto_invest_plan_list_get200_response.py | 108 + ...st_plan_list_get200_response_plan_inner.py | 94 + ...rebalance_history_get200_response_inner.py | 76 + ...esponse_inner_transaction_details_inner.py | 58 + ...st_redeem_history_get200_response_inner.py | 68 + ...ing_auto_invest_redeem_post200_response.py | 52 + ...nvest_source_asset_list_get200_response.py | 68 + ...ist_get200_response_source_assets_inner.py | 60 + ...nvest_target_asset_list_get200_response.py | 61 + ...0_response_auto_invest_asset_list_inner.py | 64 + ...inner_roi_and_dimension_type_list_inner.py | 56 + ...et_asset_roi_list_get200_response_inner.py | 54 + ...tomized_fixed_purchase_post200_response.py | 52 + ...nding_position_changed_post200_response.py | 56 + ...ding_project_list_get200_response_inner.py | 82 + ...ect_position_list_get200_response_inner.py | 84 + ...api_v1_loan_adjust_ltv_post200_response.py | 60 + ..._v1_loan_borrow_history_get200_response.py | 76 + ...rrow_history_get200_response_rows_inner.py | 68 + ...st_sapi_v1_loan_borrow_post200_response.py | 62 + ...v1_loan_collateral_data_get200_response.py | 70 + ...lateral_data_get200_response_rows_inner.py | 62 + ..._customize_margin_call_post200_response.py | 68 + ...margin_call_post200_response_rows_inner.py | 60 + ...pi_v1_loan_income_get200_response_inner.py | 60 + ...i_v1_loan_loanable_data_get200_response.py | 86 + ...oanable_data_get200_response_rows_inner.py | 78 + ..._ltv_adjustment_history_get200_response.py | 74 + ...ment_history_get200_response_rows_inner.py | 66 + ..._v1_loan_ongoing_orders_get200_response.py | 74 + ...going_orders_get200_response_rows_inner.py | 66 + ...n_repay_collateral_rate_get200_response.py | 58 + ...i_v1_loan_repay_history_get200_response.py | 76 + ...epay_history_get200_response_rows_inner.py | 68 + ...est_sapi_v1_loan_repay_post200_response.py | 64 + ...api_v1_loan_vip_borrow_post200_response.py | 65 + ..._vip_collateral_account_get200_response.py | 64 + ...eral_account_get200_response_rows_inner.py | 56 + ...oan_vip_collateral_data_get200_response.py | 76 + ...lateral_data_get200_response_rows_inner.py | 68 + ..._loan_vip_loanable_data_get200_response.py | 78 + ...oanable_data_get200_response_rows_inner.py | 70 + ...loan_vip_ongoing_orders_get200_response.py | 86 + ...going_orders_get200_response_rows_inner.py | 76 + ...sapi_v1_loan_vip_renew_post200_response.py | 62 + ..._loan_vip_repay_history_get200_response.py | 70 + ...epay_history_get200_response_rows_inner.py | 62 + ...sapi_v1_loan_vip_repay_post200_response.py | 64 + ...1_loan_vip_request_data_get200_response.py | 76 + ...request_data_get200_response_rows_inner.py | 68 + ...est_interest_rate_get200_response_inner.py | 58 + ...ccount_account_snapshot_get200_response.py | 80 + ...shot_get200_response_snapshot_vos_inner.py | 70 + ...get200_response_snapshot_vos_inner_data.py | 64 + ..._snapshot_vos_inner_data_balances_inner.py | 56 + ..._subaccount_asset_get200_response_inner.py | 62 + ...account_deposit_address_get200_response.py | 58 + ...ged_subaccount_deposit_post200_response.py | 52 + ...ount_fetch_future_asset_get200_response.py | 92 + ...sset_get200_response_snapshot_vos_inner.py | 82 + ...get200_response_snapshot_vos_inner_data.py | 76 + ...se_snapshot_vos_inner_data_assets_inner.py | 56 + ..._snapshot_vos_inner_data_position_inner.py | 58 + ...managed_subaccount_info_get200_response.py | 80 + ...nse_manager_sub_user_info_vo_list_inner.py | 71 + ...subaccount_margin_asset_get200_response.py | 76 + ...asset_get200_response_user_assets_inner.py | 62 + ..._trans_log_for_investor_get200_response.py | 78 + ..._manager_sub_transfer_history_vos_inner.py | 70 + ...account_query_trans_log_get200_response.py | 78 + ..._manager_sub_transfer_history_vos_inner.py | 70 + ..._sapi_v1_margin_account_get200_response.py | 82 + ...count_get200_response_user_assets_inner.py | 62 + ...margin_all_assets_get200_response_inner.py | 62 + ..._margin_all_pairs_get200_response_inner.py | 64 + ...gin_available_inventory_get200_response.py | 62 + ...ilable_inventory_get200_response_assets.py | 58 + ..._v1_margin_borrow_repay_get200_response.py | 74 + ...borrow_repay_get200_response_rows_inner.py | 63 + ...v1_margin_borrow_repay_post200_response.py | 52 + ...rgin_capital_flow_get200_response_inner.py | 64 + ..._collateral_ratio_get200_response_inner.py | 68 + ...get200_response_inner_collaterals_inner.py | 56 + ...cross_margin_data_get200_response_inner.py | 66 + ...n_delist_schedule_get200_response_inner.py | 57 + ...e_small_liability_get200_response_inner.py | 60 + ...small_liability_history_get200_response.py | 70 + ...lity_history_get200_response_rows_inner.py | 62 + ...n_force_liquidation_rec_get200_response.py | 78 + ...uidation_rec_get200_response_rows_inner.py | 70 + ...margin_interest_history_get200_response.py | 72 + ...rest_history_get200_response_rows_inner.py | 64 + ...rest_rate_history_get200_response_inner.py | 58 + ..._isolated_account_limit_get200_response.py | 54 + ...argin_isolated_account_post200_response.py | 54 + ...solated_all_pairs_get200_response_inner.py | 62 + ...lated_margin_data_get200_response_inner.py | 54 + ...n_data_get200_response_inner_data_inner.py | 53 + ...lated_margin_tier_get200_response_inner.py | 57 + ..._leverage_bracket_get200_response_inner.py | 74 + ...et_get200_response_inner_brackets_inner.py | 55 + ...1_margin_max_borrowable_get200_response.py | 54 + ...v1_margin_max_leverage_post200_response.py | 52 + ...margin_max_transferable_get200_response.py | 54 + ...rly_interest_rate_get200_response_inner.py | 54 + ...n_open_order_list_get200_response_inner.py | 72 + ...in_open_orders_delete200_response_inner.py | 100 + ...pi_v1_margin_order_list_get200_response.py | 72 + ...pi_v1_margin_order_oco_post200_response.py | 74 + ...co_post200_response_order_reports_inner.py | 78 + ...order_oco_post200_response_orders_inner.py | 56 + ...t_sapi_v1_margin_order_post200_response.py | 94 + ...i_v1_margin_price_index_get200_response.py | 56 + ..._rate_limit_order_get200_response_inner.py | 60 + ...i_v1_margin_trade_coeff_get200_response.py | 53 + ...sapi_v1_margin_transfer_get200_response.py | 70 + ...gin_transfer_get200_response_rows_inner.py | 62 + ...transfer_config_cancel_post200_response.py | 56 + ...fer_config_details_list_get200_response.py | 82 + ...onfig_details_list_get200_response_data.py | 76 + ...t200_response_data_config_details_inner.py | 66 + ...g_hash_transfer_config_post200_response.py | 56 + ...transfer_profit_details_get200_response.py | 80 + ...fer_profit_details_get200_response_data.py | 74 + ...onse_data_profit_transfer_details_inner.py | 64 + ..._v1_mining_payment_list_get200_response.py | 82 + ...ining_payment_list_get200_response_data.py | 76 + ...200_response_data_account_profits_inner.py | 66 + ...v1_mining_payment_other_get200_response.py | 76 + ...ning_payment_other_get200_response_data.py | 70 + ...et200_response_data_other_profits_inner.py | 60 + ...i_v1_mining_payment_uid_get200_response.py | 78 + ...mining_payment_uid_get200_response_data.py | 72 + ...200_response_data_account_profits_inner.py | 62 + ...v1_mining_pub_algo_list_get200_response.py | 68 + ...ub_algo_list_get200_response_data_inner.py | 58 + ...v1_mining_pub_coin_list_get200_response.py | 70 + ...ub_coin_list_get200_response_data_inner.py | 60 + ...ng_statistics_user_list_get200_response.py | 76 + ...cs_user_list_get200_response_data_inner.py | 66 + ...t_get200_response_data_inner_list_inner.py | 56 + ..._statistics_user_status_get200_response.py | 86 + ...istics_user_status_get200_response_data.py | 80 + ...tatus_get200_response_data_profit_today.py | 56 + ...v1_mining_worker_detail_get200_response.py | 76 + ...orker_detail_get200_response_data_inner.py | 66 + ...esponse_data_inner_hashrate_datas_inner.py | 56 + ...i_v1_mining_worker_list_get200_response.py | 80 + ...mining_worker_list_get200_response_data.py | 74 + ...get200_response_data_worker_datas_inner.py | 64 + ..._v1_nft_history_deposit_get200_response.py | 68 + ...tory_deposit_get200_response_list_inner.py | 60 + ...ft_history_transactions_get200_response.py | 78 + ...transactions_get200_response_list_inner.py | 70 + ...get200_response_list_inner_tokens_inner.py | 56 + ...v1_nft_history_withdraw_get200_response.py | 72 + ...ory_withdraw_get200_response_list_inner.py | 64 + ...i_v1_nft_user_get_asset_get200_response.py | 64 + ...er_get_asset_get200_response_list_inner.py | 56 + ...api_v1_pay_transactions_get200_response.py | 126 + ...transactions_get200_response_data_inner.py | 114 + ..._response_data_inner_funds_detail_inner.py | 54 + ...s_get200_response_data_inner_payer_info.py | 58 + ...et200_response_data_inner_receiver_info.py | 72 + ...e_data_inner_receiver_info_extend_inner.py | 56 + ...pi_v1_portfolio_account_get200_response.py | 62 + ...asset_index_price_get200_response_inner.py | 56 + ...tfolio_auto_collection_post200_response.py | 52 + ...o_collateral_rate_get200_response_inner.py | 54 + ..._interest_history_get200_response_inner.py | 60 + ...in_asset_leverage_get200_response_inner.py | 52 + ...pi_v1_portfolio_pm_loan_get200_response.py | 54 + ...io_repay_futures_switch_get200_response.py | 52 + ...api_v1_portfolio_repay_post200_response.py | 52 + ...api_v1_rebate_tax_query_get200_response.py | 78 + ...1_rebate_tax_query_get200_response_data.py | 70 + ...x_query_get200_response_data_data_inner.py | 58 + ..._v1_simple_earn_account_get200_response.py | 62 + ...story_collateral_record_get200_response.py | 72 + ...teral_record_get200_response_rows_inner.py | 64 + ...le_history_rate_history_get200_response.py | 66 + ...rate_history_get200_response_rows_inner.py | 58 + ...story_redemption_record_get200_response.py | 72 + ...ption_record_get200_response_rows_inner.py | 64 + ..._history_rewards_record_get200_response.py | 68 + ...wards_record_get200_response_rows_inner.py | 60 + ...ory_subscription_record_get200_response.py | 76 + ...ption_record_get200_response_rows_inner.py | 68 + ...mple_earn_flexible_list_get200_response.py | 86 + ...lexible_list_get200_response_rows_inner.py | 78 + ..._rows_inner_tier_annual_percentage_rate.py | 54 + ...ble_personal_left_quota_get200_response.py | 52 + ..._earn_flexible_position_get200_response.py | 90 + ...ble_position_get200_response_rows_inner.py | 82 + ...e_earn_flexible_redeem_post200_response.py | 54 + ...arn_flexible_subscribe_post200_response.py | 54 + ...le_subscription_preview_get200_response.py | 62 + ...story_redemption_record_get200_response.py | 76 + ...ption_record_get200_response_rows_inner.py | 68 + ..._history_rewards_record_get200_response.py | 68 + ...wards_record_get200_response_rows_inner.py | 60 + ...ory_subscription_record_get200_response.py | 80 + ...ption_record_get200_response_rows_inner.py | 72 + ...simple_earn_locked_list_get200_response.py | 88 + ..._locked_list_get200_response_rows_inner.py | 80 + ..._list_get200_response_rows_inner_detail.py | 70 + ...d_list_get200_response_rows_inner_quota.py | 54 + ...le_earn_locked_position_get200_response.py | 82 + ...ked_position_get200_response_rows_inner.py | 74 + ..._earn_locked_subscribe_post200_response.py | 56 + ...scription_preview_get200_response_inner.py | 70 + ...t_delist_schedule_get200_response_inner.py | 54 + ...ub_account_blvt_enable_post200_response.py | 54 + ...ccount_eoptions_enable_post200_response.py | 54 + ...account_futures_account_get200_response.py | 104 + ...es_account_get200_response_assets_inner.py | 68 + ...futures_account_summary_get200_response.py | 90 + ..._get200_response_sub_account_list_inner.py | 68 + ...account_futures_enable_post200_response.py | 54 + ...tures_internal_transfer_get200_response.py | 72 + ...ransfer_get200_response_transfers_inner.py | 62 + ...ures_internal_transfer_post200_response.py | 54 + ...res_position_risk_get200_response_inner.py | 66 + ...count_futures_transfer_post200_response.py | 52 + ...api_v1_sub_account_list_get200_response.py | 66 + ...list_get200_response_sub_accounts_inner.py | 60 + ..._account_margin_account_get200_response.py | 86 + ...t_get200_response_margin_trade_coeff_vo.py | 56 + ..._margin_account_summary_get200_response.py | 70 + ..._get200_response_sub_account_list_inner.py | 58 + ..._account_margin_enable_post200_response.py | 54 + ...ub_account_spot_summary_get200_response.py | 64 + ...e_spot_sub_user_asset_btc_vo_list_inner.py | 54 + ...ub_account_status_get200_response_inner.py | 64 + ...ount_api_ip_restriction_get200_response.py | 58 + ..._restriction_ip_list_delete200_response.py | 58 + ..._transfer_history_get200_response_inner.py | 64 + ..._transaction_statistics_get200_response.py | 84 + ...cs_get200_response_trade_info_vos_inner.py | 58 + ..._sub_user_history_get200_response_inner.py | 70 + ...niversal_transfer_get200_response_inner.py | 70 + ...unt_universal_transfer_post200_response.py | 54 + ...nt_virtual_sub_account_post200_response.py | 52 + ...t_sapi_v1_system_status_get200_response.py | 54 + ...r_data_stream_isolated_post200_response.py | 52 + ..._v2_eth_staking_account_get200_response.py | 66 + ...taking_account_get200_response_holdings.py | 54 + ..._staking_account_get200_response_profit.py | 54 + ..._eth_staking_eth_stake_post200_response.py | 56 + ...an_flexible_adjust_ltv_post200_response.py | 60 + ...flexible_borrow_history_get200_response.py | 70 + ...rrow_history_get200_response_rows_inner.py | 62 + ...2_loan_flexible_borrow_post200_response.py | 59 + ...lexible_collateral_data_get200_response.py | 68 + ...lateral_data_get200_response_rows_inner.py | 60 + ..._flexible_loanable_data_get200_response.py | 66 + ...oanable_data_get200_response_rows_inner.py | 58 + ..._ltv_adjustment_history_get200_response.py | 72 + ...ment_history_get200_response_rows_inner.py | 64 + ...flexible_ongoing_orders_get200_response.py | 68 + ...going_orders_get200_response_rows_inner.py | 60 + ..._flexible_repay_history_get200_response.py | 70 + ...epay_history_get200_response_rows_inner.py | 62 + ...v2_loan_flexible_repay_post200_response.py | 64 + ...account_futures_account_get200_response.py | 140 + ...futures_account_summary_get200_response.py | 118 + ...t_futures_position_risk_get200_response.py | 100 + ...unt_api_ip_restriction_post200_response.py | 58 + ...t_get_user_asset_post200_response_inner.py | 64 + ...i_v3_sub_account_assets_get200_response.py | 62 + ...t_assets_get200_response_balances_inner.py | 56 + ...i_v4_sub_account_assets_get200_response.py | 62 + ...t_assets_get200_response_balances_inner.py | 56 + .../binance_openapi/test/test_savings_api.py | 59 + .../test/test_simple_earn_api.py | 192 + .../test/test_snapshot_futures.py | 94 + ...est_snapshot_futures_snapshot_vos_inner.py | 84 + ...napshot_futures_snapshot_vos_inner_data.py | 78 + ...es_snapshot_vos_inner_data_assets_inner.py | 56 + ..._snapshot_vos_inner_data_position_inner.py | 60 + .../test/test_snapshot_margin.py | 92 + ...test_snapshot_margin_snapshot_vos_inner.py | 82 + ...snapshot_margin_snapshot_vos_inner_data.py | 76 + ...apshot_vos_inner_data_user_assets_inner.py | 62 + .../test/test_snapshot_spot.py | 80 + .../test_snapshot_spot_snapshot_vos_inner.py | 70 + ...t_snapshot_spot_snapshot_vos_inner_data.py | 64 + ..._snapshot_vos_inner_data_balances_inner.py | 56 + .../test/test_spot_algo_api.py | 66 + .../binance_openapi/test/test_staking_api.py | 115 + .../binance_openapi/test/test_stream_api.py | 52 + .../test/test_sub_account_api.py | 346 + .../test_sub_account_coin_futures_details.py | 86 + ...count_coin_futures_details_assets_inner.py | 68 + ..._sub_account_coin_futures_position_risk.py | 78 + ...n_risk_delivery_position_risk_vos_inner.py | 72 + .../test_sub_account_coin_futures_summary.py | 76 + ...s_summary_delivery_account_summary_resp.py | 74 + ...unt_summary_resp_sub_account_list_inner.py | 60 + .../test_sub_account_usdt_futures_details.py | 104 + ...sdt_futures_details_future_account_resp.py | 102 + ..._sub_account_usdt_futures_position_risk.py | 72 + .../test_sub_account_usdt_futures_summary.py | 92 + ...res_summary_future_account_summary_resp.py | 90 + ...unt_summary_resp_sub_account_list_inner.py | 68 + .../binance_openapi/test/test_ticker.py | 88 + .../python/binance_openapi/test/test_trade.py | 64 + .../binance_openapi/test/test_trade_api.py | 178 + .../binance_openapi/test/test_transaction.py | 52 + .../test/test_vip_loans_api.py | 101 + .../binance_openapi/test/test_wallet_api.py | 269 + target/python/binance_openapi/tox.ini | 9 + test_rust/.gitignore | 3 + test_rust/.openapi-generator-ignore | 6 + test_rust/.openapi-generator/FILES | 548 + test_rust/.openapi-generator/VERSION | 1 + test_rust/Cargo.toml | 15 + test_rust/src/apis/auto_invest_api.rs | 1024 + test_rust/src/apis/blvt_api.rs | 352 + test_rust/src/apis/c2_c_api.rs | 81 + test_rust/src/apis/configuration.rs | 53 + test_rust/src/apis/convert_api.rs | 504 + test_rust/src/apis/crypto_loans_api.rs | 1308 ++ test_rust/src/apis/dual_investment_api.rs | 292 + test_rust/src/apis/fiat_api.rs | 144 + test_rust/src/apis/futures_algo_api.rs | 376 + test_rust/src/apis/futures_api.rs | 190 + test_rust/src/apis/gift_card_api.rs | 329 + .../src/apis/isolated_margin_stream_api.rs | 155 + test_rust/src/apis/margin_api.rs | 2650 +++ test_rust/src/apis/margin_stream_api.rs | 155 + test_rust/src/apis/market_api.rs | 666 + test_rust/src/apis/mining_api.rs | 750 + test_rust/src/apis/mod.rs | 122 + test_rust/src/apis/nft_api.rs | 261 + test_rust/src/apis/pay_api.rs | 77 + test_rust/src/apis/portfolio_margin_api.rs | 663 + test_rust/src/apis/rebate_api.rs | 77 + test_rust/src/apis/savings_api.rs | 251 + test_rust/src/apis/simple_earn_api.rs | 1380 ++ test_rust/src/apis/spot_algo_api.rs | 300 + test_rust/src/apis/staking_api.rs | 708 + test_rust/src/apis/stream_api.rs | 155 + test_rust/src/apis/sub_account_api.rs | 2536 +++ test_rust/src/apis/trade_api.rs | 1412 ++ test_rust/src/apis/vip_loans_api.rs | 599 + test_rust/src/apis/wallet_api.rs | 1908 ++ test_rust/src/lib.rs | 10 + ..._v3_account_commission_get_200_response.rs | 36 + ...nt_commission_get_200_response_discount.rs | 39 + ...on_get_200_response_standard_commission.rs | 38 + ...mission_get_200_response_tax_commission.rs | 38 + ...3_all_order_list_get_200_response_inner.rs | 51 + ...ist_get_200_response_inner_orders_inner.rs | 33 + .../_api_v3_avg_price_get_200_response.rs | 36 + .../models/_api_v3_depth_get_200_response.rs | 33 + .../_api_v3_exchange_info_get_200_response.rs | 39 + ...info_get_200_response_rate_limits_inner.rs | 36 + ...nge_info_get_200_response_symbols_inner.rs | 90 + ...00_response_symbols_inner_filters_inner.rs | 36 + ..._v3_klines_get_200_response_inner_inner.rs | 26 + ...3_my_allocations_get_200_response_inner.rs | 66 + ...revented_matches_get_200_response_inner.rs | 51 + ..._open_order_list_get_200_response_inner.rs | 48 + ...ist_get_200_response_inner_orders_inner.rs | 33 + ...3_open_orders_delete_200_response_inner.rs | 90 + ..._order_cancel_replace_post_200_response.rs | 36 + ...place_post_200_response_cancel_response.rs | 69 + ...ce_post_200_response_new_order_response.rs | 72 + .../_api_v3_order_list_get_200_response.rs | 48 + ...rder_list_get_200_response_orders_inner.rs | 33 + .../_api_v3_order_oco_post_200_response.rs | 51 + ...o_post_200_response_order_reports_inner.rs | 72 + ...rder_oco_post_200_response_orders_inner.rs | 33 + .../models/_api_v3_order_post_200_response.rs | 27 + ...rate_limit_order_get_200_response_inner.rs | 39 + .../_api_v3_sor_order_post_200_response.rs | 78 + ...sor_order_post_200_response_fills_inner.rs | 45 + .../_api_v3_ticker_24hr_get_200_response.rs | 26 + ..._v3_ticker_book_ticker_get_200_response.rs | 26 + .../models/_api_v3_ticker_get_200_response.rs | 69 + .../_api_v3_ticker_price_get_200_response.rs | 26 + ..._v3_ticker_trading_day_get_200_response.rs | 26 + .../models/_api_v3_time_get_200_response.rs | 27 + ...i_v3_user_data_stream_post_200_response.rs | 27 + ...count_api_restrictions_get_200_response.rs | 68 + ...unt_api_trading_status_get_200_response.rs | 27 + ...pi_trading_status_get_200_response_data.rs | 41 + ...status_get_200_response_data_indicators.rs | 29 + ..._response_data_indicators_btcusdt_inner.rs | 40 + ...get_200_response_data_trigger_condition.rs | 36 + .../_sapi_v1_account_info_get_200_response.rs | 35 + ...pi_v1_account_snapshot_get_200_response.rs | 27 + ...sapi_v1_account_status_get_200_response.rs | 27 + ...ures_historical_orders_get_200_response.rs | 30 + ...al_orders_get_200_response_orders_inner.rs | 66 + ..._futures_new_order_vp_post_200_response.rs | 36 + ...go_futures_open_orders_get_200_response.rs | 30 + ...en_orders_get_200_response_orders_inner.rs | 66 + ..._algo_futures_order_delete_200_response.rs | 36 + ...lgo_futures_sub_orders_get_200_response.rs | 36 + ...rders_get_200_response_sub_orders_inner.rs | 66 + ...spot_historical_orders_get_200_response.rs | 30 + ...al_orders_get_200_response_orders_inner.rs | 63 + ...o_spot_new_order_twap_post_200_response.rs | 36 + ..._algo_spot_open_orders_get_200_response.rs | 30 + ...en_orders_get_200_response_orders_inner.rs | 63 + ..._v1_algo_spot_order_delete_200_response.rs | 36 + ...1_algo_spot_sub_orders_get_200_response.rs | 36 + ...rders_get_200_response_sub_orders_inner.rs | 66 + ..._v1_asset_asset_detail_get_200_response.rs | 27 + ...asset_asset_detail_get_200_response_ctr.rs | 41 + ...1_asset_asset_dividend_get_200_response.rs | 30 + ...et_dividend_get_200_response_rows_inner.rs | 42 + ...sset_convert_transfer_post_200_response.rs | 30 + ...transfer_query_by_page_get_200_response.rs | 30 + ...ery_by_page_get_200_response_rows_inner.rs | 51 + ...stody_transfer_history_get_200_response.rs | 30 + ...fer_history_get_200_response_rows_inner.rs | 39 + ...sapi_v1_asset_dribblet_get_200_response.rs | 31 + ...200_response_user_asset_dribblets_inner.rs | 41 + ...inner_user_asset_dribblet_details_inner.rs | 42 + ...api_v1_asset_dust_btc_post_200_response.rs | 37 + ...ust_btc_post_200_response_details_inner.rs | 50 + .../_sapi_v1_asset_dust_post_200_response.rs | 33 + ...post_200_response_transfer_result_inner.rs | 42 + ...t_funding_asset_post_200_response_inner.rs | 42 + ...d_mining_query_by_page_get_200_response.rs | 30 + ...ery_by_page_get_200_response_rows_inner.rs | 42 + ..._asset_trade_fee_get_200_response_inner.rs | 33 + ...sapi_v1_asset_transfer_get_200_response.rs | 30 + ...et_transfer_get_200_response_rows_inner.rs | 42 + ...api_v1_asset_transfer_post_200_response.rs | 27 + ...t_wallet_balance_get_200_response_inner.rs | 33 + .../_sapi_v1_blvt_redeem_post_200_response.rs | 45 + ...vt_redeem_record_get_200_response_inner.rs | 49 + ...api_v1_blvt_subscribe_post_200_response.rs | 45 + ..._blvt_subscribe_record_get_200_response.rs | 49 + ..._blvt_token_info_get_200_response_inner.rs | 69 + ...00_response_inner_current_baskets_inner.rs | 33 + ..._blvt_user_limit_get_200_response_inner.rs | 35 + ...ist_user_order_history_get_200_response.rs | 39 + ...der_history_get_200_response_data_inner.rs | 70 + ...al_config_getall_get_200_response_inner.rs | 66 + ...t_200_response_inner_network_list_inner.rs | 82 + ...ract_convertible_coins_get_200_response.rs | 33 + ...e_coins_get_200_response_exchange_rates.rs | 33 + ...apital_deposit_address_get_200_response.rs | 36 + ...sit_address_list_get_200_response_inner.rs | 33 + ..._deposit_credit_apply_post_200_response.rs | 36 + ...l_deposit_hisrec_get_200_response_inner.rs | 58 + ...al_deposit_sub_address_get_200_response.rs | 36 + ...posit_sub_hisrec_get_200_response_inner.rs | 54 + ...raw_address_list_get_200_response_inner.rs | 48 + ...apital_withdraw_apply_post_200_response.rs | 27 + ...withdraw_history_get_200_response_inner.rs | 66 + ..._convert_accept_quote_post_200_response.rs | 33 + ...nvert_asset_info_get_200_response_inner.rs | 30 + ...rt_exchange_info_get_200_response_inner.rs | 42 + ..._v1_convert_get_quote_post_200_response.rs | 42 + ...rt_limit_cancel_order_post_200_response.rs | 30 + ...ert_limit_place_order_post_200_response.rs | 30 + ...imit_query_open_orders_get_200_response.rs | 27 + ...open_orders_get_200_response_list_inner.rs | 57 + ...1_convert_order_status_get_200_response.rs | 51 + ..._v1_convert_trade_flow_get_200_response.rs | 39 + ..._trade_flow_get_200_response_list_inner.rs | 56 + ...1_dci_product_accounts_get_200_response.rs | 32 + ..._compound_edit_status_post_200_response.rs | 31 + ...pi_v1_dci_product_list_get_200_response.rs | 30 + ...roduct_list_get_200_response_list_inner.rs | 75 + ..._dci_product_positions_get_200_response.rs | 30 + ...t_positions_get_200_response_list_inner.rs | 63 + ...dci_product_subscribe_post_200_response.rs | 64 + ...h_history_rate_history_get_200_response.rs | 30 + ...ate_history_get_200_response_rows_inner.rs | 35 + ...ory_redemption_history_get_200_response.rs | 30 + ...ion_history_get_200_response_rows_inner.rs | 49 + ...istory_rewards_history_get_200_response.rs | 30 + ...rds_history_get_200_response_rows_inner.rs | 45 + ...istory_staking_history_get_200_response.rs | 30 + ...ing_history_get_200_response_rows_inner.rs | 43 + ..._wbeth_rewards_history_get_200_response.rs | 33 + ...rds_history_get_200_response_rows_inner.rs | 41 + ..._eth_staking_eth_quota_get_200_response.rs | 32 + ...th_staking_eth_redeem_post_200_response.rs | 36 + ...history_unwrap_history_get_200_response.rs | 30 + ...rap_history_get_200_response_rows_inner.rs | 47 + ...h_history_wrap_history_get_200_response.rs | 30 + ...rap_history_get_200_response_rows_inner.rs | 47 + ...th_staking_wbeth_wrap_post_200_response.rs | 33 + .../_sapi_v1_fiat_orders_get_200_response.rs | 39 + ...fiat_orders_get_200_response_data_inner.rs | 52 + ..._sapi_v1_fiat_payments_get_200_response.rs | 39 + ...at_payments_get_200_response_data_inner.rs | 60 + ...futures_hist_data_link_get_200_response.rs | 27 + ...t_data_link_get_200_response_data_inner.rs | 30 + ...pi_v1_futures_transfer_get_200_response.rs | 30 + ...es_transfer_get_200_response_rows_inner.rs | 43 + ...d_buy_code_token_limit_get_200_response.rs | 36 + ..._code_token_limit_get_200_response_data.rs | 33 + ..._giftcard_create_code_post_200_response.rs | 36 + ...card_create_code_post_200_response_data.rs | 33 + ...ography_rsa_public_key_get_200_response.rs | 36 + ..._giftcard_redeem_code_post_200_response.rs | 36 + ...card_redeem_code_post_200_response_data.rs | 36 + ...api_v1_giftcard_verify_get_200_response.rs | 36 + ...1_giftcard_verify_get_200_response_data.rs | 33 + ..._auto_invest_all_asset_get_200_response.rs | 30 + ...est_history_list_get_200_response_inner.rs | 78 + ...auto_invest_index_info_get_200_response.rs | 36 + ...get_200_response_asset_allocation_inner.rs | 30 + ...est_index_user_summary_get_200_response.rs | 48 + ...get_200_response_asset_allocation_inner.rs | 31 + ..._summary_get_200_response_details_inner.rs | 64 + ...g_auto_invest_one_off_post_200_response.rs | 30 + ...st_one_off_post_details_parameter_inner.rs | 30 + ..._invest_one_off_status_get_200_response.rs | 30 + ..._auto_invest_plan_add_post_200_response.rs | 30 + ...t_plan_add_post_details_parameter_inner.rs | 30 + ...vest_plan_edit_status_post_200_response.rs | 33 + ...ng_auto_invest_plan_id_get_200_response.rs | 39 + ...est_plan_id_get_200_response_plan_inner.rs | 69 + ...t_200_response_plan_inner_details_inner.rs | 66 + ..._auto_invest_plan_list_get_200_response.rs | 39 + ...t_plan_list_get_200_response_plan_inner.rs | 90 + ...ebalance_history_get_200_response_inner.rs | 45 + ...esponse_inner_transaction_details_inner.rs | 36 + ...t_redeem_history_get_200_response_inner.rs | 51 + ...ng_auto_invest_redeem_post_200_response.rs | 27 + ...vest_source_asset_list_get_200_response.rs | 30 + ...st_get_200_response_source_assets_inner.rs | 39 + ...vest_target_asset_list_get_200_response.rs | 30 + ...0_response_auto_invest_asset_list_inner.rs | 30 + ...inner_roi_and_dimension_type_list_inner.rs | 33 + ...t_asset_roi_list_get_200_response_inner.rs | 30 + ...omized_fixed_purchase_post_200_response.rs | 27 + ...ding_position_changed_post_200_response.rs | 33 + ...ing_project_list_get_200_response_inner.rs | 72 + ...ct_position_list_get_200_response_inner.rs | 75 + ...pi_v1_loan_adjust_ltv_post_200_response.rs | 39 + ...v1_loan_borrow_history_get_200_response.rs | 30 + ...row_history_get_200_response_rows_inner.rs | 51 + .../_sapi_v1_loan_borrow_post_200_response.rs | 42 + ...1_loan_collateral_data_get_200_response.rs | 30 + ...ateral_data_get_200_response_rows_inner.rs | 42 + ...customize_margin_call_post_200_response.rs | 30 + ...argin_call_post_200_response_rows_inner.rs | 39 + ...i_v1_loan_income_get_200_response_inner.rs | 39 + ..._v1_loan_loanable_data_get_200_response.rs | 30 + ...anable_data_get_200_response_rows_inner.rs | 66 + ...ltv_adjustment_history_get_200_response.rs | 30 + ...ent_history_get_200_response_rows_inner.rs | 48 + ...v1_loan_ongoing_orders_get_200_response.rs | 30 + ...oing_orders_get_200_response_rows_inner.rs | 48 + ..._repay_collateral_rate_get_200_response.rs | 37 + ..._v1_loan_repay_history_get_200_response.rs | 30 + ...pay_history_get_200_response_rows_inner.rs | 52 + .../_sapi_v1_loan_repay_post_200_response.rs | 26 + ...pi_v1_loan_vip_borrow_post_200_response.rs | 48 + ...vip_collateral_account_get_200_response.rs | 30 + ...ral_account_get_200_response_rows_inner.rs | 34 + ...an_vip_collateral_data_get_200_response.rs | 30 + ...ateral_data_get_200_response_rows_inner.rs | 51 + ...loan_vip_loanable_data_get_200_response.rs | 30 + ...anable_data_get_200_response_rows_inner.rs | 54 + ...oan_vip_ongoing_orders_get_200_response.rs | 30 + ...oing_orders_get_200_response_rows_inner.rs | 67 + ...api_v1_loan_vip_renew_post_200_response.rs | 42 + ...loan_vip_repay_history_get_200_response.rs | 30 + ...pay_history_get_200_response_rows_inner.rs | 43 + ...api_v1_loan_vip_repay_post_200_response.rs | 46 + ..._loan_vip_request_data_get_200_response.rs | 30 + ...equest_data_get_200_response_rows_inner.rs | 51 + ...st_interest_rate_get_200_response_inner.rs | 36 + ...count_account_snapshot_get_200_response.rs | 33 + ...hot_get_200_response_snapshot_vos_inner.rs | 33 + ...et_200_response_snapshot_vos_inner_data.rs | 30 + ..._snapshot_vos_inner_data_balances_inner.rs | 33 + ...subaccount_asset_get_200_response_inner.rs | 42 + ...ccount_deposit_address_get_200_response.rs | 36 + ...ed_subaccount_deposit_post_200_response.rs | 27 + ...unt_fetch_future_asset_get_200_response.rs | 33 + ...set_get_200_response_snapshot_vos_inner.rs | 33 + ...et_200_response_snapshot_vos_inner_data.rs | 30 + ...se_snapshot_vos_inner_data_assets_inner.rs | 33 + ..._snapshot_vos_inner_data_position_inner.rs | 36 + ...anaged_subaccount_info_get_200_response.rs | 30 + ...nse_manager_sub_user_info_vo_list_inner.rs | 57 + ...ubaccount_margin_asset_get_200_response.rs | 39 + ...sset_get_200_response_user_assets_inner.rs | 42 + ...trans_log_for_investor_get_200_response.rs | 30 + ..._manager_sub_transfer_history_vos_inner.rs | 54 + ...ccount_query_trans_log_get_200_response.rs | 30 + ..._manager_sub_transfer_history_vos_inner.rs | 54 + ...sapi_v1_margin_account_get_200_response.rs | 48 + ...ount_get_200_response_user_assets_inner.rs | 42 + ...argin_all_assets_get_200_response_inner.rs | 42 + ...margin_all_pairs_get_200_response_inner.rs | 45 + ...in_available_inventory_get_200_response.rs | 30 + ...lable_inventory_get_200_response_assets.rs | 36 + ...v1_margin_borrow_repay_get_200_response.rs | 30 + ...orrow_repay_get_200_response_rows_inner.rs | 53 + ...1_margin_borrow_repay_post_200_response.rs | 27 + ...gin_capital_flow_get_200_response_inner.rs | 45 + ...collateral_ratio_get_200_response_inner.rs | 30 + ...et_200_response_inner_collaterals_inner.rs | 33 + ...ross_margin_data_get_200_response_inner.rs | 48 + ..._delist_schedule_get_200_response_inner.rs | 33 + ..._small_liability_get_200_response_inner.rs | 39 + ...mall_liability_history_get_200_response.rs | 30 + ...ity_history_get_200_response_rows_inner.rs | 42 + ..._force_liquidation_rec_get_200_response.rs | 30 + ...idation_rec_get_200_response_rows_inner.rs | 54 + ...argin_interest_history_get_200_response.rs | 30 + ...est_history_get_200_response_rows_inner.rs | 45 + ...est_rate_history_get_200_response_inner.rs | 36 + ...isolated_account_limit_get_200_response.rs | 30 + ...rgin_isolated_account_post_200_response.rs | 30 + ...olated_all_pairs_get_200_response_inner.rs | 42 + ...ated_margin_data_get_200_response_inner.rs | 36 + ..._data_get_200_response_inner_data_inner.rs | 33 + ...ated_margin_tier_get_200_response_inner.rs | 45 + ...leverage_bracket_get_200_response_inner.rs | 33 + ...t_get_200_response_inner_brackets_inner.rs | 39 + ..._margin_max_borrowable_get_200_response.rs | 32 + ...1_margin_max_leverage_post_200_response.rs | 27 + ...argin_max_transferable_get_200_response.rs | 32 + ...ly_interest_rate_get_200_response_inner.rs | 30 + ..._open_order_list_get_200_response_inner.rs | 51 + ...n_open_orders_delete_200_response_inner.rs | 87 + ...i_v1_margin_order_list_get_200_response.rs | 51 + ...i_v1_margin_order_oco_post_200_response.rs | 62 + ...o_post_200_response_order_reports_inner.rs | 66 + ...rder_oco_post_200_response_orders_inner.rs | 33 + ..._sapi_v1_margin_order_post_200_response.rs | 27 + ..._v1_margin_price_index_get_200_response.rs | 33 + ...rate_limit_order_get_200_response_inner.rs | 39 + ..._v1_margin_trade_coeff_get_200_response.rs | 36 + ...api_v1_margin_transfer_get_200_response.rs | 30 + ...in_transfer_get_200_response_rows_inner.rs | 42 + ...ransfer_config_cancel_post_200_response.rs | 33 + ...er_config_details_list_get_200_response.rs | 33 + ...nfig_details_list_get_200_response_data.rs | 33 + ..._200_response_data_config_details_inner.rs | 56 + ..._hash_transfer_config_post_200_response.rs | 34 + ...ransfer_profit_details_get_200_response.rs | 33 + ...er_profit_details_get_200_response_data.rs | 33 + ...onse_data_profit_transfer_details_inner.rs | 51 + ...v1_mining_payment_list_get_200_response.rs | 33 + ...ning_payment_list_get_200_response_data.rs | 35 + ...200_response_data_account_profits_inner.rs | 56 + ...1_mining_payment_other_get_200_response.rs | 33 + ...ing_payment_other_get_200_response_data.rs | 35 + ...t_200_response_data_other_profits_inner.rs | 43 + ..._v1_mining_payment_uid_get_200_response.rs | 33 + ...ining_payment_uid_get_200_response_data.rs | 33 + ...200_response_data_account_profits_inner.rs | 45 + ...1_mining_pub_algo_list_get_200_response.rs | 33 + ...b_algo_list_get_200_response_data_inner.rs | 36 + ...1_mining_pub_coin_list_get_200_response.rs | 33 + ...b_coin_list_get_200_response_data_inner.rs | 39 + ...g_statistics_user_list_get_200_response.rs | 33 + ...s_user_list_get_200_response_data_inner.rs | 33 + ..._get_200_response_data_inner_list_inner.rs | 33 + ...statistics_user_status_get_200_response.rs | 33 + ...stics_user_status_get_200_response_data.rs | 51 + ...atus_get_200_response_data_profit_today.rs | 33 + ...1_mining_worker_detail_get_200_response.rs | 33 + ...rker_detail_get_200_response_data_inner.rs | 35 + ...esponse_data_inner_hashrate_datas_inner.rs | 34 + ..._v1_mining_worker_list_get_200_response.rs | 33 + ...ining_worker_list_get_200_response_data.rs | 33 + ...et_200_response_data_worker_datas_inner.rs | 50 + ...v1_nft_history_deposit_get_200_response.rs | 30 + ...ory_deposit_get_200_response_list_inner.rs | 39 + ...t_history_transactions_get_200_response.rs | 30 + ...ransactions_get_200_response_list_inner.rs | 40 + ...et_200_response_list_inner_tokens_inner.rs | 33 + ...1_nft_history_withdraw_get_200_response.rs | 30 + ...ry_withdraw_get_200_response_list_inner.rs | 45 + ..._v1_nft_user_get_asset_get_200_response.rs | 30 + ...r_get_asset_get_200_response_list_inner.rs | 33 + ...pi_v1_pay_transactions_get_200_response.rs | 36 + ...ransactions_get_200_response_data_inner.rs | 56 + ..._response_data_inner_funds_detail_inner.rs | 30 + ..._get_200_response_data_inner_payer_info.rs | 36 + ...t_200_response_data_inner_receiver_info.rs | 51 + ...e_data_inner_receiver_info_extend_inner.rs | 33 + ...i_v1_portfolio_account_get_200_response.rs | 48 + ...sset_index_price_get_200_response_inner.rs | 33 + ...folio_auto_collection_post_200_response.rs | 27 + ..._collateral_rate_get_200_response_inner.rs | 30 + ...interest_history_get_200_response_inner.rs | 39 + ...n_asset_leverage_get_200_response_inner.rs | 30 + ...i_v1_portfolio_pm_loan_get_200_response.rs | 30 + ...o_repay_futures_switch_get_200_response.rs | 27 + ...pi_v1_portfolio_repay_post_200_response.rs | 27 + ...pi_v1_rebate_tax_query_get_200_response.rs | 36 + ..._rebate_tax_query_get_200_response_data.rs | 36 + ..._query_get_200_response_data_data_inner.rs | 37 + ...v1_simple_earn_account_get_200_response.rs | 42 + ...tory_collateral_record_get_200_response.rs | 30 + ...eral_record_get_200_response_rows_inner.rs | 45 + ...e_history_rate_history_get_200_response.rs | 30 + ...ate_history_get_200_response_rows_inner.rs | 36 + ...tory_redemption_record_get_200_response.rs | 30 + ...tion_record_get_200_response_rows_inner.rs | 46 + ...history_rewards_record_get_200_response.rs | 30 + ...ards_record_get_200_response_rows_inner.rs | 39 + ...ry_subscription_record_get_200_response.rs | 30 + ...tion_record_get_200_response_rows_inner.rs | 56 + ...ple_earn_flexible_list_get_200_response.rs | 30 + ...exible_list_get_200_response_rows_inner.rs | 60 + ..._rows_inner_tier_annual_percentage_rate.rs | 30 + ...le_personal_left_quota_get_200_response.rs | 27 + ...earn_flexible_position_get_200_response.rs | 30 + ...le_position_get_200_response_rows_inner.rs | 66 + ..._earn_flexible_redeem_post_200_response.rs | 30 + ...rn_flexible_subscribe_post_200_response.rs | 30 + ...e_subscription_preview_get_200_response.rs | 42 + ...tory_redemption_record_get_200_response.rs | 30 + ...tion_record_get_200_response_rows_inner.rs | 52 + ...history_rewards_record_get_200_response.rs | 30 + ...ards_record_get_200_response_rows_inner.rs | 39 + ...ry_subscription_record_get_200_response.rs | 30 + ...tion_record_get_200_response_rows_inner.rs | 62 + ...imple_earn_locked_list_get_200_response.rs | 30 + ...locked_list_get_200_response_rows_inner.rs | 33 + ...list_get_200_response_rows_inner_detail.rs | 54 + ..._list_get_200_response_rows_inner_quota.rs | 30 + ...e_earn_locked_position_get_200_response.rs | 30 + ...ed_position_get_200_response_rows_inner.rs | 60 + ...earn_locked_subscribe_post_200_response.rs | 33 + ...cription_preview_get_200_response_inner.rs | 54 + ..._delist_schedule_get_200_response_inner.rs | 30 + ...b_account_blvt_enable_post_200_response.rs | 30 + ...count_eoptions_enable_post_200_response.rs | 30 + ...ccount_futures_account_get_200_response.rs | 72 + ...s_account_get_200_response_assets_inner.rs | 51 + ...utures_account_summary_get_200_response.rs | 51 + ...get_200_response_sub_account_list_inner.rs | 51 + ...ccount_futures_enable_post_200_response.rs | 30 + ...ures_internal_transfer_get_200_response.rs | 33 + ...ansfer_get_200_response_transfers_inner.rs | 42 + ...res_internal_transfer_post_200_response.rs | 30 + ...es_position_risk_get_200_response_inner.rs | 50 + ...ount_futures_transfer_post_200_response.rs | 27 + ...pi_v1_sub_account_list_get_200_response.rs | 27 + ...ist_get_200_response_sub_accounts_inner.rs | 39 + ...account_margin_account_get_200_response.rs | 45 + ..._get_200_response_margin_trade_coeff_vo.rs | 36 + ...margin_account_summary_get_200_response.rs | 36 + ...get_200_response_sub_account_list_inner.rs | 36 + ...account_margin_enable_post_200_response.rs | 30 + ...b_account_spot_summary_get_200_response.rs | 33 + ...e_spot_sub_user_asset_btc_vo_list_inner.rs | 30 + ...b_account_status_get_200_response_inner.rs | 47 + ...unt_api_ip_restriction_get_200_response.rs | 36 + ...restriction_ip_list_delete_200_response.rs | 36 + ...transfer_history_get_200_response_inner.rs | 45 + ...transaction_statistics_get_200_response.rs | 45 + ...s_get_200_response_trade_info_vos_inner.rs | 48 + ...sub_user_history_get_200_response_inner.rs | 55 + ...iversal_transfer_get_200_response_inner.rs | 54 + ...nt_universal_transfer_post_200_response.rs | 30 + ...t_virtual_sub_account_post_200_response.rs | 27 + ..._sapi_v1_system_status_get_200_response.rs | 32 + ..._data_stream_isolated_post_200_response.rs | 27 + ...v2_eth_staking_account_get_200_response.rs | 36 + ...aking_account_get_200_response_holdings.rs | 30 + ...staking_account_get_200_response_profit.rs | 30 + ...eth_staking_eth_stake_post_200_response.rs | 34 + ...n_flexible_adjust_ltv_post_200_response.rs | 39 + ...lexible_borrow_history_get_200_response.rs | 30 + ...row_history_get_200_response_rows_inner.rs | 42 + ..._loan_flexible_borrow_post_200_response.rs | 39 + ...exible_collateral_data_get_200_response.rs | 30 + ...ateral_data_get_200_response_rows_inner.rs | 39 + ...flexible_loanable_data_get_200_response.rs | 30 + ...anable_data_get_200_response_rows_inner.rs | 36 + ...ltv_adjustment_history_get_200_response.rs | 30 + ...ent_history_get_200_response_rows_inner.rs | 45 + ...lexible_ongoing_orders_get_200_response.rs | 30 + ...oing_orders_get_200_response_rows_inner.rs | 39 + ...flexible_repay_history_get_200_response.rs | 30 + ...pay_history_get_200_response_rows_inner.rs | 42 + ...2_loan_flexible_repay_post_200_response.rs | 46 + ...ccount_futures_account_get_200_response.rs | 26 + ...utures_account_summary_get_200_response.rs | 26 + ..._futures_position_risk_get_200_response.rs | 26 + ...nt_api_ip_restriction_post_200_response.rs | 36 + ..._get_user_asset_post_200_response_inner.rs | 45 + ..._v3_sub_account_assets_get_200_response.rs | 27 + ..._assets_get_200_response_balances_inner.rs | 33 + ..._v4_sub_account_assets_get_200_response.rs | 27 + ..._assets_get_200_response_balances_inner.rs | 33 + test_rust/src/models/account.rs | 72 + .../src/models/account_balances_inner.rs | 33 + .../src/models/account_commission_rates.rs | 36 + test_rust/src/models/agg_trade.rs | 56 + test_rust/src/models/bnb_burn_status.rs | 30 + test_rust/src/models/book_ticker.rs | 39 + .../models/canceled_margin_order_detail.rs | 66 + test_rust/src/models/day_ticker.rs | 77 + test_rust/src/models/error.rs | 32 + .../models/isolated_margin_account_info.rs | 36 + ...olated_margin_account_info_assets_inner.rs | 62 + ...in_account_info_assets_inner_base_asset.rs | 54 + ...n_account_info_assets_inner_quote_asset.rs | 54 + test_rust/src/models/margin_oco_order.rs | 54 + .../margin_oco_order_order_reports_inner.rs | 66 + .../models/margin_oco_order_orders_inner.rs | 33 + test_rust/src/models/margin_order.rs | 60 + test_rust/src/models/margin_order_detail.rs | 78 + .../src/models/margin_order_response_ack.rs | 39 + .../src/models/margin_order_response_full.rs | 74 + .../models/margin_order_response_result.rs | 63 + test_rust/src/models/margin_trade.rs | 60 + .../src/models/margin_transfer_details.rs | 30 + .../margin_transfer_details_rows_inner.rs | 48 + test_rust/src/models/mod.rs | 1028 + test_rust/src/models/my_trade.rs | 68 + test_rust/src/models/oco_order.rs | 51 + .../models/oco_order_order_reports_inner.rs | 72 + test_rust/src/models/order.rs | 70 + test_rust/src/models/order_details.rs | 91 + test_rust/src/models/order_response_ack.rs | 39 + test_rust/src/models/order_response_full.rs | 78 + .../models/order_response_full_fills_inner.rs | 36 + test_rust/src/models/order_response_result.rs | 75 + test_rust/src/models/price_ticker.rs | 30 + test_rust/src/models/repayment_info.rs | 45 + test_rust/src/models/repayment_info2.rs | 33 + test_rust/src/models/snapshot_futures.rs | 33 + .../snapshot_futures_snapshot_vos_inner.rs | 33 + ...napshot_futures_snapshot_vos_inner_data.rs | 30 + ...es_snapshot_vos_inner_data_assets_inner.rs | 33 + ..._snapshot_vos_inner_data_position_inner.rs | 39 + test_rust/src/models/snapshot_margin.rs | 33 + .../snapshot_margin_snapshot_vos_inner.rs | 33 + ...snapshot_margin_snapshot_vos_inner_data.rs | 39 + ...apshot_vos_inner_data_user_assets_inner.rs | 42 + test_rust/src/models/snapshot_spot.rs | 33 + .../snapshot_spot_snapshot_vos_inner.rs | 33 + .../snapshot_spot_snapshot_vos_inner_data.rs | 30 + ..._snapshot_vos_inner_data_balances_inner.rs | 33 + .../sub_account_coin_futures_details.rs | 45 + ...count_coin_futures_details_assets_inner.rs | 51 + .../sub_account_coin_futures_position_risk.rs | 27 + ...n_risk_delivery_position_risk_vos_inner.rs | 57 + .../sub_account_coin_futures_summary.rs | 27 + ...s_summary_delivery_account_summary_resp.rs | 39 + ...unt_summary_resp_sub_account_list_inner.rs | 39 + .../sub_account_usdt_futures_details.rs | 27 + ...sdt_futures_details_future_account_resp.rs | 69 + .../sub_account_usdt_futures_position_risk.rs | 27 + .../sub_account_usdt_futures_summary.rs | 27 + ...res_summary_future_account_summary_resp.rs | 52 + ...unt_summary_resp_sub_account_list_inner.rs | 52 + test_rust/src/models/ticker.rs | 81 + test_rust/src/models/trade.rs | 50 + test_rust/src/models/transaction.rs | 28 + 2207 files changed, 302703 insertions(+), 4 deletions(-) create mode 100644 .DS_Store delete mode 100644 .gitignore create mode 100644 .openapi-generator-ignore create mode 100644 openapitools.json create mode 100644 target/.DS_Store create mode 100644 target/python/binance_openapi/.github/workflows/python.yml create mode 100644 target/python/binance_openapi/.gitignore create mode 100644 target/python/binance_openapi/.gitlab-ci.yml create mode 100644 target/python/binance_openapi/.openapi-generator-ignore create mode 100644 target/python/binance_openapi/.openapi-generator/FILES create mode 100644 target/python/binance_openapi/.openapi-generator/VERSION create mode 100644 target/python/binance_openapi/.travis.yml create mode 100644 target/python/binance_openapi/README.md create mode 100644 target/python/binance_openapi/docs/Account.md create mode 100644 target/python/binance_openapi/docs/AccountBalancesInner.md create mode 100644 target/python/binance_openapi/docs/AccountCommissionRates.md create mode 100644 target/python/binance_openapi/docs/AggTrade.md create mode 100644 target/python/binance_openapi/docs/ApiV3AccountCommissionGet200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3AccountCommissionGet200ResponseDiscount.md create mode 100644 target/python/binance_openapi/docs/ApiV3AccountCommissionGet200ResponseStandardCommission.md create mode 100644 target/python/binance_openapi/docs/ApiV3AccountCommissionGet200ResponseTaxCommission.md create mode 100644 target/python/binance_openapi/docs/ApiV3AllOrderListGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3AllOrderListGet200ResponseInnerOrdersInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3AvgPriceGet200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3DepthGet200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200ResponseRateLimitsInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200ResponseSymbolsInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3KlinesGet200ResponseInnerInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3MyAllocationsGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3MyPreventedMatchesGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3OpenOrderListGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3OpenOrderListGet200ResponseInnerOrdersInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3OpenOrdersDelete200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3OrderCancelReplacePost200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3OrderCancelReplacePost200ResponseCancelResponse.md create mode 100644 target/python/binance_openapi/docs/ApiV3OrderCancelReplacePost200ResponseNewOrderResponse.md create mode 100644 target/python/binance_openapi/docs/ApiV3OrderListGet200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3OrderListGet200ResponseOrdersInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3OrderOcoPost200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3OrderOcoPost200ResponseOrderReportsInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3OrderOcoPost200ResponseOrdersInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3OrderPost200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3RateLimitOrderGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3SorOrderPost200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3SorOrderPost200ResponseFillsInner.md create mode 100644 target/python/binance_openapi/docs/ApiV3Ticker24hrGet200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3TickerBookTickerGet200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3TickerGet200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3TickerPriceGet200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3TickerTradingDayGet200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3TimeGet200Response.md create mode 100644 target/python/binance_openapi/docs/ApiV3UserDataStreamPost200Response.md create mode 100644 target/python/binance_openapi/docs/AutoInvestApi.md create mode 100644 target/python/binance_openapi/docs/BLVTApi.md create mode 100644 target/python/binance_openapi/docs/BnbBurnStatus.md create mode 100644 target/python/binance_openapi/docs/BookTicker.md create mode 100644 target/python/binance_openapi/docs/C2CApi.md create mode 100644 target/python/binance_openapi/docs/CanceledMarginOrderDetail.md create mode 100644 target/python/binance_openapi/docs/ConvertApi.md create mode 100644 target/python/binance_openapi/docs/CryptoLoansApi.md create mode 100644 target/python/binance_openapi/docs/DayTicker.md create mode 100644 target/python/binance_openapi/docs/DualInvestmentApi.md create mode 100644 target/python/binance_openapi/docs/Error.md create mode 100644 target/python/binance_openapi/docs/FiatApi.md create mode 100644 target/python/binance_openapi/docs/FuturesAlgoApi.md create mode 100644 target/python/binance_openapi/docs/FuturesApi.md create mode 100644 target/python/binance_openapi/docs/GiftCardApi.md create mode 100644 target/python/binance_openapi/docs/IsolatedMarginAccountInfo.md create mode 100644 target/python/binance_openapi/docs/IsolatedMarginAccountInfoAssetsInner.md create mode 100644 target/python/binance_openapi/docs/IsolatedMarginAccountInfoAssetsInnerBaseAsset.md create mode 100644 target/python/binance_openapi/docs/IsolatedMarginAccountInfoAssetsInnerQuoteAsset.md create mode 100644 target/python/binance_openapi/docs/IsolatedMarginStreamApi.md create mode 100644 target/python/binance_openapi/docs/MarginApi.md create mode 100644 target/python/binance_openapi/docs/MarginOcoOrder.md create mode 100644 target/python/binance_openapi/docs/MarginOcoOrderOrderReportsInner.md create mode 100644 target/python/binance_openapi/docs/MarginOcoOrderOrdersInner.md create mode 100644 target/python/binance_openapi/docs/MarginOrder.md create mode 100644 target/python/binance_openapi/docs/MarginOrderDetail.md create mode 100644 target/python/binance_openapi/docs/MarginOrderResponseAck.md create mode 100644 target/python/binance_openapi/docs/MarginOrderResponseFull.md create mode 100644 target/python/binance_openapi/docs/MarginOrderResponseResult.md create mode 100644 target/python/binance_openapi/docs/MarginStreamApi.md create mode 100644 target/python/binance_openapi/docs/MarginTrade.md create mode 100644 target/python/binance_openapi/docs/MarginTransferDetails.md create mode 100644 target/python/binance_openapi/docs/MarginTransferDetailsRowsInner.md create mode 100644 target/python/binance_openapi/docs/MarketApi.md create mode 100644 target/python/binance_openapi/docs/MiningApi.md create mode 100644 target/python/binance_openapi/docs/MyTrade.md create mode 100644 target/python/binance_openapi/docs/NFTApi.md create mode 100644 target/python/binance_openapi/docs/OcoOrder.md create mode 100644 target/python/binance_openapi/docs/OcoOrderOrderReportsInner.md create mode 100644 target/python/binance_openapi/docs/Order.md create mode 100644 target/python/binance_openapi/docs/OrderDetails.md create mode 100644 target/python/binance_openapi/docs/OrderResponseAck.md create mode 100644 target/python/binance_openapi/docs/OrderResponseFull.md create mode 100644 target/python/binance_openapi/docs/OrderResponseFullFillsInner.md create mode 100644 target/python/binance_openapi/docs/OrderResponseResult.md create mode 100644 target/python/binance_openapi/docs/PayApi.md create mode 100644 target/python/binance_openapi/docs/PortfolioMarginApi.md create mode 100644 target/python/binance_openapi/docs/PriceTicker.md create mode 100644 target/python/binance_openapi/docs/RebateApi.md create mode 100644 target/python/binance_openapi/docs/RepaymentInfo.md create mode 100644 target/python/binance_openapi/docs/RepaymentInfo2.md create mode 100644 target/python/binance_openapi/docs/SapiV1AccountApiRestrictionsGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseData.md create mode 100644 target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseDataIndicators.md create mode 100644 target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition.md create mode 100644 target/python/binance_openapi/docs/SapiV1AccountInfoGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AccountSnapshotGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AccountStatusGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoFuturesHistoricalOrdersGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoFuturesNewOrderVpPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoFuturesOpenOrdersGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoFuturesOrderDelete200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoFuturesSubOrdersGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoSpotHistoricalOrdersGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoSpotNewOrderTwapPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoSpotOpenOrdersGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoSpotOrderDelete200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoSpotSubOrdersGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetAssetDetailGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetAssetDetailGet200ResponseCTR.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetAssetDividendGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetAssetDividendGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetConvertTransferPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetConvertTransferQueryByPageGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetCustodyTransferHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetDribbletGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetDustBtcPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetDustBtcPost200ResponseDetailsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetDustPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetDustPost200ResponseTransferResultInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetGetFundingAssetPost200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetTradeFeeGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetTransferGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetTransferGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetTransferPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1AssetWalletBalanceGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1BlvtRedeemPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1BlvtRedeemRecordGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1BlvtSubscribePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1BlvtSubscribeRecordGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1BlvtTokenInfoGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1BlvtUserLimitGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1C2cOrderMatchListUserOrderHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1CapitalConfigGetallGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1CapitalContractConvertibleCoinsGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates.md create mode 100644 target/python/binance_openapi/docs/SapiV1CapitalDepositAddressGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1CapitalDepositAddressListGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1CapitalDepositCreditApplyPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1CapitalDepositHisrecGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1CapitalDepositSubAddressGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1CapitalDepositSubHisrecGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1CapitalWithdrawAddressListGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1CapitalWithdrawApplyPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1CapitalWithdrawHistoryGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1ConvertAcceptQuotePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ConvertAssetInfoGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1ConvertExchangeInfoGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1ConvertGetQuotePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ConvertLimitCancelOrderPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ConvertLimitPlaceOrderPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ConvertLimitQueryOpenOrdersGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1ConvertOrderStatusGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ConvertTradeFlowGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ConvertTradeFlowGet200ResponseListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1DciProductAccountsGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1DciProductAutoCompoundEditStatusPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1DciProductListGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1DciProductListGet200ResponseListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1DciProductPositionsGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1DciProductPositionsGet200ResponseListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1DciProductSubscribePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRateHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRewardsHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryStakingHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingEthQuotaGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingEthRedeemPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryWrapHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1EthStakingWbethWrapPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1FiatOrdersGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1FiatOrdersGet200ResponseDataInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1FiatPaymentsGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1FiatPaymentsGet200ResponseDataInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1FuturesHistDataLinkGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1FuturesHistDataLinkGet200ResponseDataInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1FuturesTransferGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1FuturesTransferGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1GiftcardBuyCodeTokenLimitGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData.md create mode 100644 target/python/binance_openapi/docs/SapiV1GiftcardCreateCodePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1GiftcardCreateCodePost200ResponseData.md create mode 100644 target/python/binance_openapi/docs/SapiV1GiftcardCryptographyRsaPublicKeyGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1GiftcardRedeemCodePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1GiftcardRedeemCodePost200ResponseData.md create mode 100644 target/python/binance_openapi/docs/SapiV1GiftcardVerifyGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1GiftcardVerifyGet200ResponseData.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestAllAssetGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestHistoryListGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexInfoGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexUserSummaryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestOneOffPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestOneOffPostDetailsParameterInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestOneOffStatusGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanAddPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanEditStatusPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanIdGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanListGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestRedeemPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestSourceAssetListGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetListGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingCustomizedFixedPurchasePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingPositionChangedPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingProjectListGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LendingProjectPositionListGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanAdjustLtvPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanBorrowHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanBorrowHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanBorrowPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanCollateralDataGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanCollateralDataGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanCustomizeMarginCallPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanIncomeGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanLoanableDataGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanLoanableDataGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanLtvAdjustmentHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanOngoingOrdersGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanOngoingOrdersGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanRepayCollateralRateGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanRepayHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanRepayHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanRepayPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipBorrowPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipCollateralAccountGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipCollateralAccountGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipCollateralDataGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipCollateralDataGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipLoanableDataGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipLoanableDataGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipOngoingOrdersGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipRenewPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipRepayHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipRepayHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipRepayPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipRequestDataGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipRequestDataGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1LoanVipRequestInterestRateGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountAssetGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountDepositAddressGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountDepositPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountInfoGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountMarginAssetGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginAccountGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginAccountGet200ResponseUserAssetsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginAllAssetsGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginAllPairsGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginAvailableInventoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginAvailableInventoryGet200ResponseAssets.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginBorrowRepayGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginBorrowRepayGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginBorrowRepayPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginCapitalFlowGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginCrossMarginDataGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginDelistScheduleGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginExchangeSmallLiabilityGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginExchangeSmallLiabilityHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginForceLiquidationRecGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginForceLiquidationRecGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginInterestHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginInterestHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginInterestRateHistoryGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginIsolatedAccountLimitGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginIsolatedAccountPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginIsolatedAllPairsGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginIsolatedMarginDataGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginIsolatedMarginTierGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginLeverageBracketGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginMaxBorrowableGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginMaxLeveragePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginMaxTransferableGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginNextHourlyInterestRateGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginOpenOrderListGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginOpenOrdersDelete200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginOrderListGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginOrderOcoPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginOrderOcoPost200ResponseOrderReportsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginOrderOcoPost200ResponseOrdersInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginOrderPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginPriceIndexGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginRateLimitOrderGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginTradeCoeffGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginTransferGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MarginTransferGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigCancelPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigDetailsListGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigDetailsListGet200ResponseData.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningHashTransferProfitDetailsGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningHashTransferProfitDetailsGet200ResponseData.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningPaymentListGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningPaymentListGet200ResponseData.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningPaymentOtherGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningPaymentOtherGet200ResponseData.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningPaymentUidGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningPaymentUidGet200ResponseData.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningPubAlgoListGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningPubAlgoListGet200ResponseDataInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningPubCoinListGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningPubCoinListGet200ResponseDataInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningStatisticsUserListGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningStatisticsUserListGet200ResponseDataInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningStatisticsUserStatusGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningStatisticsUserStatusGet200ResponseData.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningWorkerDetailGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningWorkerDetailGet200ResponseDataInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningWorkerListGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningWorkerListGet200ResponseData.md create mode 100644 target/python/binance_openapi/docs/SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1NftHistoryDepositGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1NftHistoryDepositGet200ResponseListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1NftHistoryTransactionsGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1NftHistoryTransactionsGet200ResponseListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1NftHistoryWithdrawGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1NftHistoryWithdrawGet200ResponseListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1NftUserGetAssetGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1NftUserGetAssetGet200ResponseListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1PayTransactionsGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo.md create mode 100644 target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo.md create mode 100644 target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1PortfolioAccountGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1PortfolioAssetIndexPriceGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1PortfolioAutoCollectionPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1PortfolioCollateralRateGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1PortfolioInterestHistoryGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1PortfolioMarginAssetLeverageGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1PortfolioPmLoanGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1PortfolioRepayFuturesSwitchGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1PortfolioRepayPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1RebateTaxQueryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1RebateTaxQueryGet200ResponseData.md create mode 100644 target/python/binance_openapi/docs/SapiV1RebateTaxQueryGet200ResponseDataDataInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnAccountGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleListGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexiblePositionGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleRedeemPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleSubscribePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnLockedPositionGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnLockedSubscribePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SpotDelistScheduleGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountBlvtEnablePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountEoptionsEnablePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountSummaryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountFuturesEnablePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountFuturesInternalTransferGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountFuturesInternalTransferPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountFuturesPositionRiskGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountFuturesTransferPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountListGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountListGet200ResponseSubAccountsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountSummaryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountMarginEnablePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountSpotSummaryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountStatusGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountSubAccountApiIpRestrictionGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountSubTransferHistoryGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountTransactionStatisticsGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountUniversalTransferGet200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountUniversalTransferPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SubAccountVirtualSubAccountPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1SystemStatusGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV1UserDataStreamIsolatedPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2EthStakingAccountGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2EthStakingAccountGet200ResponseHoldings.md create mode 100644 target/python/binance_openapi/docs/SapiV2EthStakingAccountGet200ResponseProfit.md create mode 100644 target/python/binance_openapi/docs/SapiV2EthStakingEthStakePost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleAdjustLtvPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleBorrowHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleBorrowPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleCollateralDataGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleLoanableDataGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleOngoingOrdersGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleRepayHistoryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner.md create mode 100644 target/python/binance_openapi/docs/SapiV2LoanFlexibleRepayPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2SubAccountFuturesAccountGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2SubAccountFuturesAccountSummaryGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2SubAccountFuturesPositionRiskGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV2SubAccountSubAccountApiIpRestrictionPost200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV3AssetGetUserAssetPost200ResponseInner.md create mode 100644 target/python/binance_openapi/docs/SapiV3SubAccountAssetsGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV3SubAccountAssetsGet200ResponseBalancesInner.md create mode 100644 target/python/binance_openapi/docs/SapiV4SubAccountAssetsGet200Response.md create mode 100644 target/python/binance_openapi/docs/SapiV4SubAccountAssetsGet200ResponseBalancesInner.md create mode 100644 target/python/binance_openapi/docs/SavingsApi.md create mode 100644 target/python/binance_openapi/docs/SimpleEarnApi.md create mode 100644 target/python/binance_openapi/docs/SnapshotFutures.md create mode 100644 target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInner.md create mode 100644 target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInnerData.md create mode 100644 target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInnerDataAssetsInner.md create mode 100644 target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInnerDataPositionInner.md create mode 100644 target/python/binance_openapi/docs/SnapshotMargin.md create mode 100644 target/python/binance_openapi/docs/SnapshotMarginSnapshotVosInner.md create mode 100644 target/python/binance_openapi/docs/SnapshotMarginSnapshotVosInnerData.md create mode 100644 target/python/binance_openapi/docs/SnapshotMarginSnapshotVosInnerDataUserAssetsInner.md create mode 100644 target/python/binance_openapi/docs/SnapshotSpot.md create mode 100644 target/python/binance_openapi/docs/SnapshotSpotSnapshotVosInner.md create mode 100644 target/python/binance_openapi/docs/SnapshotSpotSnapshotVosInnerData.md create mode 100644 target/python/binance_openapi/docs/SnapshotSpotSnapshotVosInnerDataBalancesInner.md create mode 100644 target/python/binance_openapi/docs/SpotAlgoApi.md create mode 100644 target/python/binance_openapi/docs/StakingApi.md create mode 100644 target/python/binance_openapi/docs/StreamApi.md create mode 100644 target/python/binance_openapi/docs/SubAccountApi.md create mode 100644 target/python/binance_openapi/docs/SubAccountCOINFuturesDetails.md create mode 100644 target/python/binance_openapi/docs/SubAccountCOINFuturesDetailsAssetsInner.md create mode 100644 target/python/binance_openapi/docs/SubAccountCOINFuturesPositionRisk.md create mode 100644 target/python/binance_openapi/docs/SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner.md create mode 100644 target/python/binance_openapi/docs/SubAccountCOINFuturesSummary.md create mode 100644 target/python/binance_openapi/docs/SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp.md create mode 100644 target/python/binance_openapi/docs/SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner.md create mode 100644 target/python/binance_openapi/docs/SubAccountUSDTFuturesDetails.md create mode 100644 target/python/binance_openapi/docs/SubAccountUSDTFuturesDetailsFutureAccountResp.md create mode 100644 target/python/binance_openapi/docs/SubAccountUSDTFuturesPositionRisk.md create mode 100644 target/python/binance_openapi/docs/SubAccountUSDTFuturesSummary.md create mode 100644 target/python/binance_openapi/docs/SubAccountUSDTFuturesSummaryFutureAccountSummaryResp.md create mode 100644 target/python/binance_openapi/docs/SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner.md create mode 100644 target/python/binance_openapi/docs/Ticker.md create mode 100644 target/python/binance_openapi/docs/Trade.md create mode 100644 target/python/binance_openapi/docs/TradeApi.md create mode 100644 target/python/binance_openapi/docs/Transaction.md create mode 100644 target/python/binance_openapi/docs/VIPLoansApi.md create mode 100644 target/python/binance_openapi/docs/WalletApi.md create mode 100644 target/python/binance_openapi/git_push.sh create mode 100644 target/python/binance_openapi/openapi_client/__init__.py create mode 100644 target/python/binance_openapi/openapi_client/api/__init__.py create mode 100644 target/python/binance_openapi/openapi_client/api/auto_invest_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/blvt_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/c2_c_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/convert_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/crypto_loans_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/dual_investment_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/fiat_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/futures_algo_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/futures_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/gift_card_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/isolated_margin_stream_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/margin_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/margin_stream_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/market_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/mining_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/nft_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/pay_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/portfolio_margin_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/rebate_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/savings_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/simple_earn_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/spot_algo_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/staking_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/stream_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/sub_account_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/trade_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/vip_loans_api.py create mode 100644 target/python/binance_openapi/openapi_client/api/wallet_api.py create mode 100644 target/python/binance_openapi/openapi_client/api_client.py create mode 100644 target/python/binance_openapi/openapi_client/api_response.py create mode 100644 target/python/binance_openapi/openapi_client/configuration.py create mode 100644 target/python/binance_openapi/openapi_client/exceptions.py create mode 100644 target/python/binance_openapi/openapi_client/models/__init__.py create mode 100644 target/python/binance_openapi/openapi_client/models/account.py create mode 100644 target/python/binance_openapi/openapi_client/models/account_balances_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/account_commission_rates.py create mode 100644 target/python/binance_openapi/openapi_client/models/agg_trade.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response_discount.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response_standard_commission.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response_tax_commission.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_all_order_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_all_order_list_get200_response_inner_orders_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_avg_price_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_depth_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response_rate_limits_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response_symbols_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response_symbols_inner_filters_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_klines_get200_response_inner_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_my_allocations_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_my_prevented_matches_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_open_order_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_open_order_list_get200_response_inner_orders_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_open_orders_delete200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_order_cancel_replace_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_order_cancel_replace_post200_response_cancel_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_order_cancel_replace_post200_response_new_order_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_order_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_order_list_get200_response_orders_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_order_oco_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_order_oco_post200_response_order_reports_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_order_oco_post200_response_orders_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_order_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_rate_limit_order_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_sor_order_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_sor_order_post200_response_fills_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_ticker24hr_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_ticker_book_ticker_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_ticker_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_ticker_price_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_ticker_trading_day_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_time_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/api_v3_user_data_stream_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/bnb_burn_status.py create mode 100644 target/python/binance_openapi/openapi_client/models/book_ticker.py create mode 100644 target/python/binance_openapi/openapi_client/models/canceled_margin_order_detail.py create mode 100644 target/python/binance_openapi/openapi_client/models/day_ticker.py create mode 100644 target/python/binance_openapi/openapi_client/models/error.py create mode 100644 target/python/binance_openapi/openapi_client/models/isolated_margin_account_info.py create mode 100644 target/python/binance_openapi/openapi_client/models/isolated_margin_account_info_assets_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/isolated_margin_account_info_assets_inner_base_asset.py create mode 100644 target/python/binance_openapi/openapi_client/models/isolated_margin_account_info_assets_inner_quote_asset.py create mode 100644 target/python/binance_openapi/openapi_client/models/margin_oco_order.py create mode 100644 target/python/binance_openapi/openapi_client/models/margin_oco_order_order_reports_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/margin_oco_order_orders_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/margin_order.py create mode 100644 target/python/binance_openapi/openapi_client/models/margin_order_detail.py create mode 100644 target/python/binance_openapi/openapi_client/models/margin_order_response_ack.py create mode 100644 target/python/binance_openapi/openapi_client/models/margin_order_response_full.py create mode 100644 target/python/binance_openapi/openapi_client/models/margin_order_response_result.py create mode 100644 target/python/binance_openapi/openapi_client/models/margin_trade.py create mode 100644 target/python/binance_openapi/openapi_client/models/margin_transfer_details.py create mode 100644 target/python/binance_openapi/openapi_client/models/margin_transfer_details_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/my_trade.py create mode 100644 target/python/binance_openapi/openapi_client/models/oco_order.py create mode 100644 target/python/binance_openapi/openapi_client/models/oco_order_order_reports_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/order.py create mode 100644 target/python/binance_openapi/openapi_client/models/order_details.py create mode 100644 target/python/binance_openapi/openapi_client/models/order_response_ack.py create mode 100644 target/python/binance_openapi/openapi_client/models/order_response_full.py create mode 100644 target/python/binance_openapi/openapi_client/models/order_response_full_fills_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/order_response_result.py create mode 100644 target/python/binance_openapi/openapi_client/models/price_ticker.py create mode 100644 target/python/binance_openapi/openapi_client/models/repayment_info.py create mode 100644 target/python/binance_openapi/openapi_client/models/repayment_info2.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_restrictions_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data_indicators.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data_trigger_condition.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_account_info_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_account_snapshot_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_account_status_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_historical_orders_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_historical_orders_get200_response_orders_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_new_order_vp_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_open_orders_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_open_orders_get200_response_orders_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_order_delete200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_sub_orders_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_historical_orders_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_historical_orders_get200_response_orders_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_new_order_twap_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_open_orders_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_open_orders_get200_response_orders_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_order_delete200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_sub_orders_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_detail_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_detail_get200_response_ctr.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_dividend_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_dividend_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_convert_transfer_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_convert_transfer_query_by_page_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_custody_transfer_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_custody_transfer_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dribblet_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_btc_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_btc_post200_response_details_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_post200_response_transfer_result_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_get_funding_asset_post200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_trade_fee_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_transfer_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_transfer_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_transfer_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_asset_wallet_balance_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_redeem_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_redeem_record_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_subscribe_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_subscribe_record_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_token_info_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_user_limit_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_c2c_order_match_list_user_order_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_capital_config_getall_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_capital_config_getall_get200_response_inner_network_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_capital_contract_convertible_coins_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_address_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_address_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_credit_apply_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_hisrec_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_sub_address_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_sub_hisrec_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_capital_withdraw_address_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_capital_withdraw_apply_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_capital_withdraw_history_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_convert_accept_quote_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_convert_asset_info_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_convert_exchange_info_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_convert_get_quote_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_cancel_order_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_place_order_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_query_open_orders_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_query_open_orders_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_convert_order_status_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_convert_trade_flow_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_convert_trade_flow_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_accounts_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_auto_compound_edit_status_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_list_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_positions_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_positions_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_subscribe_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rate_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_redemption_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rewards_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_staking_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_quota_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_redeem_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_wrap_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_orders_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_orders_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_payments_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_payments_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_futures_hist_data_link_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_futures_hist_data_link_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_futures_transfer_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_futures_transfer_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_buy_code_token_limit_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_buy_code_token_limit_get200_response_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_create_code_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_create_code_post200_response_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_cryptography_rsa_public_key_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_redeem_code_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_redeem_code_post200_response_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_verify_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_verify_get200_response_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_all_asset_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_history_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_info_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_user_summary_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_one_off_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_one_off_status_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_add_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_edit_status_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_id_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_redeem_history_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_redeem_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_source_asset_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_customized_fixed_purchase_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_position_changed_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_project_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_lending_project_position_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_adjust_ltv_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_borrow_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_borrow_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_borrow_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_collateral_data_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_collateral_data_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_customize_margin_call_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_customize_margin_call_post200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_income_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_loanable_data_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_loanable_data_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ltv_adjustment_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ongoing_orders_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ongoing_orders_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_collateral_rate_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_borrow_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_account_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_account_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_data_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_data_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_loanable_data_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_loanable_data_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_ongoing_orders_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_renew_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_repay_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_repay_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_repay_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_request_data_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_request_data_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_request_interest_rate_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_asset_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_deposit_address_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_deposit_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_info_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_margin_asset_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_account_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_account_get200_response_user_assets_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_all_assets_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_all_pairs_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_available_inventory_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_available_inventory_get200_response_assets.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_borrow_repay_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_borrow_repay_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_borrow_repay_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_capital_flow_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_cross_margin_data_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_delist_schedule_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_exchange_small_liability_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_exchange_small_liability_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_force_liquidation_rec_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_interest_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_interest_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_interest_rate_history_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_account_limit_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_account_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_all_pairs_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_margin_data_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_margin_tier_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_leverage_bracket_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_max_borrowable_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_max_leverage_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_max_transferable_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_next_hourly_interest_rate_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_open_order_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_open_orders_delete200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_oco_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_oco_post200_response_order_reports_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_oco_post200_response_orders_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_price_index_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_rate_limit_order_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_trade_coeff_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_transfer_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_margin_transfer_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_cancel_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_details_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_details_list_get200_response_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_profit_details_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_profit_details_get200_response_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_list_get200_response_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_list_get200_response_data_account_profits_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_other_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_other_get200_response_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_other_get200_response_data_other_profits_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_uid_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_uid_get200_response_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_algo_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_algo_list_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_coin_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_coin_list_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_list_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_status_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_status_get200_response_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_status_get200_response_data_profit_today.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_detail_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_detail_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_list_get200_response_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_deposit_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_deposit_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_transactions_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_transactions_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_withdraw_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_withdraw_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_nft_user_get_asset_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_nft_user_get_asset_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_payer_info.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_receiver_info.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_account_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_asset_index_price_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_auto_collection_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_collateral_rate_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_interest_history_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_margin_asset_leverage_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_pm_loan_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_repay_futures_switch_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_repay_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_rebate_tax_query_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_rebate_tax_query_get200_response_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_rebate_tax_query_get200_response_data_data_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_account_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_collateral_record_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rate_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_redemption_record_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rewards_record_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_subscription_record_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_list_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_personal_left_quota_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_position_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_position_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_redeem_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_subscribe_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_subscription_preview_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_redemption_record_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_rewards_record_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_subscription_record_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_position_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_position_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_subscribe_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_spot_delist_schedule_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_blvt_enable_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_eoptions_enable_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_get200_response_assets_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_summary_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_enable_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_internal_transfer_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_internal_transfer_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_position_risk_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_transfer_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_list_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_list_get200_response_sub_accounts_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_summary_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_enable_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_spot_summary_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_status_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_sub_transfer_history_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_transaction_statistics_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_universal_transfer_get200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_universal_transfer_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_virtual_sub_account_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_system_status_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v1_user_data_stream_isolated_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_account_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_account_get200_response_holdings.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_account_get200_response_profit.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_eth_stake_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_adjust_ltv_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_borrow_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_borrow_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_collateral_data_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_loanable_data_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ltv_adjustment_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ongoing_orders_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_repay_history_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_repay_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_repay_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_futures_account_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_futures_account_summary_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_futures_position_risk_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v3_asset_get_user_asset_post200_response_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v3_sub_account_assets_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v3_sub_account_assets_get200_response_balances_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v4_sub_account_assets_get200_response.py create mode 100644 target/python/binance_openapi/openapi_client/models/sapi_v4_sub_account_assets_get200_response_balances_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/snapshot_futures.py create mode 100644 target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner_data_assets_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner_data_position_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/snapshot_margin.py create mode 100644 target/python/binance_openapi/openapi_client/models/snapshot_margin_snapshot_vos_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/snapshot_margin_snapshot_vos_inner_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/snapshot_margin_snapshot_vos_inner_data_user_assets_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/snapshot_spot.py create mode 100644 target/python/binance_openapi/openapi_client/models/snapshot_spot_snapshot_vos_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/snapshot_spot_snapshot_vos_inner_data.py create mode 100644 target/python/binance_openapi/openapi_client/models/snapshot_spot_snapshot_vos_inner_data_balances_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_details.py create mode 100644 target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_details_assets_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_position_risk.py create mode 100644 target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_summary.py create mode 100644 target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_summary_delivery_account_summary_resp.py create mode 100644 target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_details.py create mode 100644 target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_details_future_account_resp.py create mode 100644 target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_position_risk.py create mode 100644 target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_summary.py create mode 100644 target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_summary_future_account_summary_resp.py create mode 100644 target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.py create mode 100644 target/python/binance_openapi/openapi_client/models/ticker.py create mode 100644 target/python/binance_openapi/openapi_client/models/trade.py create mode 100644 target/python/binance_openapi/openapi_client/models/transaction.py create mode 100644 target/python/binance_openapi/openapi_client/py.typed create mode 100644 target/python/binance_openapi/openapi_client/rest.py create mode 100644 target/python/binance_openapi/pyproject.toml create mode 100644 target/python/binance_openapi/requirements.txt create mode 100644 target/python/binance_openapi/setup.cfg create mode 100644 target/python/binance_openapi/setup.py create mode 100644 target/python/binance_openapi/test-requirements.txt create mode 100644 target/python/binance_openapi/test/__init__.py create mode 100644 target/python/binance_openapi/test/test_account.py create mode 100644 target/python/binance_openapi/test/test_account_balances_inner.py create mode 100644 target/python/binance_openapi/test/test_account_commission_rates.py create mode 100644 target/python/binance_openapi/test/test_agg_trade.py create mode 100644 target/python/binance_openapi/test/test_api_v3_account_commission_get200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_account_commission_get200_response_discount.py create mode 100644 target/python/binance_openapi/test/test_api_v3_account_commission_get200_response_standard_commission.py create mode 100644 target/python/binance_openapi/test/test_api_v3_account_commission_get200_response_tax_commission.py create mode 100644 target/python/binance_openapi/test/test_api_v3_all_order_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_all_order_list_get200_response_inner_orders_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_avg_price_get200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_depth_get200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response_rate_limits_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response_symbols_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response_symbols_inner_filters_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_klines_get200_response_inner_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_my_allocations_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_my_prevented_matches_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_open_order_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_open_order_list_get200_response_inner_orders_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_open_orders_delete200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_order_cancel_replace_post200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_order_cancel_replace_post200_response_cancel_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_order_cancel_replace_post200_response_new_order_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_order_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_order_list_get200_response_orders_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_order_oco_post200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_order_oco_post200_response_order_reports_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_order_oco_post200_response_orders_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_order_post200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_rate_limit_order_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_sor_order_post200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_sor_order_post200_response_fills_inner.py create mode 100644 target/python/binance_openapi/test/test_api_v3_ticker24hr_get200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_ticker_book_ticker_get200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_ticker_get200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_ticker_price_get200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_ticker_trading_day_get200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_time_get200_response.py create mode 100644 target/python/binance_openapi/test/test_api_v3_user_data_stream_post200_response.py create mode 100644 target/python/binance_openapi/test/test_auto_invest_api.py create mode 100644 target/python/binance_openapi/test/test_blvt_api.py create mode 100644 target/python/binance_openapi/test/test_bnb_burn_status.py create mode 100644 target/python/binance_openapi/test/test_book_ticker.py create mode 100644 target/python/binance_openapi/test/test_c2_c_api.py create mode 100644 target/python/binance_openapi/test/test_canceled_margin_order_detail.py create mode 100644 target/python/binance_openapi/test/test_convert_api.py create mode 100644 target/python/binance_openapi/test/test_crypto_loans_api.py create mode 100644 target/python/binance_openapi/test/test_day_ticker.py create mode 100644 target/python/binance_openapi/test/test_dual_investment_api.py create mode 100644 target/python/binance_openapi/test/test_error.py create mode 100644 target/python/binance_openapi/test/test_fiat_api.py create mode 100644 target/python/binance_openapi/test/test_futures_algo_api.py create mode 100644 target/python/binance_openapi/test/test_futures_api.py create mode 100644 target/python/binance_openapi/test/test_gift_card_api.py create mode 100644 target/python/binance_openapi/test/test_isolated_margin_account_info.py create mode 100644 target/python/binance_openapi/test/test_isolated_margin_account_info_assets_inner.py create mode 100644 target/python/binance_openapi/test/test_isolated_margin_account_info_assets_inner_base_asset.py create mode 100644 target/python/binance_openapi/test/test_isolated_margin_account_info_assets_inner_quote_asset.py create mode 100644 target/python/binance_openapi/test/test_isolated_margin_stream_api.py create mode 100644 target/python/binance_openapi/test/test_margin_api.py create mode 100644 target/python/binance_openapi/test/test_margin_oco_order.py create mode 100644 target/python/binance_openapi/test/test_margin_oco_order_order_reports_inner.py create mode 100644 target/python/binance_openapi/test/test_margin_oco_order_orders_inner.py create mode 100644 target/python/binance_openapi/test/test_margin_order.py create mode 100644 target/python/binance_openapi/test/test_margin_order_detail.py create mode 100644 target/python/binance_openapi/test/test_margin_order_response_ack.py create mode 100644 target/python/binance_openapi/test/test_margin_order_response_full.py create mode 100644 target/python/binance_openapi/test/test_margin_order_response_result.py create mode 100644 target/python/binance_openapi/test/test_margin_stream_api.py create mode 100644 target/python/binance_openapi/test/test_margin_trade.py create mode 100644 target/python/binance_openapi/test/test_margin_transfer_details.py create mode 100644 target/python/binance_openapi/test/test_margin_transfer_details_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_market_api.py create mode 100644 target/python/binance_openapi/test/test_mining_api.py create mode 100644 target/python/binance_openapi/test/test_my_trade.py create mode 100644 target/python/binance_openapi/test/test_nft_api.py create mode 100644 target/python/binance_openapi/test/test_oco_order.py create mode 100644 target/python/binance_openapi/test/test_oco_order_order_reports_inner.py create mode 100644 target/python/binance_openapi/test/test_order.py create mode 100644 target/python/binance_openapi/test/test_order_details.py create mode 100644 target/python/binance_openapi/test/test_order_response_ack.py create mode 100644 target/python/binance_openapi/test/test_order_response_full.py create mode 100644 target/python/binance_openapi/test/test_order_response_full_fills_inner.py create mode 100644 target/python/binance_openapi/test/test_order_response_result.py create mode 100644 target/python/binance_openapi/test/test_pay_api.py create mode 100644 target/python/binance_openapi/test/test_portfolio_margin_api.py create mode 100644 target/python/binance_openapi/test/test_price_ticker.py create mode 100644 target/python/binance_openapi/test/test_rebate_api.py create mode 100644 target/python/binance_openapi/test/test_repayment_info.py create mode 100644 target/python/binance_openapi/test/test_repayment_info2.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_account_api_restrictions_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data_indicators.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data_trigger_condition.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_account_info_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_account_snapshot_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_account_status_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_futures_historical_orders_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_futures_historical_orders_get200_response_orders_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_futures_new_order_vp_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_futures_open_orders_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_futures_open_orders_get200_response_orders_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_futures_order_delete200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_futures_sub_orders_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_spot_historical_orders_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_spot_historical_orders_get200_response_orders_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_spot_new_order_twap_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_spot_open_orders_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_spot_open_orders_get200_response_orders_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_spot_order_delete200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_spot_sub_orders_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_asset_detail_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_asset_detail_get200_response_ctr.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_asset_dividend_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_asset_dividend_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_convert_transfer_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_convert_transfer_query_by_page_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_custody_transfer_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_custody_transfer_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_dribblet_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_dust_btc_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_dust_btc_post200_response_details_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_dust_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_dust_post200_response_transfer_result_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_get_funding_asset_post200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_trade_fee_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_transfer_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_transfer_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_transfer_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_asset_wallet_balance_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_blvt_redeem_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_blvt_redeem_record_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_blvt_subscribe_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_blvt_subscribe_record_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_blvt_token_info_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_blvt_user_limit_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_c2c_order_match_list_user_order_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_capital_config_getall_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_capital_config_getall_get200_response_inner_network_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_capital_contract_convertible_coins_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_capital_deposit_address_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_capital_deposit_address_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_capital_deposit_credit_apply_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_capital_deposit_hisrec_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_capital_deposit_sub_address_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_capital_deposit_sub_hisrec_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_capital_withdraw_address_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_capital_withdraw_apply_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_capital_withdraw_history_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_convert_accept_quote_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_convert_asset_info_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_convert_exchange_info_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_convert_get_quote_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_convert_limit_cancel_order_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_convert_limit_place_order_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_convert_limit_query_open_orders_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_convert_limit_query_open_orders_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_convert_order_status_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_convert_trade_flow_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_convert_trade_flow_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_dci_product_accounts_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_dci_product_auto_compound_edit_status_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_dci_product_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_dci_product_list_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_dci_product_positions_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_dci_product_positions_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_dci_product_subscribe_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rate_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_redemption_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rewards_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_staking_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_quota_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_redeem_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_wrap_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_fiat_orders_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_fiat_orders_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_fiat_payments_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_fiat_payments_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_futures_hist_data_link_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_futures_hist_data_link_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_futures_transfer_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_futures_transfer_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_giftcard_buy_code_token_limit_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_giftcard_buy_code_token_limit_get200_response_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_giftcard_create_code_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_giftcard_create_code_post200_response_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_giftcard_cryptography_rsa_public_key_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_giftcard_redeem_code_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_giftcard_redeem_code_post200_response_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_giftcard_verify_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_giftcard_verify_get200_response_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_all_asset_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_history_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_info_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_user_summary_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_one_off_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_one_off_status_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_add_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_edit_status_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_id_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_redeem_history_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_redeem_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_source_asset_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_customized_fixed_purchase_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_position_changed_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_project_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_lending_project_position_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_adjust_ltv_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_borrow_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_borrow_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_borrow_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_collateral_data_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_collateral_data_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_customize_margin_call_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_customize_margin_call_post200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_income_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_loanable_data_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_loanable_data_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_ltv_adjustment_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_ongoing_orders_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_ongoing_orders_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_repay_collateral_rate_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_repay_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_repay_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_repay_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_borrow_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_account_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_account_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_data_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_data_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_loanable_data_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_loanable_data_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_ongoing_orders_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_renew_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_repay_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_repay_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_repay_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_request_data_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_request_data_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_loan_vip_request_interest_rate_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_asset_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_deposit_address_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_deposit_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_info_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_margin_asset_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_account_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_account_get200_response_user_assets_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_all_assets_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_all_pairs_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_available_inventory_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_available_inventory_get200_response_assets.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_borrow_repay_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_borrow_repay_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_borrow_repay_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_capital_flow_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_cross_margin_data_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_delist_schedule_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_exchange_small_liability_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_exchange_small_liability_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_force_liquidation_rec_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_interest_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_interest_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_interest_rate_history_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_isolated_account_limit_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_isolated_account_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_isolated_all_pairs_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_isolated_margin_data_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_isolated_margin_tier_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_leverage_bracket_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_max_borrowable_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_max_leverage_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_max_transferable_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_next_hourly_interest_rate_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_open_order_list_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_open_orders_delete200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_order_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_order_oco_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_order_oco_post200_response_order_reports_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_order_oco_post200_response_orders_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_order_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_price_index_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_rate_limit_order_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_trade_coeff_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_transfer_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_margin_transfer_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_cancel_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_details_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_details_list_get200_response_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_profit_details_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_profit_details_get200_response_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_payment_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_payment_list_get200_response_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_payment_list_get200_response_data_account_profits_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_payment_other_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_payment_other_get200_response_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_payment_other_get200_response_data_other_profits_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_payment_uid_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_payment_uid_get200_response_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_pub_algo_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_pub_algo_list_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_pub_coin_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_pub_coin_list_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_list_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_status_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_status_get200_response_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_status_get200_response_data_profit_today.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_worker_detail_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_worker_detail_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_worker_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_worker_list_get200_response_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_nft_history_deposit_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_nft_history_deposit_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_nft_history_transactions_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_nft_history_transactions_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_nft_history_withdraw_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_nft_history_withdraw_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_nft_user_get_asset_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_nft_user_get_asset_get200_response_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_payer_info.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_receiver_info.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_portfolio_account_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_portfolio_asset_index_price_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_portfolio_auto_collection_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_portfolio_collateral_rate_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_portfolio_interest_history_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_portfolio_margin_asset_leverage_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_portfolio_pm_loan_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_portfolio_repay_futures_switch_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_portfolio_repay_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_rebate_tax_query_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_rebate_tax_query_get200_response_data.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_rebate_tax_query_get200_response_data_data_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_account_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_collateral_record_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rate_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_redemption_record_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rewards_record_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_subscription_record_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_list_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_personal_left_quota_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_position_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_position_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_redeem_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_subscribe_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_subscription_preview_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_redemption_record_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_rewards_record_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_subscription_record_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_position_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_position_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_subscribe_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_spot_delist_schedule_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_blvt_enable_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_eoptions_enable_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_get200_response_assets_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_summary_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_enable_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_internal_transfer_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_internal_transfer_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_position_risk_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_transfer_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_list_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_list_get200_response_sub_accounts_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_summary_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_enable_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_spot_summary_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_status_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_sub_transfer_history_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_transaction_statistics_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_universal_transfer_get200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_universal_transfer_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_sub_account_virtual_sub_account_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_system_status_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v1_user_data_stream_isolated_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_eth_staking_account_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_eth_staking_account_get200_response_holdings.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_eth_staking_account_get200_response_profit.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_eth_staking_eth_stake_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_adjust_ltv_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_borrow_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_borrow_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_collateral_data_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_loanable_data_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ltv_adjustment_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ongoing_orders_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_repay_history_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_repay_history_get200_response_rows_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_loan_flexible_repay_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_sub_account_futures_account_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_sub_account_futures_account_summary_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_sub_account_futures_position_risk_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v3_asset_get_user_asset_post200_response_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v3_sub_account_assets_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v3_sub_account_assets_get200_response_balances_inner.py create mode 100644 target/python/binance_openapi/test/test_sapi_v4_sub_account_assets_get200_response.py create mode 100644 target/python/binance_openapi/test/test_sapi_v4_sub_account_assets_get200_response_balances_inner.py create mode 100644 target/python/binance_openapi/test/test_savings_api.py create mode 100644 target/python/binance_openapi/test/test_simple_earn_api.py create mode 100644 target/python/binance_openapi/test/test_snapshot_futures.py create mode 100644 target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner.py create mode 100644 target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner_data.py create mode 100644 target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner_data_assets_inner.py create mode 100644 target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner_data_position_inner.py create mode 100644 target/python/binance_openapi/test/test_snapshot_margin.py create mode 100644 target/python/binance_openapi/test/test_snapshot_margin_snapshot_vos_inner.py create mode 100644 target/python/binance_openapi/test/test_snapshot_margin_snapshot_vos_inner_data.py create mode 100644 target/python/binance_openapi/test/test_snapshot_margin_snapshot_vos_inner_data_user_assets_inner.py create mode 100644 target/python/binance_openapi/test/test_snapshot_spot.py create mode 100644 target/python/binance_openapi/test/test_snapshot_spot_snapshot_vos_inner.py create mode 100644 target/python/binance_openapi/test/test_snapshot_spot_snapshot_vos_inner_data.py create mode 100644 target/python/binance_openapi/test/test_snapshot_spot_snapshot_vos_inner_data_balances_inner.py create mode 100644 target/python/binance_openapi/test/test_spot_algo_api.py create mode 100644 target/python/binance_openapi/test/test_staking_api.py create mode 100644 target/python/binance_openapi/test/test_stream_api.py create mode 100644 target/python/binance_openapi/test/test_sub_account_api.py create mode 100644 target/python/binance_openapi/test/test_sub_account_coin_futures_details.py create mode 100644 target/python/binance_openapi/test/test_sub_account_coin_futures_details_assets_inner.py create mode 100644 target/python/binance_openapi/test/test_sub_account_coin_futures_position_risk.py create mode 100644 target/python/binance_openapi/test/test_sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.py create mode 100644 target/python/binance_openapi/test/test_sub_account_coin_futures_summary.py create mode 100644 target/python/binance_openapi/test/test_sub_account_coin_futures_summary_delivery_account_summary_resp.py create mode 100644 target/python/binance_openapi/test/test_sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.py create mode 100644 target/python/binance_openapi/test/test_sub_account_usdt_futures_details.py create mode 100644 target/python/binance_openapi/test/test_sub_account_usdt_futures_details_future_account_resp.py create mode 100644 target/python/binance_openapi/test/test_sub_account_usdt_futures_position_risk.py create mode 100644 target/python/binance_openapi/test/test_sub_account_usdt_futures_summary.py create mode 100644 target/python/binance_openapi/test/test_sub_account_usdt_futures_summary_future_account_summary_resp.py create mode 100644 target/python/binance_openapi/test/test_sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.py create mode 100644 target/python/binance_openapi/test/test_ticker.py create mode 100644 target/python/binance_openapi/test/test_trade.py create mode 100644 target/python/binance_openapi/test/test_trade_api.py create mode 100644 target/python/binance_openapi/test/test_transaction.py create mode 100644 target/python/binance_openapi/test/test_vip_loans_api.py create mode 100644 target/python/binance_openapi/test/test_wallet_api.py create mode 100644 target/python/binance_openapi/tox.ini create mode 100644 test_rust/.gitignore create mode 100644 test_rust/.openapi-generator-ignore create mode 100644 test_rust/.openapi-generator/FILES create mode 100644 test_rust/.openapi-generator/VERSION create mode 100644 test_rust/Cargo.toml create mode 100644 test_rust/src/apis/auto_invest_api.rs create mode 100644 test_rust/src/apis/blvt_api.rs create mode 100644 test_rust/src/apis/c2_c_api.rs create mode 100644 test_rust/src/apis/configuration.rs create mode 100644 test_rust/src/apis/convert_api.rs create mode 100644 test_rust/src/apis/crypto_loans_api.rs create mode 100644 test_rust/src/apis/dual_investment_api.rs create mode 100644 test_rust/src/apis/fiat_api.rs create mode 100644 test_rust/src/apis/futures_algo_api.rs create mode 100644 test_rust/src/apis/futures_api.rs create mode 100644 test_rust/src/apis/gift_card_api.rs create mode 100644 test_rust/src/apis/isolated_margin_stream_api.rs create mode 100644 test_rust/src/apis/margin_api.rs create mode 100644 test_rust/src/apis/margin_stream_api.rs create mode 100644 test_rust/src/apis/market_api.rs create mode 100644 test_rust/src/apis/mining_api.rs create mode 100644 test_rust/src/apis/mod.rs create mode 100644 test_rust/src/apis/nft_api.rs create mode 100644 test_rust/src/apis/pay_api.rs create mode 100644 test_rust/src/apis/portfolio_margin_api.rs create mode 100644 test_rust/src/apis/rebate_api.rs create mode 100644 test_rust/src/apis/savings_api.rs create mode 100644 test_rust/src/apis/simple_earn_api.rs create mode 100644 test_rust/src/apis/spot_algo_api.rs create mode 100644 test_rust/src/apis/staking_api.rs create mode 100644 test_rust/src/apis/stream_api.rs create mode 100644 test_rust/src/apis/sub_account_api.rs create mode 100644 test_rust/src/apis/trade_api.rs create mode 100644 test_rust/src/apis/vip_loans_api.rs create mode 100644 test_rust/src/apis/wallet_api.rs create mode 100644 test_rust/src/lib.rs create mode 100644 test_rust/src/models/_api_v3_account_commission_get_200_response.rs create mode 100644 test_rust/src/models/_api_v3_account_commission_get_200_response_discount.rs create mode 100644 test_rust/src/models/_api_v3_account_commission_get_200_response_standard_commission.rs create mode 100644 test_rust/src/models/_api_v3_account_commission_get_200_response_tax_commission.rs create mode 100644 test_rust/src/models/_api_v3_all_order_list_get_200_response_inner.rs create mode 100644 test_rust/src/models/_api_v3_all_order_list_get_200_response_inner_orders_inner.rs create mode 100644 test_rust/src/models/_api_v3_avg_price_get_200_response.rs create mode 100644 test_rust/src/models/_api_v3_depth_get_200_response.rs create mode 100644 test_rust/src/models/_api_v3_exchange_info_get_200_response.rs create mode 100644 test_rust/src/models/_api_v3_exchange_info_get_200_response_rate_limits_inner.rs create mode 100644 test_rust/src/models/_api_v3_exchange_info_get_200_response_symbols_inner.rs create mode 100644 test_rust/src/models/_api_v3_exchange_info_get_200_response_symbols_inner_filters_inner.rs create mode 100644 test_rust/src/models/_api_v3_klines_get_200_response_inner_inner.rs create mode 100644 test_rust/src/models/_api_v3_my_allocations_get_200_response_inner.rs create mode 100644 test_rust/src/models/_api_v3_my_prevented_matches_get_200_response_inner.rs create mode 100644 test_rust/src/models/_api_v3_open_order_list_get_200_response_inner.rs create mode 100644 test_rust/src/models/_api_v3_open_order_list_get_200_response_inner_orders_inner.rs create mode 100644 test_rust/src/models/_api_v3_open_orders_delete_200_response_inner.rs create mode 100644 test_rust/src/models/_api_v3_order_cancel_replace_post_200_response.rs create mode 100644 test_rust/src/models/_api_v3_order_cancel_replace_post_200_response_cancel_response.rs create mode 100644 test_rust/src/models/_api_v3_order_cancel_replace_post_200_response_new_order_response.rs create mode 100644 test_rust/src/models/_api_v3_order_list_get_200_response.rs create mode 100644 test_rust/src/models/_api_v3_order_list_get_200_response_orders_inner.rs create mode 100644 test_rust/src/models/_api_v3_order_oco_post_200_response.rs create mode 100644 test_rust/src/models/_api_v3_order_oco_post_200_response_order_reports_inner.rs create mode 100644 test_rust/src/models/_api_v3_order_oco_post_200_response_orders_inner.rs create mode 100644 test_rust/src/models/_api_v3_order_post_200_response.rs create mode 100644 test_rust/src/models/_api_v3_rate_limit_order_get_200_response_inner.rs create mode 100644 test_rust/src/models/_api_v3_sor_order_post_200_response.rs create mode 100644 test_rust/src/models/_api_v3_sor_order_post_200_response_fills_inner.rs create mode 100644 test_rust/src/models/_api_v3_ticker_24hr_get_200_response.rs create mode 100644 test_rust/src/models/_api_v3_ticker_book_ticker_get_200_response.rs create mode 100644 test_rust/src/models/_api_v3_ticker_get_200_response.rs create mode 100644 test_rust/src/models/_api_v3_ticker_price_get_200_response.rs create mode 100644 test_rust/src/models/_api_v3_ticker_trading_day_get_200_response.rs create mode 100644 test_rust/src/models/_api_v3_time_get_200_response.rs create mode 100644 test_rust/src/models/_api_v3_user_data_stream_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_account_api_restrictions_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data.rs create mode 100644 test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data_indicators.rs create mode 100644 test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data_indicators_btcusdt_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data_trigger_condition.rs create mode 100644 test_rust/src/models/_sapi_v1_account_info_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_account_snapshot_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_account_status_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_futures_historical_orders_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_futures_historical_orders_get_200_response_orders_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_futures_new_order_vp_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_futures_open_orders_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_futures_open_orders_get_200_response_orders_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_futures_order_delete_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_futures_sub_orders_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_futures_sub_orders_get_200_response_sub_orders_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_spot_historical_orders_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_spot_historical_orders_get_200_response_orders_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_spot_new_order_twap_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_spot_open_orders_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_spot_open_orders_get_200_response_orders_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_spot_order_delete_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_spot_sub_orders_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_algo_spot_sub_orders_get_200_response_sub_orders_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_asset_detail_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_asset_detail_get_200_response_ctr.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_asset_dividend_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_asset_dividend_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_convert_transfer_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_convert_transfer_query_by_page_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_convert_transfer_query_by_page_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_custody_transfer_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_custody_transfer_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_dribblet_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_dust_btc_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_dust_btc_post_200_response_details_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_dust_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_dust_post_200_response_transfer_result_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_get_funding_asset_post_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_trade_fee_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_transfer_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_transfer_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_transfer_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_asset_wallet_balance_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_blvt_redeem_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_blvt_redeem_record_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_blvt_subscribe_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_blvt_subscribe_record_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_blvt_token_info_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_blvt_token_info_get_200_response_inner_current_baskets_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_blvt_user_limit_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_c2c_order_match_list_user_order_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_c2c_order_match_list_user_order_history_get_200_response_data_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_capital_config_getall_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_capital_config_getall_get_200_response_inner_network_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_capital_contract_convertible_coins_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_capital_contract_convertible_coins_get_200_response_exchange_rates.rs create mode 100644 test_rust/src/models/_sapi_v1_capital_deposit_address_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_capital_deposit_address_list_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_capital_deposit_credit_apply_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_capital_deposit_hisrec_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_capital_deposit_sub_address_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_capital_deposit_sub_hisrec_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_capital_withdraw_address_list_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_capital_withdraw_apply_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_capital_withdraw_history_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_convert_accept_quote_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_convert_asset_info_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_convert_exchange_info_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_convert_get_quote_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_convert_limit_cancel_order_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_convert_limit_place_order_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_convert_limit_query_open_orders_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_convert_limit_query_open_orders_get_200_response_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_convert_order_status_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_convert_trade_flow_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_convert_trade_flow_get_200_response_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_dci_product_accounts_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_dci_product_auto_compound_edit_status_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_dci_product_list_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_dci_product_list_get_200_response_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_dci_product_positions_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_dci_product_positions_get_200_response_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_dci_product_subscribe_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_eth_history_rate_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_eth_history_rate_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_eth_history_redemption_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_eth_history_redemption_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_eth_history_rewards_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_eth_history_rewards_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_eth_history_staking_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_eth_history_staking_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_eth_quota_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_eth_redeem_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_eth_staking_wbeth_wrap_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_fiat_orders_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_fiat_orders_get_200_response_data_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_fiat_payments_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_fiat_payments_get_200_response_data_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_futures_hist_data_link_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_futures_hist_data_link_get_200_response_data_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_futures_transfer_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_futures_transfer_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_giftcard_buy_code_token_limit_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_giftcard_buy_code_token_limit_get_200_response_data.rs create mode 100644 test_rust/src/models/_sapi_v1_giftcard_create_code_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_giftcard_create_code_post_200_response_data.rs create mode 100644 test_rust/src/models/_sapi_v1_giftcard_cryptography_rsa_public_key_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_giftcard_redeem_code_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_giftcard_redeem_code_post_200_response_data.rs create mode 100644 test_rust/src/models/_sapi_v1_giftcard_verify_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_giftcard_verify_get_200_response_data.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_all_asset_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_history_list_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_index_info_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_index_info_get_200_response_asset_allocation_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response_asset_allocation_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response_details_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_one_off_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_one_off_status_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_plan_add_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_plan_edit_status_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner_details_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_plan_list_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_plan_list_get_200_response_plan_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner_transaction_details_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_redeem_history_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_redeem_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_source_asset_list_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_source_asset_list_get_200_response_source_assets_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_roi_list_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_customized_fixed_purchase_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_position_changed_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_project_list_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_lending_project_position_list_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_adjust_ltv_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_borrow_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_borrow_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_borrow_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_collateral_data_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_collateral_data_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_customize_margin_call_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_customize_margin_call_post_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_income_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_loanable_data_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_loanable_data_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_ltv_adjustment_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_ltv_adjustment_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_ongoing_orders_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_ongoing_orders_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_repay_collateral_rate_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_repay_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_repay_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_repay_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_borrow_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_collateral_account_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_collateral_account_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_collateral_data_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_collateral_data_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_loanable_data_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_loanable_data_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_ongoing_orders_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_ongoing_orders_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_renew_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_repay_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_repay_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_repay_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_request_data_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_request_data_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_loan_vip_request_interest_rate_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data_balances_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_asset_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_deposit_address_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_deposit_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_assets_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_position_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_info_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_info_get_200_response_manager_sub_user_info_vo_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_margin_asset_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_margin_asset_get_200_response_user_assets_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response_manager_sub_transfer_history_vos_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_get_200_response_manager_sub_transfer_history_vos_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_account_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_account_get_200_response_user_assets_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_all_assets_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_all_pairs_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_available_inventory_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_available_inventory_get_200_response_assets.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_borrow_repay_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_borrow_repay_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_borrow_repay_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_capital_flow_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner_collaterals_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_cross_margin_data_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_delist_schedule_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_exchange_small_liability_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_exchange_small_liability_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_exchange_small_liability_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_force_liquidation_rec_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_force_liquidation_rec_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_interest_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_interest_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_interest_rate_history_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_isolated_account_limit_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_isolated_account_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_isolated_all_pairs_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_isolated_margin_data_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_isolated_margin_data_get_200_response_inner_data_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_isolated_margin_tier_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_leverage_bracket_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_leverage_bracket_get_200_response_inner_brackets_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_max_borrowable_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_max_leverage_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_max_transferable_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_next_hourly_interest_rate_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_open_order_list_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_open_orders_delete_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_order_list_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_order_oco_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_order_oco_post_200_response_order_reports_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_order_oco_post_200_response_orders_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_order_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_price_index_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_rate_limit_order_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_trade_coeff_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_transfer_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_margin_transfer_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_hash_transfer_config_cancel_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_config_details_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_hash_transfer_config_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response_data.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profit_transfer_details_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_payment_list_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_payment_list_get_200_response_data.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_payment_list_get_200_response_data_account_profits_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_payment_other_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_payment_other_get_200_response_data.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_payment_other_get_200_response_data_other_profits_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_payment_uid_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_payment_uid_get_200_response_data.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_payment_uid_get_200_response_data_account_profits_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_pub_algo_list_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_pub_algo_list_get_200_response_data_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_pub_coin_list_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_pub_coin_list_get_200_response_data_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_statistics_user_list_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_statistics_user_list_get_200_response_data_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_statistics_user_status_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_statistics_user_status_get_200_response_data.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_worker_detail_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_worker_detail_get_200_response_data_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrate_datas_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_worker_list_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_worker_list_get_200_response_data.rs create mode 100644 test_rust/src/models/_sapi_v1_mining_worker_list_get_200_response_data_worker_datas_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_nft_history_deposit_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_nft_history_deposit_get_200_response_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_nft_history_transactions_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_nft_history_transactions_get_200_response_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_nft_history_withdraw_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_nft_history_withdraw_get_200_response_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_nft_user_get_asset_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_nft_user_get_asset_get_200_response_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_pay_transactions_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_funds_detail_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_payer_info.rs create mode 100644 test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info.rs create mode 100644 test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info_extend_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_portfolio_account_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_portfolio_asset_index_price_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_portfolio_auto_collection_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_portfolio_collateral_rate_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_portfolio_interest_history_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_portfolio_margin_asset_leverage_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_portfolio_pm_loan_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_portfolio_repay_futures_switch_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_portfolio_repay_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_rebate_tax_query_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_rebate_tax_query_get_200_response_data.rs create mode 100644 test_rust/src/models/_sapi_v1_rebate_tax_query_get_200_response_data_data_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_account_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rate_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rate_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_list_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_personal_left_quota_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_position_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_position_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_redeem_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_subscribe_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_flexible_subscription_preview_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_locked_history_redemption_record_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_locked_history_redemption_record_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_locked_history_rewards_record_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_locked_history_rewards_record_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_locked_history_subscription_record_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_locked_history_subscription_record_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_locked_position_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_locked_position_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_locked_subscribe_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_simple_earn_locked_subscription_preview_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_spot_delist_schedule_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_blvt_enable_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_eoptions_enable_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_futures_account_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_futures_account_get_200_response_assets_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_futures_account_summary_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_futures_account_summary_get_200_response_sub_account_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_futures_enable_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_futures_internal_transfer_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_futures_internal_transfer_get_200_response_transfers_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_futures_internal_transfer_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_futures_position_risk_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_futures_transfer_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_list_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_list_get_200_response_sub_accounts_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_margin_account_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_margin_account_get_200_response_margin_trade_coeff_vo.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_margin_account_summary_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_margin_account_summary_get_200_response_sub_account_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_margin_enable_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_spot_summary_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_spot_summary_get_200_response_spot_sub_user_asset_btc_vo_list_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_status_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_sub_account_api_ip_restriction_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_sub_transfer_history_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_transaction_statistics_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_transaction_statistics_get_200_response_trade_info_vos_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_transfer_sub_user_history_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_universal_transfer_get_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_universal_transfer_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_sub_account_virtual_sub_account_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_system_status_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v1_user_data_stream_isolated_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_eth_staking_account_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_eth_staking_account_get_200_response_holdings.rs create mode 100644 test_rust/src/models/_sapi_v2_eth_staking_account_get_200_response_profit.rs create mode 100644 test_rust/src/models/_sapi_v2_eth_staking_eth_stake_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_adjust_ltv_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_borrow_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_borrow_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_borrow_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_collateral_data_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_collateral_data_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_loanable_data_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_loanable_data_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_ongoing_orders_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_ongoing_orders_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_repay_history_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_repay_history_get_200_response_rows_inner.rs create mode 100644 test_rust/src/models/_sapi_v2_loan_flexible_repay_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_sub_account_futures_account_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_sub_account_futures_account_summary_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_sub_account_futures_position_risk_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v2_sub_account_sub_account_api_ip_restriction_post_200_response.rs create mode 100644 test_rust/src/models/_sapi_v3_asset_get_user_asset_post_200_response_inner.rs create mode 100644 test_rust/src/models/_sapi_v3_sub_account_assets_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v3_sub_account_assets_get_200_response_balances_inner.rs create mode 100644 test_rust/src/models/_sapi_v4_sub_account_assets_get_200_response.rs create mode 100644 test_rust/src/models/_sapi_v4_sub_account_assets_get_200_response_balances_inner.rs create mode 100644 test_rust/src/models/account.rs create mode 100644 test_rust/src/models/account_balances_inner.rs create mode 100644 test_rust/src/models/account_commission_rates.rs create mode 100644 test_rust/src/models/agg_trade.rs create mode 100644 test_rust/src/models/bnb_burn_status.rs create mode 100644 test_rust/src/models/book_ticker.rs create mode 100644 test_rust/src/models/canceled_margin_order_detail.rs create mode 100644 test_rust/src/models/day_ticker.rs create mode 100644 test_rust/src/models/error.rs create mode 100644 test_rust/src/models/isolated_margin_account_info.rs create mode 100644 test_rust/src/models/isolated_margin_account_info_assets_inner.rs create mode 100644 test_rust/src/models/isolated_margin_account_info_assets_inner_base_asset.rs create mode 100644 test_rust/src/models/isolated_margin_account_info_assets_inner_quote_asset.rs create mode 100644 test_rust/src/models/margin_oco_order.rs create mode 100644 test_rust/src/models/margin_oco_order_order_reports_inner.rs create mode 100644 test_rust/src/models/margin_oco_order_orders_inner.rs create mode 100644 test_rust/src/models/margin_order.rs create mode 100644 test_rust/src/models/margin_order_detail.rs create mode 100644 test_rust/src/models/margin_order_response_ack.rs create mode 100644 test_rust/src/models/margin_order_response_full.rs create mode 100644 test_rust/src/models/margin_order_response_result.rs create mode 100644 test_rust/src/models/margin_trade.rs create mode 100644 test_rust/src/models/margin_transfer_details.rs create mode 100644 test_rust/src/models/margin_transfer_details_rows_inner.rs create mode 100644 test_rust/src/models/mod.rs create mode 100644 test_rust/src/models/my_trade.rs create mode 100644 test_rust/src/models/oco_order.rs create mode 100644 test_rust/src/models/oco_order_order_reports_inner.rs create mode 100644 test_rust/src/models/order.rs create mode 100644 test_rust/src/models/order_details.rs create mode 100644 test_rust/src/models/order_response_ack.rs create mode 100644 test_rust/src/models/order_response_full.rs create mode 100644 test_rust/src/models/order_response_full_fills_inner.rs create mode 100644 test_rust/src/models/order_response_result.rs create mode 100644 test_rust/src/models/price_ticker.rs create mode 100644 test_rust/src/models/repayment_info.rs create mode 100644 test_rust/src/models/repayment_info2.rs create mode 100644 test_rust/src/models/snapshot_futures.rs create mode 100644 test_rust/src/models/snapshot_futures_snapshot_vos_inner.rs create mode 100644 test_rust/src/models/snapshot_futures_snapshot_vos_inner_data.rs create mode 100644 test_rust/src/models/snapshot_futures_snapshot_vos_inner_data_assets_inner.rs create mode 100644 test_rust/src/models/snapshot_futures_snapshot_vos_inner_data_position_inner.rs create mode 100644 test_rust/src/models/snapshot_margin.rs create mode 100644 test_rust/src/models/snapshot_margin_snapshot_vos_inner.rs create mode 100644 test_rust/src/models/snapshot_margin_snapshot_vos_inner_data.rs create mode 100644 test_rust/src/models/snapshot_margin_snapshot_vos_inner_data_user_assets_inner.rs create mode 100644 test_rust/src/models/snapshot_spot.rs create mode 100644 test_rust/src/models/snapshot_spot_snapshot_vos_inner.rs create mode 100644 test_rust/src/models/snapshot_spot_snapshot_vos_inner_data.rs create mode 100644 test_rust/src/models/snapshot_spot_snapshot_vos_inner_data_balances_inner.rs create mode 100644 test_rust/src/models/sub_account_coin_futures_details.rs create mode 100644 test_rust/src/models/sub_account_coin_futures_details_assets_inner.rs create mode 100644 test_rust/src/models/sub_account_coin_futures_position_risk.rs create mode 100644 test_rust/src/models/sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.rs create mode 100644 test_rust/src/models/sub_account_coin_futures_summary.rs create mode 100644 test_rust/src/models/sub_account_coin_futures_summary_delivery_account_summary_resp.rs create mode 100644 test_rust/src/models/sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.rs create mode 100644 test_rust/src/models/sub_account_usdt_futures_details.rs create mode 100644 test_rust/src/models/sub_account_usdt_futures_details_future_account_resp.rs create mode 100644 test_rust/src/models/sub_account_usdt_futures_position_risk.rs create mode 100644 test_rust/src/models/sub_account_usdt_futures_summary.rs create mode 100644 test_rust/src/models/sub_account_usdt_futures_summary_future_account_summary_resp.rs create mode 100644 test_rust/src/models/sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.rs create mode 100644 test_rust/src/models/ticker.rs create mode 100644 test_rust/src/models/trade.rs create mode 100644 test_rust/src/models/transaction.rs diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..543e5fee66d89d0c0e6277ac9cfd5b008c1e93c3 GIT binary patch literal 6148 zcmeHKT}s115T0#=M(jf$ear5B2{Fc;WHMHx^Alz|^-06m)}JQmbZ8Bhk4frZOK?u)Fm_l9!UHjq3Y1jiju=MLVUJu~?64G+bTaPnVcgEfoluP39qUInoJ=gJ zqcWfj_zd*ra>)IE(tZB-lk`d%PzL@L113n)WQ<#Ky|s07+-oD~6_kbJO2H}x6WfXr e%dPkXY6bR)C&1WYDF_Qhe*`QIIw%9b%D@-uc5CPW literal 0 HcmV?d00001 diff --git a/.gitignore b/.gitignore deleted file mode 100644 index f63cb53..0000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -output -.DS_Store -openapitools.json -*/.openapi_generator/* diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..cbafd62 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,7 @@ +docs/* +target/* +.gitignore +.travis.yml +Cargo.lock +git_push.sh +README.md diff --git a/openapitools.json b/openapitools.json new file mode 100644 index 0000000..f227cf2 --- /dev/null +++ b/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.7.0" + } +} diff --git a/target/.DS_Store b/target/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..223f96b9c4a841a8001ae6e6762b90cc1ceb8a01 GIT binary patch literal 6148 zcmeHKJx;?=47N*zQn7SoV0dCfh@le;L#Vp$?=SmZdW(s>AWne zUbGv2BLnj6_Nk(K+R&1E&+q)?v%e_we6}iQu&2itZ?Dg1FPHt8#kVolvi+Vs;s{D; zO6oLQ}opta0a>z?CIr5`v29}^M5zVubcsA;7>8YNj}XdxFzeYy_=I> s8=%)v5s9l6n-pwfD@Lre;zMW@*n@0sapi_v1_lending_auto_invest_all_asset_get:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_all_asset_get: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.binance.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_all_asset_get**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_all_asset_get) | **GET** /sapi/v1/lending/auto-invest/all/asset | Query all source asset and target asset (USER_DATA) +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_history_list_get**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_history_list_get) | **GET** /sapi/v1/lending/auto-invest/history/list | Query subscription transaction history +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_index_info_get**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_index_info_get) | **GET** /sapi/v1/lending/auto-invest/index/info | Query Index Details(USER_DATA) +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_index_user_summary_get**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_index_user_summary_get) | **GET** /sapi/v1/lending/auto-invest/index/user-summary | Query Index Linked Plan Position Details(USER_DATA) +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_one_off_post**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_one_off_post) | **POST** /sapi/v1/lending/auto-invest/one-off | One Time Transaction(TRADE) +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_one_off_status_get**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_one_off_status_get) | **GET** /sapi/v1/lending/auto-invest/one-off/status | Query One-Time Transaction Status (USER_DATA) +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_plan_add_post**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_plan_add_post) | **POST** /sapi/v1/lending/auto-invest/plan/add | Investment plan creation (USER_DATA) +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_plan_edit_post**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_plan_edit_post) | **POST** /sapi/v1/lending/auto-invest/plan/edit | Investment plan adjustment +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_plan_edit_status_post**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_plan_edit_status_post) | **POST** /sapi/v1/lending/auto-invest/plan/edit-status | Change Plan Status +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_plan_id_get**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_plan_id_get) | **GET** /sapi/v1/lending/auto-invest/plan/id | Query holding details of the plan +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_plan_list_get**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_plan_list_get) | **GET** /sapi/v1/lending/auto-invest/plan/list | Get list of plans +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_rebalance_history_get**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_rebalance_history_get) | **GET** /sapi/v1/lending/auto-invest/rebalance/history | Index Linked Plan Rebalance Details (USER_DATA) +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_redeem_history_get**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_redeem_history_get) | **GET** /sapi/v1/lending/auto-invest/redeem/history | Index Linked Plan Redemption History (USER_DATA) +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_redeem_post**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_redeem_post) | **POST** /sapi/v1/lending/auto-invest/redeem | Index Linked Plan Redemption (TRADE) +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_source_asset_list_get**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_source_asset_list_get) | **GET** /sapi/v1/lending/auto-invest/source-asset/list | Query source asset list (USER_DATA) +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_target_asset_list_get**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_target_asset_list_get) | **GET** /sapi/v1/lending/auto-invest/target-asset/list | Get target asset list (USER_DATA) +*AutoInvestApi* | [**sapi_v1_lending_auto_invest_target_asset_roi_list_get**](docs/AutoInvestApi.md#sapi_v1_lending_auto_invest_target_asset_roi_list_get) | **GET** /sapi/v1/lending/auto-invest/target-asset/roi/list | Get target asset ROI data (USER_DATA) +*BLVTApi* | [**sapi_v1_blvt_redeem_post**](docs/BLVTApi.md#sapi_v1_blvt_redeem_post) | **POST** /sapi/v1/blvt/redeem | Redeem BLVT (USER_DATA) +*BLVTApi* | [**sapi_v1_blvt_redeem_record_get**](docs/BLVTApi.md#sapi_v1_blvt_redeem_record_get) | **GET** /sapi/v1/blvt/redeem/record | Redemption Record (USER_DATA) +*BLVTApi* | [**sapi_v1_blvt_subscribe_post**](docs/BLVTApi.md#sapi_v1_blvt_subscribe_post) | **POST** /sapi/v1/blvt/subscribe | Subscribe BLVT (USER_DATA) +*BLVTApi* | [**sapi_v1_blvt_subscribe_record_get**](docs/BLVTApi.md#sapi_v1_blvt_subscribe_record_get) | **GET** /sapi/v1/blvt/subscribe/record | Query Subscription Record (USER_DATA) +*BLVTApi* | [**sapi_v1_blvt_token_info_get**](docs/BLVTApi.md#sapi_v1_blvt_token_info_get) | **GET** /sapi/v1/blvt/tokenInfo | BLVT Info (MARKET_DATA) +*BLVTApi* | [**sapi_v1_blvt_user_limit_get**](docs/BLVTApi.md#sapi_v1_blvt_user_limit_get) | **GET** /sapi/v1/blvt/userLimit | BLVT User Limit Info (USER_DATA) +*C2CApi* | [**sapi_v1_c2c_order_match_list_user_order_history_get**](docs/C2CApi.md#sapi_v1_c2c_order_match_list_user_order_history_get) | **GET** /sapi/v1/c2c/orderMatch/listUserOrderHistory | Get C2C Trade History (USER_DATA) +*ConvertApi* | [**sapi_v1_convert_accept_quote_post**](docs/ConvertApi.md#sapi_v1_convert_accept_quote_post) | **POST** /sapi/v1/convert/acceptQuote | Accept Quote (TRADE) +*ConvertApi* | [**sapi_v1_convert_asset_info_get**](docs/ConvertApi.md#sapi_v1_convert_asset_info_get) | **GET** /sapi/v1/convert/assetInfo | Query order quantity precision per asset (USER_DATA) +*ConvertApi* | [**sapi_v1_convert_exchange_info_get**](docs/ConvertApi.md#sapi_v1_convert_exchange_info_get) | **GET** /sapi/v1/convert/exchangeInfo | List All Convert Pairs +*ConvertApi* | [**sapi_v1_convert_get_quote_post**](docs/ConvertApi.md#sapi_v1_convert_get_quote_post) | **POST** /sapi/v1/convert/getQuote | Send quote request (USER_DATA) +*ConvertApi* | [**sapi_v1_convert_limit_cancel_order_post**](docs/ConvertApi.md#sapi_v1_convert_limit_cancel_order_post) | **POST** /sapi/v1/convert/limit/cancelOrder | Cancel limit order (USER_DATA) +*ConvertApi* | [**sapi_v1_convert_limit_place_order_post**](docs/ConvertApi.md#sapi_v1_convert_limit_place_order_post) | **POST** /sapi/v1/convert/limit/placeOrder | Place limit order (USER_DATA) +*ConvertApi* | [**sapi_v1_convert_limit_query_open_orders_get**](docs/ConvertApi.md#sapi_v1_convert_limit_query_open_orders_get) | **GET** /sapi/v1/convert/limit/queryOpenOrders | Query limit open orders (USER_DATA) +*ConvertApi* | [**sapi_v1_convert_order_status_get**](docs/ConvertApi.md#sapi_v1_convert_order_status_get) | **GET** /sapi/v1/convert/orderStatus | Order status (USER_DATA) +*ConvertApi* | [**sapi_v1_convert_trade_flow_get**](docs/ConvertApi.md#sapi_v1_convert_trade_flow_get) | **GET** /sapi/v1/convert/tradeFlow | Get Convert Trade History (USER_DATA) +*CryptoLoansApi* | [**sapi_v1_loan_adjust_ltv_post**](docs/CryptoLoansApi.md#sapi_v1_loan_adjust_ltv_post) | **POST** /sapi/v1/loan/adjust/ltv | Crypto Loan Adjust LTV (TRADE) +*CryptoLoansApi* | [**sapi_v1_loan_borrow_history_get**](docs/CryptoLoansApi.md#sapi_v1_loan_borrow_history_get) | **GET** /sapi/v1/loan/borrow/history | Get Crypto Loans Borrow History (USER_DATA) +*CryptoLoansApi* | [**sapi_v1_loan_borrow_post**](docs/CryptoLoansApi.md#sapi_v1_loan_borrow_post) | **POST** /sapi/v1/loan/borrow | Crypto Loan Borrow (TRADE) +*CryptoLoansApi* | [**sapi_v1_loan_collateral_data_get**](docs/CryptoLoansApi.md#sapi_v1_loan_collateral_data_get) | **GET** /sapi/v1/loan/collateral/data | Get Collateral Assets Data (USER_DATA) +*CryptoLoansApi* | [**sapi_v1_loan_customize_margin_call_post**](docs/CryptoLoansApi.md#sapi_v1_loan_customize_margin_call_post) | **POST** /sapi/v1/loan/customize/margin_call | Crypto Loan Customize Margin Call (TRADE) +*CryptoLoansApi* | [**sapi_v1_loan_income_get**](docs/CryptoLoansApi.md#sapi_v1_loan_income_get) | **GET** /sapi/v1/loan/income | Get Crypto Loans Income History (USER_DATA) +*CryptoLoansApi* | [**sapi_v1_loan_loanable_data_get**](docs/CryptoLoansApi.md#sapi_v1_loan_loanable_data_get) | **GET** /sapi/v1/loan/loanable/data | Get Loanable Assets Data (USER_DATA) +*CryptoLoansApi* | [**sapi_v1_loan_ltv_adjustment_history_get**](docs/CryptoLoansApi.md#sapi_v1_loan_ltv_adjustment_history_get) | **GET** /sapi/v1/loan/ltv/adjustment/history | Get Loan LTV Adjustment History (USER_DATA) +*CryptoLoansApi* | [**sapi_v1_loan_ongoing_orders_get**](docs/CryptoLoansApi.md#sapi_v1_loan_ongoing_orders_get) | **GET** /sapi/v1/loan/ongoing/orders | Get Loan Ongoing Orders (USER_DATA) +*CryptoLoansApi* | [**sapi_v1_loan_repay_collateral_rate_get**](docs/CryptoLoansApi.md#sapi_v1_loan_repay_collateral_rate_get) | **GET** /sapi/v1/loan/repay/collateral/rate | Check Collateral Repay Rate (USER_DATA) +*CryptoLoansApi* | [**sapi_v1_loan_repay_history_get**](docs/CryptoLoansApi.md#sapi_v1_loan_repay_history_get) | **GET** /sapi/v1/loan/repay/history | Get Loan Repayment History (USER_DATA) +*CryptoLoansApi* | [**sapi_v1_loan_repay_post**](docs/CryptoLoansApi.md#sapi_v1_loan_repay_post) | **POST** /sapi/v1/loan/repay | Crypto Loan Repay (TRADE) +*CryptoLoansApi* | [**sapi_v2_loan_flexible_adjust_ltv_post**](docs/CryptoLoansApi.md#sapi_v2_loan_flexible_adjust_ltv_post) | **POST** /sapi/v2/loan/flexible/adjust/ltv | Adjust LTV - Flexible Loan Adjust LTV (TRADE) +*CryptoLoansApi* | [**sapi_v2_loan_flexible_borrow_history_get**](docs/CryptoLoansApi.md#sapi_v2_loan_flexible_borrow_history_get) | **GET** /sapi/v2/loan/flexible/borrow/history | Borrow - Get Flexible Loan Borrow History (USER_DATA) +*CryptoLoansApi* | [**sapi_v2_loan_flexible_borrow_post**](docs/CryptoLoansApi.md#sapi_v2_loan_flexible_borrow_post) | **POST** /sapi/v2/loan/flexible/borrow | Borrow - Flexible Loan Borrow (TRADE) +*CryptoLoansApi* | [**sapi_v2_loan_flexible_collateral_data_get**](docs/CryptoLoansApi.md#sapi_v2_loan_flexible_collateral_data_get) | **GET** /sapi/v2/loan/flexible/collateral/data | Get Flexible Loan Collateral Assets Data (USER_DATA) +*CryptoLoansApi* | [**sapi_v2_loan_flexible_loanable_data_get**](docs/CryptoLoansApi.md#sapi_v2_loan_flexible_loanable_data_get) | **GET** /sapi/v2/loan/flexible/loanable/data | Get Flexible Loan Assets Data (USER_DATA) +*CryptoLoansApi* | [**sapi_v2_loan_flexible_ltv_adjustment_history_get**](docs/CryptoLoansApi.md#sapi_v2_loan_flexible_ltv_adjustment_history_get) | **GET** /sapi/v2/loan/flexible/ltv/adjustment/history | Adjust LTV - Get Flexible Loan LTV Adjustment History (USER_DATA) +*CryptoLoansApi* | [**sapi_v2_loan_flexible_ongoing_orders_get**](docs/CryptoLoansApi.md#sapi_v2_loan_flexible_ongoing_orders_get) | **GET** /sapi/v2/loan/flexible/ongoing/orders | Borrow - Get Flexible Loan Ongoing Orders (USER_DATA) +*CryptoLoansApi* | [**sapi_v2_loan_flexible_repay_history_get**](docs/CryptoLoansApi.md#sapi_v2_loan_flexible_repay_history_get) | **GET** /sapi/v2/loan/flexible/repay/history | Repay - Get Flexible Loan Repayment History (USER_DATA) +*CryptoLoansApi* | [**sapi_v2_loan_flexible_repay_post**](docs/CryptoLoansApi.md#sapi_v2_loan_flexible_repay_post) | **POST** /sapi/v2/loan/flexible/repay | Repay - Flexible Loan Repay (TRADE) +*DualInvestmentApi* | [**sapi_v1_dci_product_accounts_get**](docs/DualInvestmentApi.md#sapi_v1_dci_product_accounts_get) | **GET** /sapi/v1/dci/product/accounts | Check Dual Investment accounts(USER_DATA) +*DualInvestmentApi* | [**sapi_v1_dci_product_auto_compound_edit_status_post**](docs/DualInvestmentApi.md#sapi_v1_dci_product_auto_compound_edit_status_post) | **POST** /sapi/v1/dci/product/auto_compound/edit-status | Change Auto-Compound status(USER_DATA) +*DualInvestmentApi* | [**sapi_v1_dci_product_list_get**](docs/DualInvestmentApi.md#sapi_v1_dci_product_list_get) | **GET** /sapi/v1/dci/product/list | Get Dual Investment product list(USER_DATA) +*DualInvestmentApi* | [**sapi_v1_dci_product_positions_get**](docs/DualInvestmentApi.md#sapi_v1_dci_product_positions_get) | **GET** /sapi/v1/dci/product/positions | Get Dual Investment positions(USER_DATA) +*DualInvestmentApi* | [**sapi_v1_dci_product_subscribe_post**](docs/DualInvestmentApi.md#sapi_v1_dci_product_subscribe_post) | **POST** /sapi/v1/dci/product/subscribe | Subscribe Dual Investment products(USER_DATA) +*FiatApi* | [**sapi_v1_fiat_orders_get**](docs/FiatApi.md#sapi_v1_fiat_orders_get) | **GET** /sapi/v1/fiat/orders | Fiat Deposit/Withdraw History (USER_DATA) +*FiatApi* | [**sapi_v1_fiat_payments_get**](docs/FiatApi.md#sapi_v1_fiat_payments_get) | **GET** /sapi/v1/fiat/payments | Fiat Payments History (USER_DATA) +*FuturesApi* | [**sapi_v1_futures_hist_data_link_get**](docs/FuturesApi.md#sapi_v1_futures_hist_data_link_get) | **GET** /sapi/v1/futures/histDataLink | Get Future TickLevel Orderbook Historical Data Download Link (USER_DATA) +*FuturesApi* | [**sapi_v1_futures_transfer_get**](docs/FuturesApi.md#sapi_v1_futures_transfer_get) | **GET** /sapi/v1/futures/transfer | Get Future Account Transaction History List (USER_DATA) +*FuturesApi* | [**sapi_v1_futures_transfer_post**](docs/FuturesApi.md#sapi_v1_futures_transfer_post) | **POST** /sapi/v1/futures/transfer | New Future Account Transfer (USER_DATA) +*FuturesAlgoApi* | [**sapi_v1_algo_futures_historical_orders_get**](docs/FuturesAlgoApi.md#sapi_v1_algo_futures_historical_orders_get) | **GET** /sapi/v1/algo/futures/historicalOrders | Query Historical Algo Orders (USER_DATA) +*FuturesAlgoApi* | [**sapi_v1_algo_futures_new_order_twap_post**](docs/FuturesAlgoApi.md#sapi_v1_algo_futures_new_order_twap_post) | **POST** /sapi/v1/algo/futures/newOrderTwap | Time-Weighted Average Price(Twap) New Order (TRADE) +*FuturesAlgoApi* | [**sapi_v1_algo_futures_new_order_vp_post**](docs/FuturesAlgoApi.md#sapi_v1_algo_futures_new_order_vp_post) | **POST** /sapi/v1/algo/futures/newOrderVp | Volume Participation(VP) New Order (TRADE) +*FuturesAlgoApi* | [**sapi_v1_algo_futures_open_orders_get**](docs/FuturesAlgoApi.md#sapi_v1_algo_futures_open_orders_get) | **GET** /sapi/v1/algo/futures/openOrders | Query Current Algo Open Orders (USER_DATA) +*FuturesAlgoApi* | [**sapi_v1_algo_futures_order_delete**](docs/FuturesAlgoApi.md#sapi_v1_algo_futures_order_delete) | **DELETE** /sapi/v1/algo/futures/order | Cancel Algo Order(TRADE) +*FuturesAlgoApi* | [**sapi_v1_algo_futures_sub_orders_get**](docs/FuturesAlgoApi.md#sapi_v1_algo_futures_sub_orders_get) | **GET** /sapi/v1/algo/futures/subOrders | Query Sub Orders (USER_DATA) +*GiftCardApi* | [**sapi_v1_giftcard_buy_code_post**](docs/GiftCardApi.md#sapi_v1_giftcard_buy_code_post) | **POST** /sapi/v1/giftcard/buyCode | Buy a Binance Code (TRADE) +*GiftCardApi* | [**sapi_v1_giftcard_buy_code_token_limit_get**](docs/GiftCardApi.md#sapi_v1_giftcard_buy_code_token_limit_get) | **GET** /sapi/v1/giftcard/buyCode/token-limit | Fetch Token Limit (USER_DATA) +*GiftCardApi* | [**sapi_v1_giftcard_create_code_post**](docs/GiftCardApi.md#sapi_v1_giftcard_create_code_post) | **POST** /sapi/v1/giftcard/createCode | Create a Binance Code (USER_DATA) +*GiftCardApi* | [**sapi_v1_giftcard_cryptography_rsa_public_key_get**](docs/GiftCardApi.md#sapi_v1_giftcard_cryptography_rsa_public_key_get) | **GET** /sapi/v1/giftcard/cryptography/rsa-public-key | Fetch RSA Public Key (USER_DATA) +*GiftCardApi* | [**sapi_v1_giftcard_redeem_code_post**](docs/GiftCardApi.md#sapi_v1_giftcard_redeem_code_post) | **POST** /sapi/v1/giftcard/redeemCode | Redeem a Binance Code (USER_DATA) +*GiftCardApi* | [**sapi_v1_giftcard_verify_get**](docs/GiftCardApi.md#sapi_v1_giftcard_verify_get) | **GET** /sapi/v1/giftcard/verify | Verify a Binance Code (USER_DATA) +*IsolatedMarginStreamApi* | [**sapi_v1_user_data_stream_isolated_delete**](docs/IsolatedMarginStreamApi.md#sapi_v1_user_data_stream_isolated_delete) | **DELETE** /sapi/v1/userDataStream/isolated | Close a ListenKey (USER_STREAM) +*IsolatedMarginStreamApi* | [**sapi_v1_user_data_stream_isolated_post**](docs/IsolatedMarginStreamApi.md#sapi_v1_user_data_stream_isolated_post) | **POST** /sapi/v1/userDataStream/isolated | Generate a Listen Key (USER_STREAM) +*IsolatedMarginStreamApi* | [**sapi_v1_user_data_stream_isolated_put**](docs/IsolatedMarginStreamApi.md#sapi_v1_user_data_stream_isolated_put) | **PUT** /sapi/v1/userDataStream/isolated | Ping/Keep-alive a Listen Key (USER_STREAM) +*MarginApi* | [**sapi_v1_bnb_burn_get**](docs/MarginApi.md#sapi_v1_bnb_burn_get) | **GET** /sapi/v1/bnbBurn | Get BNB Burn Status(USER_DATA) +*MarginApi* | [**sapi_v1_bnb_burn_post**](docs/MarginApi.md#sapi_v1_bnb_burn_post) | **POST** /sapi/v1/bnbBurn | Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) +*MarginApi* | [**sapi_v1_margin_account_get**](docs/MarginApi.md#sapi_v1_margin_account_get) | **GET** /sapi/v1/margin/account | Query Cross Margin Account Details (USER_DATA) +*MarginApi* | [**sapi_v1_margin_all_assets_get**](docs/MarginApi.md#sapi_v1_margin_all_assets_get) | **GET** /sapi/v1/margin/allAssets | Get All Margin Assets (MARKET_DATA) +*MarginApi* | [**sapi_v1_margin_all_order_list_get**](docs/MarginApi.md#sapi_v1_margin_all_order_list_get) | **GET** /sapi/v1/margin/allOrderList | Query Margin Account's all OCO (USER_DATA) +*MarginApi* | [**sapi_v1_margin_all_orders_get**](docs/MarginApi.md#sapi_v1_margin_all_orders_get) | **GET** /sapi/v1/margin/allOrders | Query Margin Account's All Orders (USER_DATA) +*MarginApi* | [**sapi_v1_margin_all_pairs_get**](docs/MarginApi.md#sapi_v1_margin_all_pairs_get) | **GET** /sapi/v1/margin/allPairs | Get All Cross Margin Pairs (MARKET_DATA) +*MarginApi* | [**sapi_v1_margin_available_inventory_get**](docs/MarginApi.md#sapi_v1_margin_available_inventory_get) | **GET** /sapi/v1/margin/available-inventory | Query Margin Available Inventory (USER_DATA) +*MarginApi* | [**sapi_v1_margin_borrow_repay_get**](docs/MarginApi.md#sapi_v1_margin_borrow_repay_get) | **GET** /sapi/v1/margin/borrow-repay | Query borrow/repay records in Margin account(USER_DATA) +*MarginApi* | [**sapi_v1_margin_borrow_repay_post**](docs/MarginApi.md#sapi_v1_margin_borrow_repay_post) | **POST** /sapi/v1/margin/borrow-repay | Margin account borrow/repay(MARGIN) +*MarginApi* | [**sapi_v1_margin_capital_flow_get**](docs/MarginApi.md#sapi_v1_margin_capital_flow_get) | **GET** /sapi/v1/margin/capital-flow | Get cross or isolated margin capital flow(USER_DATA) +*MarginApi* | [**sapi_v1_margin_cross_margin_collateral_ratio_get**](docs/MarginApi.md#sapi_v1_margin_cross_margin_collateral_ratio_get) | **GET** /sapi/v1/margin/crossMarginCollateralRatio | Cross margin collateral ratio (MARKET_DATA) +*MarginApi* | [**sapi_v1_margin_cross_margin_data_get**](docs/MarginApi.md#sapi_v1_margin_cross_margin_data_get) | **GET** /sapi/v1/margin/crossMarginData | Query Cross Margin Fee Data (USER_DATA) +*MarginApi* | [**sapi_v1_margin_delist_schedule_get**](docs/MarginApi.md#sapi_v1_margin_delist_schedule_get) | **GET** /sapi/v1/margin/delist-schedule | Get tokens or symbols delist schedule for cross margin and isolated margin (MARKET_DATA) +*MarginApi* | [**sapi_v1_margin_exchange_small_liability_get**](docs/MarginApi.md#sapi_v1_margin_exchange_small_liability_get) | **GET** /sapi/v1/margin/exchange-small-liability | Get Small Liability Exchange Coin List (USER_DATA) +*MarginApi* | [**sapi_v1_margin_exchange_small_liability_history_get**](docs/MarginApi.md#sapi_v1_margin_exchange_small_liability_history_get) | **GET** /sapi/v1/margin/exchange-small-liability-history | Get Small Liability Exchange History (USER_DATA) +*MarginApi* | [**sapi_v1_margin_force_liquidation_rec_get**](docs/MarginApi.md#sapi_v1_margin_force_liquidation_rec_get) | **GET** /sapi/v1/margin/forceLiquidationRec | Get Force Liquidation Record (USER_DATA) +*MarginApi* | [**sapi_v1_margin_interest_history_get**](docs/MarginApi.md#sapi_v1_margin_interest_history_get) | **GET** /sapi/v1/margin/interestHistory | Get Interest History (USER_DATA) +*MarginApi* | [**sapi_v1_margin_interest_rate_history_get**](docs/MarginApi.md#sapi_v1_margin_interest_rate_history_get) | **GET** /sapi/v1/margin/interestRateHistory | Margin Interest Rate History (USER_DATA) +*MarginApi* | [**sapi_v1_margin_isolated_account_delete**](docs/MarginApi.md#sapi_v1_margin_isolated_account_delete) | **DELETE** /sapi/v1/margin/isolated/account | Disable Isolated Margin Account (TRADE) +*MarginApi* | [**sapi_v1_margin_isolated_account_get**](docs/MarginApi.md#sapi_v1_margin_isolated_account_get) | **GET** /sapi/v1/margin/isolated/account | Query Isolated Margin Account Info (USER_DATA) +*MarginApi* | [**sapi_v1_margin_isolated_account_limit_get**](docs/MarginApi.md#sapi_v1_margin_isolated_account_limit_get) | **GET** /sapi/v1/margin/isolated/accountLimit | Query Enabled Isolated Margin Account Limit (USER_DATA) +*MarginApi* | [**sapi_v1_margin_isolated_account_post**](docs/MarginApi.md#sapi_v1_margin_isolated_account_post) | **POST** /sapi/v1/margin/isolated/account | Enable Isolated Margin Account (TRADE) +*MarginApi* | [**sapi_v1_margin_isolated_all_pairs_get**](docs/MarginApi.md#sapi_v1_margin_isolated_all_pairs_get) | **GET** /sapi/v1/margin/isolated/allPairs | Get All Isolated Margin Symbol(USER_DATA) +*MarginApi* | [**sapi_v1_margin_isolated_margin_data_get**](docs/MarginApi.md#sapi_v1_margin_isolated_margin_data_get) | **GET** /sapi/v1/margin/isolatedMarginData | Query Isolated Margin Fee Data (USER_DATA) +*MarginApi* | [**sapi_v1_margin_isolated_margin_tier_get**](docs/MarginApi.md#sapi_v1_margin_isolated_margin_tier_get) | **GET** /sapi/v1/margin/isolatedMarginTier | Query Isolated Margin Tier Data (USER_DATA) +*MarginApi* | [**sapi_v1_margin_leverage_bracket_get**](docs/MarginApi.md#sapi_v1_margin_leverage_bracket_get) | **GET** /sapi/v1/margin/leverageBracket | Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) +*MarginApi* | [**sapi_v1_margin_manual_liquidation_post**](docs/MarginApi.md#sapi_v1_margin_manual_liquidation_post) | **POST** /sapi/v1/margin/manual-liquidation | Margin manual liquidation(MARGIN) +*MarginApi* | [**sapi_v1_margin_max_borrowable_get**](docs/MarginApi.md#sapi_v1_margin_max_borrowable_get) | **GET** /sapi/v1/margin/maxBorrowable | Query Max Borrow (USER_DATA) +*MarginApi* | [**sapi_v1_margin_max_leverage_post**](docs/MarginApi.md#sapi_v1_margin_max_leverage_post) | **POST** /sapi/v1/margin/max-leverage | Adjust cross margin max leverage (USER_DATA) +*MarginApi* | [**sapi_v1_margin_max_transferable_get**](docs/MarginApi.md#sapi_v1_margin_max_transferable_get) | **GET** /sapi/v1/margin/maxTransferable | Query Max Transfer-Out Amount (USER_DATA) +*MarginApi* | [**sapi_v1_margin_my_trades_get**](docs/MarginApi.md#sapi_v1_margin_my_trades_get) | **GET** /sapi/v1/margin/myTrades | Query Margin Account's Trade List (USER_DATA) +*MarginApi* | [**sapi_v1_margin_next_hourly_interest_rate_get**](docs/MarginApi.md#sapi_v1_margin_next_hourly_interest_rate_get) | **GET** /sapi/v1/margin/next-hourly-interest-rate | Get a future hourly interest rate (USER_DATA) +*MarginApi* | [**sapi_v1_margin_open_order_list_get**](docs/MarginApi.md#sapi_v1_margin_open_order_list_get) | **GET** /sapi/v1/margin/openOrderList | Query Margin Account's Open OCO (USER_DATA) +*MarginApi* | [**sapi_v1_margin_open_orders_delete**](docs/MarginApi.md#sapi_v1_margin_open_orders_delete) | **DELETE** /sapi/v1/margin/openOrders | Margin Account Cancel all Open Orders on a Symbol (TRADE) +*MarginApi* | [**sapi_v1_margin_open_orders_get**](docs/MarginApi.md#sapi_v1_margin_open_orders_get) | **GET** /sapi/v1/margin/openOrders | Query Margin Account's Open Orders (USER_DATA) +*MarginApi* | [**sapi_v1_margin_order_delete**](docs/MarginApi.md#sapi_v1_margin_order_delete) | **DELETE** /sapi/v1/margin/order | Margin Account Cancel Order (TRADE) +*MarginApi* | [**sapi_v1_margin_order_get**](docs/MarginApi.md#sapi_v1_margin_order_get) | **GET** /sapi/v1/margin/order | Query Margin Account's Order (USER_DATA) +*MarginApi* | [**sapi_v1_margin_order_list_delete**](docs/MarginApi.md#sapi_v1_margin_order_list_delete) | **DELETE** /sapi/v1/margin/orderList | Margin Account Cancel OCO (TRADE) +*MarginApi* | [**sapi_v1_margin_order_list_get**](docs/MarginApi.md#sapi_v1_margin_order_list_get) | **GET** /sapi/v1/margin/orderList | Query Margin Account's OCO (USER_DATA) +*MarginApi* | [**sapi_v1_margin_order_oco_post**](docs/MarginApi.md#sapi_v1_margin_order_oco_post) | **POST** /sapi/v1/margin/order/oco | Margin Account New OCO (TRADE) +*MarginApi* | [**sapi_v1_margin_order_post**](docs/MarginApi.md#sapi_v1_margin_order_post) | **POST** /sapi/v1/margin/order | Margin Account New Order (TRADE) +*MarginApi* | [**sapi_v1_margin_price_index_get**](docs/MarginApi.md#sapi_v1_margin_price_index_get) | **GET** /sapi/v1/margin/priceIndex | Query Margin PriceIndex (MARKET_DATA) +*MarginApi* | [**sapi_v1_margin_rate_limit_order_get**](docs/MarginApi.md#sapi_v1_margin_rate_limit_order_get) | **GET** /sapi/v1/margin/rateLimit/order | Query Current Margin Order Count Usage (TRADE) +*MarginApi* | [**sapi_v1_margin_trade_coeff_get**](docs/MarginApi.md#sapi_v1_margin_trade_coeff_get) | **GET** /sapi/v1/margin/tradeCoeff | Get Summary of Margin account (USER_DATA) +*MarginApi* | [**sapi_v1_margin_transfer_get**](docs/MarginApi.md#sapi_v1_margin_transfer_get) | **GET** /sapi/v1/margin/transfer | Get Cross Margin Transfer History (USER_DATA) +*MarginStreamApi* | [**sapi_v1_user_data_stream_delete**](docs/MarginStreamApi.md#sapi_v1_user_data_stream_delete) | **DELETE** /sapi/v1/userDataStream | Close a ListenKey (USER_STREAM) +*MarginStreamApi* | [**sapi_v1_user_data_stream_post**](docs/MarginStreamApi.md#sapi_v1_user_data_stream_post) | **POST** /sapi/v1/userDataStream | Create a ListenKey (USER_STREAM) +*MarginStreamApi* | [**sapi_v1_user_data_stream_put**](docs/MarginStreamApi.md#sapi_v1_user_data_stream_put) | **PUT** /sapi/v1/userDataStream | Ping/Keep-alive a ListenKey (USER_STREAM) +*MarketApi* | [**api_v3_agg_trades_get**](docs/MarketApi.md#api_v3_agg_trades_get) | **GET** /api/v3/aggTrades | Compressed/Aggregate Trades List +*MarketApi* | [**api_v3_avg_price_get**](docs/MarketApi.md#api_v3_avg_price_get) | **GET** /api/v3/avgPrice | Current Average Price +*MarketApi* | [**api_v3_depth_get**](docs/MarketApi.md#api_v3_depth_get) | **GET** /api/v3/depth | Order Book +*MarketApi* | [**api_v3_exchange_info_get**](docs/MarketApi.md#api_v3_exchange_info_get) | **GET** /api/v3/exchangeInfo | Exchange Information +*MarketApi* | [**api_v3_historical_trades_get**](docs/MarketApi.md#api_v3_historical_trades_get) | **GET** /api/v3/historicalTrades | Old Trade Lookup +*MarketApi* | [**api_v3_klines_get**](docs/MarketApi.md#api_v3_klines_get) | **GET** /api/v3/klines | Kline/Candlestick Data +*MarketApi* | [**api_v3_ping_get**](docs/MarketApi.md#api_v3_ping_get) | **GET** /api/v3/ping | Test Connectivity +*MarketApi* | [**api_v3_ticker24hr_get**](docs/MarketApi.md#api_v3_ticker24hr_get) | **GET** /api/v3/ticker/24hr | 24hr Ticker Price Change Statistics +*MarketApi* | [**api_v3_ticker_book_ticker_get**](docs/MarketApi.md#api_v3_ticker_book_ticker_get) | **GET** /api/v3/ticker/bookTicker | Symbol Order Book Ticker +*MarketApi* | [**api_v3_ticker_get**](docs/MarketApi.md#api_v3_ticker_get) | **GET** /api/v3/ticker | Rolling window price change statistics +*MarketApi* | [**api_v3_ticker_price_get**](docs/MarketApi.md#api_v3_ticker_price_get) | **GET** /api/v3/ticker/price | Symbol Price Ticker +*MarketApi* | [**api_v3_ticker_trading_day_get**](docs/MarketApi.md#api_v3_ticker_trading_day_get) | **GET** /api/v3/ticker/tradingDay | Trading Day Ticker +*MarketApi* | [**api_v3_time_get**](docs/MarketApi.md#api_v3_time_get) | **GET** /api/v3/time | Check Server Time +*MarketApi* | [**api_v3_trades_get**](docs/MarketApi.md#api_v3_trades_get) | **GET** /api/v3/trades | Recent Trades List +*MarketApi* | [**api_v3_ui_klines_get**](docs/MarketApi.md#api_v3_ui_klines_get) | **GET** /api/v3/uiKlines | UIKlines +*MiningApi* | [**sapi_v1_mining_hash_transfer_config_cancel_post**](docs/MiningApi.md#sapi_v1_mining_hash_transfer_config_cancel_post) | **POST** /sapi/v1/mining/hash-transfer/config/cancel | Cancel Hashrate Resale configuration (USER_DATA) +*MiningApi* | [**sapi_v1_mining_hash_transfer_config_details_list_get**](docs/MiningApi.md#sapi_v1_mining_hash_transfer_config_details_list_get) | **GET** /sapi/v1/mining/hash-transfer/config/details/list | Hashrate Resale List (USER_DATA) +*MiningApi* | [**sapi_v1_mining_hash_transfer_config_post**](docs/MiningApi.md#sapi_v1_mining_hash_transfer_config_post) | **POST** /sapi/v1/mining/hash-transfer/config | Hashrate Resale Request (USER_DATA) +*MiningApi* | [**sapi_v1_mining_hash_transfer_profit_details_get**](docs/MiningApi.md#sapi_v1_mining_hash_transfer_profit_details_get) | **GET** /sapi/v1/mining/hash-transfer/profit/details | Hashrate Resale Details (USER_DATA) +*MiningApi* | [**sapi_v1_mining_payment_list_get**](docs/MiningApi.md#sapi_v1_mining_payment_list_get) | **GET** /sapi/v1/mining/payment/list | Earnings List (USER_DATA) +*MiningApi* | [**sapi_v1_mining_payment_other_get**](docs/MiningApi.md#sapi_v1_mining_payment_other_get) | **GET** /sapi/v1/mining/payment/other | Extra Bonus List (USER_DATA) +*MiningApi* | [**sapi_v1_mining_payment_uid_get**](docs/MiningApi.md#sapi_v1_mining_payment_uid_get) | **GET** /sapi/v1/mining/payment/uid | Mining Account Earning (USER_DATA) +*MiningApi* | [**sapi_v1_mining_pub_algo_list_get**](docs/MiningApi.md#sapi_v1_mining_pub_algo_list_get) | **GET** /sapi/v1/mining/pub/algoList | Acquiring Algorithm (MARKET_DATA) +*MiningApi* | [**sapi_v1_mining_pub_coin_list_get**](docs/MiningApi.md#sapi_v1_mining_pub_coin_list_get) | **GET** /sapi/v1/mining/pub/coinList | Acquiring CoinName (MARKET_DATA) +*MiningApi* | [**sapi_v1_mining_statistics_user_list_get**](docs/MiningApi.md#sapi_v1_mining_statistics_user_list_get) | **GET** /sapi/v1/mining/statistics/user/list | Account List (USER_DATA) +*MiningApi* | [**sapi_v1_mining_statistics_user_status_get**](docs/MiningApi.md#sapi_v1_mining_statistics_user_status_get) | **GET** /sapi/v1/mining/statistics/user/status | Statistic List (USER_DATA) +*MiningApi* | [**sapi_v1_mining_worker_detail_get**](docs/MiningApi.md#sapi_v1_mining_worker_detail_get) | **GET** /sapi/v1/mining/worker/detail | Request for Detail Miner List (USER_DATA) +*MiningApi* | [**sapi_v1_mining_worker_list_get**](docs/MiningApi.md#sapi_v1_mining_worker_list_get) | **GET** /sapi/v1/mining/worker/list | Request for Miner List (USER_DATA) +*NFTApi* | [**sapi_v1_nft_history_deposit_get**](docs/NFTApi.md#sapi_v1_nft_history_deposit_get) | **GET** /sapi/v1/nft/history/deposit | Get NFT Deposit History(USER_DATA) +*NFTApi* | [**sapi_v1_nft_history_transactions_get**](docs/NFTApi.md#sapi_v1_nft_history_transactions_get) | **GET** /sapi/v1/nft/history/transactions | Get NFT Transaction History (USER_DATA) +*NFTApi* | [**sapi_v1_nft_history_withdraw_get**](docs/NFTApi.md#sapi_v1_nft_history_withdraw_get) | **GET** /sapi/v1/nft/history/withdraw | Get NFT Withdraw History (USER_DATA) +*NFTApi* | [**sapi_v1_nft_user_get_asset_get**](docs/NFTApi.md#sapi_v1_nft_user_get_asset_get) | **GET** /sapi/v1/nft/user/getAsset | Get NFT Asset (USER_DATA) +*PayApi* | [**sapi_v1_pay_transactions_get**](docs/PayApi.md#sapi_v1_pay_transactions_get) | **GET** /sapi/v1/pay/transactions | Get Pay Trade History (USER_DATA) +*PortfolioMarginApi* | [**sapi_v1_portfolio_account_get**](docs/PortfolioMarginApi.md#sapi_v1_portfolio_account_get) | **GET** /sapi/v1/portfolio/account | Portfolio Margin Account (USER_DATA) +*PortfolioMarginApi* | [**sapi_v1_portfolio_asset_collection_post**](docs/PortfolioMarginApi.md#sapi_v1_portfolio_asset_collection_post) | **POST** /sapi/v1/portfolio/asset-collection | Fund Collection by Asset (USER_DATA) +*PortfolioMarginApi* | [**sapi_v1_portfolio_asset_index_price_get**](docs/PortfolioMarginApi.md#sapi_v1_portfolio_asset_index_price_get) | **GET** /sapi/v1/portfolio/asset-index-price | Query Portfolio Margin Asset Index Price (MARKET_DATA) +*PortfolioMarginApi* | [**sapi_v1_portfolio_auto_collection_post**](docs/PortfolioMarginApi.md#sapi_v1_portfolio_auto_collection_post) | **POST** /sapi/v1/portfolio/auto-collection | Fund Auto-collection (USER_DATA) +*PortfolioMarginApi* | [**sapi_v1_portfolio_bnb_transfer_post**](docs/PortfolioMarginApi.md#sapi_v1_portfolio_bnb_transfer_post) | **POST** /sapi/v1/portfolio/bnb-transfer | BNB Transfer (USER_DATA) +*PortfolioMarginApi* | [**sapi_v1_portfolio_collateral_rate_get**](docs/PortfolioMarginApi.md#sapi_v1_portfolio_collateral_rate_get) | **GET** /sapi/v1/portfolio/collateralRate | Portfolio Margin Collateral Rate (MARKET_DATA) +*PortfolioMarginApi* | [**sapi_v1_portfolio_interest_history_get**](docs/PortfolioMarginApi.md#sapi_v1_portfolio_interest_history_get) | **GET** /sapi/v1/portfolio/interest-history | Query Classic Portfolio Margin Negative Balance Interest History (USER_DATA) +*PortfolioMarginApi* | [**sapi_v1_portfolio_margin_asset_leverage_get**](docs/PortfolioMarginApi.md#sapi_v1_portfolio_margin_asset_leverage_get) | **GET** /sapi/v1/portfolio/margin-asset-leverage | Get Portfolio Margin Asset Leverage (USER_DATA) +*PortfolioMarginApi* | [**sapi_v1_portfolio_pm_loan_get**](docs/PortfolioMarginApi.md#sapi_v1_portfolio_pm_loan_get) | **GET** /sapi/v1/portfolio/pmLoan | Portfolio Margin Bankruptcy Loan Amount (USER_DATA) +*PortfolioMarginApi* | [**sapi_v1_portfolio_repay_futures_negative_balance_post**](docs/PortfolioMarginApi.md#sapi_v1_portfolio_repay_futures_negative_balance_post) | **POST** /sapi/v1/portfolio/repay-futures-negative-balance | Repay futures Negative Balance (USER_DATA) +*PortfolioMarginApi* | [**sapi_v1_portfolio_repay_futures_switch_get**](docs/PortfolioMarginApi.md#sapi_v1_portfolio_repay_futures_switch_get) | **GET** /sapi/v1/portfolio/repay-futures-switch | Get Auto-repay-futures Status (USER_DATA) +*PortfolioMarginApi* | [**sapi_v1_portfolio_repay_futures_switch_post**](docs/PortfolioMarginApi.md#sapi_v1_portfolio_repay_futures_switch_post) | **POST** /sapi/v1/portfolio/repay-futures-switch | Change Auto-repay-futures Status (USER_DATA) +*PortfolioMarginApi* | [**sapi_v1_portfolio_repay_post**](docs/PortfolioMarginApi.md#sapi_v1_portfolio_repay_post) | **POST** /sapi/v1/portfolio/repay | Portfolio Margin Bankruptcy Loan Repay (USER_DATA) +*RebateApi* | [**sapi_v1_rebate_tax_query_get**](docs/RebateApi.md#sapi_v1_rebate_tax_query_get) | **GET** /sapi/v1/rebate/taxQuery | Get Spot Rebate History Records (USER_DATA) +*SavingsApi* | [**sapi_v1_lending_customized_fixed_purchase_post**](docs/SavingsApi.md#sapi_v1_lending_customized_fixed_purchase_post) | **POST** /sapi/v1/lending/customizedFixed/purchase | Purchase Fixed/Activity Project (USER_DATA) +*SavingsApi* | [**sapi_v1_lending_position_changed_post**](docs/SavingsApi.md#sapi_v1_lending_position_changed_post) | **POST** /sapi/v1/lending/positionChanged | Change Fixed/Activity Position to Daily Position (USER_DATA) +*SavingsApi* | [**sapi_v1_lending_project_list_get**](docs/SavingsApi.md#sapi_v1_lending_project_list_get) | **GET** /sapi/v1/lending/project/list | Get Fixed/Activity Project List(USER_DATA) +*SavingsApi* | [**sapi_v1_lending_project_position_list_get**](docs/SavingsApi.md#sapi_v1_lending_project_position_list_get) | **GET** /sapi/v1/lending/project/position/list | Get Fixed/Activity Project Position (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_account_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_account_get) | **GET** /sapi/v1/simple-earn/account | Simple Account (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_flexible_history_collateral_record_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_flexible_history_collateral_record_get) | **GET** /sapi/v1/simple-earn/flexible/history/collateralRecord | Get Collateral Record (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_flexible_history_rate_history_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_flexible_history_rate_history_get) | **GET** /sapi/v1/simple-earn/flexible/history/rateHistory | Get Rate History (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_flexible_history_redemption_record_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_flexible_history_redemption_record_get) | **GET** /sapi/v1/simple-earn/flexible/history/redemptionRecord | Get Flexible Redemption Record (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_flexible_history_rewards_record_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_flexible_history_rewards_record_get) | **GET** /sapi/v1/simple-earn/flexible/history/rewardsRecord | Get Flexible Rewards History (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_flexible_history_subscription_record_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_flexible_history_subscription_record_get) | **GET** /sapi/v1/simple-earn/flexible/history/subscriptionRecord | Get Flexible Subscription Record (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_flexible_list_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_flexible_list_get) | **GET** /sapi/v1/simple-earn/flexible/list | Get Simple Earn Flexible Product List (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_flexible_personal_left_quota_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_flexible_personal_left_quota_get) | **GET** /sapi/v1/simple-earn/flexible/personalLeftQuota | Get Flexible Personal Left Quota (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_flexible_position_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_flexible_position_get) | **GET** /sapi/v1/simple-earn/flexible/position | Get Flexible Product Position (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_flexible_redeem_post**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_flexible_redeem_post) | **POST** /sapi/v1/simple-earn/flexible/redeem | Redeem Flexible Product (TRADE) +*SimpleEarnApi* | [**sapi_v1_simple_earn_flexible_set_auto_subscribe_post**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_flexible_set_auto_subscribe_post) | **POST** /sapi/v1/simple-earn/flexible/setAutoSubscribe | Set Flexible Auto Subscribe (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_flexible_subscribe_post**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_flexible_subscribe_post) | **POST** /sapi/v1/simple-earn/flexible/subscribe | Subscribe Flexible Product (TRADE) +*SimpleEarnApi* | [**sapi_v1_simple_earn_flexible_subscription_preview_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_flexible_subscription_preview_get) | **GET** /sapi/v1/simple-earn/flexible/subscriptionPreview | Get Flexible Subscription Preview (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_locked_history_redemption_record_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_locked_history_redemption_record_get) | **GET** /sapi/v1/simple-earn/locked/history/redemptionRecord | Get Locked Redemption Record (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_locked_history_rewards_record_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_locked_history_rewards_record_get) | **GET** /sapi/v1/simple-earn/locked/history/rewardsRecord | Get Locked Rewards History (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_locked_history_subscription_record_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_locked_history_subscription_record_get) | **GET** /sapi/v1/simple-earn/locked/history/subscriptionRecord | Get Locked Subscription Record (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_locked_list_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_locked_list_get) | **GET** /sapi/v1/simple-earn/locked/list | Get Simple Earn Locked Product List (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_locked_personal_left_quota_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_locked_personal_left_quota_get) | **GET** /sapi/v1/simple-earn/locked/personalLeftQuota | Get Locked Personal Left Quota (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_locked_position_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_locked_position_get) | **GET** /sapi/v1/simple-earn/locked/position | Get Locked Product Position (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_locked_redeem_post**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_locked_redeem_post) | **POST** /sapi/v1/simple-earn/locked/redeem | Redeem Locked Product (TRADE) +*SimpleEarnApi* | [**sapi_v1_simple_earn_locked_set_auto_subscribe_post**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_locked_set_auto_subscribe_post) | **POST** /sapi/v1/simple-earn/locked/setAutoSubscribe | Set Locked Auto Subscribe (USER_DATA) +*SimpleEarnApi* | [**sapi_v1_simple_earn_locked_subscribe_post**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_locked_subscribe_post) | **POST** /sapi/v1/simple-earn/locked/subscribe | Subscribe Locked Product (TRADE) +*SimpleEarnApi* | [**sapi_v1_simple_earn_locked_subscription_preview_get**](docs/SimpleEarnApi.md#sapi_v1_simple_earn_locked_subscription_preview_get) | **GET** /sapi/v1/simple-earn/locked/subscriptionPreview | Get Locked Subscription Preview (USER_DATA) +*SpotAlgoApi* | [**sapi_v1_algo_spot_historical_orders_get**](docs/SpotAlgoApi.md#sapi_v1_algo_spot_historical_orders_get) | **GET** /sapi/v1/algo/spot/historicalOrders | Query Historical Algo Orders +*SpotAlgoApi* | [**sapi_v1_algo_spot_new_order_twap_post**](docs/SpotAlgoApi.md#sapi_v1_algo_spot_new_order_twap_post) | **POST** /sapi/v1/algo/spot/newOrderTwap | Time-Weighted Average Price (Twap) New Order +*SpotAlgoApi* | [**sapi_v1_algo_spot_open_orders_get**](docs/SpotAlgoApi.md#sapi_v1_algo_spot_open_orders_get) | **GET** /sapi/v1/algo/spot/openOrders | Query Current Algo Open Orders +*SpotAlgoApi* | [**sapi_v1_algo_spot_order_delete**](docs/SpotAlgoApi.md#sapi_v1_algo_spot_order_delete) | **DELETE** /sapi/v1/algo/spot/order | Cancel Algo Order +*SpotAlgoApi* | [**sapi_v1_algo_spot_sub_orders_get**](docs/SpotAlgoApi.md#sapi_v1_algo_spot_sub_orders_get) | **GET** /sapi/v1/algo/spot/subOrders | Query Sub Orders +*StakingApi* | [**sapi_v1_eth_staking_eth_history_rate_history_get**](docs/StakingApi.md#sapi_v1_eth_staking_eth_history_rate_history_get) | **GET** /sapi/v1/eth-staking/eth/history/rateHistory | Get WBETH Rate History (USER_DATA) +*StakingApi* | [**sapi_v1_eth_staking_eth_history_redemption_history_get**](docs/StakingApi.md#sapi_v1_eth_staking_eth_history_redemption_history_get) | **GET** /sapi/v1/eth-staking/eth/history/redemptionHistory | Get ETH redemption history (USER_DATA) +*StakingApi* | [**sapi_v1_eth_staking_eth_history_rewards_history_get**](docs/StakingApi.md#sapi_v1_eth_staking_eth_history_rewards_history_get) | **GET** /sapi/v1/eth-staking/eth/history/rewardsHistory | Get BETH rewards distribution history(USER_DATA) +*StakingApi* | [**sapi_v1_eth_staking_eth_history_staking_history_get**](docs/StakingApi.md#sapi_v1_eth_staking_eth_history_staking_history_get) | **GET** /sapi/v1/eth-staking/eth/history/stakingHistory | Get ETH staking history (USER_DATA) +*StakingApi* | [**sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get**](docs/StakingApi.md#sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get) | **GET** /sapi/v1/eth-staking/eth/history/wbethRewardsHistory | Get WBETH rewards history(USER_DATA) +*StakingApi* | [**sapi_v1_eth_staking_eth_quota_get**](docs/StakingApi.md#sapi_v1_eth_staking_eth_quota_get) | **GET** /sapi/v1/eth-staking/eth/quota | Get current ETH staking quota (USER_DATA) +*StakingApi* | [**sapi_v1_eth_staking_eth_redeem_post**](docs/StakingApi.md#sapi_v1_eth_staking_eth_redeem_post) | **POST** /sapi/v1/eth-staking/eth/redeem | Redeem ETH (TRADE) +*StakingApi* | [**sapi_v1_eth_staking_wbeth_history_unwrap_history_get**](docs/StakingApi.md#sapi_v1_eth_staking_wbeth_history_unwrap_history_get) | **GET** /sapi/v1/eth-staking/wbeth/history/unwrapHistory | Get WBETH unwrap history (USER_DATA) +*StakingApi* | [**sapi_v1_eth_staking_wbeth_history_wrap_history_get**](docs/StakingApi.md#sapi_v1_eth_staking_wbeth_history_wrap_history_get) | **GET** /sapi/v1/eth-staking/wbeth/history/wrapHistory | Get WBETH wrap history (USER_DATA) +*StakingApi* | [**sapi_v1_eth_staking_wbeth_wrap_post**](docs/StakingApi.md#sapi_v1_eth_staking_wbeth_wrap_post) | **POST** /sapi/v1/eth-staking/wbeth/wrap | Wrap BETH(TRADE) +*StakingApi* | [**sapi_v2_eth_staking_account_get**](docs/StakingApi.md#sapi_v2_eth_staking_account_get) | **GET** /sapi/v2/eth-staking/account | ETH Staking account V2(USER_DATA) +*StakingApi* | [**sapi_v2_eth_staking_eth_stake_post**](docs/StakingApi.md#sapi_v2_eth_staking_eth_stake_post) | **POST** /sapi/v2/eth-staking/eth/stake | Subscribe ETH Staking V2(TRADE) +*StreamApi* | [**api_v3_user_data_stream_delete**](docs/StreamApi.md#api_v3_user_data_stream_delete) | **DELETE** /api/v3/userDataStream | Close a ListenKey (USER_STREAM) +*StreamApi* | [**api_v3_user_data_stream_post**](docs/StreamApi.md#api_v3_user_data_stream_post) | **POST** /api/v3/userDataStream | Create a ListenKey (USER_STREAM) +*StreamApi* | [**api_v3_user_data_stream_put**](docs/StreamApi.md#api_v3_user_data_stream_put) | **PUT** /api/v3/userDataStream | Ping/Keep-alive a ListenKey (USER_STREAM) +*SubAccountApi* | [**sapi_v1_capital_deposit_sub_address_get**](docs/SubAccountApi.md#sapi_v1_capital_deposit_sub_address_get) | **GET** /sapi/v1/capital/deposit/subAddress | Sub-account Spot Assets Summary (For Master Account) +*SubAccountApi* | [**sapi_v1_capital_deposit_sub_hisrec_get**](docs/SubAccountApi.md#sapi_v1_capital_deposit_sub_hisrec_get) | **GET** /sapi/v1/capital/deposit/subHisrec | Sub-account Deposit History (For Master Account) +*SubAccountApi* | [**sapi_v1_managed_subaccount_account_snapshot_get**](docs/SubAccountApi.md#sapi_v1_managed_subaccount_account_snapshot_get) | **GET** /sapi/v1/managed-subaccount/accountSnapshot | Managed sub-account snapshot (For Investor Master Account) +*SubAccountApi* | [**sapi_v1_managed_subaccount_asset_get**](docs/SubAccountApi.md#sapi_v1_managed_subaccount_asset_get) | **GET** /sapi/v1/managed-subaccount/asset | Managed sub-account asset details(For Investor Master Account) +*SubAccountApi* | [**sapi_v1_managed_subaccount_deposit_address_get**](docs/SubAccountApi.md#sapi_v1_managed_subaccount_deposit_address_get) | **GET** /sapi/v1/managed-subaccount/deposit/address | Get Managed Sub-account Deposit Address (For Investor Master Account) +*SubAccountApi* | [**sapi_v1_managed_subaccount_deposit_post**](docs/SubAccountApi.md#sapi_v1_managed_subaccount_deposit_post) | **POST** /sapi/v1/managed-subaccount/deposit | Deposit assets into the managed sub-account(For Investor Master Account) +*SubAccountApi* | [**sapi_v1_managed_subaccount_fetch_future_asset_get**](docs/SubAccountApi.md#sapi_v1_managed_subaccount_fetch_future_asset_get) | **GET** /sapi/v1/managed-subaccount/fetch-future-asset | Query Managed Sub-account Futures Asset Details (For Investor Master Account) +*SubAccountApi* | [**sapi_v1_managed_subaccount_info_get**](docs/SubAccountApi.md#sapi_v1_managed_subaccount_info_get) | **GET** /sapi/v1/managed-subaccount/info | Query Managed Sub-account List (For Investor) +*SubAccountApi* | [**sapi_v1_managed_subaccount_margin_asset_get**](docs/SubAccountApi.md#sapi_v1_managed_subaccount_margin_asset_get) | **GET** /sapi/v1/managed-subaccount/marginAsset | Query Managed Sub-account Margin Asset Details (For Investor Master Account) +*SubAccountApi* | [**sapi_v1_managed_subaccount_query_trans_log_for_investor_get**](docs/SubAccountApi.md#sapi_v1_managed_subaccount_query_trans_log_for_investor_get) | **GET** /sapi/v1/managed-subaccount/queryTransLogForInvestor | Query Managed Sub Account Transfer Log (For Investor Master Account) +*SubAccountApi* | [**sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get**](docs/SubAccountApi.md#sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get) | **GET** /sapi/v1/managed-subaccount/queryTransLogForTradeParent | Query Managed Sub Account Transfer Log (For Trading Team Master Account) +*SubAccountApi* | [**sapi_v1_managed_subaccount_query_trans_log_get**](docs/SubAccountApi.md#sapi_v1_managed_subaccount_query_trans_log_get) | **GET** /sapi/v1/managed-subaccount/query-trans-log | Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA) +*SubAccountApi* | [**sapi_v1_managed_subaccount_withdraw_post**](docs/SubAccountApi.md#sapi_v1_managed_subaccount_withdraw_post) | **POST** /sapi/v1/managed-subaccount/withdraw | Withdrawl assets from the managed sub-account(For Investor Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_blvt_enable_post**](docs/SubAccountApi.md#sapi_v1_sub_account_blvt_enable_post) | **POST** /sapi/v1/sub-account/blvt/enable | Enable Leverage Token for Sub-account (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_eoptions_enable_post**](docs/SubAccountApi.md#sapi_v1_sub_account_eoptions_enable_post) | **POST** /sapi/v1/sub-account/eoptions/enable | Enable Options for Sub-account (For Master Account)(USER_DATA) +*SubAccountApi* | [**sapi_v1_sub_account_futures_account_get**](docs/SubAccountApi.md#sapi_v1_sub_account_futures_account_get) | **GET** /sapi/v1/sub-account/futures/account | Detail on Sub-account's Futures Account (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_futures_account_summary_get**](docs/SubAccountApi.md#sapi_v1_sub_account_futures_account_summary_get) | **GET** /sapi/v1/sub-account/futures/accountSummary | Summary of Sub-account's Futures Account (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_futures_enable_post**](docs/SubAccountApi.md#sapi_v1_sub_account_futures_enable_post) | **POST** /sapi/v1/sub-account/futures/enable | Enable Futures for Sub-account (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_futures_internal_transfer_get**](docs/SubAccountApi.md#sapi_v1_sub_account_futures_internal_transfer_get) | **GET** /sapi/v1/sub-account/futures/internalTransfer | Sub-account Futures Asset Transfer History (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_futures_internal_transfer_post**](docs/SubAccountApi.md#sapi_v1_sub_account_futures_internal_transfer_post) | **POST** /sapi/v1/sub-account/futures/internalTransfer | Sub-account Futures Asset Transfer (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_futures_position_risk_get**](docs/SubAccountApi.md#sapi_v1_sub_account_futures_position_risk_get) | **GET** /sapi/v1/sub-account/futures/positionRisk | Futures Position-Risk of Sub-account (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_futures_transfer_post**](docs/SubAccountApi.md#sapi_v1_sub_account_futures_transfer_post) | **POST** /sapi/v1/sub-account/futures/transfer | Transfer for Sub-account (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_list_get**](docs/SubAccountApi.md#sapi_v1_sub_account_list_get) | **GET** /sapi/v1/sub-account/list | Query Sub-account List (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_margin_account_get**](docs/SubAccountApi.md#sapi_v1_sub_account_margin_account_get) | **GET** /sapi/v1/sub-account/margin/account | Detail on Sub-account's Margin Account (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_margin_account_summary_get**](docs/SubAccountApi.md#sapi_v1_sub_account_margin_account_summary_get) | **GET** /sapi/v1/sub-account/margin/accountSummary | Summary of Sub-account's Margin Account (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_margin_enable_post**](docs/SubAccountApi.md#sapi_v1_sub_account_margin_enable_post) | **POST** /sapi/v1/sub-account/margin/enable | Enable Margin for Sub-account (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_margin_transfer_post**](docs/SubAccountApi.md#sapi_v1_sub_account_margin_transfer_post) | **POST** /sapi/v1/sub-account/margin/transfer | Margin Transfer for Sub-account (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_spot_summary_get**](docs/SubAccountApi.md#sapi_v1_sub_account_spot_summary_get) | **GET** /sapi/v1/sub-account/spotSummary | Sub-account Spot Assets Summary (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_status_get**](docs/SubAccountApi.md#sapi_v1_sub_account_status_get) | **GET** /sapi/v1/sub-account/status | Sub-account's Status on Margin/Futures (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_sub_account_api_ip_restriction_get**](docs/SubAccountApi.md#sapi_v1_sub_account_sub_account_api_ip_restriction_get) | **GET** /sapi/v1/sub-account/subAccountApi/ipRestriction | Get IP Restriction for a Sub-account API Key (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete**](docs/SubAccountApi.md#sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete) | **DELETE** /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList | Delete IP List for a Sub-account API Key (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_sub_transfer_history_get**](docs/SubAccountApi.md#sapi_v1_sub_account_sub_transfer_history_get) | **GET** /sapi/v1/sub-account/sub/transfer/history | Sub-account Spot Asset Transfer History (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_transaction_statistics_get**](docs/SubAccountApi.md#sapi_v1_sub_account_transaction_statistics_get) | **GET** /sapi/v1/sub-account/transaction-statistics | Query Sub-account Transaction Statistics (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_transfer_sub_to_master_post**](docs/SubAccountApi.md#sapi_v1_sub_account_transfer_sub_to_master_post) | **POST** /sapi/v1/sub-account/transfer/subToMaster | Transfer to Master (For Sub-account) +*SubAccountApi* | [**sapi_v1_sub_account_transfer_sub_to_sub_post**](docs/SubAccountApi.md#sapi_v1_sub_account_transfer_sub_to_sub_post) | **POST** /sapi/v1/sub-account/transfer/subToSub | Transfer to Sub-account of Same Master (For Sub-account) +*SubAccountApi* | [**sapi_v1_sub_account_transfer_sub_user_history_get**](docs/SubAccountApi.md#sapi_v1_sub_account_transfer_sub_user_history_get) | **GET** /sapi/v1/sub-account/transfer/subUserHistory | Sub-account Transfer History (For Sub-account) +*SubAccountApi* | [**sapi_v1_sub_account_universal_transfer_get**](docs/SubAccountApi.md#sapi_v1_sub_account_universal_transfer_get) | **GET** /sapi/v1/sub-account/universalTransfer | Universal Transfer History (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_universal_transfer_post**](docs/SubAccountApi.md#sapi_v1_sub_account_universal_transfer_post) | **POST** /sapi/v1/sub-account/universalTransfer | Universal Transfer (For Master Account) +*SubAccountApi* | [**sapi_v1_sub_account_virtual_sub_account_post**](docs/SubAccountApi.md#sapi_v1_sub_account_virtual_sub_account_post) | **POST** /sapi/v1/sub-account/virtualSubAccount | Create a Virtual Sub-account(For Master Account) +*SubAccountApi* | [**sapi_v2_sub_account_futures_account_get**](docs/SubAccountApi.md#sapi_v2_sub_account_futures_account_get) | **GET** /sapi/v2/sub-account/futures/account | Detail on Sub-account's Futures Account V2 (For Master Account) +*SubAccountApi* | [**sapi_v2_sub_account_futures_account_summary_get**](docs/SubAccountApi.md#sapi_v2_sub_account_futures_account_summary_get) | **GET** /sapi/v2/sub-account/futures/accountSummary | Summary of Sub-account's Futures Account V2 (For Master Account) +*SubAccountApi* | [**sapi_v2_sub_account_futures_position_risk_get**](docs/SubAccountApi.md#sapi_v2_sub_account_futures_position_risk_get) | **GET** /sapi/v2/sub-account/futures/positionRisk | Futures Position-Risk of Sub-account V2 (For Master Account) +*SubAccountApi* | [**sapi_v2_sub_account_sub_account_api_ip_restriction_post**](docs/SubAccountApi.md#sapi_v2_sub_account_sub_account_api_ip_restriction_post) | **POST** /sapi/v2/sub-account/subAccountApi/ipRestriction | Update IP Restriction for Sub-Account API key (For Master Account) +*SubAccountApi* | [**sapi_v3_sub_account_assets_get**](docs/SubAccountApi.md#sapi_v3_sub_account_assets_get) | **GET** /sapi/v3/sub-account/assets | Sub-account Assets (For Master Account) +*SubAccountApi* | [**sapi_v4_sub_account_assets_get**](docs/SubAccountApi.md#sapi_v4_sub_account_assets_get) | **GET** /sapi/v4/sub-account/assets | Query Sub-account Assets (For Master Account) +*TradeApi* | [**api_v3_account_commission_get**](docs/TradeApi.md#api_v3_account_commission_get) | **GET** /api/v3/account/commission | Query Commission Rates (USER_DATA) +*TradeApi* | [**api_v3_account_get**](docs/TradeApi.md#api_v3_account_get) | **GET** /api/v3/account | Account Information (USER_DATA) +*TradeApi* | [**api_v3_all_order_list_get**](docs/TradeApi.md#api_v3_all_order_list_get) | **GET** /api/v3/allOrderList | Query all OCO (USER_DATA) +*TradeApi* | [**api_v3_all_orders_get**](docs/TradeApi.md#api_v3_all_orders_get) | **GET** /api/v3/allOrders | All Orders (USER_DATA) +*TradeApi* | [**api_v3_my_allocations_get**](docs/TradeApi.md#api_v3_my_allocations_get) | **GET** /api/v3/myAllocations | Query Allocations (USER_DATA) +*TradeApi* | [**api_v3_my_prevented_matches_get**](docs/TradeApi.md#api_v3_my_prevented_matches_get) | **GET** /api/v3/myPreventedMatches | Query Prevented Matches +*TradeApi* | [**api_v3_my_trades_get**](docs/TradeApi.md#api_v3_my_trades_get) | **GET** /api/v3/myTrades | Account Trade List (USER_DATA) +*TradeApi* | [**api_v3_open_order_list_get**](docs/TradeApi.md#api_v3_open_order_list_get) | **GET** /api/v3/openOrderList | Query Open OCO (USER_DATA) +*TradeApi* | [**api_v3_open_orders_delete**](docs/TradeApi.md#api_v3_open_orders_delete) | **DELETE** /api/v3/openOrders | Cancel all Open Orders on a Symbol (TRADE) +*TradeApi* | [**api_v3_open_orders_get**](docs/TradeApi.md#api_v3_open_orders_get) | **GET** /api/v3/openOrders | Current Open Orders (USER_DATA) +*TradeApi* | [**api_v3_order_cancel_replace_post**](docs/TradeApi.md#api_v3_order_cancel_replace_post) | **POST** /api/v3/order/cancelReplace | Cancel an Existing Order and Send a New Order (Trade) +*TradeApi* | [**api_v3_order_delete**](docs/TradeApi.md#api_v3_order_delete) | **DELETE** /api/v3/order | Cancel Order (TRADE) +*TradeApi* | [**api_v3_order_get**](docs/TradeApi.md#api_v3_order_get) | **GET** /api/v3/order | Query Order (USER_DATA) +*TradeApi* | [**api_v3_order_list_delete**](docs/TradeApi.md#api_v3_order_list_delete) | **DELETE** /api/v3/orderList | Cancel OCO (TRADE) +*TradeApi* | [**api_v3_order_list_get**](docs/TradeApi.md#api_v3_order_list_get) | **GET** /api/v3/orderList | Query OCO (USER_DATA) +*TradeApi* | [**api_v3_order_oco_post**](docs/TradeApi.md#api_v3_order_oco_post) | **POST** /api/v3/order/oco | New OCO (TRADE) +*TradeApi* | [**api_v3_order_post**](docs/TradeApi.md#api_v3_order_post) | **POST** /api/v3/order | New Order (TRADE) +*TradeApi* | [**api_v3_order_test_post**](docs/TradeApi.md#api_v3_order_test_post) | **POST** /api/v3/order/test | Test New Order (TRADE) +*TradeApi* | [**api_v3_rate_limit_order_get**](docs/TradeApi.md#api_v3_rate_limit_order_get) | **GET** /api/v3/rateLimit/order | Query Current Order Count Usage (TRADE) +*TradeApi* | [**api_v3_sor_order_post**](docs/TradeApi.md#api_v3_sor_order_post) | **POST** /api/v3/sor/order | New order using SOR (TRADE) +*TradeApi* | [**api_v3_sor_order_test_post**](docs/TradeApi.md#api_v3_sor_order_test_post) | **POST** /api/v3/sor/order/test | Test new order using SOR (TRADE) +*VIPLoansApi* | [**sapi_v1_loan_vip_borrow_post**](docs/VIPLoansApi.md#sapi_v1_loan_vip_borrow_post) | **POST** /sapi/v1/loan/vip/borrow | VIP Loan Borrow +*VIPLoansApi* | [**sapi_v1_loan_vip_collateral_account_get**](docs/VIPLoansApi.md#sapi_v1_loan_vip_collateral_account_get) | **GET** /sapi/v1/loan/vip/collateral/account | Check Locked Value of VIP Collateral Account (USER_DATA) +*VIPLoansApi* | [**sapi_v1_loan_vip_collateral_data_get**](docs/VIPLoansApi.md#sapi_v1_loan_vip_collateral_data_get) | **GET** /sapi/v1/loan/vip/collateral/data | Get Collateral Asset Data (USER_DATA) +*VIPLoansApi* | [**sapi_v1_loan_vip_loanable_data_get**](docs/VIPLoansApi.md#sapi_v1_loan_vip_loanable_data_get) | **GET** /sapi/v1/loan/vip/loanable/data | Get Loanable Assets Data +*VIPLoansApi* | [**sapi_v1_loan_vip_ongoing_orders_get**](docs/VIPLoansApi.md#sapi_v1_loan_vip_ongoing_orders_get) | **GET** /sapi/v1/loan/vip/ongoing/orders | Get VIP Loan Ongoing Orders (USER_DATA) +*VIPLoansApi* | [**sapi_v1_loan_vip_renew_post**](docs/VIPLoansApi.md#sapi_v1_loan_vip_renew_post) | **POST** /sapi/v1/loan/vip/renew | VIP Loan Renew +*VIPLoansApi* | [**sapi_v1_loan_vip_repay_history_get**](docs/VIPLoansApi.md#sapi_v1_loan_vip_repay_history_get) | **GET** /sapi/v1/loan/vip/repay/history | Get VIP Loan Repayment History (USER_DATA) +*VIPLoansApi* | [**sapi_v1_loan_vip_repay_post**](docs/VIPLoansApi.md#sapi_v1_loan_vip_repay_post) | **POST** /sapi/v1/loan/vip/repay | VIP Loan Repay (TRADE) +*VIPLoansApi* | [**sapi_v1_loan_vip_request_data_get**](docs/VIPLoansApi.md#sapi_v1_loan_vip_request_data_get) | **GET** /sapi/v1/loan/vip/request/data | Query Application Status (USER_DATA) +*VIPLoansApi* | [**sapi_v1_loan_vip_request_interest_rate_get**](docs/VIPLoansApi.md#sapi_v1_loan_vip_request_interest_rate_get) | **GET** /sapi/v1/loan/vip/request/interestRate | Get Borrow Interest Rate (USER_DATA) +*WalletApi* | [**sapi_v1_account_api_restrictions_get**](docs/WalletApi.md#sapi_v1_account_api_restrictions_get) | **GET** /sapi/v1/account/apiRestrictions | Get API Key Permission (USER_DATA) +*WalletApi* | [**sapi_v1_account_api_trading_status_get**](docs/WalletApi.md#sapi_v1_account_api_trading_status_get) | **GET** /sapi/v1/account/apiTradingStatus | Account API Trading Status (USER_DATA) +*WalletApi* | [**sapi_v1_account_disable_fast_withdraw_switch_post**](docs/WalletApi.md#sapi_v1_account_disable_fast_withdraw_switch_post) | **POST** /sapi/v1/account/disableFastWithdrawSwitch | Disable Fast Withdraw Switch (USER_DATA) +*WalletApi* | [**sapi_v1_account_enable_fast_withdraw_switch_post**](docs/WalletApi.md#sapi_v1_account_enable_fast_withdraw_switch_post) | **POST** /sapi/v1/account/enableFastWithdrawSwitch | Enable Fast Withdraw Switch (USER_DATA) +*WalletApi* | [**sapi_v1_account_info_get**](docs/WalletApi.md#sapi_v1_account_info_get) | **GET** /sapi/v1/account/info | Account info (USER_DATA) +*WalletApi* | [**sapi_v1_account_snapshot_get**](docs/WalletApi.md#sapi_v1_account_snapshot_get) | **GET** /sapi/v1/accountSnapshot | Daily Account Snapshot (USER_DATA) +*WalletApi* | [**sapi_v1_account_status_get**](docs/WalletApi.md#sapi_v1_account_status_get) | **GET** /sapi/v1/account/status | Account Status (USER_DATA) +*WalletApi* | [**sapi_v1_asset_asset_detail_get**](docs/WalletApi.md#sapi_v1_asset_asset_detail_get) | **GET** /sapi/v1/asset/assetDetail | Asset Detail (USER_DATA) +*WalletApi* | [**sapi_v1_asset_asset_dividend_get**](docs/WalletApi.md#sapi_v1_asset_asset_dividend_get) | **GET** /sapi/v1/asset/assetDividend | Asset Dividend Record (USER_DATA) +*WalletApi* | [**sapi_v1_asset_convert_transfer_post**](docs/WalletApi.md#sapi_v1_asset_convert_transfer_post) | **POST** /sapi/v1/asset/convert-transfer | Convert Transfer (USER_DATA) +*WalletApi* | [**sapi_v1_asset_convert_transfer_query_by_page_get**](docs/WalletApi.md#sapi_v1_asset_convert_transfer_query_by_page_get) | **GET** /sapi/v1/asset/convert-transfer/queryByPage | Query Convert Transfer (USER_DATA) +*WalletApi* | [**sapi_v1_asset_custody_transfer_history_get**](docs/WalletApi.md#sapi_v1_asset_custody_transfer_history_get) | **GET** /sapi/v1/asset/custody/transfer-history | Query User Delegation History(For Master Account) (USER_DATA) +*WalletApi* | [**sapi_v1_asset_dribblet_get**](docs/WalletApi.md#sapi_v1_asset_dribblet_get) | **GET** /sapi/v1/asset/dribblet | DustLog(USER_DATA) +*WalletApi* | [**sapi_v1_asset_dust_btc_post**](docs/WalletApi.md#sapi_v1_asset_dust_btc_post) | **POST** /sapi/v1/asset/dust-btc | Get Assets That Can Be Converted Into BNB (USER_DATA) +*WalletApi* | [**sapi_v1_asset_dust_post**](docs/WalletApi.md#sapi_v1_asset_dust_post) | **POST** /sapi/v1/asset/dust | Dust Transfer (USER_DATA) +*WalletApi* | [**sapi_v1_asset_get_funding_asset_post**](docs/WalletApi.md#sapi_v1_asset_get_funding_asset_post) | **POST** /sapi/v1/asset/get-funding-asset | Funding Wallet (USER_DATA) +*WalletApi* | [**sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get**](docs/WalletApi.md#sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get) | **GET** /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage | Get Cloud-Mining payment and refund history (USER_DATA) +*WalletApi* | [**sapi_v1_asset_trade_fee_get**](docs/WalletApi.md#sapi_v1_asset_trade_fee_get) | **GET** /sapi/v1/asset/tradeFee | Trade Fee (USER_DATA) +*WalletApi* | [**sapi_v1_asset_transfer_get**](docs/WalletApi.md#sapi_v1_asset_transfer_get) | **GET** /sapi/v1/asset/transfer | Query User Universal Transfer History (USER_DATA) +*WalletApi* | [**sapi_v1_asset_transfer_post**](docs/WalletApi.md#sapi_v1_asset_transfer_post) | **POST** /sapi/v1/asset/transfer | User Universal Transfer (USER_DATA) +*WalletApi* | [**sapi_v1_asset_wallet_balance_get**](docs/WalletApi.md#sapi_v1_asset_wallet_balance_get) | **GET** /sapi/v1/asset/wallet/balance | Query User Wallet Balance (USER_DATA) +*WalletApi* | [**sapi_v1_capital_config_getall_get**](docs/WalletApi.md#sapi_v1_capital_config_getall_get) | **GET** /sapi/v1/capital/config/getall | All Coins' Information (USER_DATA) +*WalletApi* | [**sapi_v1_capital_contract_convertible_coins_get**](docs/WalletApi.md#sapi_v1_capital_contract_convertible_coins_get) | **GET** /sapi/v1/capital/contract/convertible-coins | Query auto-converting stable coins (USER_DATA) +*WalletApi* | [**sapi_v1_capital_contract_convertible_coins_post**](docs/WalletApi.md#sapi_v1_capital_contract_convertible_coins_post) | **POST** /sapi/v1/capital/contract/convertible-coins | Switch on/off BUSD and stable coins conversion (USER_DATA) (USER_DATA) +*WalletApi* | [**sapi_v1_capital_deposit_address_get**](docs/WalletApi.md#sapi_v1_capital_deposit_address_get) | **GET** /sapi/v1/capital/deposit/address | Deposit Address (supporting network) (USER_DATA) +*WalletApi* | [**sapi_v1_capital_deposit_address_list_get**](docs/WalletApi.md#sapi_v1_capital_deposit_address_list_get) | **GET** /sapi/v1/capital/deposit/address/list | Fetch deposit address list with network (USER_DATA) +*WalletApi* | [**sapi_v1_capital_deposit_credit_apply_post**](docs/WalletApi.md#sapi_v1_capital_deposit_credit_apply_post) | **POST** /sapi/v1/capital/deposit/credit-apply | One click arrival deposit apply (USER_DATA) +*WalletApi* | [**sapi_v1_capital_deposit_hisrec_get**](docs/WalletApi.md#sapi_v1_capital_deposit_hisrec_get) | **GET** /sapi/v1/capital/deposit/hisrec | Deposit History(supporting network) (USER_DATA) +*WalletApi* | [**sapi_v1_capital_withdraw_address_list_get**](docs/WalletApi.md#sapi_v1_capital_withdraw_address_list_get) | **GET** /sapi/v1/capital/withdraw/address/list | Fetch withdraw address list (USER_DATA) +*WalletApi* | [**sapi_v1_capital_withdraw_apply_post**](docs/WalletApi.md#sapi_v1_capital_withdraw_apply_post) | **POST** /sapi/v1/capital/withdraw/apply | Withdraw (USER_DATA) +*WalletApi* | [**sapi_v1_capital_withdraw_history_get**](docs/WalletApi.md#sapi_v1_capital_withdraw_history_get) | **GET** /sapi/v1/capital/withdraw/history | Withdraw History (supporting network) (USER_DATA) +*WalletApi* | [**sapi_v1_spot_delist_schedule_get**](docs/WalletApi.md#sapi_v1_spot_delist_schedule_get) | **GET** /sapi/v1/spot/delist-schedule | Get symbols delist schedule for spot (MARKET_DATA) +*WalletApi* | [**sapi_v1_system_status_get**](docs/WalletApi.md#sapi_v1_system_status_get) | **GET** /sapi/v1/system/status | System Status (System) +*WalletApi* | [**sapi_v3_asset_get_user_asset_post**](docs/WalletApi.md#sapi_v3_asset_get_user_asset_post) | **POST** /sapi/v3/asset/getUserAsset | User Asset (USER_DATA) + + +## Documentation For Models + + - [Account](docs/Account.md) + - [AccountBalancesInner](docs/AccountBalancesInner.md) + - [AccountCommissionRates](docs/AccountCommissionRates.md) + - [AggTrade](docs/AggTrade.md) + - [ApiV3AccountCommissionGet200Response](docs/ApiV3AccountCommissionGet200Response.md) + - [ApiV3AccountCommissionGet200ResponseDiscount](docs/ApiV3AccountCommissionGet200ResponseDiscount.md) + - [ApiV3AccountCommissionGet200ResponseStandardCommission](docs/ApiV3AccountCommissionGet200ResponseStandardCommission.md) + - [ApiV3AccountCommissionGet200ResponseTaxCommission](docs/ApiV3AccountCommissionGet200ResponseTaxCommission.md) + - [ApiV3AllOrderListGet200ResponseInner](docs/ApiV3AllOrderListGet200ResponseInner.md) + - [ApiV3AllOrderListGet200ResponseInnerOrdersInner](docs/ApiV3AllOrderListGet200ResponseInnerOrdersInner.md) + - [ApiV3AvgPriceGet200Response](docs/ApiV3AvgPriceGet200Response.md) + - [ApiV3DepthGet200Response](docs/ApiV3DepthGet200Response.md) + - [ApiV3ExchangeInfoGet200Response](docs/ApiV3ExchangeInfoGet200Response.md) + - [ApiV3ExchangeInfoGet200ResponseRateLimitsInner](docs/ApiV3ExchangeInfoGet200ResponseRateLimitsInner.md) + - [ApiV3ExchangeInfoGet200ResponseSymbolsInner](docs/ApiV3ExchangeInfoGet200ResponseSymbolsInner.md) + - [ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner](docs/ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner.md) + - [ApiV3KlinesGet200ResponseInnerInner](docs/ApiV3KlinesGet200ResponseInnerInner.md) + - [ApiV3MyAllocationsGet200ResponseInner](docs/ApiV3MyAllocationsGet200ResponseInner.md) + - [ApiV3MyPreventedMatchesGet200ResponseInner](docs/ApiV3MyPreventedMatchesGet200ResponseInner.md) + - [ApiV3OpenOrderListGet200ResponseInner](docs/ApiV3OpenOrderListGet200ResponseInner.md) + - [ApiV3OpenOrderListGet200ResponseInnerOrdersInner](docs/ApiV3OpenOrderListGet200ResponseInnerOrdersInner.md) + - [ApiV3OpenOrdersDelete200ResponseInner](docs/ApiV3OpenOrdersDelete200ResponseInner.md) + - [ApiV3OrderCancelReplacePost200Response](docs/ApiV3OrderCancelReplacePost200Response.md) + - [ApiV3OrderCancelReplacePost200ResponseCancelResponse](docs/ApiV3OrderCancelReplacePost200ResponseCancelResponse.md) + - [ApiV3OrderCancelReplacePost200ResponseNewOrderResponse](docs/ApiV3OrderCancelReplacePost200ResponseNewOrderResponse.md) + - [ApiV3OrderListGet200Response](docs/ApiV3OrderListGet200Response.md) + - [ApiV3OrderListGet200ResponseOrdersInner](docs/ApiV3OrderListGet200ResponseOrdersInner.md) + - [ApiV3OrderOcoPost200Response](docs/ApiV3OrderOcoPost200Response.md) + - [ApiV3OrderOcoPost200ResponseOrderReportsInner](docs/ApiV3OrderOcoPost200ResponseOrderReportsInner.md) + - [ApiV3OrderOcoPost200ResponseOrdersInner](docs/ApiV3OrderOcoPost200ResponseOrdersInner.md) + - [ApiV3OrderPost200Response](docs/ApiV3OrderPost200Response.md) + - [ApiV3RateLimitOrderGet200ResponseInner](docs/ApiV3RateLimitOrderGet200ResponseInner.md) + - [ApiV3SorOrderPost200Response](docs/ApiV3SorOrderPost200Response.md) + - [ApiV3SorOrderPost200ResponseFillsInner](docs/ApiV3SorOrderPost200ResponseFillsInner.md) + - [ApiV3Ticker24hrGet200Response](docs/ApiV3Ticker24hrGet200Response.md) + - [ApiV3TickerBookTickerGet200Response](docs/ApiV3TickerBookTickerGet200Response.md) + - [ApiV3TickerGet200Response](docs/ApiV3TickerGet200Response.md) + - [ApiV3TickerPriceGet200Response](docs/ApiV3TickerPriceGet200Response.md) + - [ApiV3TickerTradingDayGet200Response](docs/ApiV3TickerTradingDayGet200Response.md) + - [ApiV3TimeGet200Response](docs/ApiV3TimeGet200Response.md) + - [ApiV3UserDataStreamPost200Response](docs/ApiV3UserDataStreamPost200Response.md) + - [BnbBurnStatus](docs/BnbBurnStatus.md) + - [BookTicker](docs/BookTicker.md) + - [CanceledMarginOrderDetail](docs/CanceledMarginOrderDetail.md) + - [DayTicker](docs/DayTicker.md) + - [Error](docs/Error.md) + - [IsolatedMarginAccountInfo](docs/IsolatedMarginAccountInfo.md) + - [IsolatedMarginAccountInfoAssetsInner](docs/IsolatedMarginAccountInfoAssetsInner.md) + - [IsolatedMarginAccountInfoAssetsInnerBaseAsset](docs/IsolatedMarginAccountInfoAssetsInnerBaseAsset.md) + - [IsolatedMarginAccountInfoAssetsInnerQuoteAsset](docs/IsolatedMarginAccountInfoAssetsInnerQuoteAsset.md) + - [MarginOcoOrder](docs/MarginOcoOrder.md) + - [MarginOcoOrderOrderReportsInner](docs/MarginOcoOrderOrderReportsInner.md) + - [MarginOcoOrderOrdersInner](docs/MarginOcoOrderOrdersInner.md) + - [MarginOrder](docs/MarginOrder.md) + - [MarginOrderDetail](docs/MarginOrderDetail.md) + - [MarginOrderResponseAck](docs/MarginOrderResponseAck.md) + - [MarginOrderResponseFull](docs/MarginOrderResponseFull.md) + - [MarginOrderResponseResult](docs/MarginOrderResponseResult.md) + - [MarginTrade](docs/MarginTrade.md) + - [MarginTransferDetails](docs/MarginTransferDetails.md) + - [MarginTransferDetailsRowsInner](docs/MarginTransferDetailsRowsInner.md) + - [MyTrade](docs/MyTrade.md) + - [OcoOrder](docs/OcoOrder.md) + - [OcoOrderOrderReportsInner](docs/OcoOrderOrderReportsInner.md) + - [Order](docs/Order.md) + - [OrderDetails](docs/OrderDetails.md) + - [OrderResponseAck](docs/OrderResponseAck.md) + - [OrderResponseFull](docs/OrderResponseFull.md) + - [OrderResponseFullFillsInner](docs/OrderResponseFullFillsInner.md) + - [OrderResponseResult](docs/OrderResponseResult.md) + - [PriceTicker](docs/PriceTicker.md) + - [RepaymentInfo](docs/RepaymentInfo.md) + - [RepaymentInfo2](docs/RepaymentInfo2.md) + - [SapiV1AccountApiRestrictionsGet200Response](docs/SapiV1AccountApiRestrictionsGet200Response.md) + - [SapiV1AccountApiTradingStatusGet200Response](docs/SapiV1AccountApiTradingStatusGet200Response.md) + - [SapiV1AccountApiTradingStatusGet200ResponseData](docs/SapiV1AccountApiTradingStatusGet200ResponseData.md) + - [SapiV1AccountApiTradingStatusGet200ResponseDataIndicators](docs/SapiV1AccountApiTradingStatusGet200ResponseDataIndicators.md) + - [SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner](docs/SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner.md) + - [SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition](docs/SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition.md) + - [SapiV1AccountInfoGet200Response](docs/SapiV1AccountInfoGet200Response.md) + - [SapiV1AccountSnapshotGet200Response](docs/SapiV1AccountSnapshotGet200Response.md) + - [SapiV1AccountStatusGet200Response](docs/SapiV1AccountStatusGet200Response.md) + - [SapiV1AlgoFuturesHistoricalOrdersGet200Response](docs/SapiV1AlgoFuturesHistoricalOrdersGet200Response.md) + - [SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner](docs/SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner.md) + - [SapiV1AlgoFuturesNewOrderVpPost200Response](docs/SapiV1AlgoFuturesNewOrderVpPost200Response.md) + - [SapiV1AlgoFuturesOpenOrdersGet200Response](docs/SapiV1AlgoFuturesOpenOrdersGet200Response.md) + - [SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner](docs/SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner.md) + - [SapiV1AlgoFuturesOrderDelete200Response](docs/SapiV1AlgoFuturesOrderDelete200Response.md) + - [SapiV1AlgoFuturesSubOrdersGet200Response](docs/SapiV1AlgoFuturesSubOrdersGet200Response.md) + - [SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner](docs/SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner.md) + - [SapiV1AlgoSpotHistoricalOrdersGet200Response](docs/SapiV1AlgoSpotHistoricalOrdersGet200Response.md) + - [SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner](docs/SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner.md) + - [SapiV1AlgoSpotNewOrderTwapPost200Response](docs/SapiV1AlgoSpotNewOrderTwapPost200Response.md) + - [SapiV1AlgoSpotOpenOrdersGet200Response](docs/SapiV1AlgoSpotOpenOrdersGet200Response.md) + - [SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner](docs/SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner.md) + - [SapiV1AlgoSpotOrderDelete200Response](docs/SapiV1AlgoSpotOrderDelete200Response.md) + - [SapiV1AlgoSpotSubOrdersGet200Response](docs/SapiV1AlgoSpotSubOrdersGet200Response.md) + - [SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner](docs/SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner.md) + - [SapiV1AssetAssetDetailGet200Response](docs/SapiV1AssetAssetDetailGet200Response.md) + - [SapiV1AssetAssetDetailGet200ResponseCTR](docs/SapiV1AssetAssetDetailGet200ResponseCTR.md) + - [SapiV1AssetAssetDividendGet200Response](docs/SapiV1AssetAssetDividendGet200Response.md) + - [SapiV1AssetAssetDividendGet200ResponseRowsInner](docs/SapiV1AssetAssetDividendGet200ResponseRowsInner.md) + - [SapiV1AssetConvertTransferPost200Response](docs/SapiV1AssetConvertTransferPost200Response.md) + - [SapiV1AssetConvertTransferQueryByPageGet200Response](docs/SapiV1AssetConvertTransferQueryByPageGet200Response.md) + - [SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner](docs/SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner.md) + - [SapiV1AssetCustodyTransferHistoryGet200Response](docs/SapiV1AssetCustodyTransferHistoryGet200Response.md) + - [SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner](docs/SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner.md) + - [SapiV1AssetDribbletGet200Response](docs/SapiV1AssetDribbletGet200Response.md) + - [SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner](docs/SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner.md) + - [SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner](docs/SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.md) + - [SapiV1AssetDustBtcPost200Response](docs/SapiV1AssetDustBtcPost200Response.md) + - [SapiV1AssetDustBtcPost200ResponseDetailsInner](docs/SapiV1AssetDustBtcPost200ResponseDetailsInner.md) + - [SapiV1AssetDustPost200Response](docs/SapiV1AssetDustPost200Response.md) + - [SapiV1AssetDustPost200ResponseTransferResultInner](docs/SapiV1AssetDustPost200ResponseTransferResultInner.md) + - [SapiV1AssetGetFundingAssetPost200ResponseInner](docs/SapiV1AssetGetFundingAssetPost200ResponseInner.md) + - [SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response](docs/SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response.md) + - [SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner](docs/SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner.md) + - [SapiV1AssetTradeFeeGet200ResponseInner](docs/SapiV1AssetTradeFeeGet200ResponseInner.md) + - [SapiV1AssetTransferGet200Response](docs/SapiV1AssetTransferGet200Response.md) + - [SapiV1AssetTransferGet200ResponseRowsInner](docs/SapiV1AssetTransferGet200ResponseRowsInner.md) + - [SapiV1AssetTransferPost200Response](docs/SapiV1AssetTransferPost200Response.md) + - [SapiV1AssetWalletBalanceGet200ResponseInner](docs/SapiV1AssetWalletBalanceGet200ResponseInner.md) + - [SapiV1BlvtRedeemPost200Response](docs/SapiV1BlvtRedeemPost200Response.md) + - [SapiV1BlvtRedeemRecordGet200ResponseInner](docs/SapiV1BlvtRedeemRecordGet200ResponseInner.md) + - [SapiV1BlvtSubscribePost200Response](docs/SapiV1BlvtSubscribePost200Response.md) + - [SapiV1BlvtSubscribeRecordGet200Response](docs/SapiV1BlvtSubscribeRecordGet200Response.md) + - [SapiV1BlvtTokenInfoGet200ResponseInner](docs/SapiV1BlvtTokenInfoGet200ResponseInner.md) + - [SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner](docs/SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner.md) + - [SapiV1BlvtUserLimitGet200ResponseInner](docs/SapiV1BlvtUserLimitGet200ResponseInner.md) + - [SapiV1C2cOrderMatchListUserOrderHistoryGet200Response](docs/SapiV1C2cOrderMatchListUserOrderHistoryGet200Response.md) + - [SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner](docs/SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner.md) + - [SapiV1CapitalConfigGetallGet200ResponseInner](docs/SapiV1CapitalConfigGetallGet200ResponseInner.md) + - [SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner](docs/SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner.md) + - [SapiV1CapitalContractConvertibleCoinsGet200Response](docs/SapiV1CapitalContractConvertibleCoinsGet200Response.md) + - [SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates](docs/SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates.md) + - [SapiV1CapitalDepositAddressGet200Response](docs/SapiV1CapitalDepositAddressGet200Response.md) + - [SapiV1CapitalDepositAddressListGet200ResponseInner](docs/SapiV1CapitalDepositAddressListGet200ResponseInner.md) + - [SapiV1CapitalDepositCreditApplyPost200Response](docs/SapiV1CapitalDepositCreditApplyPost200Response.md) + - [SapiV1CapitalDepositHisrecGet200ResponseInner](docs/SapiV1CapitalDepositHisrecGet200ResponseInner.md) + - [SapiV1CapitalDepositSubAddressGet200Response](docs/SapiV1CapitalDepositSubAddressGet200Response.md) + - [SapiV1CapitalDepositSubHisrecGet200ResponseInner](docs/SapiV1CapitalDepositSubHisrecGet200ResponseInner.md) + - [SapiV1CapitalWithdrawAddressListGet200ResponseInner](docs/SapiV1CapitalWithdrawAddressListGet200ResponseInner.md) + - [SapiV1CapitalWithdrawApplyPost200Response](docs/SapiV1CapitalWithdrawApplyPost200Response.md) + - [SapiV1CapitalWithdrawHistoryGet200ResponseInner](docs/SapiV1CapitalWithdrawHistoryGet200ResponseInner.md) + - [SapiV1ConvertAcceptQuotePost200Response](docs/SapiV1ConvertAcceptQuotePost200Response.md) + - [SapiV1ConvertAssetInfoGet200ResponseInner](docs/SapiV1ConvertAssetInfoGet200ResponseInner.md) + - [SapiV1ConvertExchangeInfoGet200ResponseInner](docs/SapiV1ConvertExchangeInfoGet200ResponseInner.md) + - [SapiV1ConvertGetQuotePost200Response](docs/SapiV1ConvertGetQuotePost200Response.md) + - [SapiV1ConvertLimitCancelOrderPost200Response](docs/SapiV1ConvertLimitCancelOrderPost200Response.md) + - [SapiV1ConvertLimitPlaceOrderPost200Response](docs/SapiV1ConvertLimitPlaceOrderPost200Response.md) + - [SapiV1ConvertLimitQueryOpenOrdersGet200Response](docs/SapiV1ConvertLimitQueryOpenOrdersGet200Response.md) + - [SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner](docs/SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner.md) + - [SapiV1ConvertOrderStatusGet200Response](docs/SapiV1ConvertOrderStatusGet200Response.md) + - [SapiV1ConvertTradeFlowGet200Response](docs/SapiV1ConvertTradeFlowGet200Response.md) + - [SapiV1ConvertTradeFlowGet200ResponseListInner](docs/SapiV1ConvertTradeFlowGet200ResponseListInner.md) + - [SapiV1DciProductAccountsGet200Response](docs/SapiV1DciProductAccountsGet200Response.md) + - [SapiV1DciProductAutoCompoundEditStatusPost200Response](docs/SapiV1DciProductAutoCompoundEditStatusPost200Response.md) + - [SapiV1DciProductListGet200Response](docs/SapiV1DciProductListGet200Response.md) + - [SapiV1DciProductListGet200ResponseListInner](docs/SapiV1DciProductListGet200ResponseListInner.md) + - [SapiV1DciProductPositionsGet200Response](docs/SapiV1DciProductPositionsGet200Response.md) + - [SapiV1DciProductPositionsGet200ResponseListInner](docs/SapiV1DciProductPositionsGet200ResponseListInner.md) + - [SapiV1DciProductSubscribePost200Response](docs/SapiV1DciProductSubscribePost200Response.md) + - [SapiV1EthStakingEthHistoryRateHistoryGet200Response](docs/SapiV1EthStakingEthHistoryRateHistoryGet200Response.md) + - [SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner](docs/SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner.md) + - [SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response](docs/SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response.md) + - [SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner](docs/SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner.md) + - [SapiV1EthStakingEthHistoryRewardsHistoryGet200Response](docs/SapiV1EthStakingEthHistoryRewardsHistoryGet200Response.md) + - [SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner](docs/SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner.md) + - [SapiV1EthStakingEthHistoryStakingHistoryGet200Response](docs/SapiV1EthStakingEthHistoryStakingHistoryGet200Response.md) + - [SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner](docs/SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner.md) + - [SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response](docs/SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response.md) + - [SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner](docs/SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner.md) + - [SapiV1EthStakingEthQuotaGet200Response](docs/SapiV1EthStakingEthQuotaGet200Response.md) + - [SapiV1EthStakingEthRedeemPost200Response](docs/SapiV1EthStakingEthRedeemPost200Response.md) + - [SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response](docs/SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response.md) + - [SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner](docs/SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner.md) + - [SapiV1EthStakingWbethHistoryWrapHistoryGet200Response](docs/SapiV1EthStakingWbethHistoryWrapHistoryGet200Response.md) + - [SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner](docs/SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner.md) + - [SapiV1EthStakingWbethWrapPost200Response](docs/SapiV1EthStakingWbethWrapPost200Response.md) + - [SapiV1FiatOrdersGet200Response](docs/SapiV1FiatOrdersGet200Response.md) + - [SapiV1FiatOrdersGet200ResponseDataInner](docs/SapiV1FiatOrdersGet200ResponseDataInner.md) + - [SapiV1FiatPaymentsGet200Response](docs/SapiV1FiatPaymentsGet200Response.md) + - [SapiV1FiatPaymentsGet200ResponseDataInner](docs/SapiV1FiatPaymentsGet200ResponseDataInner.md) + - [SapiV1FuturesHistDataLinkGet200Response](docs/SapiV1FuturesHistDataLinkGet200Response.md) + - [SapiV1FuturesHistDataLinkGet200ResponseDataInner](docs/SapiV1FuturesHistDataLinkGet200ResponseDataInner.md) + - [SapiV1FuturesTransferGet200Response](docs/SapiV1FuturesTransferGet200Response.md) + - [SapiV1FuturesTransferGet200ResponseRowsInner](docs/SapiV1FuturesTransferGet200ResponseRowsInner.md) + - [SapiV1GiftcardBuyCodeTokenLimitGet200Response](docs/SapiV1GiftcardBuyCodeTokenLimitGet200Response.md) + - [SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData](docs/SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData.md) + - [SapiV1GiftcardCreateCodePost200Response](docs/SapiV1GiftcardCreateCodePost200Response.md) + - [SapiV1GiftcardCreateCodePost200ResponseData](docs/SapiV1GiftcardCreateCodePost200ResponseData.md) + - [SapiV1GiftcardCryptographyRsaPublicKeyGet200Response](docs/SapiV1GiftcardCryptographyRsaPublicKeyGet200Response.md) + - [SapiV1GiftcardRedeemCodePost200Response](docs/SapiV1GiftcardRedeemCodePost200Response.md) + - [SapiV1GiftcardRedeemCodePost200ResponseData](docs/SapiV1GiftcardRedeemCodePost200ResponseData.md) + - [SapiV1GiftcardVerifyGet200Response](docs/SapiV1GiftcardVerifyGet200Response.md) + - [SapiV1GiftcardVerifyGet200ResponseData](docs/SapiV1GiftcardVerifyGet200ResponseData.md) + - [SapiV1LendingAutoInvestAllAssetGet200Response](docs/SapiV1LendingAutoInvestAllAssetGet200Response.md) + - [SapiV1LendingAutoInvestHistoryListGet200ResponseInner](docs/SapiV1LendingAutoInvestHistoryListGet200ResponseInner.md) + - [SapiV1LendingAutoInvestIndexInfoGet200Response](docs/SapiV1LendingAutoInvestIndexInfoGet200Response.md) + - [SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner](docs/SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner.md) + - [SapiV1LendingAutoInvestIndexUserSummaryGet200Response](docs/SapiV1LendingAutoInvestIndexUserSummaryGet200Response.md) + - [SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner](docs/SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner.md) + - [SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner](docs/SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner.md) + - [SapiV1LendingAutoInvestOneOffPost200Response](docs/SapiV1LendingAutoInvestOneOffPost200Response.md) + - [SapiV1LendingAutoInvestOneOffPostDetailsParameterInner](docs/SapiV1LendingAutoInvestOneOffPostDetailsParameterInner.md) + - [SapiV1LendingAutoInvestOneOffStatusGet200Response](docs/SapiV1LendingAutoInvestOneOffStatusGet200Response.md) + - [SapiV1LendingAutoInvestPlanAddPost200Response](docs/SapiV1LendingAutoInvestPlanAddPost200Response.md) + - [SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner](docs/SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner.md) + - [SapiV1LendingAutoInvestPlanEditStatusPost200Response](docs/SapiV1LendingAutoInvestPlanEditStatusPost200Response.md) + - [SapiV1LendingAutoInvestPlanIdGet200Response](docs/SapiV1LendingAutoInvestPlanIdGet200Response.md) + - [SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner](docs/SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner.md) + - [SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner](docs/SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner.md) + - [SapiV1LendingAutoInvestPlanListGet200Response](docs/SapiV1LendingAutoInvestPlanListGet200Response.md) + - [SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner](docs/SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner.md) + - [SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner](docs/SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner.md) + - [SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner](docs/SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner.md) + - [SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner](docs/SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner.md) + - [SapiV1LendingAutoInvestRedeemPost200Response](docs/SapiV1LendingAutoInvestRedeemPost200Response.md) + - [SapiV1LendingAutoInvestSourceAssetListGet200Response](docs/SapiV1LendingAutoInvestSourceAssetListGet200Response.md) + - [SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner](docs/SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner.md) + - [SapiV1LendingAutoInvestTargetAssetListGet200Response](docs/SapiV1LendingAutoInvestTargetAssetListGet200Response.md) + - [SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner](docs/SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner.md) + - [SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner](docs/SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner.md) + - [SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner](docs/SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner.md) + - [SapiV1LendingCustomizedFixedPurchasePost200Response](docs/SapiV1LendingCustomizedFixedPurchasePost200Response.md) + - [SapiV1LendingPositionChangedPost200Response](docs/SapiV1LendingPositionChangedPost200Response.md) + - [SapiV1LendingProjectListGet200ResponseInner](docs/SapiV1LendingProjectListGet200ResponseInner.md) + - [SapiV1LendingProjectPositionListGet200ResponseInner](docs/SapiV1LendingProjectPositionListGet200ResponseInner.md) + - [SapiV1LoanAdjustLtvPost200Response](docs/SapiV1LoanAdjustLtvPost200Response.md) + - [SapiV1LoanBorrowHistoryGet200Response](docs/SapiV1LoanBorrowHistoryGet200Response.md) + - [SapiV1LoanBorrowHistoryGet200ResponseRowsInner](docs/SapiV1LoanBorrowHistoryGet200ResponseRowsInner.md) + - [SapiV1LoanBorrowPost200Response](docs/SapiV1LoanBorrowPost200Response.md) + - [SapiV1LoanCollateralDataGet200Response](docs/SapiV1LoanCollateralDataGet200Response.md) + - [SapiV1LoanCollateralDataGet200ResponseRowsInner](docs/SapiV1LoanCollateralDataGet200ResponseRowsInner.md) + - [SapiV1LoanCustomizeMarginCallPost200Response](docs/SapiV1LoanCustomizeMarginCallPost200Response.md) + - [SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner](docs/SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner.md) + - [SapiV1LoanIncomeGet200ResponseInner](docs/SapiV1LoanIncomeGet200ResponseInner.md) + - [SapiV1LoanLoanableDataGet200Response](docs/SapiV1LoanLoanableDataGet200Response.md) + - [SapiV1LoanLoanableDataGet200ResponseRowsInner](docs/SapiV1LoanLoanableDataGet200ResponseRowsInner.md) + - [SapiV1LoanLtvAdjustmentHistoryGet200Response](docs/SapiV1LoanLtvAdjustmentHistoryGet200Response.md) + - [SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner](docs/SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner.md) + - [SapiV1LoanOngoingOrdersGet200Response](docs/SapiV1LoanOngoingOrdersGet200Response.md) + - [SapiV1LoanOngoingOrdersGet200ResponseRowsInner](docs/SapiV1LoanOngoingOrdersGet200ResponseRowsInner.md) + - [SapiV1LoanRepayCollateralRateGet200Response](docs/SapiV1LoanRepayCollateralRateGet200Response.md) + - [SapiV1LoanRepayHistoryGet200Response](docs/SapiV1LoanRepayHistoryGet200Response.md) + - [SapiV1LoanRepayHistoryGet200ResponseRowsInner](docs/SapiV1LoanRepayHistoryGet200ResponseRowsInner.md) + - [SapiV1LoanRepayPost200Response](docs/SapiV1LoanRepayPost200Response.md) + - [SapiV1LoanVipBorrowPost200Response](docs/SapiV1LoanVipBorrowPost200Response.md) + - [SapiV1LoanVipCollateralAccountGet200Response](docs/SapiV1LoanVipCollateralAccountGet200Response.md) + - [SapiV1LoanVipCollateralAccountGet200ResponseRowsInner](docs/SapiV1LoanVipCollateralAccountGet200ResponseRowsInner.md) + - [SapiV1LoanVipCollateralDataGet200Response](docs/SapiV1LoanVipCollateralDataGet200Response.md) + - [SapiV1LoanVipCollateralDataGet200ResponseRowsInner](docs/SapiV1LoanVipCollateralDataGet200ResponseRowsInner.md) + - [SapiV1LoanVipLoanableDataGet200Response](docs/SapiV1LoanVipLoanableDataGet200Response.md) + - [SapiV1LoanVipLoanableDataGet200ResponseRowsInner](docs/SapiV1LoanVipLoanableDataGet200ResponseRowsInner.md) + - [SapiV1LoanVipOngoingOrdersGet200Response](docs/SapiV1LoanVipOngoingOrdersGet200Response.md) + - [SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner](docs/SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner.md) + - [SapiV1LoanVipRenewPost200Response](docs/SapiV1LoanVipRenewPost200Response.md) + - [SapiV1LoanVipRepayHistoryGet200Response](docs/SapiV1LoanVipRepayHistoryGet200Response.md) + - [SapiV1LoanVipRepayHistoryGet200ResponseRowsInner](docs/SapiV1LoanVipRepayHistoryGet200ResponseRowsInner.md) + - [SapiV1LoanVipRepayPost200Response](docs/SapiV1LoanVipRepayPost200Response.md) + - [SapiV1LoanVipRequestDataGet200Response](docs/SapiV1LoanVipRequestDataGet200Response.md) + - [SapiV1LoanVipRequestDataGet200ResponseRowsInner](docs/SapiV1LoanVipRequestDataGet200ResponseRowsInner.md) + - [SapiV1LoanVipRequestInterestRateGet200ResponseInner](docs/SapiV1LoanVipRequestInterestRateGet200ResponseInner.md) + - [SapiV1ManagedSubaccountAccountSnapshotGet200Response](docs/SapiV1ManagedSubaccountAccountSnapshotGet200Response.md) + - [SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner](docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner.md) + - [SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData](docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData.md) + - [SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner](docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner.md) + - [SapiV1ManagedSubaccountAssetGet200ResponseInner](docs/SapiV1ManagedSubaccountAssetGet200ResponseInner.md) + - [SapiV1ManagedSubaccountDepositAddressGet200Response](docs/SapiV1ManagedSubaccountDepositAddressGet200Response.md) + - [SapiV1ManagedSubaccountDepositPost200Response](docs/SapiV1ManagedSubaccountDepositPost200Response.md) + - [SapiV1ManagedSubaccountFetchFutureAssetGet200Response](docs/SapiV1ManagedSubaccountFetchFutureAssetGet200Response.md) + - [SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner](docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner.md) + - [SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData](docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData.md) + - [SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner](docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner.md) + - [SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner](docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner.md) + - [SapiV1ManagedSubaccountInfoGet200Response](docs/SapiV1ManagedSubaccountInfoGet200Response.md) + - [SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner](docs/SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner.md) + - [SapiV1ManagedSubaccountMarginAssetGet200Response](docs/SapiV1ManagedSubaccountMarginAssetGet200Response.md) + - [SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner](docs/SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner.md) + - [SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response](docs/SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response.md) + - [SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner](docs/SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner.md) + - [SapiV1ManagedSubaccountQueryTransLogGet200Response](docs/SapiV1ManagedSubaccountQueryTransLogGet200Response.md) + - [SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner](docs/SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner.md) + - [SapiV1MarginAccountGet200Response](docs/SapiV1MarginAccountGet200Response.md) + - [SapiV1MarginAccountGet200ResponseUserAssetsInner](docs/SapiV1MarginAccountGet200ResponseUserAssetsInner.md) + - [SapiV1MarginAllAssetsGet200ResponseInner](docs/SapiV1MarginAllAssetsGet200ResponseInner.md) + - [SapiV1MarginAllPairsGet200ResponseInner](docs/SapiV1MarginAllPairsGet200ResponseInner.md) + - [SapiV1MarginAvailableInventoryGet200Response](docs/SapiV1MarginAvailableInventoryGet200Response.md) + - [SapiV1MarginAvailableInventoryGet200ResponseAssets](docs/SapiV1MarginAvailableInventoryGet200ResponseAssets.md) + - [SapiV1MarginBorrowRepayGet200Response](docs/SapiV1MarginBorrowRepayGet200Response.md) + - [SapiV1MarginBorrowRepayGet200ResponseRowsInner](docs/SapiV1MarginBorrowRepayGet200ResponseRowsInner.md) + - [SapiV1MarginBorrowRepayPost200Response](docs/SapiV1MarginBorrowRepayPost200Response.md) + - [SapiV1MarginCapitalFlowGet200ResponseInner](docs/SapiV1MarginCapitalFlowGet200ResponseInner.md) + - [SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner](docs/SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner.md) + - [SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner](docs/SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner.md) + - [SapiV1MarginCrossMarginDataGet200ResponseInner](docs/SapiV1MarginCrossMarginDataGet200ResponseInner.md) + - [SapiV1MarginDelistScheduleGet200ResponseInner](docs/SapiV1MarginDelistScheduleGet200ResponseInner.md) + - [SapiV1MarginExchangeSmallLiabilityGet200ResponseInner](docs/SapiV1MarginExchangeSmallLiabilityGet200ResponseInner.md) + - [SapiV1MarginExchangeSmallLiabilityHistoryGet200Response](docs/SapiV1MarginExchangeSmallLiabilityHistoryGet200Response.md) + - [SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner](docs/SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner.md) + - [SapiV1MarginForceLiquidationRecGet200Response](docs/SapiV1MarginForceLiquidationRecGet200Response.md) + - [SapiV1MarginForceLiquidationRecGet200ResponseRowsInner](docs/SapiV1MarginForceLiquidationRecGet200ResponseRowsInner.md) + - [SapiV1MarginInterestHistoryGet200Response](docs/SapiV1MarginInterestHistoryGet200Response.md) + - [SapiV1MarginInterestHistoryGet200ResponseRowsInner](docs/SapiV1MarginInterestHistoryGet200ResponseRowsInner.md) + - [SapiV1MarginInterestRateHistoryGet200ResponseInner](docs/SapiV1MarginInterestRateHistoryGet200ResponseInner.md) + - [SapiV1MarginIsolatedAccountLimitGet200Response](docs/SapiV1MarginIsolatedAccountLimitGet200Response.md) + - [SapiV1MarginIsolatedAccountPost200Response](docs/SapiV1MarginIsolatedAccountPost200Response.md) + - [SapiV1MarginIsolatedAllPairsGet200ResponseInner](docs/SapiV1MarginIsolatedAllPairsGet200ResponseInner.md) + - [SapiV1MarginIsolatedMarginDataGet200ResponseInner](docs/SapiV1MarginIsolatedMarginDataGet200ResponseInner.md) + - [SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner](docs/SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner.md) + - [SapiV1MarginIsolatedMarginTierGet200ResponseInner](docs/SapiV1MarginIsolatedMarginTierGet200ResponseInner.md) + - [SapiV1MarginLeverageBracketGet200ResponseInner](docs/SapiV1MarginLeverageBracketGet200ResponseInner.md) + - [SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner](docs/SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner.md) + - [SapiV1MarginMaxBorrowableGet200Response](docs/SapiV1MarginMaxBorrowableGet200Response.md) + - [SapiV1MarginMaxLeveragePost200Response](docs/SapiV1MarginMaxLeveragePost200Response.md) + - [SapiV1MarginMaxTransferableGet200Response](docs/SapiV1MarginMaxTransferableGet200Response.md) + - [SapiV1MarginNextHourlyInterestRateGet200ResponseInner](docs/SapiV1MarginNextHourlyInterestRateGet200ResponseInner.md) + - [SapiV1MarginOpenOrderListGet200ResponseInner](docs/SapiV1MarginOpenOrderListGet200ResponseInner.md) + - [SapiV1MarginOpenOrdersDelete200ResponseInner](docs/SapiV1MarginOpenOrdersDelete200ResponseInner.md) + - [SapiV1MarginOrderListGet200Response](docs/SapiV1MarginOrderListGet200Response.md) + - [SapiV1MarginOrderOcoPost200Response](docs/SapiV1MarginOrderOcoPost200Response.md) + - [SapiV1MarginOrderOcoPost200ResponseOrderReportsInner](docs/SapiV1MarginOrderOcoPost200ResponseOrderReportsInner.md) + - [SapiV1MarginOrderOcoPost200ResponseOrdersInner](docs/SapiV1MarginOrderOcoPost200ResponseOrdersInner.md) + - [SapiV1MarginOrderPost200Response](docs/SapiV1MarginOrderPost200Response.md) + - [SapiV1MarginPriceIndexGet200Response](docs/SapiV1MarginPriceIndexGet200Response.md) + - [SapiV1MarginRateLimitOrderGet200ResponseInner](docs/SapiV1MarginRateLimitOrderGet200ResponseInner.md) + - [SapiV1MarginTradeCoeffGet200Response](docs/SapiV1MarginTradeCoeffGet200Response.md) + - [SapiV1MarginTransferGet200Response](docs/SapiV1MarginTransferGet200Response.md) + - [SapiV1MarginTransferGet200ResponseRowsInner](docs/SapiV1MarginTransferGet200ResponseRowsInner.md) + - [SapiV1MiningHashTransferConfigCancelPost200Response](docs/SapiV1MiningHashTransferConfigCancelPost200Response.md) + - [SapiV1MiningHashTransferConfigDetailsListGet200Response](docs/SapiV1MiningHashTransferConfigDetailsListGet200Response.md) + - [SapiV1MiningHashTransferConfigDetailsListGet200ResponseData](docs/SapiV1MiningHashTransferConfigDetailsListGet200ResponseData.md) + - [SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner](docs/SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner.md) + - [SapiV1MiningHashTransferConfigPost200Response](docs/SapiV1MiningHashTransferConfigPost200Response.md) + - [SapiV1MiningHashTransferProfitDetailsGet200Response](docs/SapiV1MiningHashTransferProfitDetailsGet200Response.md) + - [SapiV1MiningHashTransferProfitDetailsGet200ResponseData](docs/SapiV1MiningHashTransferProfitDetailsGet200ResponseData.md) + - [SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner](docs/SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner.md) + - [SapiV1MiningPaymentListGet200Response](docs/SapiV1MiningPaymentListGet200Response.md) + - [SapiV1MiningPaymentListGet200ResponseData](docs/SapiV1MiningPaymentListGet200ResponseData.md) + - [SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner](docs/SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner.md) + - [SapiV1MiningPaymentOtherGet200Response](docs/SapiV1MiningPaymentOtherGet200Response.md) + - [SapiV1MiningPaymentOtherGet200ResponseData](docs/SapiV1MiningPaymentOtherGet200ResponseData.md) + - [SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner](docs/SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner.md) + - [SapiV1MiningPaymentUidGet200Response](docs/SapiV1MiningPaymentUidGet200Response.md) + - [SapiV1MiningPaymentUidGet200ResponseData](docs/SapiV1MiningPaymentUidGet200ResponseData.md) + - [SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner](docs/SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner.md) + - [SapiV1MiningPubAlgoListGet200Response](docs/SapiV1MiningPubAlgoListGet200Response.md) + - [SapiV1MiningPubAlgoListGet200ResponseDataInner](docs/SapiV1MiningPubAlgoListGet200ResponseDataInner.md) + - [SapiV1MiningPubCoinListGet200Response](docs/SapiV1MiningPubCoinListGet200Response.md) + - [SapiV1MiningPubCoinListGet200ResponseDataInner](docs/SapiV1MiningPubCoinListGet200ResponseDataInner.md) + - [SapiV1MiningStatisticsUserListGet200Response](docs/SapiV1MiningStatisticsUserListGet200Response.md) + - [SapiV1MiningStatisticsUserListGet200ResponseDataInner](docs/SapiV1MiningStatisticsUserListGet200ResponseDataInner.md) + - [SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner](docs/SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner.md) + - [SapiV1MiningStatisticsUserStatusGet200Response](docs/SapiV1MiningStatisticsUserStatusGet200Response.md) + - [SapiV1MiningStatisticsUserStatusGet200ResponseData](docs/SapiV1MiningStatisticsUserStatusGet200ResponseData.md) + - [SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday](docs/SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday.md) + - [SapiV1MiningWorkerDetailGet200Response](docs/SapiV1MiningWorkerDetailGet200Response.md) + - [SapiV1MiningWorkerDetailGet200ResponseDataInner](docs/SapiV1MiningWorkerDetailGet200ResponseDataInner.md) + - [SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner](docs/SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner.md) + - [SapiV1MiningWorkerListGet200Response](docs/SapiV1MiningWorkerListGet200Response.md) + - [SapiV1MiningWorkerListGet200ResponseData](docs/SapiV1MiningWorkerListGet200ResponseData.md) + - [SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner](docs/SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner.md) + - [SapiV1NftHistoryDepositGet200Response](docs/SapiV1NftHistoryDepositGet200Response.md) + - [SapiV1NftHistoryDepositGet200ResponseListInner](docs/SapiV1NftHistoryDepositGet200ResponseListInner.md) + - [SapiV1NftHistoryTransactionsGet200Response](docs/SapiV1NftHistoryTransactionsGet200Response.md) + - [SapiV1NftHistoryTransactionsGet200ResponseListInner](docs/SapiV1NftHistoryTransactionsGet200ResponseListInner.md) + - [SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner](docs/SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner.md) + - [SapiV1NftHistoryWithdrawGet200Response](docs/SapiV1NftHistoryWithdrawGet200Response.md) + - [SapiV1NftHistoryWithdrawGet200ResponseListInner](docs/SapiV1NftHistoryWithdrawGet200ResponseListInner.md) + - [SapiV1NftUserGetAssetGet200Response](docs/SapiV1NftUserGetAssetGet200Response.md) + - [SapiV1NftUserGetAssetGet200ResponseListInner](docs/SapiV1NftUserGetAssetGet200ResponseListInner.md) + - [SapiV1PayTransactionsGet200Response](docs/SapiV1PayTransactionsGet200Response.md) + - [SapiV1PayTransactionsGet200ResponseDataInner](docs/SapiV1PayTransactionsGet200ResponseDataInner.md) + - [SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner](docs/SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner.md) + - [SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo](docs/SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo.md) + - [SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo](docs/SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo.md) + - [SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner](docs/SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner.md) + - [SapiV1PortfolioAccountGet200Response](docs/SapiV1PortfolioAccountGet200Response.md) + - [SapiV1PortfolioAssetIndexPriceGet200ResponseInner](docs/SapiV1PortfolioAssetIndexPriceGet200ResponseInner.md) + - [SapiV1PortfolioAutoCollectionPost200Response](docs/SapiV1PortfolioAutoCollectionPost200Response.md) + - [SapiV1PortfolioCollateralRateGet200ResponseInner](docs/SapiV1PortfolioCollateralRateGet200ResponseInner.md) + - [SapiV1PortfolioInterestHistoryGet200ResponseInner](docs/SapiV1PortfolioInterestHistoryGet200ResponseInner.md) + - [SapiV1PortfolioMarginAssetLeverageGet200ResponseInner](docs/SapiV1PortfolioMarginAssetLeverageGet200ResponseInner.md) + - [SapiV1PortfolioPmLoanGet200Response](docs/SapiV1PortfolioPmLoanGet200Response.md) + - [SapiV1PortfolioRepayFuturesSwitchGet200Response](docs/SapiV1PortfolioRepayFuturesSwitchGet200Response.md) + - [SapiV1PortfolioRepayPost200Response](docs/SapiV1PortfolioRepayPost200Response.md) + - [SapiV1RebateTaxQueryGet200Response](docs/SapiV1RebateTaxQueryGet200Response.md) + - [SapiV1RebateTaxQueryGet200ResponseData](docs/SapiV1RebateTaxQueryGet200ResponseData.md) + - [SapiV1RebateTaxQueryGet200ResponseDataDataInner](docs/SapiV1RebateTaxQueryGet200ResponseDataDataInner.md) + - [SapiV1SimpleEarnAccountGet200Response](docs/SapiV1SimpleEarnAccountGet200Response.md) + - [SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response](docs/SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response.md) + - [SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner](docs/SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner.md) + - [SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response](docs/SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response.md) + - [SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner](docs/SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner.md) + - [SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response](docs/SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response.md) + - [SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner](docs/SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner.md) + - [SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response](docs/SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response.md) + - [SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner](docs/SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner.md) + - [SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response](docs/SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response.md) + - [SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner](docs/SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner.md) + - [SapiV1SimpleEarnFlexibleListGet200Response](docs/SapiV1SimpleEarnFlexibleListGet200Response.md) + - [SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner](docs/SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner.md) + - [SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate](docs/SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate.md) + - [SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response](docs/SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response.md) + - [SapiV1SimpleEarnFlexiblePositionGet200Response](docs/SapiV1SimpleEarnFlexiblePositionGet200Response.md) + - [SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner](docs/SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner.md) + - [SapiV1SimpleEarnFlexibleRedeemPost200Response](docs/SapiV1SimpleEarnFlexibleRedeemPost200Response.md) + - [SapiV1SimpleEarnFlexibleSubscribePost200Response](docs/SapiV1SimpleEarnFlexibleSubscribePost200Response.md) + - [SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response](docs/SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response.md) + - [SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response](docs/SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response.md) + - [SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner](docs/SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner.md) + - [SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response](docs/SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response.md) + - [SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner](docs/SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner.md) + - [SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response](docs/SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response.md) + - [SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner](docs/SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner.md) + - [SapiV1SimpleEarnLockedListGet200Response](docs/SapiV1SimpleEarnLockedListGet200Response.md) + - [SapiV1SimpleEarnLockedListGet200ResponseRowsInner](docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInner.md) + - [SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail](docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail.md) + - [SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota](docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota.md) + - [SapiV1SimpleEarnLockedPositionGet200Response](docs/SapiV1SimpleEarnLockedPositionGet200Response.md) + - [SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner](docs/SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner.md) + - [SapiV1SimpleEarnLockedSubscribePost200Response](docs/SapiV1SimpleEarnLockedSubscribePost200Response.md) + - [SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner](docs/SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner.md) + - [SapiV1SpotDelistScheduleGet200ResponseInner](docs/SapiV1SpotDelistScheduleGet200ResponseInner.md) + - [SapiV1SubAccountBlvtEnablePost200Response](docs/SapiV1SubAccountBlvtEnablePost200Response.md) + - [SapiV1SubAccountEoptionsEnablePost200Response](docs/SapiV1SubAccountEoptionsEnablePost200Response.md) + - [SapiV1SubAccountFuturesAccountGet200Response](docs/SapiV1SubAccountFuturesAccountGet200Response.md) + - [SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner](docs/SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner.md) + - [SapiV1SubAccountFuturesAccountSummaryGet200Response](docs/SapiV1SubAccountFuturesAccountSummaryGet200Response.md) + - [SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner](docs/SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner.md) + - [SapiV1SubAccountFuturesEnablePost200Response](docs/SapiV1SubAccountFuturesEnablePost200Response.md) + - [SapiV1SubAccountFuturesInternalTransferGet200Response](docs/SapiV1SubAccountFuturesInternalTransferGet200Response.md) + - [SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner](docs/SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner.md) + - [SapiV1SubAccountFuturesInternalTransferPost200Response](docs/SapiV1SubAccountFuturesInternalTransferPost200Response.md) + - [SapiV1SubAccountFuturesPositionRiskGet200ResponseInner](docs/SapiV1SubAccountFuturesPositionRiskGet200ResponseInner.md) + - [SapiV1SubAccountFuturesTransferPost200Response](docs/SapiV1SubAccountFuturesTransferPost200Response.md) + - [SapiV1SubAccountListGet200Response](docs/SapiV1SubAccountListGet200Response.md) + - [SapiV1SubAccountListGet200ResponseSubAccountsInner](docs/SapiV1SubAccountListGet200ResponseSubAccountsInner.md) + - [SapiV1SubAccountMarginAccountGet200Response](docs/SapiV1SubAccountMarginAccountGet200Response.md) + - [SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo](docs/SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo.md) + - [SapiV1SubAccountMarginAccountSummaryGet200Response](docs/SapiV1SubAccountMarginAccountSummaryGet200Response.md) + - [SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner](docs/SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner.md) + - [SapiV1SubAccountMarginEnablePost200Response](docs/SapiV1SubAccountMarginEnablePost200Response.md) + - [SapiV1SubAccountSpotSummaryGet200Response](docs/SapiV1SubAccountSpotSummaryGet200Response.md) + - [SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner](docs/SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner.md) + - [SapiV1SubAccountStatusGet200ResponseInner](docs/SapiV1SubAccountStatusGet200ResponseInner.md) + - [SapiV1SubAccountSubAccountApiIpRestrictionGet200Response](docs/SapiV1SubAccountSubAccountApiIpRestrictionGet200Response.md) + - [SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response](docs/SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response.md) + - [SapiV1SubAccountSubTransferHistoryGet200ResponseInner](docs/SapiV1SubAccountSubTransferHistoryGet200ResponseInner.md) + - [SapiV1SubAccountTransactionStatisticsGet200Response](docs/SapiV1SubAccountTransactionStatisticsGet200Response.md) + - [SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner](docs/SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner.md) + - [SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner](docs/SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner.md) + - [SapiV1SubAccountUniversalTransferGet200ResponseInner](docs/SapiV1SubAccountUniversalTransferGet200ResponseInner.md) + - [SapiV1SubAccountUniversalTransferPost200Response](docs/SapiV1SubAccountUniversalTransferPost200Response.md) + - [SapiV1SubAccountVirtualSubAccountPost200Response](docs/SapiV1SubAccountVirtualSubAccountPost200Response.md) + - [SapiV1SystemStatusGet200Response](docs/SapiV1SystemStatusGet200Response.md) + - [SapiV1UserDataStreamIsolatedPost200Response](docs/SapiV1UserDataStreamIsolatedPost200Response.md) + - [SapiV2EthStakingAccountGet200Response](docs/SapiV2EthStakingAccountGet200Response.md) + - [SapiV2EthStakingAccountGet200ResponseHoldings](docs/SapiV2EthStakingAccountGet200ResponseHoldings.md) + - [SapiV2EthStakingAccountGet200ResponseProfit](docs/SapiV2EthStakingAccountGet200ResponseProfit.md) + - [SapiV2EthStakingEthStakePost200Response](docs/SapiV2EthStakingEthStakePost200Response.md) + - [SapiV2LoanFlexibleAdjustLtvPost200Response](docs/SapiV2LoanFlexibleAdjustLtvPost200Response.md) + - [SapiV2LoanFlexibleBorrowHistoryGet200Response](docs/SapiV2LoanFlexibleBorrowHistoryGet200Response.md) + - [SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner](docs/SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner.md) + - [SapiV2LoanFlexibleBorrowPost200Response](docs/SapiV2LoanFlexibleBorrowPost200Response.md) + - [SapiV2LoanFlexibleCollateralDataGet200Response](docs/SapiV2LoanFlexibleCollateralDataGet200Response.md) + - [SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner](docs/SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner.md) + - [SapiV2LoanFlexibleLoanableDataGet200Response](docs/SapiV2LoanFlexibleLoanableDataGet200Response.md) + - [SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner](docs/SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner.md) + - [SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response](docs/SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response.md) + - [SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner](docs/SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner.md) + - [SapiV2LoanFlexibleOngoingOrdersGet200Response](docs/SapiV2LoanFlexibleOngoingOrdersGet200Response.md) + - [SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner](docs/SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner.md) + - [SapiV2LoanFlexibleRepayHistoryGet200Response](docs/SapiV2LoanFlexibleRepayHistoryGet200Response.md) + - [SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner](docs/SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner.md) + - [SapiV2LoanFlexibleRepayPost200Response](docs/SapiV2LoanFlexibleRepayPost200Response.md) + - [SapiV2SubAccountFuturesAccountGet200Response](docs/SapiV2SubAccountFuturesAccountGet200Response.md) + - [SapiV2SubAccountFuturesAccountSummaryGet200Response](docs/SapiV2SubAccountFuturesAccountSummaryGet200Response.md) + - [SapiV2SubAccountFuturesPositionRiskGet200Response](docs/SapiV2SubAccountFuturesPositionRiskGet200Response.md) + - [SapiV2SubAccountSubAccountApiIpRestrictionPost200Response](docs/SapiV2SubAccountSubAccountApiIpRestrictionPost200Response.md) + - [SapiV3AssetGetUserAssetPost200ResponseInner](docs/SapiV3AssetGetUserAssetPost200ResponseInner.md) + - [SapiV3SubAccountAssetsGet200Response](docs/SapiV3SubAccountAssetsGet200Response.md) + - [SapiV3SubAccountAssetsGet200ResponseBalancesInner](docs/SapiV3SubAccountAssetsGet200ResponseBalancesInner.md) + - [SapiV4SubAccountAssetsGet200Response](docs/SapiV4SubAccountAssetsGet200Response.md) + - [SapiV4SubAccountAssetsGet200ResponseBalancesInner](docs/SapiV4SubAccountAssetsGet200ResponseBalancesInner.md) + - [SnapshotFutures](docs/SnapshotFutures.md) + - [SnapshotFuturesSnapshotVosInner](docs/SnapshotFuturesSnapshotVosInner.md) + - [SnapshotFuturesSnapshotVosInnerData](docs/SnapshotFuturesSnapshotVosInnerData.md) + - [SnapshotFuturesSnapshotVosInnerDataAssetsInner](docs/SnapshotFuturesSnapshotVosInnerDataAssetsInner.md) + - [SnapshotFuturesSnapshotVosInnerDataPositionInner](docs/SnapshotFuturesSnapshotVosInnerDataPositionInner.md) + - [SnapshotMargin](docs/SnapshotMargin.md) + - [SnapshotMarginSnapshotVosInner](docs/SnapshotMarginSnapshotVosInner.md) + - [SnapshotMarginSnapshotVosInnerData](docs/SnapshotMarginSnapshotVosInnerData.md) + - [SnapshotMarginSnapshotVosInnerDataUserAssetsInner](docs/SnapshotMarginSnapshotVosInnerDataUserAssetsInner.md) + - [SnapshotSpot](docs/SnapshotSpot.md) + - [SnapshotSpotSnapshotVosInner](docs/SnapshotSpotSnapshotVosInner.md) + - [SnapshotSpotSnapshotVosInnerData](docs/SnapshotSpotSnapshotVosInnerData.md) + - [SnapshotSpotSnapshotVosInnerDataBalancesInner](docs/SnapshotSpotSnapshotVosInnerDataBalancesInner.md) + - [SubAccountCOINFuturesDetails](docs/SubAccountCOINFuturesDetails.md) + - [SubAccountCOINFuturesDetailsAssetsInner](docs/SubAccountCOINFuturesDetailsAssetsInner.md) + - [SubAccountCOINFuturesPositionRisk](docs/SubAccountCOINFuturesPositionRisk.md) + - [SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner](docs/SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner.md) + - [SubAccountCOINFuturesSummary](docs/SubAccountCOINFuturesSummary.md) + - [SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp](docs/SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp.md) + - [SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner](docs/SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner.md) + - [SubAccountUSDTFuturesDetails](docs/SubAccountUSDTFuturesDetails.md) + - [SubAccountUSDTFuturesDetailsFutureAccountResp](docs/SubAccountUSDTFuturesDetailsFutureAccountResp.md) + - [SubAccountUSDTFuturesPositionRisk](docs/SubAccountUSDTFuturesPositionRisk.md) + - [SubAccountUSDTFuturesSummary](docs/SubAccountUSDTFuturesSummary.md) + - [SubAccountUSDTFuturesSummaryFutureAccountSummaryResp](docs/SubAccountUSDTFuturesSummaryFutureAccountSummaryResp.md) + - [SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner](docs/SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner.md) + - [Ticker](docs/Ticker.md) + - [Trade](docs/Trade.md) + - [Transaction](docs/Transaction.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### ApiKeyAuth + +- **Type**: API key +- **API key parameter name**: X-MBX-APIKEY +- **Location**: HTTP header + + +## Author + + + + diff --git a/target/python/binance_openapi/docs/Account.md b/target/python/binance_openapi/docs/Account.md new file mode 100644 index 0000000..134f27d --- /dev/null +++ b/target/python/binance_openapi/docs/Account.md @@ -0,0 +1,44 @@ +# Account + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**maker_commission** | **int** | | +**taker_commission** | **int** | | +**buyer_commission** | **int** | | +**seller_commission** | **int** | | +**commission_rates** | [**AccountCommissionRates**](AccountCommissionRates.md) | | +**can_trade** | **bool** | | +**can_withdraw** | **bool** | | +**can_deposit** | **bool** | | +**brokered** | **bool** | | +**require_self_trade_prevention** | **bool** | | +**prevent_sor** | **bool** | | +**update_time** | **int** | | +**account_type** | **str** | | +**balances** | [**List[AccountBalancesInner]**](AccountBalancesInner.md) | | +**permissions** | **List[str]** | | +**uid** | **int** | | + +## Example + +```python +from openapi_client.models.account import Account + +# TODO update the JSON string below +json = "{}" +# create an instance of Account from a JSON string +account_instance = Account.from_json(json) +# print the JSON string representation of the object +print(Account.to_json()) + +# convert the object into a dict +account_dict = account_instance.to_dict() +# create an instance of Account from a dict +account_from_dict = Account.from_dict(account_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/AccountBalancesInner.md b/target/python/binance_openapi/docs/AccountBalancesInner.md new file mode 100644 index 0000000..509e0c6 --- /dev/null +++ b/target/python/binance_openapi/docs/AccountBalancesInner.md @@ -0,0 +1,31 @@ +# AccountBalancesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**free** | **str** | | +**locked** | **str** | | + +## Example + +```python +from openapi_client.models.account_balances_inner import AccountBalancesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountBalancesInner from a JSON string +account_balances_inner_instance = AccountBalancesInner.from_json(json) +# print the JSON string representation of the object +print(AccountBalancesInner.to_json()) + +# convert the object into a dict +account_balances_inner_dict = account_balances_inner_instance.to_dict() +# create an instance of AccountBalancesInner from a dict +account_balances_inner_from_dict = AccountBalancesInner.from_dict(account_balances_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/AccountCommissionRates.md b/target/python/binance_openapi/docs/AccountCommissionRates.md new file mode 100644 index 0000000..760288a --- /dev/null +++ b/target/python/binance_openapi/docs/AccountCommissionRates.md @@ -0,0 +1,32 @@ +# AccountCommissionRates + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**maker** | **str** | | +**taker** | **str** | | +**buyer** | **str** | | +**seller** | **str** | | + +## Example + +```python +from openapi_client.models.account_commission_rates import AccountCommissionRates + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountCommissionRates from a JSON string +account_commission_rates_instance = AccountCommissionRates.from_json(json) +# print the JSON string representation of the object +print(AccountCommissionRates.to_json()) + +# convert the object into a dict +account_commission_rates_dict = account_commission_rates_instance.to_dict() +# create an instance of AccountCommissionRates from a dict +account_commission_rates_from_dict = AccountCommissionRates.from_dict(account_commission_rates_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/AggTrade.md b/target/python/binance_openapi/docs/AggTrade.md new file mode 100644 index 0000000..5047817 --- /dev/null +++ b/target/python/binance_openapi/docs/AggTrade.md @@ -0,0 +1,36 @@ +# AggTrade + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**a** | **int** | Aggregate tradeId | +**p** | **str** | Price | +**q** | **str** | Quantity | +**f** | **int** | First tradeId | +**l** | **int** | Last tradeId | +**t** | **bool** | Timestamp | +**m** | **bool** | Was the buyer the maker? | +**m** | **bool** | Was the trade the best price match? | + +## Example + +```python +from openapi_client.models.agg_trade import AggTrade + +# TODO update the JSON string below +json = "{}" +# create an instance of AggTrade from a JSON string +agg_trade_instance = AggTrade.from_json(json) +# print the JSON string representation of the object +print(AggTrade.to_json()) + +# convert the object into a dict +agg_trade_dict = agg_trade_instance.to_dict() +# create an instance of AggTrade from a dict +agg_trade_from_dict = AggTrade.from_dict(agg_trade_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3AccountCommissionGet200Response.md b/target/python/binance_openapi/docs/ApiV3AccountCommissionGet200Response.md new file mode 100644 index 0000000..36c0322 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3AccountCommissionGet200Response.md @@ -0,0 +1,32 @@ +# ApiV3AccountCommissionGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**standard_commission** | [**ApiV3AccountCommissionGet200ResponseStandardCommission**](ApiV3AccountCommissionGet200ResponseStandardCommission.md) | | +**tax_commission** | [**ApiV3AccountCommissionGet200ResponseTaxCommission**](ApiV3AccountCommissionGet200ResponseTaxCommission.md) | | +**discount** | [**ApiV3AccountCommissionGet200ResponseDiscount**](ApiV3AccountCommissionGet200ResponseDiscount.md) | | + +## Example + +```python +from openapi_client.models.api_v3_account_commission_get200_response import ApiV3AccountCommissionGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3AccountCommissionGet200Response from a JSON string +api_v3_account_commission_get200_response_instance = ApiV3AccountCommissionGet200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3AccountCommissionGet200Response.to_json()) + +# convert the object into a dict +api_v3_account_commission_get200_response_dict = api_v3_account_commission_get200_response_instance.to_dict() +# create an instance of ApiV3AccountCommissionGet200Response from a dict +api_v3_account_commission_get200_response_from_dict = ApiV3AccountCommissionGet200Response.from_dict(api_v3_account_commission_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3AccountCommissionGet200ResponseDiscount.md b/target/python/binance_openapi/docs/ApiV3AccountCommissionGet200ResponseDiscount.md new file mode 100644 index 0000000..212657b --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3AccountCommissionGet200ResponseDiscount.md @@ -0,0 +1,33 @@ +# ApiV3AccountCommissionGet200ResponseDiscount + +Discount commission when paying in BNB. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled_for_account** | **bool** | | [optional] +**enabled_for_symbol** | **bool** | | [optional] +**discount_asset** | **str** | | [optional] +**discount** | **str** | Standard commission is reduced by this rate when paying commission in BNB. | [optional] + +## Example + +```python +from openapi_client.models.api_v3_account_commission_get200_response_discount import ApiV3AccountCommissionGet200ResponseDiscount + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3AccountCommissionGet200ResponseDiscount from a JSON string +api_v3_account_commission_get200_response_discount_instance = ApiV3AccountCommissionGet200ResponseDiscount.from_json(json) +# print the JSON string representation of the object +print(ApiV3AccountCommissionGet200ResponseDiscount.to_json()) + +# convert the object into a dict +api_v3_account_commission_get200_response_discount_dict = api_v3_account_commission_get200_response_discount_instance.to_dict() +# create an instance of ApiV3AccountCommissionGet200ResponseDiscount from a dict +api_v3_account_commission_get200_response_discount_from_dict = ApiV3AccountCommissionGet200ResponseDiscount.from_dict(api_v3_account_commission_get200_response_discount_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3AccountCommissionGet200ResponseStandardCommission.md b/target/python/binance_openapi/docs/ApiV3AccountCommissionGet200ResponseStandardCommission.md new file mode 100644 index 0000000..4836bf1 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3AccountCommissionGet200ResponseStandardCommission.md @@ -0,0 +1,33 @@ +# ApiV3AccountCommissionGet200ResponseStandardCommission + +Standard commission rates on trades from the order. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**maker** | **str** | | +**taker** | **str** | | +**buyer** | **str** | | +**seller** | **str** | | + +## Example + +```python +from openapi_client.models.api_v3_account_commission_get200_response_standard_commission import ApiV3AccountCommissionGet200ResponseStandardCommission + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3AccountCommissionGet200ResponseStandardCommission from a JSON string +api_v3_account_commission_get200_response_standard_commission_instance = ApiV3AccountCommissionGet200ResponseStandardCommission.from_json(json) +# print the JSON string representation of the object +print(ApiV3AccountCommissionGet200ResponseStandardCommission.to_json()) + +# convert the object into a dict +api_v3_account_commission_get200_response_standard_commission_dict = api_v3_account_commission_get200_response_standard_commission_instance.to_dict() +# create an instance of ApiV3AccountCommissionGet200ResponseStandardCommission from a dict +api_v3_account_commission_get200_response_standard_commission_from_dict = ApiV3AccountCommissionGet200ResponseStandardCommission.from_dict(api_v3_account_commission_get200_response_standard_commission_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3AccountCommissionGet200ResponseTaxCommission.md b/target/python/binance_openapi/docs/ApiV3AccountCommissionGet200ResponseTaxCommission.md new file mode 100644 index 0000000..6527ce9 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3AccountCommissionGet200ResponseTaxCommission.md @@ -0,0 +1,33 @@ +# ApiV3AccountCommissionGet200ResponseTaxCommission + +Tax commission rates for trades from the order. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**maker** | **str** | | +**taker** | **str** | | +**buyer** | **str** | | +**seller** | **str** | | + +## Example + +```python +from openapi_client.models.api_v3_account_commission_get200_response_tax_commission import ApiV3AccountCommissionGet200ResponseTaxCommission + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3AccountCommissionGet200ResponseTaxCommission from a JSON string +api_v3_account_commission_get200_response_tax_commission_instance = ApiV3AccountCommissionGet200ResponseTaxCommission.from_json(json) +# print the JSON string representation of the object +print(ApiV3AccountCommissionGet200ResponseTaxCommission.to_json()) + +# convert the object into a dict +api_v3_account_commission_get200_response_tax_commission_dict = api_v3_account_commission_get200_response_tax_commission_instance.to_dict() +# create an instance of ApiV3AccountCommissionGet200ResponseTaxCommission from a dict +api_v3_account_commission_get200_response_tax_commission_from_dict = ApiV3AccountCommissionGet200ResponseTaxCommission.from_dict(api_v3_account_commission_get200_response_tax_commission_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3AllOrderListGet200ResponseInner.md b/target/python/binance_openapi/docs/ApiV3AllOrderListGet200ResponseInner.md new file mode 100644 index 0000000..ee417cc --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3AllOrderListGet200ResponseInner.md @@ -0,0 +1,37 @@ +# ApiV3AllOrderListGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_list_id** | **int** | | +**contingency_type** | **str** | | +**list_status_type** | **str** | | +**list_order_status** | **str** | | +**list_client_order_id** | **str** | | +**transaction_time** | **int** | | +**symbol** | **str** | | +**is_isolated** | **bool** | | +**orders** | [**List[ApiV3AllOrderListGet200ResponseInnerOrdersInner]**](ApiV3AllOrderListGet200ResponseInnerOrdersInner.md) | | + +## Example + +```python +from openapi_client.models.api_v3_all_order_list_get200_response_inner import ApiV3AllOrderListGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3AllOrderListGet200ResponseInner from a JSON string +api_v3_all_order_list_get200_response_inner_instance = ApiV3AllOrderListGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3AllOrderListGet200ResponseInner.to_json()) + +# convert the object into a dict +api_v3_all_order_list_get200_response_inner_dict = api_v3_all_order_list_get200_response_inner_instance.to_dict() +# create an instance of ApiV3AllOrderListGet200ResponseInner from a dict +api_v3_all_order_list_get200_response_inner_from_dict = ApiV3AllOrderListGet200ResponseInner.from_dict(api_v3_all_order_list_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3AllOrderListGet200ResponseInnerOrdersInner.md b/target/python/binance_openapi/docs/ApiV3AllOrderListGet200ResponseInnerOrdersInner.md new file mode 100644 index 0000000..f8eaed5 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3AllOrderListGet200ResponseInnerOrdersInner.md @@ -0,0 +1,31 @@ +# ApiV3AllOrderListGet200ResponseInnerOrdersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**client_order_id** | **str** | | + +## Example + +```python +from openapi_client.models.api_v3_all_order_list_get200_response_inner_orders_inner import ApiV3AllOrderListGet200ResponseInnerOrdersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3AllOrderListGet200ResponseInnerOrdersInner from a JSON string +api_v3_all_order_list_get200_response_inner_orders_inner_instance = ApiV3AllOrderListGet200ResponseInnerOrdersInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3AllOrderListGet200ResponseInnerOrdersInner.to_json()) + +# convert the object into a dict +api_v3_all_order_list_get200_response_inner_orders_inner_dict = api_v3_all_order_list_get200_response_inner_orders_inner_instance.to_dict() +# create an instance of ApiV3AllOrderListGet200ResponseInnerOrdersInner from a dict +api_v3_all_order_list_get200_response_inner_orders_inner_from_dict = ApiV3AllOrderListGet200ResponseInnerOrdersInner.from_dict(api_v3_all_order_list_get200_response_inner_orders_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3AvgPriceGet200Response.md b/target/python/binance_openapi/docs/ApiV3AvgPriceGet200Response.md new file mode 100644 index 0000000..5e79777 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3AvgPriceGet200Response.md @@ -0,0 +1,31 @@ +# ApiV3AvgPriceGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mins** | **int** | Average price interval (in minutes) | +**price** | **str** | Average price | +**close_time** | **int** | Last trade time | + +## Example + +```python +from openapi_client.models.api_v3_avg_price_get200_response import ApiV3AvgPriceGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3AvgPriceGet200Response from a JSON string +api_v3_avg_price_get200_response_instance = ApiV3AvgPriceGet200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3AvgPriceGet200Response.to_json()) + +# convert the object into a dict +api_v3_avg_price_get200_response_dict = api_v3_avg_price_get200_response_instance.to_dict() +# create an instance of ApiV3AvgPriceGet200Response from a dict +api_v3_avg_price_get200_response_from_dict = ApiV3AvgPriceGet200Response.from_dict(api_v3_avg_price_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3DepthGet200Response.md b/target/python/binance_openapi/docs/ApiV3DepthGet200Response.md new file mode 100644 index 0000000..55915b3 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3DepthGet200Response.md @@ -0,0 +1,31 @@ +# ApiV3DepthGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_update_id** | **int** | | +**bids** | **List[List[str]]** | | +**asks** | **List[List[str]]** | | + +## Example + +```python +from openapi_client.models.api_v3_depth_get200_response import ApiV3DepthGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3DepthGet200Response from a JSON string +api_v3_depth_get200_response_instance = ApiV3DepthGet200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3DepthGet200Response.to_json()) + +# convert the object into a dict +api_v3_depth_get200_response_dict = api_v3_depth_get200_response_instance.to_dict() +# create an instance of ApiV3DepthGet200Response from a dict +api_v3_depth_get200_response_from_dict = ApiV3DepthGet200Response.from_dict(api_v3_depth_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200Response.md b/target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200Response.md new file mode 100644 index 0000000..173ee85 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200Response.md @@ -0,0 +1,33 @@ +# ApiV3ExchangeInfoGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timezone** | **str** | | +**server_time** | **int** | | +**rate_limits** | [**List[ApiV3ExchangeInfoGet200ResponseRateLimitsInner]**](ApiV3ExchangeInfoGet200ResponseRateLimitsInner.md) | | +**exchange_filters** | **List[object]** | | +**symbols** | [**List[ApiV3ExchangeInfoGet200ResponseSymbolsInner]**](ApiV3ExchangeInfoGet200ResponseSymbolsInner.md) | | + +## Example + +```python +from openapi_client.models.api_v3_exchange_info_get200_response import ApiV3ExchangeInfoGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3ExchangeInfoGet200Response from a JSON string +api_v3_exchange_info_get200_response_instance = ApiV3ExchangeInfoGet200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3ExchangeInfoGet200Response.to_json()) + +# convert the object into a dict +api_v3_exchange_info_get200_response_dict = api_v3_exchange_info_get200_response_instance.to_dict() +# create an instance of ApiV3ExchangeInfoGet200Response from a dict +api_v3_exchange_info_get200_response_from_dict = ApiV3ExchangeInfoGet200Response.from_dict(api_v3_exchange_info_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200ResponseRateLimitsInner.md b/target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200ResponseRateLimitsInner.md new file mode 100644 index 0000000..409edd3 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200ResponseRateLimitsInner.md @@ -0,0 +1,32 @@ +# ApiV3ExchangeInfoGet200ResponseRateLimitsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rate_limit_type** | **str** | | +**interval** | **str** | | +**interval_num** | **int** | | +**limit** | **int** | | + +## Example + +```python +from openapi_client.models.api_v3_exchange_info_get200_response_rate_limits_inner import ApiV3ExchangeInfoGet200ResponseRateLimitsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3ExchangeInfoGet200ResponseRateLimitsInner from a JSON string +api_v3_exchange_info_get200_response_rate_limits_inner_instance = ApiV3ExchangeInfoGet200ResponseRateLimitsInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3ExchangeInfoGet200ResponseRateLimitsInner.to_json()) + +# convert the object into a dict +api_v3_exchange_info_get200_response_rate_limits_inner_dict = api_v3_exchange_info_get200_response_rate_limits_inner_instance.to_dict() +# create an instance of ApiV3ExchangeInfoGet200ResponseRateLimitsInner from a dict +api_v3_exchange_info_get200_response_rate_limits_inner_from_dict = ApiV3ExchangeInfoGet200ResponseRateLimitsInner.from_dict(api_v3_exchange_info_get200_response_rate_limits_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200ResponseSymbolsInner.md b/target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200ResponseSymbolsInner.md new file mode 100644 index 0000000..cabac68 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200ResponseSymbolsInner.md @@ -0,0 +1,50 @@ +# ApiV3ExchangeInfoGet200ResponseSymbolsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**status** | **str** | | +**base_asset** | **str** | | +**base_asset_precision** | **int** | | +**quote_asset** | **str** | | +**quote_asset_precision** | **int** | | +**base_commission_precision** | **int** | | +**quote_commission_precision** | **int** | | +**order_types** | **List[str]** | | +**iceberg_allowed** | **bool** | | +**oco_allowed** | **bool** | | +**oto_allowed** | **bool** | | +**quote_order_qty_market_allowed** | **bool** | | +**allow_trailing_stop** | **bool** | | +**cancel_replace_allowed** | **bool** | | +**is_spot_trading_allowed** | **bool** | | +**is_margin_trading_allowed** | **bool** | | +**filters** | [**List[ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner]**](ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner.md) | | +**permissions** | **List[str]** | | +**permission_sets** | **List[List[str]]** | | +**default_self_trade_prevention_mode** | **str** | | +**allowed_self_trade_prevention_modes** | **List[str]** | | + +## Example + +```python +from openapi_client.models.api_v3_exchange_info_get200_response_symbols_inner import ApiV3ExchangeInfoGet200ResponseSymbolsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3ExchangeInfoGet200ResponseSymbolsInner from a JSON string +api_v3_exchange_info_get200_response_symbols_inner_instance = ApiV3ExchangeInfoGet200ResponseSymbolsInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3ExchangeInfoGet200ResponseSymbolsInner.to_json()) + +# convert the object into a dict +api_v3_exchange_info_get200_response_symbols_inner_dict = api_v3_exchange_info_get200_response_symbols_inner_instance.to_dict() +# create an instance of ApiV3ExchangeInfoGet200ResponseSymbolsInner from a dict +api_v3_exchange_info_get200_response_symbols_inner_from_dict = ApiV3ExchangeInfoGet200ResponseSymbolsInner.from_dict(api_v3_exchange_info_get200_response_symbols_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner.md b/target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner.md new file mode 100644 index 0000000..24ccf5b --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner.md @@ -0,0 +1,32 @@ +# ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter_type** | **str** | | +**min_price** | **str** | | +**max_price** | **str** | | +**tick_size** | **str** | | + +## Example + +```python +from openapi_client.models.api_v3_exchange_info_get200_response_symbols_inner_filters_inner import ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner from a JSON string +api_v3_exchange_info_get200_response_symbols_inner_filters_inner_instance = ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner.to_json()) + +# convert the object into a dict +api_v3_exchange_info_get200_response_symbols_inner_filters_inner_dict = api_v3_exchange_info_get200_response_symbols_inner_filters_inner_instance.to_dict() +# create an instance of ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner from a dict +api_v3_exchange_info_get200_response_symbols_inner_filters_inner_from_dict = ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner.from_dict(api_v3_exchange_info_get200_response_symbols_inner_filters_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3KlinesGet200ResponseInnerInner.md b/target/python/binance_openapi/docs/ApiV3KlinesGet200ResponseInnerInner.md new file mode 100644 index 0000000..712bf39 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3KlinesGet200ResponseInnerInner.md @@ -0,0 +1,28 @@ +# ApiV3KlinesGet200ResponseInnerInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from openapi_client.models.api_v3_klines_get200_response_inner_inner import ApiV3KlinesGet200ResponseInnerInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3KlinesGet200ResponseInnerInner from a JSON string +api_v3_klines_get200_response_inner_inner_instance = ApiV3KlinesGet200ResponseInnerInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3KlinesGet200ResponseInnerInner.to_json()) + +# convert the object into a dict +api_v3_klines_get200_response_inner_inner_dict = api_v3_klines_get200_response_inner_inner_instance.to_dict() +# create an instance of ApiV3KlinesGet200ResponseInnerInner from a dict +api_v3_klines_get200_response_inner_inner_from_dict = ApiV3KlinesGet200ResponseInnerInner.from_dict(api_v3_klines_get200_response_inner_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3MyAllocationsGet200ResponseInner.md b/target/python/binance_openapi/docs/ApiV3MyAllocationsGet200ResponseInner.md new file mode 100644 index 0000000..4351aac --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3MyAllocationsGet200ResponseInner.md @@ -0,0 +1,42 @@ +# ApiV3MyAllocationsGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**allocation_id** | **int** | | +**allocation_type** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**price** | **str** | | +**qty** | **str** | | +**quote_qty** | **str** | | +**commission** | **str** | | +**commission_asset** | **str** | | +**time** | **int** | | +**is_buyer** | **bool** | | +**is_maker** | **bool** | | +**is_allocator** | **bool** | | + +## Example + +```python +from openapi_client.models.api_v3_my_allocations_get200_response_inner import ApiV3MyAllocationsGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3MyAllocationsGet200ResponseInner from a JSON string +api_v3_my_allocations_get200_response_inner_instance = ApiV3MyAllocationsGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3MyAllocationsGet200ResponseInner.to_json()) + +# convert the object into a dict +api_v3_my_allocations_get200_response_inner_dict = api_v3_my_allocations_get200_response_inner_instance.to_dict() +# create an instance of ApiV3MyAllocationsGet200ResponseInner from a dict +api_v3_my_allocations_get200_response_inner_from_dict = ApiV3MyAllocationsGet200ResponseInner.from_dict(api_v3_my_allocations_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3MyPreventedMatchesGet200ResponseInner.md b/target/python/binance_openapi/docs/ApiV3MyPreventedMatchesGet200ResponseInner.md new file mode 100644 index 0000000..d92f65a --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3MyPreventedMatchesGet200ResponseInner.md @@ -0,0 +1,37 @@ +# ApiV3MyPreventedMatchesGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**prevented_match_id** | **int** | | +**taker_order_id** | **int** | | +**maker_order_id** | **int** | | +**trade_group_id** | **int** | | +**self_trade_prevention_mode** | **str** | | +**price** | **str** | | +**maker_prevented_quantity** | **str** | | +**transact_time** | **int** | | + +## Example + +```python +from openapi_client.models.api_v3_my_prevented_matches_get200_response_inner import ApiV3MyPreventedMatchesGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3MyPreventedMatchesGet200ResponseInner from a JSON string +api_v3_my_prevented_matches_get200_response_inner_instance = ApiV3MyPreventedMatchesGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3MyPreventedMatchesGet200ResponseInner.to_json()) + +# convert the object into a dict +api_v3_my_prevented_matches_get200_response_inner_dict = api_v3_my_prevented_matches_get200_response_inner_instance.to_dict() +# create an instance of ApiV3MyPreventedMatchesGet200ResponseInner from a dict +api_v3_my_prevented_matches_get200_response_inner_from_dict = ApiV3MyPreventedMatchesGet200ResponseInner.from_dict(api_v3_my_prevented_matches_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3OpenOrderListGet200ResponseInner.md b/target/python/binance_openapi/docs/ApiV3OpenOrderListGet200ResponseInner.md new file mode 100644 index 0000000..b1895f9 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3OpenOrderListGet200ResponseInner.md @@ -0,0 +1,36 @@ +# ApiV3OpenOrderListGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_list_id** | **int** | | +**contingency_type** | **str** | | +**list_status_type** | **str** | | +**list_order_status** | **str** | | +**list_client_order_id** | **str** | | +**transaction_time** | **int** | | +**symbol** | **str** | | +**orders** | [**List[ApiV3OpenOrderListGet200ResponseInnerOrdersInner]**](ApiV3OpenOrderListGet200ResponseInnerOrdersInner.md) | | + +## Example + +```python +from openapi_client.models.api_v3_open_order_list_get200_response_inner import ApiV3OpenOrderListGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3OpenOrderListGet200ResponseInner from a JSON string +api_v3_open_order_list_get200_response_inner_instance = ApiV3OpenOrderListGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3OpenOrderListGet200ResponseInner.to_json()) + +# convert the object into a dict +api_v3_open_order_list_get200_response_inner_dict = api_v3_open_order_list_get200_response_inner_instance.to_dict() +# create an instance of ApiV3OpenOrderListGet200ResponseInner from a dict +api_v3_open_order_list_get200_response_inner_from_dict = ApiV3OpenOrderListGet200ResponseInner.from_dict(api_v3_open_order_list_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3OpenOrderListGet200ResponseInnerOrdersInner.md b/target/python/binance_openapi/docs/ApiV3OpenOrderListGet200ResponseInnerOrdersInner.md new file mode 100644 index 0000000..ad1b0c0 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3OpenOrderListGet200ResponseInnerOrdersInner.md @@ -0,0 +1,31 @@ +# ApiV3OpenOrderListGet200ResponseInnerOrdersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**client_order_id** | **str** | | + +## Example + +```python +from openapi_client.models.api_v3_open_order_list_get200_response_inner_orders_inner import ApiV3OpenOrderListGet200ResponseInnerOrdersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3OpenOrderListGet200ResponseInnerOrdersInner from a JSON string +api_v3_open_order_list_get200_response_inner_orders_inner_instance = ApiV3OpenOrderListGet200ResponseInnerOrdersInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3OpenOrderListGet200ResponseInnerOrdersInner.to_json()) + +# convert the object into a dict +api_v3_open_order_list_get200_response_inner_orders_inner_dict = api_v3_open_order_list_get200_response_inner_orders_inner_instance.to_dict() +# create an instance of ApiV3OpenOrderListGet200ResponseInnerOrdersInner from a dict +api_v3_open_order_list_get200_response_inner_orders_inner_from_dict = ApiV3OpenOrderListGet200ResponseInnerOrdersInner.from_dict(api_v3_open_order_list_get200_response_inner_orders_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3OpenOrdersDelete200ResponseInner.md b/target/python/binance_openapi/docs/ApiV3OpenOrdersDelete200ResponseInner.md new file mode 100644 index 0000000..ffde17a --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3OpenOrdersDelete200ResponseInner.md @@ -0,0 +1,50 @@ +# ApiV3OpenOrdersDelete200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**orig_client_order_id** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**client_order_id** | **str** | | +**transact_time** | **int** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**self_trade_prevention_mode** | **str** | | +**contingency_type** | **str** | | +**list_status_type** | **str** | | +**list_order_status** | **str** | | +**list_client_order_id** | **str** | | +**transaction_time** | **int** | | +**orders** | [**List[SapiV1MarginOrderOcoPost200ResponseOrdersInner]**](SapiV1MarginOrderOcoPost200ResponseOrdersInner.md) | | +**order_reports** | [**List[OcoOrderOrderReportsInner]**](OcoOrderOrderReportsInner.md) | | + +## Example + +```python +from openapi_client.models.api_v3_open_orders_delete200_response_inner import ApiV3OpenOrdersDelete200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3OpenOrdersDelete200ResponseInner from a JSON string +api_v3_open_orders_delete200_response_inner_instance = ApiV3OpenOrdersDelete200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3OpenOrdersDelete200ResponseInner.to_json()) + +# convert the object into a dict +api_v3_open_orders_delete200_response_inner_dict = api_v3_open_orders_delete200_response_inner_instance.to_dict() +# create an instance of ApiV3OpenOrdersDelete200ResponseInner from a dict +api_v3_open_orders_delete200_response_inner_from_dict = ApiV3OpenOrdersDelete200ResponseInner.from_dict(api_v3_open_orders_delete200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3OrderCancelReplacePost200Response.md b/target/python/binance_openapi/docs/ApiV3OrderCancelReplacePost200Response.md new file mode 100644 index 0000000..1de200b --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3OrderCancelReplacePost200Response.md @@ -0,0 +1,32 @@ +# ApiV3OrderCancelReplacePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cancel_result** | **str** | | +**new_order_result** | **str** | | +**cancel_response** | [**ApiV3OrderCancelReplacePost200ResponseCancelResponse**](ApiV3OrderCancelReplacePost200ResponseCancelResponse.md) | | +**new_order_response** | [**ApiV3OrderCancelReplacePost200ResponseNewOrderResponse**](ApiV3OrderCancelReplacePost200ResponseNewOrderResponse.md) | | + +## Example + +```python +from openapi_client.models.api_v3_order_cancel_replace_post200_response import ApiV3OrderCancelReplacePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3OrderCancelReplacePost200Response from a JSON string +api_v3_order_cancel_replace_post200_response_instance = ApiV3OrderCancelReplacePost200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3OrderCancelReplacePost200Response.to_json()) + +# convert the object into a dict +api_v3_order_cancel_replace_post200_response_dict = api_v3_order_cancel_replace_post200_response_instance.to_dict() +# create an instance of ApiV3OrderCancelReplacePost200Response from a dict +api_v3_order_cancel_replace_post200_response_from_dict = ApiV3OrderCancelReplacePost200Response.from_dict(api_v3_order_cancel_replace_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3OrderCancelReplacePost200ResponseCancelResponse.md b/target/python/binance_openapi/docs/ApiV3OrderCancelReplacePost200ResponseCancelResponse.md new file mode 100644 index 0000000..691a470 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3OrderCancelReplacePost200ResponseCancelResponse.md @@ -0,0 +1,43 @@ +# ApiV3OrderCancelReplacePost200ResponseCancelResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**orig_client_order_id** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**client_order_id** | **str** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**self_trade_prevention_mode** | **str** | | +**transact_time** | **int** | | [optional] + +## Example + +```python +from openapi_client.models.api_v3_order_cancel_replace_post200_response_cancel_response import ApiV3OrderCancelReplacePost200ResponseCancelResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3OrderCancelReplacePost200ResponseCancelResponse from a JSON string +api_v3_order_cancel_replace_post200_response_cancel_response_instance = ApiV3OrderCancelReplacePost200ResponseCancelResponse.from_json(json) +# print the JSON string representation of the object +print(ApiV3OrderCancelReplacePost200ResponseCancelResponse.to_json()) + +# convert the object into a dict +api_v3_order_cancel_replace_post200_response_cancel_response_dict = api_v3_order_cancel_replace_post200_response_cancel_response_instance.to_dict() +# create an instance of ApiV3OrderCancelReplacePost200ResponseCancelResponse from a dict +api_v3_order_cancel_replace_post200_response_cancel_response_from_dict = ApiV3OrderCancelReplacePost200ResponseCancelResponse.from_dict(api_v3_order_cancel_replace_post200_response_cancel_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3OrderCancelReplacePost200ResponseNewOrderResponse.md b/target/python/binance_openapi/docs/ApiV3OrderCancelReplacePost200ResponseNewOrderResponse.md new file mode 100644 index 0000000..18c2628 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3OrderCancelReplacePost200ResponseNewOrderResponse.md @@ -0,0 +1,44 @@ +# ApiV3OrderCancelReplacePost200ResponseNewOrderResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**client_order_id** | **str** | | +**transact_time** | **int** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**working_time** | **int** | | +**fills** | **List[str]** | | +**self_trade_prevention_mode** | **str** | | + +## Example + +```python +from openapi_client.models.api_v3_order_cancel_replace_post200_response_new_order_response import ApiV3OrderCancelReplacePost200ResponseNewOrderResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3OrderCancelReplacePost200ResponseNewOrderResponse from a JSON string +api_v3_order_cancel_replace_post200_response_new_order_response_instance = ApiV3OrderCancelReplacePost200ResponseNewOrderResponse.from_json(json) +# print the JSON string representation of the object +print(ApiV3OrderCancelReplacePost200ResponseNewOrderResponse.to_json()) + +# convert the object into a dict +api_v3_order_cancel_replace_post200_response_new_order_response_dict = api_v3_order_cancel_replace_post200_response_new_order_response_instance.to_dict() +# create an instance of ApiV3OrderCancelReplacePost200ResponseNewOrderResponse from a dict +api_v3_order_cancel_replace_post200_response_new_order_response_from_dict = ApiV3OrderCancelReplacePost200ResponseNewOrderResponse.from_dict(api_v3_order_cancel_replace_post200_response_new_order_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3OrderListGet200Response.md b/target/python/binance_openapi/docs/ApiV3OrderListGet200Response.md new file mode 100644 index 0000000..91c4938 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3OrderListGet200Response.md @@ -0,0 +1,36 @@ +# ApiV3OrderListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_list_id** | **int** | | +**contingency_type** | **str** | | +**list_status_type** | **str** | | +**list_order_status** | **str** | | +**list_client_order_id** | **str** | | +**transaction_time** | **int** | | +**symbol** | **str** | | +**orders** | [**List[ApiV3OrderListGet200ResponseOrdersInner]**](ApiV3OrderListGet200ResponseOrdersInner.md) | | + +## Example + +```python +from openapi_client.models.api_v3_order_list_get200_response import ApiV3OrderListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3OrderListGet200Response from a JSON string +api_v3_order_list_get200_response_instance = ApiV3OrderListGet200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3OrderListGet200Response.to_json()) + +# convert the object into a dict +api_v3_order_list_get200_response_dict = api_v3_order_list_get200_response_instance.to_dict() +# create an instance of ApiV3OrderListGet200Response from a dict +api_v3_order_list_get200_response_from_dict = ApiV3OrderListGet200Response.from_dict(api_v3_order_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3OrderListGet200ResponseOrdersInner.md b/target/python/binance_openapi/docs/ApiV3OrderListGet200ResponseOrdersInner.md new file mode 100644 index 0000000..668c6a6 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3OrderListGet200ResponseOrdersInner.md @@ -0,0 +1,31 @@ +# ApiV3OrderListGet200ResponseOrdersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**client_order_id** | **str** | | + +## Example + +```python +from openapi_client.models.api_v3_order_list_get200_response_orders_inner import ApiV3OrderListGet200ResponseOrdersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3OrderListGet200ResponseOrdersInner from a JSON string +api_v3_order_list_get200_response_orders_inner_instance = ApiV3OrderListGet200ResponseOrdersInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3OrderListGet200ResponseOrdersInner.to_json()) + +# convert the object into a dict +api_v3_order_list_get200_response_orders_inner_dict = api_v3_order_list_get200_response_orders_inner_instance.to_dict() +# create an instance of ApiV3OrderListGet200ResponseOrdersInner from a dict +api_v3_order_list_get200_response_orders_inner_from_dict = ApiV3OrderListGet200ResponseOrdersInner.from_dict(api_v3_order_list_get200_response_orders_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3OrderOcoPost200Response.md b/target/python/binance_openapi/docs/ApiV3OrderOcoPost200Response.md new file mode 100644 index 0000000..950d204 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3OrderOcoPost200Response.md @@ -0,0 +1,37 @@ +# ApiV3OrderOcoPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_list_id** | **int** | | +**contingency_type** | **str** | | +**list_status_type** | **str** | | +**list_order_status** | **str** | | +**list_client_order_id** | **str** | | +**transaction_time** | **int** | | +**symbol** | **str** | | +**orders** | [**List[ApiV3OrderOcoPost200ResponseOrdersInner]**](ApiV3OrderOcoPost200ResponseOrdersInner.md) | | +**order_reports** | [**List[ApiV3OrderOcoPost200ResponseOrderReportsInner]**](ApiV3OrderOcoPost200ResponseOrderReportsInner.md) | | + +## Example + +```python +from openapi_client.models.api_v3_order_oco_post200_response import ApiV3OrderOcoPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3OrderOcoPost200Response from a JSON string +api_v3_order_oco_post200_response_instance = ApiV3OrderOcoPost200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3OrderOcoPost200Response.to_json()) + +# convert the object into a dict +api_v3_order_oco_post200_response_dict = api_v3_order_oco_post200_response_instance.to_dict() +# create an instance of ApiV3OrderOcoPost200Response from a dict +api_v3_order_oco_post200_response_from_dict = ApiV3OrderOcoPost200Response.from_dict(api_v3_order_oco_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3OrderOcoPost200ResponseOrderReportsInner.md b/target/python/binance_openapi/docs/ApiV3OrderOcoPost200ResponseOrderReportsInner.md new file mode 100644 index 0000000..5fbcf35 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3OrderOcoPost200ResponseOrderReportsInner.md @@ -0,0 +1,44 @@ +# ApiV3OrderOcoPost200ResponseOrderReportsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**client_order_id** | **str** | | +**transact_time** | **int** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**stop_price** | **str** | | +**working_time** | **str** | | +**self_trade_prevention_mode** | **str** | | + +## Example + +```python +from openapi_client.models.api_v3_order_oco_post200_response_order_reports_inner import ApiV3OrderOcoPost200ResponseOrderReportsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3OrderOcoPost200ResponseOrderReportsInner from a JSON string +api_v3_order_oco_post200_response_order_reports_inner_instance = ApiV3OrderOcoPost200ResponseOrderReportsInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3OrderOcoPost200ResponseOrderReportsInner.to_json()) + +# convert the object into a dict +api_v3_order_oco_post200_response_order_reports_inner_dict = api_v3_order_oco_post200_response_order_reports_inner_instance.to_dict() +# create an instance of ApiV3OrderOcoPost200ResponseOrderReportsInner from a dict +api_v3_order_oco_post200_response_order_reports_inner_from_dict = ApiV3OrderOcoPost200ResponseOrderReportsInner.from_dict(api_v3_order_oco_post200_response_order_reports_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3OrderOcoPost200ResponseOrdersInner.md b/target/python/binance_openapi/docs/ApiV3OrderOcoPost200ResponseOrdersInner.md new file mode 100644 index 0000000..89c5a4c --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3OrderOcoPost200ResponseOrdersInner.md @@ -0,0 +1,31 @@ +# ApiV3OrderOcoPost200ResponseOrdersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**client_order_id** | **str** | | + +## Example + +```python +from openapi_client.models.api_v3_order_oco_post200_response_orders_inner import ApiV3OrderOcoPost200ResponseOrdersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3OrderOcoPost200ResponseOrdersInner from a JSON string +api_v3_order_oco_post200_response_orders_inner_instance = ApiV3OrderOcoPost200ResponseOrdersInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3OrderOcoPost200ResponseOrdersInner.to_json()) + +# convert the object into a dict +api_v3_order_oco_post200_response_orders_inner_dict = api_v3_order_oco_post200_response_orders_inner_instance.to_dict() +# create an instance of ApiV3OrderOcoPost200ResponseOrdersInner from a dict +api_v3_order_oco_post200_response_orders_inner_from_dict = ApiV3OrderOcoPost200ResponseOrdersInner.from_dict(api_v3_order_oco_post200_response_orders_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3OrderPost200Response.md b/target/python/binance_openapi/docs/ApiV3OrderPost200Response.md new file mode 100644 index 0000000..4916f33 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3OrderPost200Response.md @@ -0,0 +1,46 @@ +# ApiV3OrderPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**client_order_id** | **str** | | +**transact_time** | **int** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**strategy_id** | **int** | | [optional] +**strategy_type** | **int** | | [optional] +**working_time** | **int** | | +**self_trade_prevention_mode** | **str** | | +**fills** | [**List[OrderResponseFullFillsInner]**](OrderResponseFullFillsInner.md) | | + +## Example + +```python +from openapi_client.models.api_v3_order_post200_response import ApiV3OrderPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3OrderPost200Response from a JSON string +api_v3_order_post200_response_instance = ApiV3OrderPost200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3OrderPost200Response.to_json()) + +# convert the object into a dict +api_v3_order_post200_response_dict = api_v3_order_post200_response_instance.to_dict() +# create an instance of ApiV3OrderPost200Response from a dict +api_v3_order_post200_response_from_dict = ApiV3OrderPost200Response.from_dict(api_v3_order_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3RateLimitOrderGet200ResponseInner.md b/target/python/binance_openapi/docs/ApiV3RateLimitOrderGet200ResponseInner.md new file mode 100644 index 0000000..7ea0afc --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3RateLimitOrderGet200ResponseInner.md @@ -0,0 +1,33 @@ +# ApiV3RateLimitOrderGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rate_limit_type** | **str** | | +**interval** | **str** | | +**interval_num** | **int** | | +**limit** | **int** | | +**count** | **int** | | [optional] + +## Example + +```python +from openapi_client.models.api_v3_rate_limit_order_get200_response_inner import ApiV3RateLimitOrderGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3RateLimitOrderGet200ResponseInner from a JSON string +api_v3_rate_limit_order_get200_response_inner_instance = ApiV3RateLimitOrderGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3RateLimitOrderGet200ResponseInner.to_json()) + +# convert the object into a dict +api_v3_rate_limit_order_get200_response_inner_dict = api_v3_rate_limit_order_get200_response_inner_instance.to_dict() +# create an instance of ApiV3RateLimitOrderGet200ResponseInner from a dict +api_v3_rate_limit_order_get200_response_inner_from_dict = ApiV3RateLimitOrderGet200ResponseInner.from_dict(api_v3_rate_limit_order_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3SorOrderPost200Response.md b/target/python/binance_openapi/docs/ApiV3SorOrderPost200Response.md new file mode 100644 index 0000000..b3bc0fa --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3SorOrderPost200Response.md @@ -0,0 +1,46 @@ +# ApiV3SorOrderPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**client_order_id** | **str** | | +**transact_time** | **int** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**working_time** | **int** | | +**fills** | [**List[ApiV3SorOrderPost200ResponseFillsInner]**](ApiV3SorOrderPost200ResponseFillsInner.md) | | +**working_floor** | **str** | | +**self_trade_prevention_mode** | **str** | | +**used_sor** | **bool** | | + +## Example + +```python +from openapi_client.models.api_v3_sor_order_post200_response import ApiV3SorOrderPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3SorOrderPost200Response from a JSON string +api_v3_sor_order_post200_response_instance = ApiV3SorOrderPost200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3SorOrderPost200Response.to_json()) + +# convert the object into a dict +api_v3_sor_order_post200_response_dict = api_v3_sor_order_post200_response_instance.to_dict() +# create an instance of ApiV3SorOrderPost200Response from a dict +api_v3_sor_order_post200_response_from_dict = ApiV3SorOrderPost200Response.from_dict(api_v3_sor_order_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3SorOrderPost200ResponseFillsInner.md b/target/python/binance_openapi/docs/ApiV3SorOrderPost200ResponseFillsInner.md new file mode 100644 index 0000000..8aeb696 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3SorOrderPost200ResponseFillsInner.md @@ -0,0 +1,35 @@ +# ApiV3SorOrderPost200ResponseFillsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**match_type** | **str** | | +**price** | **str** | | +**qty** | **str** | | +**commission** | **str** | | +**commission_asset** | **str** | | +**trade_id** | **int** | | +**alloc_id** | **int** | | + +## Example + +```python +from openapi_client.models.api_v3_sor_order_post200_response_fills_inner import ApiV3SorOrderPost200ResponseFillsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3SorOrderPost200ResponseFillsInner from a JSON string +api_v3_sor_order_post200_response_fills_inner_instance = ApiV3SorOrderPost200ResponseFillsInner.from_json(json) +# print the JSON string representation of the object +print(ApiV3SorOrderPost200ResponseFillsInner.to_json()) + +# convert the object into a dict +api_v3_sor_order_post200_response_fills_inner_dict = api_v3_sor_order_post200_response_fills_inner_instance.to_dict() +# create an instance of ApiV3SorOrderPost200ResponseFillsInner from a dict +api_v3_sor_order_post200_response_fills_inner_from_dict = ApiV3SorOrderPost200ResponseFillsInner.from_dict(api_v3_sor_order_post200_response_fills_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3Ticker24hrGet200Response.md b/target/python/binance_openapi/docs/ApiV3Ticker24hrGet200Response.md new file mode 100644 index 0000000..07c730f --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3Ticker24hrGet200Response.md @@ -0,0 +1,47 @@ +# ApiV3Ticker24hrGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**price_change** | **str** | | +**price_change_percent** | **str** | | +**prev_close_price** | **str** | | +**last_price** | **str** | | +**bid_price** | **str** | | +**bid_qty** | **str** | | +**ask_price** | **str** | | +**ask_qty** | **str** | | +**open_price** | **str** | | +**high_price** | **str** | | +**low_price** | **str** | | +**volume** | **str** | | +**quote_volume** | **str** | | +**open_time** | **int** | | +**close_time** | **int** | | +**first_id** | **int** | | +**last_id** | **int** | | +**count** | **int** | | + +## Example + +```python +from openapi_client.models.api_v3_ticker24hr_get200_response import ApiV3Ticker24hrGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3Ticker24hrGet200Response from a JSON string +api_v3_ticker24hr_get200_response_instance = ApiV3Ticker24hrGet200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3Ticker24hrGet200Response.to_json()) + +# convert the object into a dict +api_v3_ticker24hr_get200_response_dict = api_v3_ticker24hr_get200_response_instance.to_dict() +# create an instance of ApiV3Ticker24hrGet200Response from a dict +api_v3_ticker24hr_get200_response_from_dict = ApiV3Ticker24hrGet200Response.from_dict(api_v3_ticker24hr_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3TickerBookTickerGet200Response.md b/target/python/binance_openapi/docs/ApiV3TickerBookTickerGet200Response.md new file mode 100644 index 0000000..5bf51fd --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3TickerBookTickerGet200Response.md @@ -0,0 +1,33 @@ +# ApiV3TickerBookTickerGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**bid_price** | **str** | | +**bid_qty** | **str** | | +**ask_price** | **str** | | +**ask_qty** | **str** | | + +## Example + +```python +from openapi_client.models.api_v3_ticker_book_ticker_get200_response import ApiV3TickerBookTickerGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3TickerBookTickerGet200Response from a JSON string +api_v3_ticker_book_ticker_get200_response_instance = ApiV3TickerBookTickerGet200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3TickerBookTickerGet200Response.to_json()) + +# convert the object into a dict +api_v3_ticker_book_ticker_get200_response_dict = api_v3_ticker_book_ticker_get200_response_instance.to_dict() +# create an instance of ApiV3TickerBookTickerGet200Response from a dict +api_v3_ticker_book_ticker_get200_response_from_dict = ApiV3TickerBookTickerGet200Response.from_dict(api_v3_ticker_book_ticker_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3TickerGet200Response.md b/target/python/binance_openapi/docs/ApiV3TickerGet200Response.md new file mode 100644 index 0000000..ff172a0 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3TickerGet200Response.md @@ -0,0 +1,43 @@ +# ApiV3TickerGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**price_change** | **str** | | +**price_change_percent** | **str** | | +**weighted_avg_price** | **str** | | +**open_price** | **str** | | +**high_price** | **str** | | +**low_price** | **str** | | +**last_price** | **str** | | +**volume** | **str** | | +**quote_volume** | **str** | | +**open_time** | **int** | | +**close_time** | **int** | | +**first_id** | **int** | | +**last_id** | **int** | | +**count** | **int** | | + +## Example + +```python +from openapi_client.models.api_v3_ticker_get200_response import ApiV3TickerGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3TickerGet200Response from a JSON string +api_v3_ticker_get200_response_instance = ApiV3TickerGet200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3TickerGet200Response.to_json()) + +# convert the object into a dict +api_v3_ticker_get200_response_dict = api_v3_ticker_get200_response_instance.to_dict() +# create an instance of ApiV3TickerGet200Response from a dict +api_v3_ticker_get200_response_from_dict = ApiV3TickerGet200Response.from_dict(api_v3_ticker_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3TickerPriceGet200Response.md b/target/python/binance_openapi/docs/ApiV3TickerPriceGet200Response.md new file mode 100644 index 0000000..99a93ba --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3TickerPriceGet200Response.md @@ -0,0 +1,30 @@ +# ApiV3TickerPriceGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**price** | **str** | | + +## Example + +```python +from openapi_client.models.api_v3_ticker_price_get200_response import ApiV3TickerPriceGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3TickerPriceGet200Response from a JSON string +api_v3_ticker_price_get200_response_instance = ApiV3TickerPriceGet200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3TickerPriceGet200Response.to_json()) + +# convert the object into a dict +api_v3_ticker_price_get200_response_dict = api_v3_ticker_price_get200_response_instance.to_dict() +# create an instance of ApiV3TickerPriceGet200Response from a dict +api_v3_ticker_price_get200_response_from_dict = ApiV3TickerPriceGet200Response.from_dict(api_v3_ticker_price_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3TickerTradingDayGet200Response.md b/target/python/binance_openapi/docs/ApiV3TickerTradingDayGet200Response.md new file mode 100644 index 0000000..7eb7b06 --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3TickerTradingDayGet200Response.md @@ -0,0 +1,43 @@ +# ApiV3TickerTradingDayGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**price_change** | **str** | Absolute price change | +**price_change_percent** | **str** | Relative price change in percent | +**weighted_avg_price** | **str** | quoteVolume / volume | +**open_price** | **str** | | +**high_price** | **str** | | +**low_price** | **str** | | +**last_price** | **str** | | +**volume** | **str** | Volume in base asset | +**quote_volume** | **str** | Volume in quote asset | +**open_time** | **int** | | +**close_time** | **int** | | +**first_id** | **int** | Trade ID of the first trade in the interval | +**last_id** | **int** | Trade ID of the last trade in the interval | +**count** | **int** | Number of trades in the interval | + +## Example + +```python +from openapi_client.models.api_v3_ticker_trading_day_get200_response import ApiV3TickerTradingDayGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3TickerTradingDayGet200Response from a JSON string +api_v3_ticker_trading_day_get200_response_instance = ApiV3TickerTradingDayGet200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3TickerTradingDayGet200Response.to_json()) + +# convert the object into a dict +api_v3_ticker_trading_day_get200_response_dict = api_v3_ticker_trading_day_get200_response_instance.to_dict() +# create an instance of ApiV3TickerTradingDayGet200Response from a dict +api_v3_ticker_trading_day_get200_response_from_dict = ApiV3TickerTradingDayGet200Response.from_dict(api_v3_ticker_trading_day_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3TimeGet200Response.md b/target/python/binance_openapi/docs/ApiV3TimeGet200Response.md new file mode 100644 index 0000000..48fe12c --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3TimeGet200Response.md @@ -0,0 +1,29 @@ +# ApiV3TimeGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**server_time** | **int** | | + +## Example + +```python +from openapi_client.models.api_v3_time_get200_response import ApiV3TimeGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3TimeGet200Response from a JSON string +api_v3_time_get200_response_instance = ApiV3TimeGet200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3TimeGet200Response.to_json()) + +# convert the object into a dict +api_v3_time_get200_response_dict = api_v3_time_get200_response_instance.to_dict() +# create an instance of ApiV3TimeGet200Response from a dict +api_v3_time_get200_response_from_dict = ApiV3TimeGet200Response.from_dict(api_v3_time_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ApiV3UserDataStreamPost200Response.md b/target/python/binance_openapi/docs/ApiV3UserDataStreamPost200Response.md new file mode 100644 index 0000000..76c828b --- /dev/null +++ b/target/python/binance_openapi/docs/ApiV3UserDataStreamPost200Response.md @@ -0,0 +1,29 @@ +# ApiV3UserDataStreamPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listen_key** | **str** | | + +## Example + +```python +from openapi_client.models.api_v3_user_data_stream_post200_response import ApiV3UserDataStreamPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiV3UserDataStreamPost200Response from a JSON string +api_v3_user_data_stream_post200_response_instance = ApiV3UserDataStreamPost200Response.from_json(json) +# print the JSON string representation of the object +print(ApiV3UserDataStreamPost200Response.to_json()) + +# convert the object into a dict +api_v3_user_data_stream_post200_response_dict = api_v3_user_data_stream_post200_response_instance.to_dict() +# create an instance of ApiV3UserDataStreamPost200Response from a dict +api_v3_user_data_stream_post200_response_from_dict = ApiV3UserDataStreamPost200Response.from_dict(api_v3_user_data_stream_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/AutoInvestApi.md b/target/python/binance_openapi/docs/AutoInvestApi.md new file mode 100644 index 0000000..ab1a0f4 --- /dev/null +++ b/target/python/binance_openapi/docs/AutoInvestApi.md @@ -0,0 +1,1607 @@ +# openapi_client.AutoInvestApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_lending_auto_invest_all_asset_get**](AutoInvestApi.md#sapi_v1_lending_auto_invest_all_asset_get) | **GET** /sapi/v1/lending/auto-invest/all/asset | Query all source asset and target asset (USER_DATA) +[**sapi_v1_lending_auto_invest_history_list_get**](AutoInvestApi.md#sapi_v1_lending_auto_invest_history_list_get) | **GET** /sapi/v1/lending/auto-invest/history/list | Query subscription transaction history +[**sapi_v1_lending_auto_invest_index_info_get**](AutoInvestApi.md#sapi_v1_lending_auto_invest_index_info_get) | **GET** /sapi/v1/lending/auto-invest/index/info | Query Index Details(USER_DATA) +[**sapi_v1_lending_auto_invest_index_user_summary_get**](AutoInvestApi.md#sapi_v1_lending_auto_invest_index_user_summary_get) | **GET** /sapi/v1/lending/auto-invest/index/user-summary | Query Index Linked Plan Position Details(USER_DATA) +[**sapi_v1_lending_auto_invest_one_off_post**](AutoInvestApi.md#sapi_v1_lending_auto_invest_one_off_post) | **POST** /sapi/v1/lending/auto-invest/one-off | One Time Transaction(TRADE) +[**sapi_v1_lending_auto_invest_one_off_status_get**](AutoInvestApi.md#sapi_v1_lending_auto_invest_one_off_status_get) | **GET** /sapi/v1/lending/auto-invest/one-off/status | Query One-Time Transaction Status (USER_DATA) +[**sapi_v1_lending_auto_invest_plan_add_post**](AutoInvestApi.md#sapi_v1_lending_auto_invest_plan_add_post) | **POST** /sapi/v1/lending/auto-invest/plan/add | Investment plan creation (USER_DATA) +[**sapi_v1_lending_auto_invest_plan_edit_post**](AutoInvestApi.md#sapi_v1_lending_auto_invest_plan_edit_post) | **POST** /sapi/v1/lending/auto-invest/plan/edit | Investment plan adjustment +[**sapi_v1_lending_auto_invest_plan_edit_status_post**](AutoInvestApi.md#sapi_v1_lending_auto_invest_plan_edit_status_post) | **POST** /sapi/v1/lending/auto-invest/plan/edit-status | Change Plan Status +[**sapi_v1_lending_auto_invest_plan_id_get**](AutoInvestApi.md#sapi_v1_lending_auto_invest_plan_id_get) | **GET** /sapi/v1/lending/auto-invest/plan/id | Query holding details of the plan +[**sapi_v1_lending_auto_invest_plan_list_get**](AutoInvestApi.md#sapi_v1_lending_auto_invest_plan_list_get) | **GET** /sapi/v1/lending/auto-invest/plan/list | Get list of plans +[**sapi_v1_lending_auto_invest_rebalance_history_get**](AutoInvestApi.md#sapi_v1_lending_auto_invest_rebalance_history_get) | **GET** /sapi/v1/lending/auto-invest/rebalance/history | Index Linked Plan Rebalance Details (USER_DATA) +[**sapi_v1_lending_auto_invest_redeem_history_get**](AutoInvestApi.md#sapi_v1_lending_auto_invest_redeem_history_get) | **GET** /sapi/v1/lending/auto-invest/redeem/history | Index Linked Plan Redemption History (USER_DATA) +[**sapi_v1_lending_auto_invest_redeem_post**](AutoInvestApi.md#sapi_v1_lending_auto_invest_redeem_post) | **POST** /sapi/v1/lending/auto-invest/redeem | Index Linked Plan Redemption (TRADE) +[**sapi_v1_lending_auto_invest_source_asset_list_get**](AutoInvestApi.md#sapi_v1_lending_auto_invest_source_asset_list_get) | **GET** /sapi/v1/lending/auto-invest/source-asset/list | Query source asset list (USER_DATA) +[**sapi_v1_lending_auto_invest_target_asset_list_get**](AutoInvestApi.md#sapi_v1_lending_auto_invest_target_asset_list_get) | **GET** /sapi/v1/lending/auto-invest/target-asset/list | Get target asset list (USER_DATA) +[**sapi_v1_lending_auto_invest_target_asset_roi_list_get**](AutoInvestApi.md#sapi_v1_lending_auto_invest_target_asset_roi_list_get) | **GET** /sapi/v1/lending/auto-invest/target-asset/roi/list | Get target asset ROI data (USER_DATA) + + +# **sapi_v1_lending_auto_invest_all_asset_get** +> SapiV1LendingAutoInvestAllAssetGet200Response sapi_v1_lending_auto_invest_all_asset_get(timestamp, signature, recv_window=recv_window) + +Query all source asset and target asset (USER_DATA) + +Query all source assets and target assets Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_all_asset_get200_response import SapiV1LendingAutoInvestAllAssetGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query all source asset and target asset (USER_DATA) + api_response = api_instance.sapi_v1_lending_auto_invest_all_asset_get(timestamp, signature, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_all_asset_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_all_asset_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingAutoInvestAllAssetGet200Response**](SapiV1LendingAutoInvestAllAssetGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Target asset | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_history_list_get** +> List[SapiV1LendingAutoInvestHistoryListGet200ResponseInner] sapi_v1_lending_auto_invest_history_list_get(timestamp, signature, plan_id=plan_id, start_time=start_time, end_time=end_time, target_asset=target_asset, plan_type=plan_type, size=size, current=current, recv_window=recv_window) + +Query subscription transaction history + +Query subscription transaction history of a plan Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_history_list_get200_response_inner import SapiV1LendingAutoInvestHistoryListGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + plan_id = 56 # int | (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + target_asset = 3.4 # float | (optional) + plan_type = 'plan_type_example' # str | (optional) + size = 100 # int | Default:10 Max:100 (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query subscription transaction history + api_response = api_instance.sapi_v1_lending_auto_invest_history_list_get(timestamp, signature, plan_id=plan_id, start_time=start_time, end_time=end_time, target_asset=target_asset, plan_type=plan_type, size=size, current=current, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_history_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_history_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **plan_id** | **int**| | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **target_asset** | **float**| | [optional] + **plan_type** | **str**| | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1LendingAutoInvestHistoryListGet200ResponseInner]**](SapiV1LendingAutoInvestHistoryListGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Plan result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_index_info_get** +> SapiV1LendingAutoInvestIndexInfoGet200Response sapi_v1_lending_auto_invest_index_info_get(index_id, timestamp, signature, recv_window=recv_window) + +Query Index Details(USER_DATA) + +Query index details Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_index_info_get200_response import SapiV1LendingAutoInvestIndexInfoGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + index_id = 56 # int | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Index Details(USER_DATA) + api_response = api_instance.sapi_v1_lending_auto_invest_index_info_get(index_id, timestamp, signature, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_index_info_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_index_info_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **index_id** | **int**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingAutoInvestIndexInfoGet200Response**](SapiV1LendingAutoInvestIndexInfoGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Index result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_index_user_summary_get** +> SapiV1LendingAutoInvestIndexUserSummaryGet200Response sapi_v1_lending_auto_invest_index_user_summary_get(index_id, timestamp, signature, recv_window=recv_window) + +Query Index Linked Plan Position Details(USER_DATA) + +Details on users Index-Linked plan position details Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response import SapiV1LendingAutoInvestIndexUserSummaryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + index_id = 56 # int | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Index Linked Plan Position Details(USER_DATA) + api_response = api_instance.sapi_v1_lending_auto_invest_index_user_summary_get(index_id, timestamp, signature, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_index_user_summary_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_index_user_summary_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **index_id** | **int**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingAutoInvestIndexUserSummaryGet200Response**](SapiV1LendingAutoInvestIndexUserSummaryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Position Details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_one_off_post** +> SapiV1LendingAutoInvestOneOffPost200Response sapi_v1_lending_auto_invest_one_off_post(source_type, subscription_amount, source_asset, timestamp, signature, request_id=request_id, flexible_allowed_to_use=flexible_allowed_to_use, plan_id=plan_id, index_id=index_id, details=details, recv_window=recv_window) + +One Time Transaction(TRADE) + +One time transaction Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_post200_response import SapiV1LendingAutoInvestOneOffPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner import SapiV1LendingAutoInvestOneOffPostDetailsParameterInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + source_type = 'MAIN_SITE' # str | + subscription_amount = 10.1 # float | + source_asset = 'USDT' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + request_id = 'TR12354859' # str | (optional) + flexible_allowed_to_use = true # bool | (optional) + plan_id = 12345 # int | (optional) + index_id = 1 # int | (optional) + details = [openapi_client.SapiV1LendingAutoInvestOneOffPostDetailsParameterInner()] # List[SapiV1LendingAutoInvestOneOffPostDetailsParameterInner] | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # One Time Transaction(TRADE) + api_response = api_instance.sapi_v1_lending_auto_invest_one_off_post(source_type, subscription_amount, source_asset, timestamp, signature, request_id=request_id, flexible_allowed_to_use=flexible_allowed_to_use, plan_id=plan_id, index_id=index_id, details=details, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_one_off_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_one_off_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **source_type** | **str**| | + **subscription_amount** | **float**| | + **source_asset** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **request_id** | **str**| | [optional] + **flexible_allowed_to_use** | **bool**| | [optional] + **plan_id** | **int**| | [optional] + **index_id** | **int**| | [optional] + **details** | [**List[SapiV1LendingAutoInvestOneOffPostDetailsParameterInner]**](SapiV1LendingAutoInvestOneOffPostDetailsParameterInner.md)| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingAutoInvestOneOffPost200Response**](SapiV1LendingAutoInvestOneOffPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | transaction result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_one_off_status_get** +> SapiV1LendingAutoInvestOneOffStatusGet200Response sapi_v1_lending_auto_invest_one_off_status_get(transaction_id, timestamp, signature, request_id=request_id, recv_window=recv_window) + +Query One-Time Transaction Status (USER_DATA) + +Transaction status for one-time transaction Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_status_get200_response import SapiV1LendingAutoInvestOneOffStatusGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + transaction_id = 12345 # int | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + request_id = 'TR12354859' # str | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query One-Time Transaction Status (USER_DATA) + api_response = api_instance.sapi_v1_lending_auto_invest_one_off_status_get(transaction_id, timestamp, signature, request_id=request_id, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_one_off_status_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_one_off_status_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **transaction_id** | **int**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **request_id** | **str**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingAutoInvestOneOffStatusGet200Response**](SapiV1LendingAutoInvestOneOffStatusGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | transaction result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_plan_add_post** +> SapiV1LendingAutoInvestPlanAddPost200Response sapi_v1_lending_auto_invest_plan_add_post(source_type, plan_type, subscription_amount, subscription_cycle, subscription_start_time, source_asset, details, timestamp, signature, request_id=request_id, index_id=index_id, subscription_start_day=subscription_start_day, subscription_start_weekday=subscription_start_weekday, flexible_allowed_to_use=flexible_allowed_to_use, recv_window=recv_window) + +Investment plan creation (USER_DATA) + +Post an investment plan creation Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_plan_add_post200_response import SapiV1LendingAutoInvestPlanAddPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner import SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + source_type = 'MAIN_SITE' # str | + plan_type = 'SINGLE' # str | + subscription_amount = 3.4 # float | + subscription_cycle = 'subscription_cycle_example' # str | + subscription_start_time = 56 # int | + source_asset = 'USDT' # str | + details = [openapi_client.SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner()] # List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner] | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + request_id = 'request_id_example' # str | (optional) + index_id = 56 # int | (optional) + subscription_start_day = 56 # int | (optional) + subscription_start_weekday = 'subscription_start_weekday_example' # str | (optional) + flexible_allowed_to_use = true # bool | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Investment plan creation (USER_DATA) + api_response = api_instance.sapi_v1_lending_auto_invest_plan_add_post(source_type, plan_type, subscription_amount, subscription_cycle, subscription_start_time, source_asset, details, timestamp, signature, request_id=request_id, index_id=index_id, subscription_start_day=subscription_start_day, subscription_start_weekday=subscription_start_weekday, flexible_allowed_to_use=flexible_allowed_to_use, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_plan_add_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_plan_add_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **source_type** | **str**| | + **plan_type** | **str**| | + **subscription_amount** | **float**| | + **subscription_cycle** | **str**| | + **subscription_start_time** | **int**| | + **source_asset** | **str**| | + **details** | [**List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner]**](SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner.md)| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **request_id** | **str**| | [optional] + **index_id** | **int**| | [optional] + **subscription_start_day** | **int**| | [optional] + **subscription_start_weekday** | **str**| | [optional] + **flexible_allowed_to_use** | **bool**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingAutoInvestPlanAddPost200Response**](SapiV1LendingAutoInvestPlanAddPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Plan result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_plan_edit_post** +> SapiV1LendingAutoInvestPlanAddPost200Response sapi_v1_lending_auto_invest_plan_edit_post(plan_id, subscription_amount, subscription_cycle, subscription_start_time, source_asset, timestamp, signature, subscription_start_day=subscription_start_day, subscription_start_weekday=subscription_start_weekday, flexible_allowed_to_use=flexible_allowed_to_use, details=details, recv_window=recv_window) + +Investment plan adjustment + +Query Source Asset to be used for investment Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_plan_add_post200_response import SapiV1LendingAutoInvestPlanAddPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner import SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + plan_id = 56 # int | + subscription_amount = 3.4 # float | + subscription_cycle = 'subscription_cycle_example' # str | + subscription_start_time = 56 # int | + source_asset = 'USDT' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + subscription_start_day = 56 # int | (optional) + subscription_start_weekday = 'subscription_start_weekday_example' # str | (optional) + flexible_allowed_to_use = true # bool | (optional) + details = [openapi_client.SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner()] # List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner] | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Investment plan adjustment + api_response = api_instance.sapi_v1_lending_auto_invest_plan_edit_post(plan_id, subscription_amount, subscription_cycle, subscription_start_time, source_asset, timestamp, signature, subscription_start_day=subscription_start_day, subscription_start_weekday=subscription_start_weekday, flexible_allowed_to_use=flexible_allowed_to_use, details=details, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_plan_edit_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_plan_edit_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **int**| | + **subscription_amount** | **float**| | + **subscription_cycle** | **str**| | + **subscription_start_time** | **int**| | + **source_asset** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **subscription_start_day** | **int**| | [optional] + **subscription_start_weekday** | **str**| | [optional] + **flexible_allowed_to_use** | **bool**| | [optional] + **details** | [**List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner]**](SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner.md)| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingAutoInvestPlanAddPost200Response**](SapiV1LendingAutoInvestPlanAddPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Plan result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_plan_edit_status_post** +> SapiV1LendingAutoInvestPlanEditStatusPost200Response sapi_v1_lending_auto_invest_plan_edit_status_post(plan_id, status, timestamp, signature, recv_window=recv_window) + +Change Plan Status + +Change Plan Status Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_plan_edit_status_post200_response import SapiV1LendingAutoInvestPlanEditStatusPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + plan_id = 56 # int | + status = 'status_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Change Plan Status + api_response = api_instance.sapi_v1_lending_auto_invest_plan_edit_status_post(plan_id, status, timestamp, signature, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_plan_edit_status_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_plan_edit_status_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_id** | **int**| | + **status** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingAutoInvestPlanEditStatusPost200Response**](SapiV1LendingAutoInvestPlanEditStatusPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Plan result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_plan_id_get** +> SapiV1LendingAutoInvestPlanIdGet200Response sapi_v1_lending_auto_invest_plan_id_get(timestamp, signature, plan_id=plan_id, request_id=request_id, recv_window=recv_window) + +Query holding details of the plan + +Query holding details of the plan Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response import SapiV1LendingAutoInvestPlanIdGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + plan_id = 56 # int | (optional) + request_id = 'request_id_example' # str | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query holding details of the plan + api_response = api_instance.sapi_v1_lending_auto_invest_plan_id_get(timestamp, signature, plan_id=plan_id, request_id=request_id, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_plan_id_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_plan_id_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **plan_id** | **int**| | [optional] + **request_id** | **str**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingAutoInvestPlanIdGet200Response**](SapiV1LendingAutoInvestPlanIdGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Plan result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_plan_list_get** +> SapiV1LendingAutoInvestPlanListGet200Response sapi_v1_lending_auto_invest_plan_list_get(plan_type, timestamp, signature, recv_window=recv_window) + +Get list of plans + +Query plan lists Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_plan_list_get200_response import SapiV1LendingAutoInvestPlanListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + plan_type = 'plan_type_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get list of plans + api_response = api_instance.sapi_v1_lending_auto_invest_plan_list_get(plan_type, timestamp, signature, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_plan_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_plan_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **plan_type** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingAutoInvestPlanListGet200Response**](SapiV1LendingAutoInvestPlanListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Plan result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_rebalance_history_get** +> List[SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner] sapi_v1_lending_auto_invest_rebalance_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Index Linked Plan Rebalance Details (USER_DATA) + +Get the history of Index Linked Plan Redemption transactions Max 30 day difference between startTime and endTime If no startTime and endTime, default to show past 30 day records Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner import SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Index Linked Plan Rebalance Details (USER_DATA) + api_response = api_instance.sapi_v1_lending_auto_invest_rebalance_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_rebalance_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_rebalance_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner]**](SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Rebalance Details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_redeem_history_get** +> List[SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner] sapi_v1_lending_auto_invest_redeem_history_get(request_id, timestamp, signature, start_time=start_time, end_time=end_time, current=current, asset=asset, size=size, recv_window=recv_window) + +Index Linked Plan Redemption History (USER_DATA) + +Get the history of Index Linked Plan Redemption transactions Max 30 day difference between startTime and endTime If no startTime and endTime, default to show past 30 day records Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_redeem_history_get200_response_inner import SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + request_id = 12345 # int | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + asset = 'BTC' # str | (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Index Linked Plan Redemption History (USER_DATA) + api_response = api_instance.sapi_v1_lending_auto_invest_redeem_history_get(request_id, timestamp, signature, start_time=start_time, end_time=end_time, current=current, asset=asset, size=size, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_redeem_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_redeem_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_id** | **int**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **asset** | **str**| | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner]**](SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Redemption history | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_redeem_post** +> SapiV1LendingAutoInvestRedeemPost200Response sapi_v1_lending_auto_invest_redeem_post(index_id, redemption_percentage, timestamp, signature, request_id=request_id, recv_window=recv_window) + +Index Linked Plan Redemption (TRADE) + +To redeem index-Linked plan holdings Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_redeem_post200_response import SapiV1LendingAutoInvestRedeemPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + index_id = 123456 # int | PORTFOLIO plan's Id + redemption_percentage = 10 # int | user redeem percentage,10/20/100. + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + request_id = 'TR12354859' # str | sourceType + unique, transactionId and requestId cannot be empty at the same time (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Index Linked Plan Redemption (TRADE) + api_response = api_instance.sapi_v1_lending_auto_invest_redeem_post(index_id, redemption_percentage, timestamp, signature, request_id=request_id, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_redeem_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_redeem_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **index_id** | **int**| PORTFOLIO plan's Id | + **redemption_percentage** | **int**| user redeem percentage,10/20/100. | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **request_id** | **str**| sourceType + unique, transactionId and requestId cannot be empty at the same time | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingAutoInvestRedeemPost200Response**](SapiV1LendingAutoInvestRedeemPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Redemption result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_source_asset_list_get** +> SapiV1LendingAutoInvestSourceAssetListGet200Response sapi_v1_lending_auto_invest_source_asset_list_get(usage_type, timestamp, signature, target_asset=target_asset, index_id=index_id, flexible_allowed_to_use=flexible_allowed_to_use, recv_window=recv_window) + +Query source asset list (USER_DATA) + +Query Source Asset to be used for investment Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_source_asset_list_get200_response import SapiV1LendingAutoInvestSourceAssetListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + usage_type = 'RECURRING' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + target_asset = 'BTC' # str | (optional) + index_id = 1 # int | (optional) + flexible_allowed_to_use = true # bool | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query source asset list (USER_DATA) + api_response = api_instance.sapi_v1_lending_auto_invest_source_asset_list_get(usage_type, timestamp, signature, target_asset=target_asset, index_id=index_id, flexible_allowed_to_use=flexible_allowed_to_use, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_source_asset_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_source_asset_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **usage_type** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **target_asset** | **str**| | [optional] + **index_id** | **int**| | [optional] + **flexible_allowed_to_use** | **bool**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingAutoInvestSourceAssetListGet200Response**](SapiV1LendingAutoInvestSourceAssetListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Asset list | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_target_asset_list_get** +> SapiV1LendingAutoInvestTargetAssetListGet200Response sapi_v1_lending_auto_invest_target_asset_list_get(timestamp, signature, target_asset=target_asset, size=size, current=current, recv_window=recv_window) + +Get target asset list (USER_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response import SapiV1LendingAutoInvestTargetAssetListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + target_asset = 'target_asset_example' # str | (optional) + size = 100 # int | Default:10 Max:100 (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get target asset list (USER_DATA) + api_response = api_instance.sapi_v1_lending_auto_invest_target_asset_list_get(timestamp, signature, target_asset=target_asset, size=size, current=current, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_target_asset_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_target_asset_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **target_asset** | **str**| | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingAutoInvestTargetAssetListGet200Response**](SapiV1LendingAutoInvestTargetAssetListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Target asset list | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_auto_invest_target_asset_roi_list_get** +> List[SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner] sapi_v1_lending_auto_invest_target_asset_roi_list_get(target_asset, his_roi_type, timestamp, signature, recv_window=recv_window) + +Get target asset ROI data (USER_DATA) + +ROI return list for target asset Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner import SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.AutoInvestApi(api_client) + target_asset = 'BTC' # str | + his_roi_type = 'FIVE_YEAR' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get target asset ROI data (USER_DATA) + api_response = api_instance.sapi_v1_lending_auto_invest_target_asset_roi_list_get(target_asset, his_roi_type, timestamp, signature, recv_window=recv_window) + print("The response of AutoInvestApi->sapi_v1_lending_auto_invest_target_asset_roi_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AutoInvestApi->sapi_v1_lending_auto_invest_target_asset_roi_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **target_asset** | **str**| | + **his_roi_type** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner]**](SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Target asset list | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/BLVTApi.md b/target/python/binance_openapi/docs/BLVTApi.md new file mode 100644 index 0000000..5012791 --- /dev/null +++ b/target/python/binance_openapi/docs/BLVTApi.md @@ -0,0 +1,549 @@ +# openapi_client.BLVTApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_blvt_redeem_post**](BLVTApi.md#sapi_v1_blvt_redeem_post) | **POST** /sapi/v1/blvt/redeem | Redeem BLVT (USER_DATA) +[**sapi_v1_blvt_redeem_record_get**](BLVTApi.md#sapi_v1_blvt_redeem_record_get) | **GET** /sapi/v1/blvt/redeem/record | Redemption Record (USER_DATA) +[**sapi_v1_blvt_subscribe_post**](BLVTApi.md#sapi_v1_blvt_subscribe_post) | **POST** /sapi/v1/blvt/subscribe | Subscribe BLVT (USER_DATA) +[**sapi_v1_blvt_subscribe_record_get**](BLVTApi.md#sapi_v1_blvt_subscribe_record_get) | **GET** /sapi/v1/blvt/subscribe/record | Query Subscription Record (USER_DATA) +[**sapi_v1_blvt_token_info_get**](BLVTApi.md#sapi_v1_blvt_token_info_get) | **GET** /sapi/v1/blvt/tokenInfo | BLVT Info (MARKET_DATA) +[**sapi_v1_blvt_user_limit_get**](BLVTApi.md#sapi_v1_blvt_user_limit_get) | **GET** /sapi/v1/blvt/userLimit | BLVT User Limit Info (USER_DATA) + + +# **sapi_v1_blvt_redeem_post** +> SapiV1BlvtRedeemPost200Response sapi_v1_blvt_redeem_post(token_name, amount, timestamp, signature, recv_window=recv_window) + +Redeem BLVT (USER_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_blvt_redeem_post200_response import SapiV1BlvtRedeemPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.BLVTApi(api_client) + token_name = 'token_name_example' # str | BTCDOWN, BTCUP + amount = 1.01 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Redeem BLVT (USER_DATA) + api_response = api_instance.sapi_v1_blvt_redeem_post(token_name, amount, timestamp, signature, recv_window=recv_window) + print("The response of BLVTApi->sapi_v1_blvt_redeem_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BLVTApi->sapi_v1_blvt_redeem_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token_name** | **str**| BTCDOWN, BTCUP | + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1BlvtRedeemPost200Response**](SapiV1BlvtRedeemPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Redemption record | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_blvt_redeem_record_get** +> List[SapiV1BlvtRedeemRecordGet200ResponseInner] sapi_v1_blvt_redeem_record_get(timestamp, signature, token_name=token_name, id=id, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + +Redemption Record (USER_DATA) + +- Only the data of the latest 90 days is available Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_blvt_redeem_record_get200_response_inner import SapiV1BlvtRedeemRecordGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.BLVTApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + token_name = 'token_name_example' # str | BTCDOWN, BTCUP (optional) + id = 56 # int | (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 56 # int | default 1000, max 1000 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Redemption Record (USER_DATA) + api_response = api_instance.sapi_v1_blvt_redeem_record_get(timestamp, signature, token_name=token_name, id=id, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + print("The response of BLVTApi->sapi_v1_blvt_redeem_record_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BLVTApi->sapi_v1_blvt_redeem_record_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **token_name** | **str**| BTCDOWN, BTCUP | [optional] + **id** | **int**| | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| default 1000, max 1000 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1BlvtRedeemRecordGet200ResponseInner]**](SapiV1BlvtRedeemRecordGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of redemption record | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_blvt_subscribe_post** +> SapiV1BlvtSubscribePost200Response sapi_v1_blvt_subscribe_post(token_name, cost, timestamp, signature, recv_window=recv_window) + +Subscribe BLVT (USER_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_blvt_subscribe_post200_response import SapiV1BlvtSubscribePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.BLVTApi(api_client) + token_name = 'token_name_example' # str | BTCDOWN, BTCUP + cost = 3.4 # float | Spot balance + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Subscribe BLVT (USER_DATA) + api_response = api_instance.sapi_v1_blvt_subscribe_post(token_name, cost, timestamp, signature, recv_window=recv_window) + print("The response of BLVTApi->sapi_v1_blvt_subscribe_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BLVTApi->sapi_v1_blvt_subscribe_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token_name** | **str**| BTCDOWN, BTCUP | + **cost** | **float**| Spot balance | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1BlvtSubscribePost200Response**](SapiV1BlvtSubscribePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Subscription Info | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_blvt_subscribe_record_get** +> SapiV1BlvtSubscribeRecordGet200Response sapi_v1_blvt_subscribe_record_get(timestamp, signature, token_name=token_name, id=id, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + +Query Subscription Record (USER_DATA) + +- Only the data of the latest 90 days is available Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_blvt_subscribe_record_get200_response import SapiV1BlvtSubscribeRecordGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.BLVTApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + token_name = 'token_name_example' # str | BTCDOWN, BTCUP (optional) + id = 56 # int | (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Subscription Record (USER_DATA) + api_response = api_instance.sapi_v1_blvt_subscribe_record_get(timestamp, signature, token_name=token_name, id=id, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + print("The response of BLVTApi->sapi_v1_blvt_subscribe_record_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BLVTApi->sapi_v1_blvt_subscribe_record_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **token_name** | **str**| BTCDOWN, BTCUP | [optional] + **id** | **int**| | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1BlvtSubscribeRecordGet200Response**](SapiV1BlvtSubscribeRecordGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of subscription record | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_blvt_token_info_get** +> List[SapiV1BlvtTokenInfoGet200ResponseInner] sapi_v1_blvt_token_info_get(token_name=token_name) + +BLVT Info (MARKET_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_blvt_token_info_get200_response_inner import SapiV1BlvtTokenInfoGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.BLVTApi(api_client) + token_name = 'token_name_example' # str | BTCDOWN, BTCUP (optional) + + try: + # BLVT Info (MARKET_DATA) + api_response = api_instance.sapi_v1_blvt_token_info_get(token_name=token_name) + print("The response of BLVTApi->sapi_v1_blvt_token_info_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BLVTApi->sapi_v1_blvt_token_info_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token_name** | **str**| BTCDOWN, BTCUP | [optional] + +### Return type + +[**List[SapiV1BlvtTokenInfoGet200ResponseInner]**](SapiV1BlvtTokenInfoGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of token information | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_blvt_user_limit_get** +> List[SapiV1BlvtUserLimitGet200ResponseInner] sapi_v1_blvt_user_limit_get(timestamp, signature, token_name=token_name, recv_window=recv_window) + +BLVT User Limit Info (USER_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_blvt_user_limit_get200_response_inner import SapiV1BlvtUserLimitGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.BLVTApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + token_name = 'token_name_example' # str | BTCDOWN, BTCUP (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # BLVT User Limit Info (USER_DATA) + api_response = api_instance.sapi_v1_blvt_user_limit_get(timestamp, signature, token_name=token_name, recv_window=recv_window) + print("The response of BLVTApi->sapi_v1_blvt_user_limit_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BLVTApi->sapi_v1_blvt_user_limit_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **token_name** | **str**| BTCDOWN, BTCUP | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1BlvtUserLimitGet200ResponseInner]**](SapiV1BlvtUserLimitGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of token limits | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/BnbBurnStatus.md b/target/python/binance_openapi/docs/BnbBurnStatus.md new file mode 100644 index 0000000..01a825c --- /dev/null +++ b/target/python/binance_openapi/docs/BnbBurnStatus.md @@ -0,0 +1,30 @@ +# BnbBurnStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spot_bnb_burn** | **bool** | | +**interest_bnb_burn** | **bool** | | + +## Example + +```python +from openapi_client.models.bnb_burn_status import BnbBurnStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of BnbBurnStatus from a JSON string +bnb_burn_status_instance = BnbBurnStatus.from_json(json) +# print the JSON string representation of the object +print(BnbBurnStatus.to_json()) + +# convert the object into a dict +bnb_burn_status_dict = bnb_burn_status_instance.to_dict() +# create an instance of BnbBurnStatus from a dict +bnb_burn_status_from_dict = BnbBurnStatus.from_dict(bnb_burn_status_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/BookTicker.md b/target/python/binance_openapi/docs/BookTicker.md new file mode 100644 index 0000000..93bb304 --- /dev/null +++ b/target/python/binance_openapi/docs/BookTicker.md @@ -0,0 +1,33 @@ +# BookTicker + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**bid_price** | **str** | | +**bid_qty** | **str** | | +**ask_price** | **str** | | +**ask_qty** | **str** | | + +## Example + +```python +from openapi_client.models.book_ticker import BookTicker + +# TODO update the JSON string below +json = "{}" +# create an instance of BookTicker from a JSON string +book_ticker_instance = BookTicker.from_json(json) +# print the JSON string representation of the object +print(BookTicker.to_json()) + +# convert the object into a dict +book_ticker_dict = book_ticker_instance.to_dict() +# create an instance of BookTicker from a dict +book_ticker_from_dict = BookTicker.from_dict(book_ticker_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/C2CApi.md b/target/python/binance_openapi/docs/C2CApi.md new file mode 100644 index 0000000..5c1b968 --- /dev/null +++ b/target/python/binance_openapi/docs/C2CApi.md @@ -0,0 +1,104 @@ +# openapi_client.C2CApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_c2c_order_match_list_user_order_history_get**](C2CApi.md#sapi_v1_c2c_order_match_list_user_order_history_get) | **GET** /sapi/v1/c2c/orderMatch/listUserOrderHistory | Get C2C Trade History (USER_DATA) + + +# **sapi_v1_c2c_order_match_list_user_order_history_get** +> SapiV1C2cOrderMatchListUserOrderHistoryGet200Response sapi_v1_c2c_order_match_list_user_order_history_get(trade_type, timestamp, signature, start_timestamp=start_timestamp, end_timestamp=end_timestamp, page=page, rows=rows, recv_window=recv_window) + +Get C2C Trade History (USER_DATA) + +- If startTimestamp and endTimestamp are not sent, the recent 30-day data will be returned. - The max interval between startTimestamp and endTimestamp is 30 days. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_c2c_order_match_list_user_order_history_get200_response import SapiV1C2cOrderMatchListUserOrderHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.C2CApi(api_client) + trade_type = 'trade_type_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_timestamp = 56 # int | UTC timestamp in ms (optional) + end_timestamp = 56 # int | UTC timestamp in ms (optional) + page = 1 # int | Default 1 (optional) + rows = 56 # int | default 100, max 100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get C2C Trade History (USER_DATA) + api_response = api_instance.sapi_v1_c2c_order_match_list_user_order_history_get(trade_type, timestamp, signature, start_timestamp=start_timestamp, end_timestamp=end_timestamp, page=page, rows=rows, recv_window=recv_window) + print("The response of C2CApi->sapi_v1_c2c_order_match_list_user_order_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling C2CApi->sapi_v1_c2c_order_match_list_user_order_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trade_type** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_timestamp** | **int**| UTC timestamp in ms | [optional] + **end_timestamp** | **int**| UTC timestamp in ms | [optional] + **page** | **int**| Default 1 | [optional] + **rows** | **int**| default 100, max 100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1C2cOrderMatchListUserOrderHistoryGet200Response**](SapiV1C2cOrderMatchListUserOrderHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Trades history | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/CanceledMarginOrderDetail.md b/target/python/binance_openapi/docs/CanceledMarginOrderDetail.md new file mode 100644 index 0000000..4dc58f5 --- /dev/null +++ b/target/python/binance_openapi/docs/CanceledMarginOrderDetail.md @@ -0,0 +1,42 @@ +# CanceledMarginOrderDetail + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**is_isolated** | **bool** | | +**orig_client_order_id** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**client_order_id** | **str** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | + +## Example + +```python +from openapi_client.models.canceled_margin_order_detail import CanceledMarginOrderDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of CanceledMarginOrderDetail from a JSON string +canceled_margin_order_detail_instance = CanceledMarginOrderDetail.from_json(json) +# print the JSON string representation of the object +print(CanceledMarginOrderDetail.to_json()) + +# convert the object into a dict +canceled_margin_order_detail_dict = canceled_margin_order_detail_instance.to_dict() +# create an instance of CanceledMarginOrderDetail from a dict +canceled_margin_order_detail_from_dict = CanceledMarginOrderDetail.from_dict(canceled_margin_order_detail_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/ConvertApi.md b/target/python/binance_openapi/docs/ConvertApi.md new file mode 100644 index 0000000..1f6b4df --- /dev/null +++ b/target/python/binance_openapi/docs/ConvertApi.md @@ -0,0 +1,811 @@ +# openapi_client.ConvertApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_convert_accept_quote_post**](ConvertApi.md#sapi_v1_convert_accept_quote_post) | **POST** /sapi/v1/convert/acceptQuote | Accept Quote (TRADE) +[**sapi_v1_convert_asset_info_get**](ConvertApi.md#sapi_v1_convert_asset_info_get) | **GET** /sapi/v1/convert/assetInfo | Query order quantity precision per asset (USER_DATA) +[**sapi_v1_convert_exchange_info_get**](ConvertApi.md#sapi_v1_convert_exchange_info_get) | **GET** /sapi/v1/convert/exchangeInfo | List All Convert Pairs +[**sapi_v1_convert_get_quote_post**](ConvertApi.md#sapi_v1_convert_get_quote_post) | **POST** /sapi/v1/convert/getQuote | Send quote request (USER_DATA) +[**sapi_v1_convert_limit_cancel_order_post**](ConvertApi.md#sapi_v1_convert_limit_cancel_order_post) | **POST** /sapi/v1/convert/limit/cancelOrder | Cancel limit order (USER_DATA) +[**sapi_v1_convert_limit_place_order_post**](ConvertApi.md#sapi_v1_convert_limit_place_order_post) | **POST** /sapi/v1/convert/limit/placeOrder | Place limit order (USER_DATA) +[**sapi_v1_convert_limit_query_open_orders_get**](ConvertApi.md#sapi_v1_convert_limit_query_open_orders_get) | **GET** /sapi/v1/convert/limit/queryOpenOrders | Query limit open orders (USER_DATA) +[**sapi_v1_convert_order_status_get**](ConvertApi.md#sapi_v1_convert_order_status_get) | **GET** /sapi/v1/convert/orderStatus | Order status (USER_DATA) +[**sapi_v1_convert_trade_flow_get**](ConvertApi.md#sapi_v1_convert_trade_flow_get) | **GET** /sapi/v1/convert/tradeFlow | Get Convert Trade History (USER_DATA) + + +# **sapi_v1_convert_accept_quote_post** +> SapiV1ConvertAcceptQuotePost200Response sapi_v1_convert_accept_quote_post(quote_id, timestamp, signature, recv_window=recv_window) + +Accept Quote (TRADE) + +Accept the offered quote by quote ID. Weight(UID): 500 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_convert_accept_quote_post200_response import SapiV1ConvertAcceptQuotePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.ConvertApi(api_client) + quote_id = '1000' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Accept Quote (TRADE) + api_response = api_instance.sapi_v1_convert_accept_quote_post(quote_id, timestamp, signature, recv_window=recv_window) + print("The response of ConvertApi->sapi_v1_convert_accept_quote_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConvertApi->sapi_v1_convert_accept_quote_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **quote_id** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ConvertAcceptQuotePost200Response**](SapiV1ConvertAcceptQuotePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Accept Quote | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_convert_asset_info_get** +> List[SapiV1ConvertAssetInfoGet200ResponseInner] sapi_v1_convert_asset_info_get(timestamp, signature, recv_window=recv_window) + +Query order quantity precision per asset (USER_DATA) + +Query for supported asset precision information Weight(IP): 100 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_convert_asset_info_get200_response_inner import SapiV1ConvertAssetInfoGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.ConvertApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query order quantity precision per asset (USER_DATA) + api_response = api_instance.sapi_v1_convert_asset_info_get(timestamp, signature, recv_window=recv_window) + print("The response of ConvertApi->sapi_v1_convert_asset_info_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConvertApi->sapi_v1_convert_asset_info_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1ConvertAssetInfoGet200ResponseInner]**](SapiV1ConvertAssetInfoGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Asset Precision Information | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_convert_exchange_info_get** +> List[SapiV1ConvertExchangeInfoGet200ResponseInner] sapi_v1_convert_exchange_info_get(from_asset=from_asset, to_asset=to_asset) + +List All Convert Pairs + +Query for all convertible token pairs and the tokens’ respective upper/lower limits Weight(IP): 3000 + +### Example + + +```python +import openapi_client +from openapi_client.models.sapi_v1_convert_exchange_info_get200_response_inner import SapiV1ConvertExchangeInfoGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.ConvertApi(api_client) + from_asset = 'BTC' # str | User spends coin (optional) + to_asset = 'USDT' # str | User receives coin (optional) + + try: + # List All Convert Pairs + api_response = api_instance.sapi_v1_convert_exchange_info_get(from_asset=from_asset, to_asset=to_asset) + print("The response of ConvertApi->sapi_v1_convert_exchange_info_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConvertApi->sapi_v1_convert_exchange_info_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **from_asset** | **str**| User spends coin | [optional] + **to_asset** | **str**| User receives coin | [optional] + +### Return type + +[**List[SapiV1ConvertExchangeInfoGet200ResponseInner]**](SapiV1ConvertExchangeInfoGet200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List Convert Pairs | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_convert_get_quote_post** +> SapiV1ConvertGetQuotePost200Response sapi_v1_convert_get_quote_post(from_asset, to_asset, timestamp, signature, from_amount=from_amount, to_amount=to_amount, valid_time=valid_time, wallet_type=wallet_type, recv_window=recv_window) + +Send quote request (USER_DATA) + +Request a quote for the requested token pairs Weight(UID): 200 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_convert_get_quote_post200_response import SapiV1ConvertGetQuotePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.ConvertApi(api_client) + from_asset = 'BTC' # str | + to_asset = 'USDT' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + from_amount = 1.0 # float | When specified, it is the amount you will be debited after the conversion (optional) + to_amount = 1.0 # float | When specified, it is the amount you will be debited after the conversion (optional) + valid_time = '10s' # str | 10s, 30s, 1m, 2m, default 10s (optional) + wallet_type = 'SPOT' # str | SPOT or FUNDING. Default is SPOT (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Send quote request (USER_DATA) + api_response = api_instance.sapi_v1_convert_get_quote_post(from_asset, to_asset, timestamp, signature, from_amount=from_amount, to_amount=to_amount, valid_time=valid_time, wallet_type=wallet_type, recv_window=recv_window) + print("The response of ConvertApi->sapi_v1_convert_get_quote_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConvertApi->sapi_v1_convert_get_quote_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **from_asset** | **str**| | + **to_asset** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **from_amount** | **float**| When specified, it is the amount you will be debited after the conversion | [optional] + **to_amount** | **float**| When specified, it is the amount you will be debited after the conversion | [optional] + **valid_time** | **str**| 10s, 30s, 1m, 2m, default 10s | [optional] + **wallet_type** | **str**| SPOT or FUNDING. Default is SPOT | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ConvertGetQuotePost200Response**](SapiV1ConvertGetQuotePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Quote Request | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_convert_limit_cancel_order_post** +> SapiV1ConvertLimitCancelOrderPost200Response sapi_v1_convert_limit_cancel_order_post(order_id, timestamp, signature, recv_window=recv_window) + +Cancel limit order (USER_DATA) + +Enable users to cancel a limit order Weight(UID): 200 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_convert_limit_cancel_order_post200_response import SapiV1ConvertLimitCancelOrderPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.ConvertApi(api_client) + order_id = 1603680255057330400 # int | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Cancel limit order (USER_DATA) + api_response = api_instance.sapi_v1_convert_limit_cancel_order_post(order_id, timestamp, signature, recv_window=recv_window) + print("The response of ConvertApi->sapi_v1_convert_limit_cancel_order_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConvertApi->sapi_v1_convert_limit_cancel_order_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **int**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ConvertLimitCancelOrderPost200Response**](SapiV1ConvertLimitCancelOrderPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cancel Order | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_convert_limit_place_order_post** +> SapiV1ConvertLimitPlaceOrderPost200Response sapi_v1_convert_limit_place_order_post(base_asset, quote_asset, limit_price, side, timestamp, signature, base_amount=base_amount, quote_amount=quote_amount, wallet_type=wallet_type, expired_type=expired_type, recv_window=recv_window) + +Place limit order (USER_DATA) + +Enable users to place a limit order - baseAsset or quoteAsset can be determined via exchangeInfo endpoint. - Limit price is defined from baseAsset to quoteAsset. - Either baseAmount or quoteAmount is used. Weight(UID): 500 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_convert_limit_place_order_post200_response import SapiV1ConvertLimitPlaceOrderPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.ConvertApi(api_client) + base_asset = 'BUSD' # str | + quote_asset = 'USDT' # str | + limit_price = 3.4 # float | Symbol limit price (from baseAsset to quoteAsset) + side = 'SELL' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + base_amount = 3.4 # float | Base asset amount. (One of baseAmount or quoteAmount is required) (optional) + quote_amount = 3.4 # float | Quote asset amount. (One of baseAmount or quoteAmount is required) (optional) + wallet_type = 'SPOT' # str | SPOT or FUNDING or SPOT_FUNDING. It is to use which type of assets. Default is SPOT. (optional) + expired_type = '1_D' # str | 1_D, 3_D, 7_D, 30_D (D means day) (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Place limit order (USER_DATA) + api_response = api_instance.sapi_v1_convert_limit_place_order_post(base_asset, quote_asset, limit_price, side, timestamp, signature, base_amount=base_amount, quote_amount=quote_amount, wallet_type=wallet_type, expired_type=expired_type, recv_window=recv_window) + print("The response of ConvertApi->sapi_v1_convert_limit_place_order_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConvertApi->sapi_v1_convert_limit_place_order_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **base_asset** | **str**| | + **quote_asset** | **str**| | + **limit_price** | **float**| Symbol limit price (from baseAsset to quoteAsset) | + **side** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **base_amount** | **float**| Base asset amount. (One of baseAmount or quoteAmount is required) | [optional] + **quote_amount** | **float**| Quote asset amount. (One of baseAmount or quoteAmount is required) | [optional] + **wallet_type** | **str**| SPOT or FUNDING or SPOT_FUNDING. It is to use which type of assets. Default is SPOT. | [optional] + **expired_type** | **str**| 1_D, 3_D, 7_D, 30_D (D means day) | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ConvertLimitPlaceOrderPost200Response**](SapiV1ConvertLimitPlaceOrderPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_convert_limit_query_open_orders_get** +> SapiV1ConvertLimitQueryOpenOrdersGet200Response sapi_v1_convert_limit_query_open_orders_get(timestamp, signature, recv_window=recv_window) + +Query limit open orders (USER_DATA) + +Enable users to query for all existing limit orders Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_convert_limit_query_open_orders_get200_response import SapiV1ConvertLimitQueryOpenOrdersGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.ConvertApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query limit open orders (USER_DATA) + api_response = api_instance.sapi_v1_convert_limit_query_open_orders_get(timestamp, signature, recv_window=recv_window) + print("The response of ConvertApi->sapi_v1_convert_limit_query_open_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConvertApi->sapi_v1_convert_limit_query_open_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ConvertLimitQueryOpenOrdersGet200Response**](SapiV1ConvertLimitQueryOpenOrdersGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | All existing limit orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_convert_order_status_get** +> SapiV1ConvertOrderStatusGet200Response sapi_v1_convert_order_status_get(timestamp, signature, order_id=order_id, quote_id=quote_id, recv_window=recv_window) + +Order status (USER_DATA) + +Query order status by order ID. Weight(UID): 100 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_convert_order_status_get200_response import SapiV1ConvertOrderStatusGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.ConvertApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = '1000' # str | (optional) + quote_id = '1000' # str | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Order status (USER_DATA) + api_response = api_instance.sapi_v1_convert_order_status_get(timestamp, signature, order_id=order_id, quote_id=quote_id, recv_window=recv_window) + print("The response of ConvertApi->sapi_v1_convert_order_status_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConvertApi->sapi_v1_convert_order_status_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **str**| | [optional] + **quote_id** | **str**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ConvertOrderStatusGet200Response**](SapiV1ConvertOrderStatusGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order Status | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_convert_trade_flow_get** +> SapiV1ConvertTradeFlowGet200Response sapi_v1_convert_trade_flow_get(start_time, end_time, timestamp, signature, limit=limit, recv_window=recv_window) + +Get Convert Trade History (USER_DATA) + +- The max interval between startTime and endTime is 30 days. Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_convert_trade_flow_get200_response import SapiV1ConvertTradeFlowGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.ConvertApi(api_client) + start_time = 1624248872184 # int | UTC timestamp in ms + end_time = 1624248872185 # int | UTC timestamp in ms + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + limit = 100 # int | default 100, max 1000 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Convert Trade History (USER_DATA) + api_response = api_instance.sapi_v1_convert_trade_flow_get(start_time, end_time, timestamp, signature, limit=limit, recv_window=recv_window) + print("The response of ConvertApi->sapi_v1_convert_trade_flow_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConvertApi->sapi_v1_convert_trade_flow_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start_time** | **int**| UTC timestamp in ms | + **end_time** | **int**| UTC timestamp in ms | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **limit** | **int**| default 100, max 1000 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ConvertTradeFlowGet200Response**](SapiV1ConvertTradeFlowGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Convert Trade History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/CryptoLoansApi.md b/target/python/binance_openapi/docs/CryptoLoansApi.md new file mode 100644 index 0000000..42d884c --- /dev/null +++ b/target/python/binance_openapi/docs/CryptoLoansApi.md @@ -0,0 +1,1994 @@ +# openapi_client.CryptoLoansApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_loan_adjust_ltv_post**](CryptoLoansApi.md#sapi_v1_loan_adjust_ltv_post) | **POST** /sapi/v1/loan/adjust/ltv | Crypto Loan Adjust LTV (TRADE) +[**sapi_v1_loan_borrow_history_get**](CryptoLoansApi.md#sapi_v1_loan_borrow_history_get) | **GET** /sapi/v1/loan/borrow/history | Get Crypto Loans Borrow History (USER_DATA) +[**sapi_v1_loan_borrow_post**](CryptoLoansApi.md#sapi_v1_loan_borrow_post) | **POST** /sapi/v1/loan/borrow | Crypto Loan Borrow (TRADE) +[**sapi_v1_loan_collateral_data_get**](CryptoLoansApi.md#sapi_v1_loan_collateral_data_get) | **GET** /sapi/v1/loan/collateral/data | Get Collateral Assets Data (USER_DATA) +[**sapi_v1_loan_customize_margin_call_post**](CryptoLoansApi.md#sapi_v1_loan_customize_margin_call_post) | **POST** /sapi/v1/loan/customize/margin_call | Crypto Loan Customize Margin Call (TRADE) +[**sapi_v1_loan_income_get**](CryptoLoansApi.md#sapi_v1_loan_income_get) | **GET** /sapi/v1/loan/income | Get Crypto Loans Income History (USER_DATA) +[**sapi_v1_loan_loanable_data_get**](CryptoLoansApi.md#sapi_v1_loan_loanable_data_get) | **GET** /sapi/v1/loan/loanable/data | Get Loanable Assets Data (USER_DATA) +[**sapi_v1_loan_ltv_adjustment_history_get**](CryptoLoansApi.md#sapi_v1_loan_ltv_adjustment_history_get) | **GET** /sapi/v1/loan/ltv/adjustment/history | Get Loan LTV Adjustment History (USER_DATA) +[**sapi_v1_loan_ongoing_orders_get**](CryptoLoansApi.md#sapi_v1_loan_ongoing_orders_get) | **GET** /sapi/v1/loan/ongoing/orders | Get Loan Ongoing Orders (USER_DATA) +[**sapi_v1_loan_repay_collateral_rate_get**](CryptoLoansApi.md#sapi_v1_loan_repay_collateral_rate_get) | **GET** /sapi/v1/loan/repay/collateral/rate | Check Collateral Repay Rate (USER_DATA) +[**sapi_v1_loan_repay_history_get**](CryptoLoansApi.md#sapi_v1_loan_repay_history_get) | **GET** /sapi/v1/loan/repay/history | Get Loan Repayment History (USER_DATA) +[**sapi_v1_loan_repay_post**](CryptoLoansApi.md#sapi_v1_loan_repay_post) | **POST** /sapi/v1/loan/repay | Crypto Loan Repay (TRADE) +[**sapi_v2_loan_flexible_adjust_ltv_post**](CryptoLoansApi.md#sapi_v2_loan_flexible_adjust_ltv_post) | **POST** /sapi/v2/loan/flexible/adjust/ltv | Adjust LTV - Flexible Loan Adjust LTV (TRADE) +[**sapi_v2_loan_flexible_borrow_history_get**](CryptoLoansApi.md#sapi_v2_loan_flexible_borrow_history_get) | **GET** /sapi/v2/loan/flexible/borrow/history | Borrow - Get Flexible Loan Borrow History (USER_DATA) +[**sapi_v2_loan_flexible_borrow_post**](CryptoLoansApi.md#sapi_v2_loan_flexible_borrow_post) | **POST** /sapi/v2/loan/flexible/borrow | Borrow - Flexible Loan Borrow (TRADE) +[**sapi_v2_loan_flexible_collateral_data_get**](CryptoLoansApi.md#sapi_v2_loan_flexible_collateral_data_get) | **GET** /sapi/v2/loan/flexible/collateral/data | Get Flexible Loan Collateral Assets Data (USER_DATA) +[**sapi_v2_loan_flexible_loanable_data_get**](CryptoLoansApi.md#sapi_v2_loan_flexible_loanable_data_get) | **GET** /sapi/v2/loan/flexible/loanable/data | Get Flexible Loan Assets Data (USER_DATA) +[**sapi_v2_loan_flexible_ltv_adjustment_history_get**](CryptoLoansApi.md#sapi_v2_loan_flexible_ltv_adjustment_history_get) | **GET** /sapi/v2/loan/flexible/ltv/adjustment/history | Adjust LTV - Get Flexible Loan LTV Adjustment History (USER_DATA) +[**sapi_v2_loan_flexible_ongoing_orders_get**](CryptoLoansApi.md#sapi_v2_loan_flexible_ongoing_orders_get) | **GET** /sapi/v2/loan/flexible/ongoing/orders | Borrow - Get Flexible Loan Ongoing Orders (USER_DATA) +[**sapi_v2_loan_flexible_repay_history_get**](CryptoLoansApi.md#sapi_v2_loan_flexible_repay_history_get) | **GET** /sapi/v2/loan/flexible/repay/history | Repay - Get Flexible Loan Repayment History (USER_DATA) +[**sapi_v2_loan_flexible_repay_post**](CryptoLoansApi.md#sapi_v2_loan_flexible_repay_post) | **POST** /sapi/v2/loan/flexible/repay | Repay - Flexible Loan Repay (TRADE) + + +# **sapi_v1_loan_adjust_ltv_post** +> SapiV1LoanAdjustLtvPost200Response sapi_v1_loan_adjust_ltv_post(order_id, amount, direction, timestamp, signature, recv_window=recv_window) + +Crypto Loan Adjust LTV (TRADE) + +Weight(UID): 6000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_adjust_ltv_post200_response import SapiV1LoanAdjustLtvPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + order_id = 123456789 # int | Order ID + amount = 100.5 # float | Amount + direction = 'ADDITIONAL' # str | 'ADDITIONAL', 'REDUCED' + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Crypto Loan Adjust LTV (TRADE) + api_response = api_instance.sapi_v1_loan_adjust_ltv_post(order_id, amount, direction, timestamp, signature, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v1_loan_adjust_ltv_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v1_loan_adjust_ltv_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **int**| Order ID | + **amount** | **float**| Amount | + **direction** | **str**| 'ADDITIONAL', 'REDUCED' | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanAdjustLtvPost200Response**](SapiV1LoanAdjustLtvPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | LTV Adjust | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_borrow_history_get** +> SapiV1LoanBorrowHistoryGet200Response sapi_v1_loan_borrow_history_get(timestamp, signature, order_id=order_id, loan_coin=loan_coin, collateral_coin=collateral_coin, start_time=start_time, end_time=end_time, current=current, limit=limit, recv_window=recv_window) + +Get Crypto Loans Borrow History (USER_DATA) + +- If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_borrow_history_get200_response import SapiV1LoanBorrowHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = 10 # int | orderId in POST /sapi/v1/loan/borrow (optional) + loan_coin = 'BUSD' # str | Coin loaned (optional) + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + limit = 10 # int | default 10, max 100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Crypto Loans Borrow History (USER_DATA) + api_response = api_instance.sapi_v1_loan_borrow_history_get(timestamp, signature, order_id=order_id, loan_coin=loan_coin, collateral_coin=collateral_coin, start_time=start_time, end_time=end_time, current=current, limit=limit, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v1_loan_borrow_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v1_loan_borrow_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **int**| orderId in POST /sapi/v1/loan/borrow | [optional] + **loan_coin** | **str**| Coin loaned | [optional] + **collateral_coin** | **str**| Coin used as collateral | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **limit** | **int**| default 10, max 100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanBorrowHistoryGet200Response**](SapiV1LoanBorrowHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Borrow History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_borrow_post** +> SapiV1LoanBorrowPost200Response sapi_v1_loan_borrow_post(loan_coin, collateral_coin, loan_term, timestamp, signature, loan_amount=loan_amount, collateral_amount=collateral_amount, recv_window=recv_window) + +Crypto Loan Borrow (TRADE) + +Weight(UID): 6000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_borrow_post200_response import SapiV1LoanBorrowPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + loan_coin = 'BUSD' # str | Coin loaned + collateral_coin = 'BNB' # str | Coin used as collateral + loan_term = 30 # int | 7/14/30/90/180 days + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + loan_amount = 100.1 # float | Loan amount (optional) + collateral_amount = 50.5 # float | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Crypto Loan Borrow (TRADE) + api_response = api_instance.sapi_v1_loan_borrow_post(loan_coin, collateral_coin, loan_term, timestamp, signature, loan_amount=loan_amount, collateral_amount=collateral_amount, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v1_loan_borrow_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v1_loan_borrow_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loan_coin** | **str**| Coin loaned | + **collateral_coin** | **str**| Coin used as collateral | + **loan_term** | **int**| 7/14/30/90/180 days | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **loan_amount** | **float**| Loan amount | [optional] + **collateral_amount** | **float**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanBorrowPost200Response**](SapiV1LoanBorrowPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Borrow Information | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_collateral_data_get** +> SapiV1LoanCollateralDataGet200Response sapi_v1_loan_collateral_data_get(timestamp, signature, collateral_coin=collateral_coin, vip_level=vip_level, recv_window=recv_window) + +Get Collateral Assets Data (USER_DATA) + +Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_collateral_data_get200_response import SapiV1LoanCollateralDataGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + vip_level = 1 # int | Defaults to user's vip level (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Collateral Assets Data (USER_DATA) + api_response = api_instance.sapi_v1_loan_collateral_data_get(timestamp, signature, collateral_coin=collateral_coin, vip_level=vip_level, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v1_loan_collateral_data_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v1_loan_collateral_data_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **collateral_coin** | **str**| Coin used as collateral | [optional] + **vip_level** | **int**| Defaults to user's vip level | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanCollateralDataGet200Response**](SapiV1LoanCollateralDataGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collateral Assets Data | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_customize_margin_call_post** +> SapiV1LoanCustomizeMarginCallPost200Response sapi_v1_loan_customize_margin_call_post(margin_call, timestamp, signature, order_id=order_id, collateral_coin=collateral_coin, recv_window=recv_window) + +Crypto Loan Customize Margin Call (TRADE) + +Customize margin call for ongoing orders only. Weight(UID): 6000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_customize_margin_call_post200_response import SapiV1LoanCustomizeMarginCallPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + margin_call = 3.4 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = 56 # int | Mandatory when collateralCoin is empty. Send either orderId or collateralCoin, if both parameters are sent, take orderId only. (optional) + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Crypto Loan Customize Margin Call (TRADE) + api_response = api_instance.sapi_v1_loan_customize_margin_call_post(margin_call, timestamp, signature, order_id=order_id, collateral_coin=collateral_coin, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v1_loan_customize_margin_call_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v1_loan_customize_margin_call_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **margin_call** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **int**| Mandatory when collateralCoin is empty. Send either orderId or collateralCoin, if both parameters are sent, take orderId only. | [optional] + **collateral_coin** | **str**| Coin used as collateral | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanCustomizeMarginCallPost200Response**](SapiV1LoanCustomizeMarginCallPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collateral Assets Data | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_income_get** +> List[SapiV1LoanIncomeGet200ResponseInner] sapi_v1_loan_income_get(timestamp, signature, asset=asset, type=type, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + +Get Crypto Loans Income History (USER_DATA) + +- If startTime and endTime are not sent, the recent 7-day data will be returned. - The max interval between startTime and endTime is 30 days. Weight(UID): 6000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_income_get200_response_inner import SapiV1LoanIncomeGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'BNB' # str | (optional) + type = 'type_example' # str | All types will be returned by default. * `borrowIn` * `collateralSpent` * `repayAmount` * `collateralReturn` - Collateral return after repayment * `addCollateral` * `removeCollateral` * `collateralReturnAfterLiquidation` (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 20 # int | default 20, max 100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Crypto Loans Income History (USER_DATA) + api_response = api_instance.sapi_v1_loan_income_get(timestamp, signature, asset=asset, type=type, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v1_loan_income_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v1_loan_income_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| | [optional] + **type** | **str**| All types will be returned by default. * `borrowIn` * `collateralSpent` * `repayAmount` * `collateralReturn` - Collateral return after repayment * `addCollateral` * `removeCollateral` * `collateralReturnAfterLiquidation` | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| default 20, max 100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1LoanIncomeGet200ResponseInner]**](SapiV1LoanIncomeGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Loan History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_loanable_data_get** +> SapiV1LoanLoanableDataGet200Response sapi_v1_loan_loanable_data_get(timestamp, signature, loan_coin=loan_coin, vip_level=vip_level, recv_window=recv_window) + +Get Loanable Assets Data (USER_DATA) + +Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_loanable_data_get200_response import SapiV1LoanLoanableDataGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + loan_coin = 'BUSD' # str | Coin loaned (optional) + vip_level = 1 # int | Defaults to user's vip level (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Loanable Assets Data (USER_DATA) + api_response = api_instance.sapi_v1_loan_loanable_data_get(timestamp, signature, loan_coin=loan_coin, vip_level=vip_level, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v1_loan_loanable_data_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v1_loan_loanable_data_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **loan_coin** | **str**| Coin loaned | [optional] + **vip_level** | **int**| Defaults to user's vip level | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanLoanableDataGet200Response**](SapiV1LoanLoanableDataGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Loanable Assets Data | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_ltv_adjustment_history_get** +> SapiV1LoanLtvAdjustmentHistoryGet200Response sapi_v1_loan_ltv_adjustment_history_get(timestamp, signature, order_id=order_id, loan_coin=loan_coin, collateral_coin=collateral_coin, start_time=start_time, end_time=end_time, current=current, limit=limit, recv_window=recv_window) + +Get Loan LTV Adjustment History (USER_DATA) + +If startTime and endTime are not sent, the recent 90-day data will be returned. The max interval between startTime and endTime is 180 days. Weight(IP): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_ltv_adjustment_history_get200_response import SapiV1LoanLtvAdjustmentHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = 10 # int | Order ID (optional) + loan_coin = 'BUSD' # str | Coin loaned (optional) + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + limit = 10 # int | default 10, max 100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Loan LTV Adjustment History (USER_DATA) + api_response = api_instance.sapi_v1_loan_ltv_adjustment_history_get(timestamp, signature, order_id=order_id, loan_coin=loan_coin, collateral_coin=collateral_coin, start_time=start_time, end_time=end_time, current=current, limit=limit, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v1_loan_ltv_adjustment_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v1_loan_ltv_adjustment_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **int**| Order ID | [optional] + **loan_coin** | **str**| Coin loaned | [optional] + **collateral_coin** | **str**| Coin used as collateral | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **limit** | **int**| default 10, max 100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanLtvAdjustmentHistoryGet200Response**](SapiV1LoanLtvAdjustmentHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | LTV Adjustment History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_ongoing_orders_get** +> SapiV1LoanOngoingOrdersGet200Response sapi_v1_loan_ongoing_orders_get(timestamp, signature, order_id=order_id, loan_coin=loan_coin, collateral_coin=collateral_coin, current=current, limit=limit, recv_window=recv_window) + +Get Loan Ongoing Orders (USER_DATA) + +Weight(IP): 300 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_ongoing_orders_get200_response import SapiV1LoanOngoingOrdersGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = 10 # int | orderId in POST /sapi/v1/loan/borrow (optional) + loan_coin = 'BUSD' # str | Coin loaned (optional) + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + current = 1 # int | Current querying page. Start from 1; default:1, max:1000 (optional) + limit = 10 # int | default 10, max 100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Loan Ongoing Orders (USER_DATA) + api_response = api_instance.sapi_v1_loan_ongoing_orders_get(timestamp, signature, order_id=order_id, loan_coin=loan_coin, collateral_coin=collateral_coin, current=current, limit=limit, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v1_loan_ongoing_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v1_loan_ongoing_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **int**| orderId in POST /sapi/v1/loan/borrow | [optional] + **loan_coin** | **str**| Coin loaned | [optional] + **collateral_coin** | **str**| Coin used as collateral | [optional] + **current** | **int**| Current querying page. Start from 1; default:1, max:1000 | [optional] + **limit** | **int**| default 10, max 100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanOngoingOrdersGet200Response**](SapiV1LoanOngoingOrdersGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ongoing Orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_repay_collateral_rate_get** +> SapiV1LoanRepayCollateralRateGet200Response sapi_v1_loan_repay_collateral_rate_get(loan_coin, collateral_coin, repay_amount, timestamp, signature, recv_window=recv_window) + +Check Collateral Repay Rate (USER_DATA) + +Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second. Weight(IP): 6000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_repay_collateral_rate_get200_response import SapiV1LoanRepayCollateralRateGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + loan_coin = 'BUSD' # str | Coin loaned + collateral_coin = 'BNB' # str | Coin used as collateral + repay_amount = 3.4 # float | repay amount of loanCoin + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Check Collateral Repay Rate (USER_DATA) + api_response = api_instance.sapi_v1_loan_repay_collateral_rate_get(loan_coin, collateral_coin, repay_amount, timestamp, signature, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v1_loan_repay_collateral_rate_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v1_loan_repay_collateral_rate_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loan_coin** | **str**| Coin loaned | + **collateral_coin** | **str**| Coin used as collateral | + **repay_amount** | **float**| repay amount of loanCoin | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanRepayCollateralRateGet200Response**](SapiV1LoanRepayCollateralRateGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collateral Assets Data | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_repay_history_get** +> SapiV1LoanRepayHistoryGet200Response sapi_v1_loan_repay_history_get(timestamp, signature, order_id=order_id, loan_coin=loan_coin, collateral_coin=collateral_coin, start_time=start_time, end_time=end_time, current=current, limit=limit, recv_window=recv_window) + +Get Loan Repayment History (USER_DATA) + +If startTime and endTime are not sent, the recent 90-day data will be returned. The max interval between startTime and endTime is 180 days. Weight(IP): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_repay_history_get200_response import SapiV1LoanRepayHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = 10 # int | Order ID (optional) + loan_coin = 'BUSD' # str | Coin loaned (optional) + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + limit = 10 # int | default 10, max 100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Loan Repayment History (USER_DATA) + api_response = api_instance.sapi_v1_loan_repay_history_get(timestamp, signature, order_id=order_id, loan_coin=loan_coin, collateral_coin=collateral_coin, start_time=start_time, end_time=end_time, current=current, limit=limit, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v1_loan_repay_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v1_loan_repay_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **int**| Order ID | [optional] + **loan_coin** | **str**| Coin loaned | [optional] + **collateral_coin** | **str**| Coin used as collateral | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **limit** | **int**| default 10, max 100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanRepayHistoryGet200Response**](SapiV1LoanRepayHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Loan Repayment History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_repay_post** +> SapiV1LoanRepayPost200Response sapi_v1_loan_repay_post(order_id, amount, timestamp, signature, type=type, collateral_return=collateral_return, recv_window=recv_window) + +Crypto Loan Repay (TRADE) + +Weight(UID): 6000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_repay_post200_response import SapiV1LoanRepayPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + order_id = 123456789 # int | Order ID + amount = 100.5 # float | Repayment Amount + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + type = 1 # int | Default: 1. 1 for 'repay with borrowed coin'; 2 for 'repay with collateral'. (optional) + collateral_return = true # bool | Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Crypto Loan Repay (TRADE) + api_response = api_instance.sapi_v1_loan_repay_post(order_id, amount, timestamp, signature, type=type, collateral_return=collateral_return, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v1_loan_repay_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v1_loan_repay_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_id** | **int**| Order ID | + **amount** | **float**| Repayment Amount | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **type** | **int**| Default: 1. 1 for 'repay with borrowed coin'; 2 for 'repay with collateral'. | [optional] + **collateral_return** | **bool**| Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanRepayPost200Response**](SapiV1LoanRepayPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Repayment Information | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_loan_flexible_adjust_ltv_post** +> SapiV2LoanFlexibleAdjustLtvPost200Response sapi_v2_loan_flexible_adjust_ltv_post(adjustment_amount, direction, timestamp, signature, loan_coin=loan_coin, collateral_coin=collateral_coin, recv_window=recv_window) + +Adjust LTV - Flexible Loan Adjust LTV (TRADE) + +- API Key needs Spot & Margin Trading permission for this endpoint Weight(UID): 6000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_loan_flexible_adjust_ltv_post200_response import SapiV2LoanFlexibleAdjustLtvPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + adjustment_amount = 3.4 # float | + direction = 'direction_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + loan_coin = 'BUSD' # str | Coin loaned (optional) + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Adjust LTV - Flexible Loan Adjust LTV (TRADE) + api_response = api_instance.sapi_v2_loan_flexible_adjust_ltv_post(adjustment_amount, direction, timestamp, signature, loan_coin=loan_coin, collateral_coin=collateral_coin, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v2_loan_flexible_adjust_ltv_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v2_loan_flexible_adjust_ltv_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **adjustment_amount** | **float**| | + **direction** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **loan_coin** | **str**| Coin loaned | [optional] + **collateral_coin** | **str**| Coin used as collateral | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2LoanFlexibleAdjustLtvPost200Response**](SapiV2LoanFlexibleAdjustLtvPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | adjust LTV result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_loan_flexible_borrow_history_get** +> SapiV2LoanFlexibleBorrowHistoryGet200Response sapi_v2_loan_flexible_borrow_history_get(timestamp, signature, loan_coin=loan_coin, collateral_coin=collateral_coin, start_time=start_time, end_time=end_time, current=current, limit=limit, recv_window=recv_window) + +Borrow - Get Flexible Loan Borrow History (USER_DATA) + +- If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_loan_flexible_borrow_history_get200_response import SapiV2LoanFlexibleBorrowHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + loan_coin = 'BUSD' # str | Coin loaned (optional) + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Borrow - Get Flexible Loan Borrow History (USER_DATA) + api_response = api_instance.sapi_v2_loan_flexible_borrow_history_get(timestamp, signature, loan_coin=loan_coin, collateral_coin=collateral_coin, start_time=start_time, end_time=end_time, current=current, limit=limit, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v2_loan_flexible_borrow_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v2_loan_flexible_borrow_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **loan_coin** | **str**| Coin loaned | [optional] + **collateral_coin** | **str**| Coin used as collateral | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2LoanFlexibleBorrowHistoryGet200Response**](SapiV2LoanFlexibleBorrowHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Loan borrow histroy | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_loan_flexible_borrow_post** +> SapiV2LoanFlexibleBorrowPost200Response sapi_v2_loan_flexible_borrow_post(timestamp, signature, loan_coin=loan_coin, loan_amount=loan_amount, collateral_coin=collateral_coin, collateral_amount=collateral_amount, recv_window=recv_window) + +Borrow - Flexible Loan Borrow (TRADE) + +- Only available for master account Weight(UID): 6000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_loan_flexible_borrow_post200_response import SapiV2LoanFlexibleBorrowPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + loan_coin = 'BUSD' # str | Coin loaned (optional) + loan_amount = 100.1 # float | Loan amount (optional) + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + collateral_amount = 50.5 # float | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Borrow - Flexible Loan Borrow (TRADE) + api_response = api_instance.sapi_v2_loan_flexible_borrow_post(timestamp, signature, loan_coin=loan_coin, loan_amount=loan_amount, collateral_coin=collateral_coin, collateral_amount=collateral_amount, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v2_loan_flexible_borrow_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v2_loan_flexible_borrow_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **loan_coin** | **str**| Coin loaned | [optional] + **loan_amount** | **float**| Loan amount | [optional] + **collateral_coin** | **str**| Coin used as collateral | [optional] + **collateral_amount** | **float**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2LoanFlexibleBorrowPost200Response**](SapiV2LoanFlexibleBorrowPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collateral Assets Data | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_loan_flexible_collateral_data_get** +> SapiV2LoanFlexibleCollateralDataGet200Response sapi_v2_loan_flexible_collateral_data_get(timestamp, signature, collateral_coin=collateral_coin, recv_window=recv_window) + +Get Flexible Loan Collateral Assets Data (USER_DATA) + +Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_loan_flexible_collateral_data_get200_response import SapiV2LoanFlexibleCollateralDataGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Flexible Loan Collateral Assets Data (USER_DATA) + api_response = api_instance.sapi_v2_loan_flexible_collateral_data_get(timestamp, signature, collateral_coin=collateral_coin, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v2_loan_flexible_collateral_data_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v2_loan_flexible_collateral_data_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **collateral_coin** | **str**| Coin used as collateral | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2LoanFlexibleCollateralDataGet200Response**](SapiV2LoanFlexibleCollateralDataGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Loan asset data | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_loan_flexible_loanable_data_get** +> SapiV2LoanFlexibleLoanableDataGet200Response sapi_v2_loan_flexible_loanable_data_get(timestamp, signature, loan_coin=loan_coin, recv_window=recv_window) + +Get Flexible Loan Assets Data (USER_DATA) + +Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_loan_flexible_loanable_data_get200_response import SapiV2LoanFlexibleLoanableDataGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + loan_coin = 'BUSD' # str | Coin loaned (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Flexible Loan Assets Data (USER_DATA) + api_response = api_instance.sapi_v2_loan_flexible_loanable_data_get(timestamp, signature, loan_coin=loan_coin, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v2_loan_flexible_loanable_data_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v2_loan_flexible_loanable_data_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **loan_coin** | **str**| Coin loaned | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2LoanFlexibleLoanableDataGet200Response**](SapiV2LoanFlexibleLoanableDataGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Loan asset data | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_loan_flexible_ltv_adjustment_history_get** +> SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response sapi_v2_loan_flexible_ltv_adjustment_history_get(timestamp, signature, loan_coin=loan_coin, collateral_coin=collateral_coin, start_time=start_time, end_time=end_time, current=current, limit=limit, recv_window=recv_window) + +Adjust LTV - Get Flexible Loan LTV Adjustment History (USER_DATA) + +- If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_loan_flexible_ltv_adjustment_history_get200_response import SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + loan_coin = 'BUSD' # str | Coin loaned (optional) + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Adjust LTV - Get Flexible Loan LTV Adjustment History (USER_DATA) + api_response = api_instance.sapi_v2_loan_flexible_ltv_adjustment_history_get(timestamp, signature, loan_coin=loan_coin, collateral_coin=collateral_coin, start_time=start_time, end_time=end_time, current=current, limit=limit, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v2_loan_flexible_ltv_adjustment_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v2_loan_flexible_ltv_adjustment_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **loan_coin** | **str**| Coin loaned | [optional] + **collateral_coin** | **str**| Coin used as collateral | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response**](SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | LTV adjustment history | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_loan_flexible_ongoing_orders_get** +> SapiV2LoanFlexibleOngoingOrdersGet200Response sapi_v2_loan_flexible_ongoing_orders_get(timestamp, signature, loan_coin=loan_coin, collateral_coin=collateral_coin, current=current, limit=limit, recv_window=recv_window) + +Borrow - Get Flexible Loan Ongoing Orders (USER_DATA) + + Weight(IP): 300 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_loan_flexible_ongoing_orders_get200_response import SapiV2LoanFlexibleOngoingOrdersGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + loan_coin = 'BUSD' # str | Coin loaned (optional) + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Borrow - Get Flexible Loan Ongoing Orders (USER_DATA) + api_response = api_instance.sapi_v2_loan_flexible_ongoing_orders_get(timestamp, signature, loan_coin=loan_coin, collateral_coin=collateral_coin, current=current, limit=limit, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v2_loan_flexible_ongoing_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v2_loan_flexible_ongoing_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **loan_coin** | **str**| Coin loaned | [optional] + **collateral_coin** | **str**| Coin used as collateral | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2LoanFlexibleOngoingOrdersGet200Response**](SapiV2LoanFlexibleOngoingOrdersGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collateral Assets Data | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_loan_flexible_repay_history_get** +> SapiV2LoanFlexibleRepayHistoryGet200Response sapi_v2_loan_flexible_repay_history_get(timestamp, signature, loan_coin=loan_coin, collateral_coin=collateral_coin, start_time=start_time, end_time=end_time, current=current, limit=limit, recv_window=recv_window) + +Repay - Get Flexible Loan Repayment History (USER_DATA) + +- If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_loan_flexible_repay_history_get200_response import SapiV2LoanFlexibleRepayHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + loan_coin = 'BUSD' # str | Coin loaned (optional) + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Repay - Get Flexible Loan Repayment History (USER_DATA) + api_response = api_instance.sapi_v2_loan_flexible_repay_history_get(timestamp, signature, loan_coin=loan_coin, collateral_coin=collateral_coin, start_time=start_time, end_time=end_time, current=current, limit=limit, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v2_loan_flexible_repay_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v2_loan_flexible_repay_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **loan_coin** | **str**| Coin loaned | [optional] + **collateral_coin** | **str**| Coin used as collateral | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2LoanFlexibleRepayHistoryGet200Response**](SapiV2LoanFlexibleRepayHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Loan repay history | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_loan_flexible_repay_post** +> SapiV2LoanFlexibleRepayPost200Response sapi_v2_loan_flexible_repay_post(repay_amount, timestamp, signature, loan_coin=loan_coin, collateral_coin=collateral_coin, collateral_return=collateral_return, full_repayment=full_repayment, recv_window=recv_window) + +Repay - Flexible Loan Repay (TRADE) + +- repayAmount is mandatory even fullRepayment = FALSE Weight(IP): 6000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_loan_flexible_repay_post200_response import SapiV2LoanFlexibleRepayPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.CryptoLoansApi(api_client) + repay_amount = 3.4 # float | repay amount of loanCoin + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + loan_coin = 'BUSD' # str | Coin loaned (optional) + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + collateral_return = true # bool | Default: TRUE. TRUE: Return extra collateral to earn account; FALSE: Keep extra collateral in the order, and lower LTV. (optional) + full_repayment = true # bool | Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Repay - Flexible Loan Repay (TRADE) + api_response = api_instance.sapi_v2_loan_flexible_repay_post(repay_amount, timestamp, signature, loan_coin=loan_coin, collateral_coin=collateral_coin, collateral_return=collateral_return, full_repayment=full_repayment, recv_window=recv_window) + print("The response of CryptoLoansApi->sapi_v2_loan_flexible_repay_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CryptoLoansApi->sapi_v2_loan_flexible_repay_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **repay_amount** | **float**| repay amount of loanCoin | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **loan_coin** | **str**| Coin loaned | [optional] + **collateral_coin** | **str**| Coin used as collateral | [optional] + **collateral_return** | **bool**| Default: TRUE. TRUE: Return extra collateral to earn account; FALSE: Keep extra collateral in the order, and lower LTV. | [optional] + **full_repayment** | **bool**| Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2LoanFlexibleRepayPost200Response**](SapiV2LoanFlexibleRepayPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Loan repay | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/DayTicker.md b/target/python/binance_openapi/docs/DayTicker.md new file mode 100644 index 0000000..a425c6f --- /dev/null +++ b/target/python/binance_openapi/docs/DayTicker.md @@ -0,0 +1,43 @@ +# DayTicker + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**price_change** | **str** | Absolute price change | +**price_change_percent** | **str** | Relative price change in percent | +**weighted_avg_price** | **str** | quoteVolume / volume | +**open_price** | **str** | | +**high_price** | **str** | | +**low_price** | **str** | | +**last_price** | **str** | | +**volume** | **str** | Volume in base asset | +**quote_volume** | **str** | Volume in quote asset | +**open_time** | **int** | | +**close_time** | **int** | | +**first_id** | **int** | Trade ID of the first trade in the interval | +**last_id** | **int** | Trade ID of the last trade in the interval | +**count** | **int** | Number of trades in the interval | + +## Example + +```python +from openapi_client.models.day_ticker import DayTicker + +# TODO update the JSON string below +json = "{}" +# create an instance of DayTicker from a JSON string +day_ticker_instance = DayTicker.from_json(json) +# print the JSON string representation of the object +print(DayTicker.to_json()) + +# convert the object into a dict +day_ticker_dict = day_ticker_instance.to_dict() +# create an instance of DayTicker from a dict +day_ticker_from_dict = DayTicker.from_dict(day_ticker_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/DualInvestmentApi.md b/target/python/binance_openapi/docs/DualInvestmentApi.md new file mode 100644 index 0000000..7c7faa0 --- /dev/null +++ b/target/python/binance_openapi/docs/DualInvestmentApi.md @@ -0,0 +1,466 @@ +# openapi_client.DualInvestmentApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_dci_product_accounts_get**](DualInvestmentApi.md#sapi_v1_dci_product_accounts_get) | **GET** /sapi/v1/dci/product/accounts | Check Dual Investment accounts(USER_DATA) +[**sapi_v1_dci_product_auto_compound_edit_status_post**](DualInvestmentApi.md#sapi_v1_dci_product_auto_compound_edit_status_post) | **POST** /sapi/v1/dci/product/auto_compound/edit-status | Change Auto-Compound status(USER_DATA) +[**sapi_v1_dci_product_list_get**](DualInvestmentApi.md#sapi_v1_dci_product_list_get) | **GET** /sapi/v1/dci/product/list | Get Dual Investment product list(USER_DATA) +[**sapi_v1_dci_product_positions_get**](DualInvestmentApi.md#sapi_v1_dci_product_positions_get) | **GET** /sapi/v1/dci/product/positions | Get Dual Investment positions(USER_DATA) +[**sapi_v1_dci_product_subscribe_post**](DualInvestmentApi.md#sapi_v1_dci_product_subscribe_post) | **POST** /sapi/v1/dci/product/subscribe | Subscribe Dual Investment products(USER_DATA) + + +# **sapi_v1_dci_product_accounts_get** +> SapiV1DciProductAccountsGet200Response sapi_v1_dci_product_accounts_get(timestamp, signature, recv_window=recv_window) + +Check Dual Investment accounts(USER_DATA) + +Check Dual Investment accounts Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_dci_product_accounts_get200_response import SapiV1DciProductAccountsGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.DualInvestmentApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Check Dual Investment accounts(USER_DATA) + api_response = api_instance.sapi_v1_dci_product_accounts_get(timestamp, signature, recv_window=recv_window) + print("The response of DualInvestmentApi->sapi_v1_dci_product_accounts_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DualInvestmentApi->sapi_v1_dci_product_accounts_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1DciProductAccountsGet200Response**](SapiV1DciProductAccountsGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Dual Investment accounts | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_dci_product_auto_compound_edit_status_post** +> SapiV1DciProductAutoCompoundEditStatusPost200Response sapi_v1_dci_product_auto_compound_edit_status_post(position_id, auto_compound_plan, timestamp, signature, recv_window=recv_window) + +Change Auto-Compound status(USER_DATA) + +Change Auto-Compound status - 15:31 ~ 16:00 UTC+8 This function is disabled Weight(IP): 1 Rate Limit: Maximum 1 time/s per account + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_dci_product_auto_compound_edit_status_post200_response import SapiV1DciProductAutoCompoundEditStatusPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.DualInvestmentApi(api_client) + position_id = 56 # int | Get positionId from /sapi/v1/dci/product/positions + auto_compound_plan = 'auto_compound_plan_example' # str | NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan; + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Change Auto-Compound status(USER_DATA) + api_response = api_instance.sapi_v1_dci_product_auto_compound_edit_status_post(position_id, auto_compound_plan, timestamp, signature, recv_window=recv_window) + print("The response of DualInvestmentApi->sapi_v1_dci_product_auto_compound_edit_status_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DualInvestmentApi->sapi_v1_dci_product_auto_compound_edit_status_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **position_id** | **int**| Get positionId from /sapi/v1/dci/product/positions | + **auto_compound_plan** | **str**| NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan; | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1DciProductAutoCompoundEditStatusPost200Response**](SapiV1DciProductAutoCompoundEditStatusPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Change Auto-Compound status response | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_dci_product_list_get** +> SapiV1DciProductListGet200Response sapi_v1_dci_product_list_get(option_type, exercised_coin, invest_coin, timestamp, signature, page_size=page_size, page_index=page_index, recv_window=recv_window) + +Get Dual Investment product list(USER_DATA) + +Get Dual Investment product list Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_dci_product_list_get200_response import SapiV1DciProductListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.DualInvestmentApi(api_client) + option_type = 'option_type_example' # str | Input CALL or PUT + exercised_coin = 'exercised_coin_example' # str | Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT; + invest_coin = 'invest_coin_example' # str | Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT; + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + page_size = 'page_size_example' # str | MIN 1, MAX 100; Default 100 (optional) + page_index = 56 # int | Page number, default is first page, start form 1 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Dual Investment product list(USER_DATA) + api_response = api_instance.sapi_v1_dci_product_list_get(option_type, exercised_coin, invest_coin, timestamp, signature, page_size=page_size, page_index=page_index, recv_window=recv_window) + print("The response of DualInvestmentApi->sapi_v1_dci_product_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DualInvestmentApi->sapi_v1_dci_product_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **option_type** | **str**| Input CALL or PUT | + **exercised_coin** | **str**| Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT; | + **invest_coin** | **str**| Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT; | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **page_size** | **str**| MIN 1, MAX 100; Default 100 | [optional] + **page_index** | **int**| Page number, default is first page, start form 1 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1DciProductListGet200Response**](SapiV1DciProductListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Dual Investment product list | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_dci_product_positions_get** +> SapiV1DciProductPositionsGet200Response sapi_v1_dci_product_positions_get(timestamp, signature, status=status, page_size=page_size, page_index=page_index, recv_window=recv_window) + +Get Dual Investment positions(USER_DATA) + +Get Dual Investment positions (batch) Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_dci_product_positions_get200_response import SapiV1DciProductPositionsGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.DualInvestmentApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + status = 'status_example' # str | - PENDING: Products are purchasing, will give results later; - PURCHASE_SUCCESS: purchase successfully; - SETTLED: Products are finish settling; - PURCHASE_FAIL: fail to purchase; - REFUNDING: refund ongoing; - REFUND_SUCCESS: refund to spot account successfully; - SETTLING: Products are settling. If don't fill this field, will response all the position status. (optional) + page_size = 'page_size_example' # str | MIN 1, MAX 100; Default 100 (optional) + page_index = 56 # int | Page number, default is first page, start form 1 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Dual Investment positions(USER_DATA) + api_response = api_instance.sapi_v1_dci_product_positions_get(timestamp, signature, status=status, page_size=page_size, page_index=page_index, recv_window=recv_window) + print("The response of DualInvestmentApi->sapi_v1_dci_product_positions_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DualInvestmentApi->sapi_v1_dci_product_positions_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **status** | **str**| - PENDING: Products are purchasing, will give results later; - PURCHASE_SUCCESS: purchase successfully; - SETTLED: Products are finish settling; - PURCHASE_FAIL: fail to purchase; - REFUNDING: refund ongoing; - REFUND_SUCCESS: refund to spot account successfully; - SETTLING: Products are settling. If don't fill this field, will response all the position status. | [optional] + **page_size** | **str**| MIN 1, MAX 100; Default 100 | [optional] + **page_index** | **int**| Page number, default is first page, start form 1 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1DciProductPositionsGet200Response**](SapiV1DciProductPositionsGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Dual Investment product list | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_dci_product_subscribe_post** +> SapiV1DciProductSubscribePost200Response sapi_v1_dci_product_subscribe_post(id, order_id, deposit_amount, auto_compound_plan, timestamp, signature, recv_window=recv_window) + +Subscribe Dual Investment products(USER_DATA) + +Subscribe Dual Investment products - `Products are not available.` means that the APR changes to lower value, or the orders are not available. - `Failed` is a system or network errors. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_dci_product_subscribe_post200_response import SapiV1DciProductSubscribePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.DualInvestmentApi(api_client) + id = 'id_example' # str | get id from /sapi/v1/dci/product/list + order_id = 'order_id_example' # str | get orderId from /sapi/v1/dci/product/list + deposit_amount = 3.4 # float | + auto_compound_plan = 'auto_compound_plan_example' # str | NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan; + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Subscribe Dual Investment products(USER_DATA) + api_response = api_instance.sapi_v1_dci_product_subscribe_post(id, order_id, deposit_amount, auto_compound_plan, timestamp, signature, recv_window=recv_window) + print("The response of DualInvestmentApi->sapi_v1_dci_product_subscribe_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DualInvestmentApi->sapi_v1_dci_product_subscribe_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| get id from /sapi/v1/dci/product/list | + **order_id** | **str**| get orderId from /sapi/v1/dci/product/list | + **deposit_amount** | **float**| | + **auto_compound_plan** | **str**| NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan; | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1DciProductSubscribePost200Response**](SapiV1DciProductSubscribePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Dual Investment product subscription response | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/Error.md b/target/python/binance_openapi/docs/Error.md new file mode 100644 index 0000000..d11bdbc --- /dev/null +++ b/target/python/binance_openapi/docs/Error.md @@ -0,0 +1,30 @@ +# Error + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Error code | +**msg** | **str** | Error message | + +## Example + +```python +from openapi_client.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print(Error.to_json()) + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_from_dict = Error.from_dict(error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/FiatApi.md b/target/python/binance_openapi/docs/FiatApi.md new file mode 100644 index 0000000..b984bc2 --- /dev/null +++ b/target/python/binance_openapi/docs/FiatApi.md @@ -0,0 +1,200 @@ +# openapi_client.FiatApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_fiat_orders_get**](FiatApi.md#sapi_v1_fiat_orders_get) | **GET** /sapi/v1/fiat/orders | Fiat Deposit/Withdraw History (USER_DATA) +[**sapi_v1_fiat_payments_get**](FiatApi.md#sapi_v1_fiat_payments_get) | **GET** /sapi/v1/fiat/payments | Fiat Payments History (USER_DATA) + + +# **sapi_v1_fiat_orders_get** +> SapiV1FiatOrdersGet200Response sapi_v1_fiat_orders_get(transaction_type, timestamp, signature, begin_time=begin_time, end_time=end_time, page=page, rows=rows, recv_window=recv_window) + +Fiat Deposit/Withdraw History (USER_DATA) + +- If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(UID): 90000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_fiat_orders_get200_response import SapiV1FiatOrdersGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.FiatApi(api_client) + transaction_type = 56 # int | * `0` - deposit * `1` - withdraw + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + begin_time = 1626144956000 # int | (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + page = 1 # int | Default 1 (optional) + rows = 300 # int | Default 100, max 500 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Fiat Deposit/Withdraw History (USER_DATA) + api_response = api_instance.sapi_v1_fiat_orders_get(transaction_type, timestamp, signature, begin_time=begin_time, end_time=end_time, page=page, rows=rows, recv_window=recv_window) + print("The response of FiatApi->sapi_v1_fiat_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FiatApi->sapi_v1_fiat_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **transaction_type** | **int**| * `0` - deposit * `1` - withdraw | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **begin_time** | **int**| | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **page** | **int**| Default 1 | [optional] + **rows** | **int**| Default 100, max 500 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1FiatOrdersGet200Response**](SapiV1FiatOrdersGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | History of deposit/withdraw orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_fiat_payments_get** +> SapiV1FiatPaymentsGet200Response sapi_v1_fiat_payments_get(transaction_type, timestamp, signature, begin_time=begin_time, end_time=end_time, page=page, rows=rows, recv_window=recv_window) + +Fiat Payments History (USER_DATA) + +- If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_fiat_payments_get200_response import SapiV1FiatPaymentsGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.FiatApi(api_client) + transaction_type = 56 # int | * `0` - deposit * `1` - withdraw + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + begin_time = 1626144956000 # int | (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + page = 1 # int | Default 1 (optional) + rows = 300 # int | Default 100, max 500 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Fiat Payments History (USER_DATA) + api_response = api_instance.sapi_v1_fiat_payments_get(transaction_type, timestamp, signature, begin_time=begin_time, end_time=end_time, page=page, rows=rows, recv_window=recv_window) + print("The response of FiatApi->sapi_v1_fiat_payments_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FiatApi->sapi_v1_fiat_payments_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **transaction_type** | **int**| * `0` - deposit * `1` - withdraw | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **begin_time** | **int**| | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **page** | **int**| Default 1 | [optional] + **rows** | **int**| Default 100, max 500 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1FiatPaymentsGet200Response**](SapiV1FiatPaymentsGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | History of fiat payments | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/FuturesAlgoApi.md b/target/python/binance_openapi/docs/FuturesAlgoApi.md new file mode 100644 index 0000000..85b32a5 --- /dev/null +++ b/target/python/binance_openapi/docs/FuturesAlgoApi.md @@ -0,0 +1,576 @@ +# openapi_client.FuturesAlgoApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_algo_futures_historical_orders_get**](FuturesAlgoApi.md#sapi_v1_algo_futures_historical_orders_get) | **GET** /sapi/v1/algo/futures/historicalOrders | Query Historical Algo Orders (USER_DATA) +[**sapi_v1_algo_futures_new_order_twap_post**](FuturesAlgoApi.md#sapi_v1_algo_futures_new_order_twap_post) | **POST** /sapi/v1/algo/futures/newOrderTwap | Time-Weighted Average Price(Twap) New Order (TRADE) +[**sapi_v1_algo_futures_new_order_vp_post**](FuturesAlgoApi.md#sapi_v1_algo_futures_new_order_vp_post) | **POST** /sapi/v1/algo/futures/newOrderVp | Volume Participation(VP) New Order (TRADE) +[**sapi_v1_algo_futures_open_orders_get**](FuturesAlgoApi.md#sapi_v1_algo_futures_open_orders_get) | **GET** /sapi/v1/algo/futures/openOrders | Query Current Algo Open Orders (USER_DATA) +[**sapi_v1_algo_futures_order_delete**](FuturesAlgoApi.md#sapi_v1_algo_futures_order_delete) | **DELETE** /sapi/v1/algo/futures/order | Cancel Algo Order(TRADE) +[**sapi_v1_algo_futures_sub_orders_get**](FuturesAlgoApi.md#sapi_v1_algo_futures_sub_orders_get) | **GET** /sapi/v1/algo/futures/subOrders | Query Sub Orders (USER_DATA) + + +# **sapi_v1_algo_futures_historical_orders_get** +> SapiV1AlgoFuturesHistoricalOrdersGet200Response sapi_v1_algo_futures_historical_orders_get(timestamp, signature, symbol=symbol, side=side, start_time=start_time, end_time=end_time, page=page, page_size=page_size, recv_window=recv_window) + +Query Historical Algo Orders (USER_DATA) + +- You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_algo_futures_historical_orders_get200_response import SapiV1AlgoFuturesHistoricalOrdersGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.FuturesAlgoApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT (optional) + side = 'SELL' # str | (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + page = 1 # int | Default 1 (optional) + page_size = 'page_size_example' # str | MIN 1, MAX 100; Default 100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Historical Algo Orders (USER_DATA) + api_response = api_instance.sapi_v1_algo_futures_historical_orders_get(timestamp, signature, symbol=symbol, side=side, start_time=start_time, end_time=end_time, page=page, page_size=page_size, recv_window=recv_window) + print("The response of FuturesAlgoApi->sapi_v1_algo_futures_historical_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FuturesAlgoApi->sapi_v1_algo_futures_historical_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | [optional] + **side** | **str**| | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **page** | **int**| Default 1 | [optional] + **page_size** | **str**| MIN 1, MAX 100; Default 100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AlgoFuturesHistoricalOrdersGet200Response**](SapiV1AlgoFuturesHistoricalOrdersGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Historical Algo Orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_algo_futures_new_order_twap_post** +> SapiV1AlgoFuturesNewOrderVpPost200Response sapi_v1_algo_futures_new_order_twap_post(symbol, side, quantity, duration, timestamp, signature, position_side=position_side, client_algo_id=client_algo_id, reduce_only=reduce_only, limit_price=limit_price, recv_window=recv_window) + +Time-Weighted Average Price(Twap) New Order (TRADE) + +Send in a Twap new order. Only support on USDⓈ-M Contracts. You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com - Total Algo open orders max allowed: 10 orders. - Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. - Receiving \"success\": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive \"success\": true, but the order status will be expired after we check it. - quantity * 60 / duration should be larger than minQty - duration cannot be less than 5 mins or more than 24 hours. - For delivery contracts, TWAP end time should be one hour earlier than the delivery time of the symbol. Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_algo_futures_new_order_vp_post200_response import SapiV1AlgoFuturesNewOrderVpPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.FuturesAlgoApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + side = 'SELL' # str | + quantity = 3.4 # float | Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT + duration = 300 # int | Duration for TWAP orders in seconds. [300, 86400];Less than 5min => defaults to 5 min; Greater than 24h => defaults to 24h + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + position_side = 'BOTH' # str | Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. (optional) + client_algo_id = '00358ce6a268403398bd34eaa36dffe7' # str | A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value (optional) + reduce_only = True # bool | 'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position (optional) + limit_price = 3.4 # float | Limit price of the order; If it is not sent, will place order by market price by default (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Time-Weighted Average Price(Twap) New Order (TRADE) + api_response = api_instance.sapi_v1_algo_futures_new_order_twap_post(symbol, side, quantity, duration, timestamp, signature, position_side=position_side, client_algo_id=client_algo_id, reduce_only=reduce_only, limit_price=limit_price, recv_window=recv_window) + print("The response of FuturesAlgoApi->sapi_v1_algo_futures_new_order_twap_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FuturesAlgoApi->sapi_v1_algo_futures_new_order_twap_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **side** | **str**| | + **quantity** | **float**| Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT | + **duration** | **int**| Duration for TWAP orders in seconds. [300, 86400];Less than 5min => defaults to 5 min; Greater than 24h => defaults to 24h | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **position_side** | **str**| Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. | [optional] + **client_algo_id** | **str**| A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value | [optional] + **reduce_only** | **bool**| 'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position | [optional] + **limit_price** | **float**| Limit price of the order; If it is not sent, will place order by market price by default | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AlgoFuturesNewOrderVpPost200Response**](SapiV1AlgoFuturesNewOrderVpPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Time-Weighted Average Price(Twap) New Order | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_algo_futures_new_order_vp_post** +> SapiV1AlgoFuturesNewOrderVpPost200Response sapi_v1_algo_futures_new_order_vp_post(symbol, side, quantity, urgency, timestamp, signature, position_side=position_side, client_algo_id=client_algo_id, reduce_only=reduce_only, limit_price=limit_price, recv_window=recv_window) + +Volume Participation(VP) New Order (TRADE) + +Send in a VP new order. Only support on USDⓈ-M Contracts. - You need to enable `Futures Trading Permission` for the api key which requests this endpoint. - Base URL: https://api.binance.com - Total Algo open orders max allowed: 10 orders. - Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. - Receiving \"success\": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive \"success\": true, but the order status will be expired after we check it. Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_algo_futures_new_order_vp_post200_response import SapiV1AlgoFuturesNewOrderVpPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.FuturesAlgoApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + side = 'SELL' # str | + quantity = 3.4 # float | Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT + urgency = 'LOW' # str | Represent the relative speed of the current execution; ENUM: LOW, MEDIUM, HIGH + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + position_side = 'BOTH' # str | Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. (optional) + client_algo_id = '00358ce6a268403398bd34eaa36dffe7' # str | A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value (optional) + reduce_only = True # bool | 'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position (optional) + limit_price = 3.4 # float | Limit price of the order; If it is not sent, will place order by market price by default (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Volume Participation(VP) New Order (TRADE) + api_response = api_instance.sapi_v1_algo_futures_new_order_vp_post(symbol, side, quantity, urgency, timestamp, signature, position_side=position_side, client_algo_id=client_algo_id, reduce_only=reduce_only, limit_price=limit_price, recv_window=recv_window) + print("The response of FuturesAlgoApi->sapi_v1_algo_futures_new_order_vp_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FuturesAlgoApi->sapi_v1_algo_futures_new_order_vp_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **side** | **str**| | + **quantity** | **float**| Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT | + **urgency** | **str**| Represent the relative speed of the current execution; ENUM: LOW, MEDIUM, HIGH | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **position_side** | **str**| Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. | [optional] + **client_algo_id** | **str**| A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value | [optional] + **reduce_only** | **bool**| 'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position | [optional] + **limit_price** | **float**| Limit price of the order; If it is not sent, will place order by market price by default | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AlgoFuturesNewOrderVpPost200Response**](SapiV1AlgoFuturesNewOrderVpPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Volume Participation(VP) Order | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_algo_futures_open_orders_get** +> SapiV1AlgoFuturesOpenOrdersGet200Response sapi_v1_algo_futures_open_orders_get(timestamp, signature, recv_window=recv_window) + +Query Current Algo Open Orders (USER_DATA) + +- You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_algo_futures_open_orders_get200_response import SapiV1AlgoFuturesOpenOrdersGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.FuturesAlgoApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Current Algo Open Orders (USER_DATA) + api_response = api_instance.sapi_v1_algo_futures_open_orders_get(timestamp, signature, recv_window=recv_window) + print("The response of FuturesAlgoApi->sapi_v1_algo_futures_open_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FuturesAlgoApi->sapi_v1_algo_futures_open_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AlgoFuturesOpenOrdersGet200Response**](SapiV1AlgoFuturesOpenOrdersGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Open Algo Orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_algo_futures_order_delete** +> SapiV1AlgoFuturesOrderDelete200Response sapi_v1_algo_futures_order_delete(algo_id, timestamp, signature, recv_window=recv_window) + +Cancel Algo Order(TRADE) + +Cancel an active order. - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_algo_futures_order_delete200_response import SapiV1AlgoFuturesOrderDelete200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.FuturesAlgoApi(api_client) + algo_id = 56 # int | Eg. 14511 + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Cancel Algo Order(TRADE) + api_response = api_instance.sapi_v1_algo_futures_order_delete(algo_id, timestamp, signature, recv_window=recv_window) + print("The response of FuturesAlgoApi->sapi_v1_algo_futures_order_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FuturesAlgoApi->sapi_v1_algo_futures_order_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **algo_id** | **int**| Eg. 14511 | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AlgoFuturesOrderDelete200Response**](SapiV1AlgoFuturesOrderDelete200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cancelled order | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_algo_futures_sub_orders_get** +> SapiV1AlgoFuturesSubOrdersGet200Response sapi_v1_algo_futures_sub_orders_get(algo_id, timestamp, signature, page=page, page_size=page_size, recv_window=recv_window) + +Query Sub Orders (USER_DATA) + +- You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_algo_futures_sub_orders_get200_response import SapiV1AlgoFuturesSubOrdersGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.FuturesAlgoApi(api_client) + algo_id = 56 # int | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + page = 1 # int | Default 1 (optional) + page_size = 'page_size_example' # str | MIN 1, MAX 100; Default 100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Sub Orders (USER_DATA) + api_response = api_instance.sapi_v1_algo_futures_sub_orders_get(algo_id, timestamp, signature, page=page, page_size=page_size, recv_window=recv_window) + print("The response of FuturesAlgoApi->sapi_v1_algo_futures_sub_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FuturesAlgoApi->sapi_v1_algo_futures_sub_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **algo_id** | **int**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **page** | **int**| Default 1 | [optional] + **page_size** | **str**| MIN 1, MAX 100; Default 100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AlgoFuturesSubOrdersGet200Response**](SapiV1AlgoFuturesSubOrdersGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sub orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/FuturesApi.md b/target/python/binance_openapi/docs/FuturesApi.md new file mode 100644 index 0000000..ffa599c --- /dev/null +++ b/target/python/binance_openapi/docs/FuturesApi.md @@ -0,0 +1,290 @@ +# openapi_client.FuturesApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_futures_hist_data_link_get**](FuturesApi.md#sapi_v1_futures_hist_data_link_get) | **GET** /sapi/v1/futures/histDataLink | Get Future TickLevel Orderbook Historical Data Download Link (USER_DATA) +[**sapi_v1_futures_transfer_get**](FuturesApi.md#sapi_v1_futures_transfer_get) | **GET** /sapi/v1/futures/transfer | Get Future Account Transaction History List (USER_DATA) +[**sapi_v1_futures_transfer_post**](FuturesApi.md#sapi_v1_futures_transfer_post) | **POST** /sapi/v1/futures/transfer | New Future Account Transfer (USER_DATA) + + +# **sapi_v1_futures_hist_data_link_get** +> SapiV1FuturesHistDataLinkGet200Response sapi_v1_futures_hist_data_link_get(symbol, data_type, timestamp, signature, start_time=start_time, end_time=end_time, recv_window=recv_window) + +Get Future TickLevel Orderbook Historical Data Download Link (USER_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_futures_hist_data_link_get200_response import SapiV1FuturesHistDataLinkGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.FuturesApi(api_client) + symbol = 'BTCUSDT' # str | + data_type = 'T_DEPTH' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Future TickLevel Orderbook Historical Data Download Link (USER_DATA) + api_response = api_instance.sapi_v1_futures_hist_data_link_get(symbol, data_type, timestamp, signature, start_time=start_time, end_time=end_time, recv_window=recv_window) + print("The response of FuturesApi->sapi_v1_futures_hist_data_link_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FuturesApi->sapi_v1_futures_hist_data_link_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| | + **data_type** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1FuturesHistDataLinkGet200Response**](SapiV1FuturesHistDataLinkGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | data link | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_futures_transfer_get** +> SapiV1FuturesTransferGet200Response sapi_v1_futures_transfer_get(asset, start_time, timestamp, signature, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Get Future Account Transaction History List (USER_DATA) + +Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_futures_transfer_get200_response import SapiV1FuturesTransferGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.FuturesApi(api_client) + asset = 'BTC' # str | + start_time = 56 # int | UTC timestamp in ms + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Future Account Transaction History List (USER_DATA) + api_response = api_instance.sapi_v1_futures_transfer_get(asset, start_time, timestamp, signature, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of FuturesApi->sapi_v1_futures_transfer_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FuturesApi->sapi_v1_futures_transfer_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | **str**| | + **start_time** | **int**| UTC timestamp in ms | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1FuturesTransferGet200Response**](SapiV1FuturesTransferGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Futures Transfer Query | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_futures_transfer_post** +> SapiV1MarginBorrowRepayPost200Response sapi_v1_futures_transfer_post(asset, amount, type, timestamp, signature, recv_window=recv_window) + +New Future Account Transfer (USER_DATA) + +Execute transfer between spot account and futures account. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_borrow_repay_post200_response import SapiV1MarginBorrowRepayPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.FuturesApi(api_client) + asset = 'BTC' # str | + amount = 1.01 # float | + type = 56 # int | 1: transfer from spot account to USDT-Ⓜ futures account. 2: transfer from USDT-Ⓜ futures account to spot account. 3: transfer from spot account to COIN-Ⓜ futures account. 4: transfer from COIN-Ⓜ futures account to spot account. + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # New Future Account Transfer (USER_DATA) + api_response = api_instance.sapi_v1_futures_transfer_post(asset, amount, type, timestamp, signature, recv_window=recv_window) + print("The response of FuturesApi->sapi_v1_futures_transfer_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FuturesApi->sapi_v1_futures_transfer_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | **str**| | + **amount** | **float**| | + **type** | **int**| 1: transfer from spot account to USDT-Ⓜ futures account. 2: transfer from USDT-Ⓜ futures account to spot account. 3: transfer from spot account to COIN-Ⓜ futures account. 4: transfer from COIN-Ⓜ futures account to spot account. | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginBorrowRepayPost200Response**](SapiV1MarginBorrowRepayPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Futures Transfer | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/GiftCardApi.md b/target/python/binance_openapi/docs/GiftCardApi.md new file mode 100644 index 0000000..0ad6c79 --- /dev/null +++ b/target/python/binance_openapi/docs/GiftCardApi.md @@ -0,0 +1,542 @@ +# openapi_client.GiftCardApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_giftcard_buy_code_post**](GiftCardApi.md#sapi_v1_giftcard_buy_code_post) | **POST** /sapi/v1/giftcard/buyCode | Buy a Binance Code (TRADE) +[**sapi_v1_giftcard_buy_code_token_limit_get**](GiftCardApi.md#sapi_v1_giftcard_buy_code_token_limit_get) | **GET** /sapi/v1/giftcard/buyCode/token-limit | Fetch Token Limit (USER_DATA) +[**sapi_v1_giftcard_create_code_post**](GiftCardApi.md#sapi_v1_giftcard_create_code_post) | **POST** /sapi/v1/giftcard/createCode | Create a Binance Code (USER_DATA) +[**sapi_v1_giftcard_cryptography_rsa_public_key_get**](GiftCardApi.md#sapi_v1_giftcard_cryptography_rsa_public_key_get) | **GET** /sapi/v1/giftcard/cryptography/rsa-public-key | Fetch RSA Public Key (USER_DATA) +[**sapi_v1_giftcard_redeem_code_post**](GiftCardApi.md#sapi_v1_giftcard_redeem_code_post) | **POST** /sapi/v1/giftcard/redeemCode | Redeem a Binance Code (USER_DATA) +[**sapi_v1_giftcard_verify_get**](GiftCardApi.md#sapi_v1_giftcard_verify_get) | **GET** /sapi/v1/giftcard/verify | Verify a Binance Code (USER_DATA) + + +# **sapi_v1_giftcard_buy_code_post** +> SapiV1GiftcardCreateCodePost200Response sapi_v1_giftcard_buy_code_post(base_token, face_token, base_token_amount, timestamp, signature, recv_window=recv_window) + +Buy a Binance Code (TRADE) + +This API is for buying a fixed-value Binance Code, which means your Binance Code will be redeemable to a token that is different to the token that you are paying in. If the token you’re paying and the redeemable token are the same, please use the Create Binance Code endpoint. You can use supported crypto currency or fiat token as baseToken to buy Binance Code that is redeemable to your chosen faceToken. Once successfully purchased, the amount of baseToken would be deducted from your funding wallet. To get started with, please make sure: - You have a Binance account - You have passed kyc - You have a sufficient balance in your Binance funding wallet - You need Enable Withdrawals for the API Key which requests this endpoint. Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_giftcard_create_code_post200_response import SapiV1GiftcardCreateCodePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GiftCardApi(api_client) + base_token = 'base_token_example' # str | The token you want to pay, example BUSD + face_token = 'face_token_example' # str | The token you want to buy, example BNB. If faceToken = baseToken, it's the same as createCode endpoint. + base_token_amount = 3.4 # float | The base token asset quantity, example 1.002 + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Buy a Binance Code (TRADE) + api_response = api_instance.sapi_v1_giftcard_buy_code_post(base_token, face_token, base_token_amount, timestamp, signature, recv_window=recv_window) + print("The response of GiftCardApi->sapi_v1_giftcard_buy_code_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GiftCardApi->sapi_v1_giftcard_buy_code_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **base_token** | **str**| The token you want to pay, example BUSD | + **face_token** | **str**| The token you want to buy, example BNB. If faceToken = baseToken, it's the same as createCode endpoint. | + **base_token_amount** | **float**| The base token asset quantity, example 1.002 | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1GiftcardCreateCodePost200Response**](SapiV1GiftcardCreateCodePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Code creation | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_giftcard_buy_code_token_limit_get** +> SapiV1GiftcardBuyCodeTokenLimitGet200Response sapi_v1_giftcard_buy_code_token_limit_get(base_token, timestamp, signature, recv_window=recv_window) + +Fetch Token Limit (USER_DATA) + +This API is to help you verify which tokens are available for you to purchase fixed-value gift cards as mentioned in section 2 and it's limitation. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_giftcard_buy_code_token_limit_get200_response import SapiV1GiftcardBuyCodeTokenLimitGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GiftCardApi(api_client) + base_token = 'base_token_example' # str | The token you want to pay, example BUSD + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Fetch Token Limit (USER_DATA) + api_response = api_instance.sapi_v1_giftcard_buy_code_token_limit_get(base_token, timestamp, signature, recv_window=recv_window) + print("The response of GiftCardApi->sapi_v1_giftcard_buy_code_token_limit_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GiftCardApi->sapi_v1_giftcard_buy_code_token_limit_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **base_token** | **str**| The token you want to pay, example BUSD | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1GiftcardBuyCodeTokenLimitGet200Response**](SapiV1GiftcardBuyCodeTokenLimitGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Token limit | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_giftcard_create_code_post** +> SapiV1GiftcardCreateCodePost200Response sapi_v1_giftcard_create_code_post(token, amount, timestamp, signature, recv_window=recv_window) + +Create a Binance Code (USER_DATA) + +This API is for creating a Binance Code. To get started with, please make sure: - You have a Binance account - You have passed kyc - You have a sufficient balance in your Binance funding wallet - You need Enable Withdrawals for the API Key which requests this endpoint. Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_giftcard_create_code_post200_response import SapiV1GiftcardCreateCodePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GiftCardApi(api_client) + token = 'token_example' # str | The coin type contained in the Binance Code + amount = 3.4 # float | The amount of the coin + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Create a Binance Code (USER_DATA) + api_response = api_instance.sapi_v1_giftcard_create_code_post(token, amount, timestamp, signature, recv_window=recv_window) + print("The response of GiftCardApi->sapi_v1_giftcard_create_code_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GiftCardApi->sapi_v1_giftcard_create_code_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **str**| The coin type contained in the Binance Code | + **amount** | **float**| The amount of the coin | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1GiftcardCreateCodePost200Response**](SapiV1GiftcardCreateCodePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Code creation | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_giftcard_cryptography_rsa_public_key_get** +> SapiV1GiftcardCryptographyRsaPublicKeyGet200Response sapi_v1_giftcard_cryptography_rsa_public_key_get(timestamp, signature, recv_window=recv_window) + +Fetch RSA Public Key (USER_DATA) + +This API is for fetching the RSA Public Key. This RSA Public key will be used to encrypt the card code. Please note that the RSA Public key fetched is valid only for the current day. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_giftcard_cryptography_rsa_public_key_get200_response import SapiV1GiftcardCryptographyRsaPublicKeyGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GiftCardApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Fetch RSA Public Key (USER_DATA) + api_response = api_instance.sapi_v1_giftcard_cryptography_rsa_public_key_get(timestamp, signature, recv_window=recv_window) + print("The response of GiftCardApi->sapi_v1_giftcard_cryptography_rsa_public_key_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GiftCardApi->sapi_v1_giftcard_cryptography_rsa_public_key_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1GiftcardCryptographyRsaPublicKeyGet200Response**](SapiV1GiftcardCryptographyRsaPublicKeyGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | RSA Public Key. | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_giftcard_redeem_code_post** +> SapiV1GiftcardRedeemCodePost200Response sapi_v1_giftcard_redeem_code_post(code, timestamp, signature, external_uid=external_uid, recv_window=recv_window) + +Redeem a Binance Code (USER_DATA) + +This API is for redeeming the Binance Code. Once redeemed, the coins will be deposited in your funding wallet. Please note that if you enter the wrong code 5 times within 24 hours, you will no longer be able to redeem any Binance Code that day. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_giftcard_redeem_code_post200_response import SapiV1GiftcardRedeemCodePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GiftCardApi(api_client) + code = 'code_example' # str | Binance Code + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + external_uid = 'external_uid_example' # str | Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance codes on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters). (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Redeem a Binance Code (USER_DATA) + api_response = api_instance.sapi_v1_giftcard_redeem_code_post(code, timestamp, signature, external_uid=external_uid, recv_window=recv_window) + print("The response of GiftCardApi->sapi_v1_giftcard_redeem_code_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GiftCardApi->sapi_v1_giftcard_redeem_code_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **code** | **str**| Binance Code | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **external_uid** | **str**| Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance codes on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters). | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1GiftcardRedeemCodePost200Response**](SapiV1GiftcardRedeemCodePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Redeemed Information | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_giftcard_verify_get** +> SapiV1GiftcardVerifyGet200Response sapi_v1_giftcard_verify_get(reference_no, timestamp, signature, recv_window=recv_window) + +Verify a Binance Code (USER_DATA) + +This API is for verifying whether the Binance Code is valid or not by entering Binance Code or reference number. Please note that if you enter the wrong binance code 5 times within an hour, you will no longer be able to verify any binance code for that hour. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_giftcard_verify_get200_response import SapiV1GiftcardVerifyGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.GiftCardApi(api_client) + reference_no = 'reference_no_example' # str | reference number + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Verify a Binance Code (USER_DATA) + api_response = api_instance.sapi_v1_giftcard_verify_get(reference_no, timestamp, signature, recv_window=recv_window) + print("The response of GiftCardApi->sapi_v1_giftcard_verify_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GiftCardApi->sapi_v1_giftcard_verify_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **reference_no** | **str**| reference number | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1GiftcardVerifyGet200Response**](SapiV1GiftcardVerifyGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Code Verification | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/IsolatedMarginAccountInfo.md b/target/python/binance_openapi/docs/IsolatedMarginAccountInfo.md new file mode 100644 index 0000000..87b9cde --- /dev/null +++ b/target/python/binance_openapi/docs/IsolatedMarginAccountInfo.md @@ -0,0 +1,32 @@ +# IsolatedMarginAccountInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assets** | [**List[IsolatedMarginAccountInfoAssetsInner]**](IsolatedMarginAccountInfoAssetsInner.md) | | +**total_asset_of_btc** | **str** | | +**total_liability_of_btc** | **str** | | +**total_net_asset_of_btc** | **str** | | + +## Example + +```python +from openapi_client.models.isolated_margin_account_info import IsolatedMarginAccountInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of IsolatedMarginAccountInfo from a JSON string +isolated_margin_account_info_instance = IsolatedMarginAccountInfo.from_json(json) +# print the JSON string representation of the object +print(IsolatedMarginAccountInfo.to_json()) + +# convert the object into a dict +isolated_margin_account_info_dict = isolated_margin_account_info_instance.to_dict() +# create an instance of IsolatedMarginAccountInfo from a dict +isolated_margin_account_info_from_dict = IsolatedMarginAccountInfo.from_dict(isolated_margin_account_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/IsolatedMarginAccountInfoAssetsInner.md b/target/python/binance_openapi/docs/IsolatedMarginAccountInfoAssetsInner.md new file mode 100644 index 0000000..5a997d6 --- /dev/null +++ b/target/python/binance_openapi/docs/IsolatedMarginAccountInfoAssetsInner.md @@ -0,0 +1,40 @@ +# IsolatedMarginAccountInfoAssetsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_asset** | [**IsolatedMarginAccountInfoAssetsInnerBaseAsset**](IsolatedMarginAccountInfoAssetsInnerBaseAsset.md) | | +**quote_asset** | [**IsolatedMarginAccountInfoAssetsInnerQuoteAsset**](IsolatedMarginAccountInfoAssetsInnerQuoteAsset.md) | | +**symbol** | **str** | | +**isolated_created** | **bool** | | +**enabled** | **bool** | true-enabled, false-disabled | +**margin_level** | **str** | | +**margin_level_status** | **str** | \"EXCESSIVE\", \"NORMAL\", \"MARGIN_CALL\", \"PRE_LIQUIDATION\", \"FORCE_LIQUIDATION\" | +**margin_ratio** | **str** | | +**index_price** | **str** | | +**liquidate_price** | **str** | | +**liquidate_rate** | **str** | | +**trade_enabled** | **bool** | | + +## Example + +```python +from openapi_client.models.isolated_margin_account_info_assets_inner import IsolatedMarginAccountInfoAssetsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of IsolatedMarginAccountInfoAssetsInner from a JSON string +isolated_margin_account_info_assets_inner_instance = IsolatedMarginAccountInfoAssetsInner.from_json(json) +# print the JSON string representation of the object +print(IsolatedMarginAccountInfoAssetsInner.to_json()) + +# convert the object into a dict +isolated_margin_account_info_assets_inner_dict = isolated_margin_account_info_assets_inner_instance.to_dict() +# create an instance of IsolatedMarginAccountInfoAssetsInner from a dict +isolated_margin_account_info_assets_inner_from_dict = IsolatedMarginAccountInfoAssetsInner.from_dict(isolated_margin_account_info_assets_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/IsolatedMarginAccountInfoAssetsInnerBaseAsset.md b/target/python/binance_openapi/docs/IsolatedMarginAccountInfoAssetsInnerBaseAsset.md new file mode 100644 index 0000000..adee3e6 --- /dev/null +++ b/target/python/binance_openapi/docs/IsolatedMarginAccountInfoAssetsInnerBaseAsset.md @@ -0,0 +1,38 @@ +# IsolatedMarginAccountInfoAssetsInnerBaseAsset + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**borrow_enabled** | **bool** | | +**borrowed** | **str** | | +**free** | **str** | | +**interest** | **str** | | +**locked** | **str** | | +**net_asset** | **str** | | +**net_asset_of_btc** | **str** | | +**repay_enabled** | **bool** | | +**total_asset** | **str** | | + +## Example + +```python +from openapi_client.models.isolated_margin_account_info_assets_inner_base_asset import IsolatedMarginAccountInfoAssetsInnerBaseAsset + +# TODO update the JSON string below +json = "{}" +# create an instance of IsolatedMarginAccountInfoAssetsInnerBaseAsset from a JSON string +isolated_margin_account_info_assets_inner_base_asset_instance = IsolatedMarginAccountInfoAssetsInnerBaseAsset.from_json(json) +# print the JSON string representation of the object +print(IsolatedMarginAccountInfoAssetsInnerBaseAsset.to_json()) + +# convert the object into a dict +isolated_margin_account_info_assets_inner_base_asset_dict = isolated_margin_account_info_assets_inner_base_asset_instance.to_dict() +# create an instance of IsolatedMarginAccountInfoAssetsInnerBaseAsset from a dict +isolated_margin_account_info_assets_inner_base_asset_from_dict = IsolatedMarginAccountInfoAssetsInnerBaseAsset.from_dict(isolated_margin_account_info_assets_inner_base_asset_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/IsolatedMarginAccountInfoAssetsInnerQuoteAsset.md b/target/python/binance_openapi/docs/IsolatedMarginAccountInfoAssetsInnerQuoteAsset.md new file mode 100644 index 0000000..046eb8f --- /dev/null +++ b/target/python/binance_openapi/docs/IsolatedMarginAccountInfoAssetsInnerQuoteAsset.md @@ -0,0 +1,38 @@ +# IsolatedMarginAccountInfoAssetsInnerQuoteAsset + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**borrow_enabled** | **bool** | | +**borrowed** | **str** | | +**free** | **str** | | +**interest** | **str** | | +**locked** | **str** | | +**net_asset** | **str** | | +**net_asset_of_btc** | **str** | | +**repay_enabled** | **bool** | | +**total_asset** | **str** | | + +## Example + +```python +from openapi_client.models.isolated_margin_account_info_assets_inner_quote_asset import IsolatedMarginAccountInfoAssetsInnerQuoteAsset + +# TODO update the JSON string below +json = "{}" +# create an instance of IsolatedMarginAccountInfoAssetsInnerQuoteAsset from a JSON string +isolated_margin_account_info_assets_inner_quote_asset_instance = IsolatedMarginAccountInfoAssetsInnerQuoteAsset.from_json(json) +# print the JSON string representation of the object +print(IsolatedMarginAccountInfoAssetsInnerQuoteAsset.to_json()) + +# convert the object into a dict +isolated_margin_account_info_assets_inner_quote_asset_dict = isolated_margin_account_info_assets_inner_quote_asset_instance.to_dict() +# create an instance of IsolatedMarginAccountInfoAssetsInnerQuoteAsset from a dict +isolated_margin_account_info_assets_inner_quote_asset_from_dict = IsolatedMarginAccountInfoAssetsInnerQuoteAsset.from_dict(isolated_margin_account_info_assets_inner_quote_asset_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/IsolatedMarginStreamApi.md b/target/python/binance_openapi/docs/IsolatedMarginStreamApi.md new file mode 100644 index 0000000..4a894f3 --- /dev/null +++ b/target/python/binance_openapi/docs/IsolatedMarginStreamApi.md @@ -0,0 +1,244 @@ +# openapi_client.IsolatedMarginStreamApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_user_data_stream_isolated_delete**](IsolatedMarginStreamApi.md#sapi_v1_user_data_stream_isolated_delete) | **DELETE** /sapi/v1/userDataStream/isolated | Close a ListenKey (USER_STREAM) +[**sapi_v1_user_data_stream_isolated_post**](IsolatedMarginStreamApi.md#sapi_v1_user_data_stream_isolated_post) | **POST** /sapi/v1/userDataStream/isolated | Generate a Listen Key (USER_STREAM) +[**sapi_v1_user_data_stream_isolated_put**](IsolatedMarginStreamApi.md#sapi_v1_user_data_stream_isolated_put) | **PUT** /sapi/v1/userDataStream/isolated | Ping/Keep-alive a Listen Key (USER_STREAM) + + +# **sapi_v1_user_data_stream_isolated_delete** +> object sapi_v1_user_data_stream_isolated_delete(listen_key=listen_key) + +Close a ListenKey (USER_STREAM) + +Close out a user data stream. Weight: 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.IsolatedMarginStreamApi(api_client) + listen_key = 'pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1' # str | User websocket listen key (optional) + + try: + # Close a ListenKey (USER_STREAM) + api_response = api_instance.sapi_v1_user_data_stream_isolated_delete(listen_key=listen_key) + print("The response of IsolatedMarginStreamApi->sapi_v1_user_data_stream_isolated_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IsolatedMarginStreamApi->sapi_v1_user_data_stream_isolated_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listen_key** | **str**| User websocket listen key | [optional] + +### Return type + +**object** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_user_data_stream_isolated_post** +> SapiV1UserDataStreamIsolatedPost200Response sapi_v1_user_data_stream_isolated_post() + +Generate a Listen Key (USER_STREAM) + +Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_user_data_stream_isolated_post200_response import SapiV1UserDataStreamIsolatedPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.IsolatedMarginStreamApi(api_client) + + try: + # Generate a Listen Key (USER_STREAM) + api_response = api_instance.sapi_v1_user_data_stream_isolated_post() + print("The response of IsolatedMarginStreamApi->sapi_v1_user_data_stream_isolated_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IsolatedMarginStreamApi->sapi_v1_user_data_stream_isolated_post: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**SapiV1UserDataStreamIsolatedPost200Response**](SapiV1UserDataStreamIsolatedPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Isolated margin listen key | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_user_data_stream_isolated_put** +> object sapi_v1_user_data_stream_isolated_put(listen_key=listen_key) + +Ping/Keep-alive a Listen Key (USER_STREAM) + +Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.IsolatedMarginStreamApi(api_client) + listen_key = 'pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1' # str | User websocket listen key (optional) + + try: + # Ping/Keep-alive a Listen Key (USER_STREAM) + api_response = api_instance.sapi_v1_user_data_stream_isolated_put(listen_key=listen_key) + print("The response of IsolatedMarginStreamApi->sapi_v1_user_data_stream_isolated_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IsolatedMarginStreamApi->sapi_v1_user_data_stream_isolated_put: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listen_key** | **str**| User websocket listen key | [optional] + +### Return type + +**object** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/MarginApi.md b/target/python/binance_openapi/docs/MarginApi.md new file mode 100644 index 0000000..a31e2ff --- /dev/null +++ b/target/python/binance_openapi/docs/MarginApi.md @@ -0,0 +1,4215 @@ +# openapi_client.MarginApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_bnb_burn_get**](MarginApi.md#sapi_v1_bnb_burn_get) | **GET** /sapi/v1/bnbBurn | Get BNB Burn Status(USER_DATA) +[**sapi_v1_bnb_burn_post**](MarginApi.md#sapi_v1_bnb_burn_post) | **POST** /sapi/v1/bnbBurn | Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) +[**sapi_v1_margin_account_get**](MarginApi.md#sapi_v1_margin_account_get) | **GET** /sapi/v1/margin/account | Query Cross Margin Account Details (USER_DATA) +[**sapi_v1_margin_all_assets_get**](MarginApi.md#sapi_v1_margin_all_assets_get) | **GET** /sapi/v1/margin/allAssets | Get All Margin Assets (MARKET_DATA) +[**sapi_v1_margin_all_order_list_get**](MarginApi.md#sapi_v1_margin_all_order_list_get) | **GET** /sapi/v1/margin/allOrderList | Query Margin Account's all OCO (USER_DATA) +[**sapi_v1_margin_all_orders_get**](MarginApi.md#sapi_v1_margin_all_orders_get) | **GET** /sapi/v1/margin/allOrders | Query Margin Account's All Orders (USER_DATA) +[**sapi_v1_margin_all_pairs_get**](MarginApi.md#sapi_v1_margin_all_pairs_get) | **GET** /sapi/v1/margin/allPairs | Get All Cross Margin Pairs (MARKET_DATA) +[**sapi_v1_margin_available_inventory_get**](MarginApi.md#sapi_v1_margin_available_inventory_get) | **GET** /sapi/v1/margin/available-inventory | Query Margin Available Inventory (USER_DATA) +[**sapi_v1_margin_borrow_repay_get**](MarginApi.md#sapi_v1_margin_borrow_repay_get) | **GET** /sapi/v1/margin/borrow-repay | Query borrow/repay records in Margin account(USER_DATA) +[**sapi_v1_margin_borrow_repay_post**](MarginApi.md#sapi_v1_margin_borrow_repay_post) | **POST** /sapi/v1/margin/borrow-repay | Margin account borrow/repay(MARGIN) +[**sapi_v1_margin_capital_flow_get**](MarginApi.md#sapi_v1_margin_capital_flow_get) | **GET** /sapi/v1/margin/capital-flow | Get cross or isolated margin capital flow(USER_DATA) +[**sapi_v1_margin_cross_margin_collateral_ratio_get**](MarginApi.md#sapi_v1_margin_cross_margin_collateral_ratio_get) | **GET** /sapi/v1/margin/crossMarginCollateralRatio | Cross margin collateral ratio (MARKET_DATA) +[**sapi_v1_margin_cross_margin_data_get**](MarginApi.md#sapi_v1_margin_cross_margin_data_get) | **GET** /sapi/v1/margin/crossMarginData | Query Cross Margin Fee Data (USER_DATA) +[**sapi_v1_margin_delist_schedule_get**](MarginApi.md#sapi_v1_margin_delist_schedule_get) | **GET** /sapi/v1/margin/delist-schedule | Get tokens or symbols delist schedule for cross margin and isolated margin (MARKET_DATA) +[**sapi_v1_margin_exchange_small_liability_get**](MarginApi.md#sapi_v1_margin_exchange_small_liability_get) | **GET** /sapi/v1/margin/exchange-small-liability | Get Small Liability Exchange Coin List (USER_DATA) +[**sapi_v1_margin_exchange_small_liability_history_get**](MarginApi.md#sapi_v1_margin_exchange_small_liability_history_get) | **GET** /sapi/v1/margin/exchange-small-liability-history | Get Small Liability Exchange History (USER_DATA) +[**sapi_v1_margin_force_liquidation_rec_get**](MarginApi.md#sapi_v1_margin_force_liquidation_rec_get) | **GET** /sapi/v1/margin/forceLiquidationRec | Get Force Liquidation Record (USER_DATA) +[**sapi_v1_margin_interest_history_get**](MarginApi.md#sapi_v1_margin_interest_history_get) | **GET** /sapi/v1/margin/interestHistory | Get Interest History (USER_DATA) +[**sapi_v1_margin_interest_rate_history_get**](MarginApi.md#sapi_v1_margin_interest_rate_history_get) | **GET** /sapi/v1/margin/interestRateHistory | Margin Interest Rate History (USER_DATA) +[**sapi_v1_margin_isolated_account_delete**](MarginApi.md#sapi_v1_margin_isolated_account_delete) | **DELETE** /sapi/v1/margin/isolated/account | Disable Isolated Margin Account (TRADE) +[**sapi_v1_margin_isolated_account_get**](MarginApi.md#sapi_v1_margin_isolated_account_get) | **GET** /sapi/v1/margin/isolated/account | Query Isolated Margin Account Info (USER_DATA) +[**sapi_v1_margin_isolated_account_limit_get**](MarginApi.md#sapi_v1_margin_isolated_account_limit_get) | **GET** /sapi/v1/margin/isolated/accountLimit | Query Enabled Isolated Margin Account Limit (USER_DATA) +[**sapi_v1_margin_isolated_account_post**](MarginApi.md#sapi_v1_margin_isolated_account_post) | **POST** /sapi/v1/margin/isolated/account | Enable Isolated Margin Account (TRADE) +[**sapi_v1_margin_isolated_all_pairs_get**](MarginApi.md#sapi_v1_margin_isolated_all_pairs_get) | **GET** /sapi/v1/margin/isolated/allPairs | Get All Isolated Margin Symbol(USER_DATA) +[**sapi_v1_margin_isolated_margin_data_get**](MarginApi.md#sapi_v1_margin_isolated_margin_data_get) | **GET** /sapi/v1/margin/isolatedMarginData | Query Isolated Margin Fee Data (USER_DATA) +[**sapi_v1_margin_isolated_margin_tier_get**](MarginApi.md#sapi_v1_margin_isolated_margin_tier_get) | **GET** /sapi/v1/margin/isolatedMarginTier | Query Isolated Margin Tier Data (USER_DATA) +[**sapi_v1_margin_leverage_bracket_get**](MarginApi.md#sapi_v1_margin_leverage_bracket_get) | **GET** /sapi/v1/margin/leverageBracket | Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) +[**sapi_v1_margin_manual_liquidation_post**](MarginApi.md#sapi_v1_margin_manual_liquidation_post) | **POST** /sapi/v1/margin/manual-liquidation | Margin manual liquidation(MARGIN) +[**sapi_v1_margin_max_borrowable_get**](MarginApi.md#sapi_v1_margin_max_borrowable_get) | **GET** /sapi/v1/margin/maxBorrowable | Query Max Borrow (USER_DATA) +[**sapi_v1_margin_max_leverage_post**](MarginApi.md#sapi_v1_margin_max_leverage_post) | **POST** /sapi/v1/margin/max-leverage | Adjust cross margin max leverage (USER_DATA) +[**sapi_v1_margin_max_transferable_get**](MarginApi.md#sapi_v1_margin_max_transferable_get) | **GET** /sapi/v1/margin/maxTransferable | Query Max Transfer-Out Amount (USER_DATA) +[**sapi_v1_margin_my_trades_get**](MarginApi.md#sapi_v1_margin_my_trades_get) | **GET** /sapi/v1/margin/myTrades | Query Margin Account's Trade List (USER_DATA) +[**sapi_v1_margin_next_hourly_interest_rate_get**](MarginApi.md#sapi_v1_margin_next_hourly_interest_rate_get) | **GET** /sapi/v1/margin/next-hourly-interest-rate | Get a future hourly interest rate (USER_DATA) +[**sapi_v1_margin_open_order_list_get**](MarginApi.md#sapi_v1_margin_open_order_list_get) | **GET** /sapi/v1/margin/openOrderList | Query Margin Account's Open OCO (USER_DATA) +[**sapi_v1_margin_open_orders_delete**](MarginApi.md#sapi_v1_margin_open_orders_delete) | **DELETE** /sapi/v1/margin/openOrders | Margin Account Cancel all Open Orders on a Symbol (TRADE) +[**sapi_v1_margin_open_orders_get**](MarginApi.md#sapi_v1_margin_open_orders_get) | **GET** /sapi/v1/margin/openOrders | Query Margin Account's Open Orders (USER_DATA) +[**sapi_v1_margin_order_delete**](MarginApi.md#sapi_v1_margin_order_delete) | **DELETE** /sapi/v1/margin/order | Margin Account Cancel Order (TRADE) +[**sapi_v1_margin_order_get**](MarginApi.md#sapi_v1_margin_order_get) | **GET** /sapi/v1/margin/order | Query Margin Account's Order (USER_DATA) +[**sapi_v1_margin_order_list_delete**](MarginApi.md#sapi_v1_margin_order_list_delete) | **DELETE** /sapi/v1/margin/orderList | Margin Account Cancel OCO (TRADE) +[**sapi_v1_margin_order_list_get**](MarginApi.md#sapi_v1_margin_order_list_get) | **GET** /sapi/v1/margin/orderList | Query Margin Account's OCO (USER_DATA) +[**sapi_v1_margin_order_oco_post**](MarginApi.md#sapi_v1_margin_order_oco_post) | **POST** /sapi/v1/margin/order/oco | Margin Account New OCO (TRADE) +[**sapi_v1_margin_order_post**](MarginApi.md#sapi_v1_margin_order_post) | **POST** /sapi/v1/margin/order | Margin Account New Order (TRADE) +[**sapi_v1_margin_price_index_get**](MarginApi.md#sapi_v1_margin_price_index_get) | **GET** /sapi/v1/margin/priceIndex | Query Margin PriceIndex (MARKET_DATA) +[**sapi_v1_margin_rate_limit_order_get**](MarginApi.md#sapi_v1_margin_rate_limit_order_get) | **GET** /sapi/v1/margin/rateLimit/order | Query Current Margin Order Count Usage (TRADE) +[**sapi_v1_margin_trade_coeff_get**](MarginApi.md#sapi_v1_margin_trade_coeff_get) | **GET** /sapi/v1/margin/tradeCoeff | Get Summary of Margin account (USER_DATA) +[**sapi_v1_margin_transfer_get**](MarginApi.md#sapi_v1_margin_transfer_get) | **GET** /sapi/v1/margin/transfer | Get Cross Margin Transfer History (USER_DATA) + + +# **sapi_v1_bnb_burn_get** +> BnbBurnStatus sapi_v1_bnb_burn_get(timestamp, signature, recv_window=recv_window) + +Get BNB Burn Status(USER_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.bnb_burn_status import BnbBurnStatus +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get BNB Burn Status(USER_DATA) + api_response = api_instance.sapi_v1_bnb_burn_get(timestamp, signature, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_bnb_burn_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_bnb_burn_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**BnbBurnStatus**](BnbBurnStatus.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Status on BNB to pay for trading fees | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_bnb_burn_post** +> BnbBurnStatus sapi_v1_bnb_burn_post(timestamp, signature, spot_bnb_burn=spot_bnb_burn, interest_bnb_burn=interest_bnb_burn, recv_window=recv_window) + +Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) + +- \"spotBNBBurn\" and \"interestBNBBurn\" should be sent at least one. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.bnb_burn_status import BnbBurnStatus +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + spot_bnb_burn = 'true' # str | Determines whether to use BNB to pay for trading fees on SPOT (optional) + interest_bnb_burn = 'false' # str | Determines whether to use BNB to pay for margin loan's interest (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) + api_response = api_instance.sapi_v1_bnb_burn_post(timestamp, signature, spot_bnb_burn=spot_bnb_burn, interest_bnb_burn=interest_bnb_burn, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_bnb_burn_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_bnb_burn_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **spot_bnb_burn** | **str**| Determines whether to use BNB to pay for trading fees on SPOT | [optional] + **interest_bnb_burn** | **str**| Determines whether to use BNB to pay for margin loan's interest | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**BnbBurnStatus**](BnbBurnStatus.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Status on BNB to pay for trading fees | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_account_get** +> SapiV1MarginAccountGet200Response sapi_v1_margin_account_get(timestamp, signature, recv_window=recv_window) + +Query Cross Margin Account Details (USER_DATA) + +Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_account_get200_response import SapiV1MarginAccountGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Cross Margin Account Details (USER_DATA) + api_response = api_instance.sapi_v1_margin_account_get(timestamp, signature, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_account_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_account_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginAccountGet200Response**](SapiV1MarginAccountGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin account details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_all_assets_get** +> List[SapiV1MarginAllAssetsGet200ResponseInner] sapi_v1_margin_all_assets_get(asset) + +Get All Margin Assets (MARKET_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_all_assets_get200_response_inner import SapiV1MarginAllAssetsGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + asset = 'BTC' # str | + + try: + # Get All Margin Assets (MARKET_DATA) + api_response = api_instance.sapi_v1_margin_all_assets_get(asset) + print("The response of MarginApi->sapi_v1_margin_all_assets_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_all_assets_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | **str**| | + +### Return type + +[**List[SapiV1MarginAllAssetsGet200ResponseInner]**](SapiV1MarginAllAssetsGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Assets details | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_all_order_list_get** +> List[ApiV3AllOrderListGet200ResponseInner] sapi_v1_margin_all_order_list_get(timestamp, signature, is_isolated=is_isolated, symbol=symbol, from_id=from_id, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + +Query Margin Account's all OCO (USER_DATA) + +Retrieves all OCO for a specific margin account based on provided optional parameters Weight(IP): 200 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_all_order_list_get200_response_inner import ApiV3AllOrderListGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + is_isolated = 'is_isolated_example' # str | * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin (optional) + symbol = 'symbol_example' # str | Mandatory for isolated margin, not supported for cross margin (optional) + from_id = 'from_id_example' # str | If supplied, neither `startTime` or `endTime` can be provided (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 56 # int | Default Value: 500; Max Value: 1000 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Margin Account's all OCO (USER_DATA) + api_response = api_instance.sapi_v1_margin_all_order_list_get(timestamp, signature, is_isolated=is_isolated, symbol=symbol, from_id=from_id, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_all_order_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_all_order_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **is_isolated** | **str**| * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin | [optional] + **symbol** | **str**| Mandatory for isolated margin, not supported for cross margin | [optional] + **from_id** | **str**| If supplied, neither `startTime` or `endTime` can be provided | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| Default Value: 500; Max Value: 1000 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[ApiV3AllOrderListGet200ResponseInner]**](ApiV3AllOrderListGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of Margin OCO orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_all_orders_get** +> List[MarginOrderDetail] sapi_v1_margin_all_orders_get(symbol, timestamp, signature, is_isolated=is_isolated, order_id=order_id, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + +Query Margin Account's All Orders (USER_DATA) + +- If `orderId` is set, it will get orders >= that orderId. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 200 Request Limit: 60 times/min per IP + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.margin_order_detail import MarginOrderDetail +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + is_isolated = 'is_isolated_example' # str | * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin (optional) + order_id = 56 # int | Order id (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Margin Account's All Orders (USER_DATA) + api_response = api_instance.sapi_v1_margin_all_orders_get(symbol, timestamp, signature, is_isolated=is_isolated, order_id=order_id, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_all_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_all_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **is_isolated** | **str**| * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin | [optional] + **order_id** | **int**| Order id | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[MarginOrderDetail]**](MarginOrderDetail.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin order list | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_all_pairs_get** +> List[SapiV1MarginAllPairsGet200ResponseInner] sapi_v1_margin_all_pairs_get(symbol) + +Get All Cross Margin Pairs (MARKET_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_all_pairs_get200_response_inner import SapiV1MarginAllPairsGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + + try: + # Get All Cross Margin Pairs (MARKET_DATA) + api_response = api_instance.sapi_v1_margin_all_pairs_get(symbol) + print("The response of MarginApi->sapi_v1_margin_all_pairs_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_all_pairs_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + +### Return type + +[**List[SapiV1MarginAllPairsGet200ResponseInner]**](SapiV1MarginAllPairsGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin pairs | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_available_inventory_get** +> SapiV1MarginAvailableInventoryGet200Response sapi_v1_margin_available_inventory_get(type, timestamp, signature) + +Query Margin Available Inventory (USER_DATA) + +Margin available Inventory query Weight(UID): 50 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_available_inventory_get200_response import SapiV1MarginAvailableInventoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + type = 'type_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + + try: + # Query Margin Available Inventory (USER_DATA) + api_response = api_instance.sapi_v1_margin_available_inventory_get(type, timestamp, signature) + print("The response of MarginApi->sapi_v1_margin_available_inventory_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_available_inventory_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + +### Return type + +[**SapiV1MarginAvailableInventoryGet200Response**](SapiV1MarginAvailableInventoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin available Inventory | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_borrow_repay_get** +> SapiV1MarginBorrowRepayGet200Response sapi_v1_margin_borrow_repay_get(asset, type, timestamp, signature, isolated_symbol=isolated_symbol, tx_id=tx_id, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Query borrow/repay records in Margin account(USER_DATA) + +Query borrow/repay records in Margin account - txId or startTime must be sent. txId takes precedence. Response in descending order - If an asset is sent, data within 30 days before endTime; If an asset is not sent, data within 7 days before endTime - If neither startTime nor endTime is sent, the recent 7-day data will be returned. - startTime set as endTime - 7 days by default, endTime set as current time by default Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_borrow_repay_get200_response import SapiV1MarginBorrowRepayGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + asset = 'BTC' # str | + type = 'type_example' # str | BORROW or REPAY + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + isolated_symbol = 'isolated_symbol_example' # str | Isolated symbol (optional) + tx_id = 56 # int | tranId in POST /sapi/v1/margin/loan (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query borrow/repay records in Margin account(USER_DATA) + api_response = api_instance.sapi_v1_margin_borrow_repay_get(asset, type, timestamp, signature, isolated_symbol=isolated_symbol, tx_id=tx_id, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_borrow_repay_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_borrow_repay_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | **str**| | + **type** | **str**| BORROW or REPAY | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **isolated_symbol** | **str**| Isolated symbol | [optional] + **tx_id** | **int**| tranId in POST /sapi/v1/margin/loan | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginBorrowRepayGet200Response**](SapiV1MarginBorrowRepayGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin account borrow/repay | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_borrow_repay_post** +> SapiV1MarginBorrowRepayPost200Response sapi_v1_margin_borrow_repay_post(asset, is_isolated, symbol, amount, type, timestamp, signature, recv_window=recv_window) + +Margin account borrow/repay(MARGIN) + +Margin account borrow/repay(MARGIN) Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_borrow_repay_post200_response import SapiV1MarginBorrowRepayPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + asset = 'BTC' # str | + is_isolated = 'is_isolated_example' # str | TRUE for isolated margin, FALSE for crossed margin + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + amount = 1.01 # float | + type = 'type_example' # str | BORROW or REPAY + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Margin account borrow/repay(MARGIN) + api_response = api_instance.sapi_v1_margin_borrow_repay_post(asset, is_isolated, symbol, amount, type, timestamp, signature, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_borrow_repay_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_borrow_repay_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | **str**| | + **is_isolated** | **str**| TRUE for isolated margin, FALSE for crossed margin | + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **amount** | **float**| | + **type** | **str**| BORROW or REPAY | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginBorrowRepayPost200Response**](SapiV1MarginBorrowRepayPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin account borrow/repay | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_capital_flow_get** +> List[SapiV1MarginCapitalFlowGet200ResponseInner] sapi_v1_margin_capital_flow_get(timestamp, signature, asset=asset, symbol=symbol, type=type, start_time=start_time, end_time=end_time, from_id=from_id, limit=limit, recv_window=recv_window) + +Get cross or isolated margin capital flow(USER_DATA) + +Get cross or isolated margin capital flow Weight(IP): 100 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_capital_flow_get200_response_inner import SapiV1MarginCapitalFlowGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'BNB' # str | (optional) + symbol = 'BTCUSDT' # str | Required when querying isolated data (optional) + type = 'type_example' # str | (optional) + start_time = 56 # int | Only supports querying the data of the last 90 days (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + from_id = 56 # int | If fromId is set, the data with id > fromId will be returned. Otherwise the latest data will be returned (optional) + limit = 56 # int | The number of data items returned each time is limited. Default 500; Max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get cross or isolated margin capital flow(USER_DATA) + api_response = api_instance.sapi_v1_margin_capital_flow_get(timestamp, signature, asset=asset, symbol=symbol, type=type, start_time=start_time, end_time=end_time, from_id=from_id, limit=limit, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_capital_flow_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_capital_flow_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| | [optional] + **symbol** | **str**| Required when querying isolated data | [optional] + **type** | **str**| | [optional] + **start_time** | **int**| Only supports querying the data of the last 90 days | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **from_id** | **int**| If fromId is set, the data with id > fromId will be returned. Otherwise the latest data will be returned | [optional] + **limit** | **int**| The number of data items returned each time is limited. Default 500; Max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1MarginCapitalFlowGet200ResponseInner]**](SapiV1MarginCapitalFlowGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin capital flow | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_cross_margin_collateral_ratio_get** +> List[SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner] sapi_v1_margin_cross_margin_collateral_ratio_get() + +Cross margin collateral ratio (MARKET_DATA) + + Weight(IP): 100 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner import SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + + try: + # Cross margin collateral ratio (MARKET_DATA) + api_response = api_instance.sapi_v1_margin_cross_margin_collateral_ratio_get() + print("The response of MarginApi->sapi_v1_margin_cross_margin_collateral_ratio_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_cross_margin_collateral_ratio_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner]**](SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin collateral ratio | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_cross_margin_data_get** +> List[SapiV1MarginCrossMarginDataGet200ResponseInner] sapi_v1_margin_cross_margin_data_get(timestamp, signature, vip_level=vip_level, coin=coin, recv_window=recv_window) + +Query Cross Margin Fee Data (USER_DATA) + +Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight(IP): 1 when coin is specified; 5 when the coin parameter is omitted + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_cross_margin_data_get200_response_inner import SapiV1MarginCrossMarginDataGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + vip_level = 1 # int | Defaults to user's vip level (optional) + coin = 'BNB' # str | Coin name (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Cross Margin Fee Data (USER_DATA) + api_response = api_instance.sapi_v1_margin_cross_margin_data_get(timestamp, signature, vip_level=vip_level, coin=coin, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_cross_margin_data_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_cross_margin_data_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **vip_level** | **int**| Defaults to user's vip level | [optional] + **coin** | **str**| Coin name | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1MarginCrossMarginDataGet200ResponseInner]**](SapiV1MarginCrossMarginDataGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cross Margin Fee Data | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_delist_schedule_get** +> List[SapiV1MarginDelistScheduleGet200ResponseInner] sapi_v1_margin_delist_schedule_get(timestamp, signature, recv_window=recv_window) + +Get tokens or symbols delist schedule for cross margin and isolated margin (MARKET_DATA) + +Get tokens or symbols delist schedule for cross margin and isolated margin Weight(IP): 100 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_delist_schedule_get200_response_inner import SapiV1MarginDelistScheduleGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get tokens or symbols delist schedule for cross margin and isolated margin (MARKET_DATA) + api_response = api_instance.sapi_v1_margin_delist_schedule_get(timestamp, signature, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_delist_schedule_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_delist_schedule_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1MarginDelistScheduleGet200ResponseInner]**](SapiV1MarginDelistScheduleGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | tokens or symbols delist schedule | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_exchange_small_liability_get** +> List[SapiV1MarginExchangeSmallLiabilityGet200ResponseInner] sapi_v1_margin_exchange_small_liability_get(timestamp, signature, recv_window=recv_window) + +Get Small Liability Exchange Coin List (USER_DATA) + +Query the coins which can be small liability exchange Weight(UID): 100 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_exchange_small_liability_get200_response_inner import SapiV1MarginExchangeSmallLiabilityGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Small Liability Exchange Coin List (USER_DATA) + api_response = api_instance.sapi_v1_margin_exchange_small_liability_get(timestamp, signature, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_exchange_small_liability_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_exchange_small_liability_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1MarginExchangeSmallLiabilityGet200ResponseInner]**](SapiV1MarginExchangeSmallLiabilityGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | coin list | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_exchange_small_liability_history_get** +> SapiV1MarginExchangeSmallLiabilityHistoryGet200Response sapi_v1_margin_exchange_small_liability_history_get(timestamp, signature, current=current, size=size, start_time=start_time, end_time=end_time, recv_window=recv_window) + +Get Small Liability Exchange History (USER_DATA) + +Get Small liability Exchange History Weight(UID): 100 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_exchange_small_liability_history_get200_response import SapiV1MarginExchangeSmallLiabilityHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Small Liability Exchange History (USER_DATA) + api_response = api_instance.sapi_v1_margin_exchange_small_liability_history_get(timestamp, signature, current=current, size=size, start_time=start_time, end_time=end_time, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_exchange_small_liability_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_exchange_small_liability_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginExchangeSmallLiabilityHistoryGet200Response**](SapiV1MarginExchangeSmallLiabilityHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | coin list | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_force_liquidation_rec_get** +> SapiV1MarginForceLiquidationRecGet200Response sapi_v1_margin_force_liquidation_rec_get(timestamp, signature, start_time=start_time, end_time=end_time, isolated_symbol=isolated_symbol, current=current, size=size, recv_window=recv_window) + +Get Force Liquidation Record (USER_DATA) + +- Response in descending order Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_force_liquidation_rec_get200_response import SapiV1MarginForceLiquidationRecGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + isolated_symbol = 'isolated_symbol_example' # str | Isolated symbol (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Force Liquidation Record (USER_DATA) + api_response = api_instance.sapi_v1_margin_force_liquidation_rec_get(timestamp, signature, start_time=start_time, end_time=end_time, isolated_symbol=isolated_symbol, current=current, size=size, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_force_liquidation_rec_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_force_liquidation_rec_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **isolated_symbol** | **str**| Isolated symbol | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginForceLiquidationRecGet200Response**](SapiV1MarginForceLiquidationRecGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Force Liquidation History, response in descending order | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_interest_history_get** +> SapiV1MarginInterestHistoryGet200Response sapi_v1_margin_interest_history_get(timestamp, signature, asset=asset, isolated_symbol=isolated_symbol, start_time=start_time, end_time=end_time, current=current, size=size, archived=archived, recv_window=recv_window) + +Get Interest History (USER_DATA) + +- Response in descending order - If `isolatedSymbol` is not sent, crossed margin data will be returned - Set `archived` to `true` to query data from 6 months ago - `type` in response has 4 enums: - `PERIODIC` interest charged per hour - `ON_BORROW` first interest charged on borrow - `PERIODIC_CONVERTED` interest charged per hour converted into BNB - `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_interest_history_get200_response import SapiV1MarginInterestHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'BNB' # str | (optional) + isolated_symbol = 'isolated_symbol_example' # str | Isolated symbol (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + archived = 'archived_example' # str | Default: false. Set to true for archived data from 6 months ago (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Interest History (USER_DATA) + api_response = api_instance.sapi_v1_margin_interest_history_get(timestamp, signature, asset=asset, isolated_symbol=isolated_symbol, start_time=start_time, end_time=end_time, current=current, size=size, archived=archived, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_interest_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_interest_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| | [optional] + **isolated_symbol** | **str**| Isolated symbol | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **archived** | **str**| Default: false. Set to true for archived data from 6 months ago | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginInterestHistoryGet200Response**](SapiV1MarginInterestHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Interest History, response in descending order | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_interest_rate_history_get** +> List[SapiV1MarginInterestRateHistoryGet200ResponseInner] sapi_v1_margin_interest_rate_history_get(asset, timestamp, signature, vip_level=vip_level, start_time=start_time, end_time=end_time, recv_window=recv_window) + +Margin Interest Rate History (USER_DATA) + +The max interval between startTime and endTime is 30 days. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_interest_rate_history_get200_response_inner import SapiV1MarginInterestRateHistoryGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + asset = 'BTC' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + vip_level = 1 # int | Defaults to user's vip level (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Margin Interest Rate History (USER_DATA) + api_response = api_instance.sapi_v1_margin_interest_rate_history_get(asset, timestamp, signature, vip_level=vip_level, start_time=start_time, end_time=end_time, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_interest_rate_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_interest_rate_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **vip_level** | **int**| Defaults to user's vip level | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1MarginInterestRateHistoryGet200ResponseInner]**](SapiV1MarginInterestRateHistoryGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin Interest Rate History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_isolated_account_delete** +> SapiV1MarginIsolatedAccountPost200Response sapi_v1_margin_isolated_account_delete(symbol, timestamp, signature, recv_window=recv_window) + +Disable Isolated Margin Account (TRADE) + +Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours . Weight(UID): 300 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_isolated_account_post200_response import SapiV1MarginIsolatedAccountPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Disable Isolated Margin Account (TRADE) + api_response = api_instance.sapi_v1_margin_isolated_account_delete(symbol, timestamp, signature, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_isolated_account_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_isolated_account_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginIsolatedAccountPost200Response**](SapiV1MarginIsolatedAccountPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Isolated Margin Account status | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_isolated_account_get** +> IsolatedMarginAccountInfo sapi_v1_margin_isolated_account_get(timestamp, signature, symbols=symbols, recv_window=recv_window) + +Query Isolated Margin Account Info (USER_DATA) + +- If \"symbols\" is not sent, all isolated assets will be returned. - If \"symbols\" is sent, only the isolated assets of the sent symbols will be returned. Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.isolated_margin_account_info import IsolatedMarginAccountInfo +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + symbols = 'BTCUSDT,BNBUSDT,ADAUSDT' # str | Max 5 symbols can be sent; separated by ',' (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Isolated Margin Account Info (USER_DATA) + api_response = api_instance.sapi_v1_margin_isolated_account_get(timestamp, signature, symbols=symbols, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_isolated_account_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_isolated_account_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **symbols** | **str**| Max 5 symbols can be sent; separated by ',' | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**IsolatedMarginAccountInfo**](IsolatedMarginAccountInfo.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Isolated Margin Account Info when \"symbols\" is not sent | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_isolated_account_limit_get** +> SapiV1MarginIsolatedAccountLimitGet200Response sapi_v1_margin_isolated_account_limit_get(timestamp, signature, recv_window=recv_window) + +Query Enabled Isolated Margin Account Limit (USER_DATA) + +Query enabled isolated margin account limit. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_isolated_account_limit_get200_response import SapiV1MarginIsolatedAccountLimitGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Enabled Isolated Margin Account Limit (USER_DATA) + api_response = api_instance.sapi_v1_margin_isolated_account_limit_get(timestamp, signature, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_isolated_account_limit_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_isolated_account_limit_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginIsolatedAccountLimitGet200Response**](SapiV1MarginIsolatedAccountLimitGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Number of enabled Isolated Margin Account and its limit | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_isolated_account_post** +> SapiV1MarginIsolatedAccountPost200Response sapi_v1_margin_isolated_account_post(symbol, timestamp, signature, recv_window=recv_window) + +Enable Isolated Margin Account (TRADE) + +Enable isolated margin account for a specific symbol. Weight(UID): 300 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_isolated_account_post200_response import SapiV1MarginIsolatedAccountPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Enable Isolated Margin Account (TRADE) + api_response = api_instance.sapi_v1_margin_isolated_account_post(symbol, timestamp, signature, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_isolated_account_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_isolated_account_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginIsolatedAccountPost200Response**](SapiV1MarginIsolatedAccountPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Isolated Margin Account status | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_isolated_all_pairs_get** +> List[SapiV1MarginIsolatedAllPairsGet200ResponseInner] sapi_v1_margin_isolated_all_pairs_get(symbol, timestamp, signature, recv_window=recv_window) + +Get All Isolated Margin Symbol(USER_DATA) + +Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_isolated_all_pairs_get200_response_inner import SapiV1MarginIsolatedAllPairsGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get All Isolated Margin Symbol(USER_DATA) + api_response = api_instance.sapi_v1_margin_isolated_all_pairs_get(symbol, timestamp, signature, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_isolated_all_pairs_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_isolated_all_pairs_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1MarginIsolatedAllPairsGet200ResponseInner]**](SapiV1MarginIsolatedAllPairsGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | All Isolated Margin Symbols | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_isolated_margin_data_get** +> List[SapiV1MarginIsolatedMarginDataGet200ResponseInner] sapi_v1_margin_isolated_margin_data_get(timestamp, signature, vip_level=vip_level, symbol=symbol, recv_window=recv_window) + +Query Isolated Margin Fee Data (USER_DATA) + +Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight(IP): 1 when a single is specified; 10 when the symbol parameter is omitted + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_isolated_margin_data_get200_response_inner import SapiV1MarginIsolatedMarginDataGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + vip_level = 1 # int | Defaults to user's vip level (optional) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Isolated Margin Fee Data (USER_DATA) + api_response = api_instance.sapi_v1_margin_isolated_margin_data_get(timestamp, signature, vip_level=vip_level, symbol=symbol, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_isolated_margin_data_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_isolated_margin_data_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **vip_level** | **int**| Defaults to user's vip level | [optional] + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1MarginIsolatedMarginDataGet200ResponseInner]**](SapiV1MarginIsolatedMarginDataGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Isolated Margin Fee Data | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_isolated_margin_tier_get** +> List[SapiV1MarginIsolatedMarginTierGet200ResponseInner] sapi_v1_margin_isolated_margin_tier_get(symbol, timestamp, signature, tier=tier, recv_window=recv_window) + +Query Isolated Margin Tier Data (USER_DATA) + +Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_isolated_margin_tier_get200_response_inner import SapiV1MarginIsolatedMarginTierGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + tier = '1' # str | All margin tier data will be returned if tier is omitted (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Isolated Margin Tier Data (USER_DATA) + api_response = api_instance.sapi_v1_margin_isolated_margin_tier_get(symbol, timestamp, signature, tier=tier, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_isolated_margin_tier_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_isolated_margin_tier_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **tier** | **str**| All margin tier data will be returned if tier is omitted | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1MarginIsolatedMarginTierGet200ResponseInner]**](SapiV1MarginIsolatedMarginTierGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Isolated Margin Tier Data | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_leverage_bracket_get** +> List[SapiV1MarginLeverageBracketGet200ResponseInner] sapi_v1_margin_leverage_bracket_get() + +Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) + +Liability Coin Leverage Bracket in Cross Margin Pro Mode Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_leverage_bracket_get200_response_inner import SapiV1MarginLeverageBracketGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + + try: + # Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) + api_response = api_instance.sapi_v1_margin_leverage_bracket_get() + print("The response of MarginApi->sapi_v1_margin_leverage_bracket_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_leverage_bracket_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[SapiV1MarginLeverageBracketGet200ResponseInner]**](SapiV1MarginLeverageBracketGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Leverage info | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_manual_liquidation_post** +> List[SapiV1MarginExchangeSmallLiabilityGet200ResponseInner] sapi_v1_margin_manual_liquidation_post(type, timestamp, signature, symbol=symbol) + +Margin manual liquidation(MARGIN) + +Margin manual liquidation Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_exchange_small_liability_get200_response_inner import SapiV1MarginExchangeSmallLiabilityGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + type = 'type_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + symbol = 'BTCUSDT' # str | (optional) + + try: + # Margin manual liquidation(MARGIN) + api_response = api_instance.sapi_v1_margin_manual_liquidation_post(type, timestamp, signature, symbol=symbol) + print("The response of MarginApi->sapi_v1_margin_manual_liquidation_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_manual_liquidation_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **symbol** | **str**| | [optional] + +### Return type + +[**List[SapiV1MarginExchangeSmallLiabilityGet200ResponseInner]**](SapiV1MarginExchangeSmallLiabilityGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin manual liquidation | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_max_borrowable_get** +> SapiV1MarginMaxBorrowableGet200Response sapi_v1_margin_max_borrowable_get(asset, timestamp, signature, isolated_symbol=isolated_symbol, recv_window=recv_window) + +Query Max Borrow (USER_DATA) + +- If `isolatedSymbol` is not sent, crossed margin data will be sent. - `borrowLimit` is also available from https://www.binance.com/en/margin-fee Weight(IP): 50 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_max_borrowable_get200_response import SapiV1MarginMaxBorrowableGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + asset = 'BTC' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + isolated_symbol = 'isolated_symbol_example' # str | Isolated symbol (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Max Borrow (USER_DATA) + api_response = api_instance.sapi_v1_margin_max_borrowable_get(asset, timestamp, signature, isolated_symbol=isolated_symbol, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_max_borrowable_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_max_borrowable_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **isolated_symbol** | **str**| Isolated symbol | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginMaxBorrowableGet200Response**](SapiV1MarginMaxBorrowableGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Details on max borrow amount | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_max_leverage_post** +> SapiV1MarginMaxLeveragePost200Response sapi_v1_margin_max_leverage_post(max_leverage, timestamp, signature, recv_window=recv_window) + +Adjust cross margin max leverage (USER_DATA) + +Adjust cross margin max leverage Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_max_leverage_post200_response import SapiV1MarginMaxLeveragePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + max_leverage = 3 # int | Can only adjust 3 or 5 + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Adjust cross margin max leverage (USER_DATA) + api_response = api_instance.sapi_v1_margin_max_leverage_post(max_leverage, timestamp, signature, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_max_leverage_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_max_leverage_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **max_leverage** | **int**| Can only adjust 3 or 5 | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginMaxLeveragePost200Response**](SapiV1MarginMaxLeveragePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Adjust result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_max_transferable_get** +> SapiV1MarginMaxTransferableGet200Response sapi_v1_margin_max_transferable_get(asset, timestamp, signature, isolated_symbol=isolated_symbol, recv_window=recv_window) + +Query Max Transfer-Out Amount (USER_DATA) + +- If `isolatedSymbol` is not sent, crossed margin data will be sent. Weight(IP): 50 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_max_transferable_get200_response import SapiV1MarginMaxTransferableGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + asset = 'BTC' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + isolated_symbol = 'isolated_symbol_example' # str | Isolated symbol (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Max Transfer-Out Amount (USER_DATA) + api_response = api_instance.sapi_v1_margin_max_transferable_get(asset, timestamp, signature, isolated_symbol=isolated_symbol, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_max_transferable_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_max_transferable_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **isolated_symbol** | **str**| Isolated symbol | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginMaxTransferableGet200Response**](SapiV1MarginMaxTransferableGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Details on max transferable amount | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_my_trades_get** +> List[MarginTrade] sapi_v1_margin_my_trades_get(symbol, timestamp, signature, is_isolated=is_isolated, start_time=start_time, end_time=end_time, from_id=from_id, limit=limit, recv_window=recv_window) + +Query Margin Account's Trade List (USER_DATA) + +- If `fromId` is set, it will get orders >= that `fromId`. Otherwise most recent trades are returned. Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.margin_trade import MarginTrade +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + is_isolated = 'is_isolated_example' # str | * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + from_id = 56 # int | Trade id to fetch from. Default gets most recent trades. (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Margin Account's Trade List (USER_DATA) + api_response = api_instance.sapi_v1_margin_my_trades_get(symbol, timestamp, signature, is_isolated=is_isolated, start_time=start_time, end_time=end_time, from_id=from_id, limit=limit, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_my_trades_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_my_trades_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **is_isolated** | **str**| * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **from_id** | **int**| Trade id to fetch from. Default gets most recent trades. | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[MarginTrade]**](MarginTrade.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of margin trades | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_next_hourly_interest_rate_get** +> List[SapiV1MarginNextHourlyInterestRateGet200ResponseInner] sapi_v1_margin_next_hourly_interest_rate_get(timestamp, signature, assets=assets, is_isolated=is_isolated, recv_window=recv_window) + +Get a future hourly interest rate (USER_DATA) + +Get user the next hourly estimate interest Weight(UID): 100 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_next_hourly_interest_rate_get200_response_inner import SapiV1MarginNextHourlyInterestRateGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + assets = 'BTC,ETH' # str | List of assets, separated by commas, up to 20 (optional) + is_isolated = 'TRUE' # str | for isolated margin or not, \"TRUE\", \"FALSE\" (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get a future hourly interest rate (USER_DATA) + api_response = api_instance.sapi_v1_margin_next_hourly_interest_rate_get(timestamp, signature, assets=assets, is_isolated=is_isolated, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_next_hourly_interest_rate_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_next_hourly_interest_rate_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **assets** | **str**| List of assets, separated by commas, up to 20 | [optional] + **is_isolated** | **str**| for isolated margin or not, \"TRUE\", \"FALSE\" | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1MarginNextHourlyInterestRateGet200ResponseInner]**](SapiV1MarginNextHourlyInterestRateGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | hourly interest | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_open_order_list_get** +> List[SapiV1MarginOpenOrderListGet200ResponseInner] sapi_v1_margin_open_order_list_get(timestamp, signature, is_isolated=is_isolated, symbol=symbol, recv_window=recv_window) + +Query Margin Account's Open OCO (USER_DATA) + +Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_open_order_list_get200_response_inner import SapiV1MarginOpenOrderListGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + is_isolated = 'is_isolated_example' # str | * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin (optional) + symbol = 'symbol_example' # str | Mandatory for isolated margin, not supported for cross margin (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Margin Account's Open OCO (USER_DATA) + api_response = api_instance.sapi_v1_margin_open_order_list_get(timestamp, signature, is_isolated=is_isolated, symbol=symbol, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_open_order_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_open_order_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **is_isolated** | **str**| * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin | [optional] + **symbol** | **str**| Mandatory for isolated margin, not supported for cross margin | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1MarginOpenOrderListGet200ResponseInner]**](SapiV1MarginOpenOrderListGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of Open Margin OCO orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_open_orders_delete** +> List[SapiV1MarginOpenOrdersDelete200ResponseInner] sapi_v1_margin_open_orders_delete(symbol, timestamp, signature, is_isolated=is_isolated, recv_window=recv_window) + +Margin Account Cancel all Open Orders on a Symbol (TRADE) + +- Cancels all active orders on a symbol for margin account. - This includes OCO orders. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_open_orders_delete200_response_inner import SapiV1MarginOpenOrdersDelete200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + is_isolated = 'is_isolated_example' # str | * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Margin Account Cancel all Open Orders on a Symbol (TRADE) + api_response = api_instance.sapi_v1_margin_open_orders_delete(symbol, timestamp, signature, is_isolated=is_isolated, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_open_orders_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_open_orders_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **is_isolated** | **str**| * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1MarginOpenOrdersDelete200ResponseInner]**](SapiV1MarginOpenOrdersDelete200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cancelled margin orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_open_orders_get** +> List[MarginOrderDetail] sapi_v1_margin_open_orders_get(timestamp, signature, symbol=symbol, is_isolated=is_isolated, recv_window=recv_window) + +Query Margin Account's Open Orders (USER_DATA) + +- If the `symbol` is not sent, orders for all symbols will be returned in an array. - When all symbols are returned, the number of requests counted against the rate limiter is equal to the number of symbols currently trading on the exchange - If isIsolated =\"TRUE\", symbol must be sent. Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.margin_order_detail import MarginOrderDetail +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT (optional) + is_isolated = 'is_isolated_example' # str | * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Margin Account's Open Orders (USER_DATA) + api_response = api_instance.sapi_v1_margin_open_orders_get(timestamp, signature, symbol=symbol, is_isolated=is_isolated, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_open_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_open_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | [optional] + **is_isolated** | **str**| * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[MarginOrderDetail]**](MarginOrderDetail.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin open orders list | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_order_delete** +> MarginOrder sapi_v1_margin_order_delete(symbol, timestamp, signature, is_isolated=is_isolated, order_id=order_id, orig_client_order_id=orig_client_order_id, new_client_order_id=new_client_order_id, recv_window=recv_window) + +Margin Account Cancel Order (TRADE) + +Cancel an active order for margin account. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.margin_order import MarginOrder +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + is_isolated = 'is_isolated_example' # str | * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin (optional) + order_id = 56 # int | Order id (optional) + orig_client_order_id = 'orig_client_order_id_example' # str | Order id from client (optional) + new_client_order_id = 'new_client_order_id_example' # str | Used to uniquely identify this cancel. Automatically generated by default (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Margin Account Cancel Order (TRADE) + api_response = api_instance.sapi_v1_margin_order_delete(symbol, timestamp, signature, is_isolated=is_isolated, order_id=order_id, orig_client_order_id=orig_client_order_id, new_client_order_id=new_client_order_id, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_order_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_order_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **is_isolated** | **str**| * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin | [optional] + **order_id** | **int**| Order id | [optional] + **orig_client_order_id** | **str**| Order id from client | [optional] + **new_client_order_id** | **str**| Used to uniquely identify this cancel. Automatically generated by default | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**MarginOrder**](MarginOrder.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cancelled margin order details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_order_get** +> MarginOrderDetail sapi_v1_margin_order_get(symbol, timestamp, signature, is_isolated=is_isolated, order_id=order_id, orig_client_order_id=orig_client_order_id, recv_window=recv_window) + +Query Margin Account's Order (USER_DATA) + +- Either `orderId` or `origClientOrderId` must be sent. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.margin_order_detail import MarginOrderDetail +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + is_isolated = 'is_isolated_example' # str | * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin (optional) + order_id = 56 # int | Order id (optional) + orig_client_order_id = 'orig_client_order_id_example' # str | Order id from client (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Margin Account's Order (USER_DATA) + api_response = api_instance.sapi_v1_margin_order_get(symbol, timestamp, signature, is_isolated=is_isolated, order_id=order_id, orig_client_order_id=orig_client_order_id, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_order_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_order_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **is_isolated** | **str**| * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin | [optional] + **order_id** | **int**| Order id | [optional] + **orig_client_order_id** | **str**| Order id from client | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**MarginOrderDetail**](MarginOrderDetail.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Interest History, response in descending order | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_order_list_delete** +> MarginOcoOrder sapi_v1_margin_order_list_delete(symbol, timestamp, signature, is_isolated=is_isolated, order_list_id=order_list_id, list_client_order_id=list_client_order_id, new_client_order_id=new_client_order_id, recv_window=recv_window) + +Margin Account Cancel OCO (TRADE) + +Cancel an entire Order List for a margin account - Canceling an individual leg will cancel the entire OCO - Either `orderListId` or `listClientOrderId` must be provided Weight(UID): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.margin_oco_order import MarginOcoOrder +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + is_isolated = 'is_isolated_example' # str | * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin (optional) + order_list_id = 56 # int | Order list id (optional) + list_client_order_id = 'list_client_order_id_example' # str | A unique Id for the entire orderList (optional) + new_client_order_id = 'new_client_order_id_example' # str | Used to uniquely identify this cancel. Automatically generated by default (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Margin Account Cancel OCO (TRADE) + api_response = api_instance.sapi_v1_margin_order_list_delete(symbol, timestamp, signature, is_isolated=is_isolated, order_list_id=order_list_id, list_client_order_id=list_client_order_id, new_client_order_id=new_client_order_id, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_order_list_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_order_list_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **is_isolated** | **str**| * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin | [optional] + **order_list_id** | **int**| Order list id | [optional] + **list_client_order_id** | **str**| A unique Id for the entire orderList | [optional] + **new_client_order_id** | **str**| Used to uniquely identify this cancel. Automatically generated by default | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**MarginOcoOrder**](MarginOcoOrder.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin OCO details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_order_list_get** +> SapiV1MarginOrderListGet200Response sapi_v1_margin_order_list_get(timestamp, signature, is_isolated=is_isolated, symbol=symbol, order_list_id=order_list_id, orig_client_order_id=orig_client_order_id, recv_window=recv_window) + +Query Margin Account's OCO (USER_DATA) + +Retrieves a specific OCO based on provided optional parameters - Either `orderListId` or `origClientOrderId` must be provided Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_order_list_get200_response import SapiV1MarginOrderListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + is_isolated = 'is_isolated_example' # str | * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin (optional) + symbol = 'symbol_example' # str | Mandatory for isolated margin, not supported for cross margin (optional) + order_list_id = 56 # int | Order list id (optional) + orig_client_order_id = 'orig_client_order_id_example' # str | Order id from client (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Margin Account's OCO (USER_DATA) + api_response = api_instance.sapi_v1_margin_order_list_get(timestamp, signature, is_isolated=is_isolated, symbol=symbol, order_list_id=order_list_id, orig_client_order_id=orig_client_order_id, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_order_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_order_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **is_isolated** | **str**| * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin | [optional] + **symbol** | **str**| Mandatory for isolated margin, not supported for cross margin | [optional] + **order_list_id** | **int**| Order list id | [optional] + **orig_client_order_id** | **str**| Order id from client | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginOrderListGet200Response**](SapiV1MarginOrderListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin OCO details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_order_oco_post** +> SapiV1MarginOrderOcoPost200Response sapi_v1_margin_order_oco_post(symbol, side, quantity, price, stop_price, timestamp, signature, is_isolated=is_isolated, list_client_order_id=list_client_order_id, limit_client_order_id=limit_client_order_id, limit_iceberg_qty=limit_iceberg_qty, stop_client_order_id=stop_client_order_id, stop_limit_price=stop_limit_price, stop_iceberg_qty=stop_iceberg_qty, stop_limit_time_in_force=stop_limit_time_in_force, new_order_resp_type=new_order_resp_type, side_effect_type=side_effect_type, self_trade_prevention_mode=self_trade_prevention_mode, recv_window=recv_window) + +Margin Account New OCO (TRADE) + +Send in a new OCO for a margin account - Price Restrictions: - SELL: Limit Price > Last Price > Stop Price - BUY: Limit Price < Last Price < Stop Price - Quantity Restrictions: - Both legs must have the same quantity - ICEBERG quantities however do not have to be the same. - Order Rate Limit - OCO counts as 2 orders against the order rate limit. Weight(UID): 6 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_order_oco_post200_response import SapiV1MarginOrderOcoPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + side = 'SELL' # str | + quantity = 1.0 # float | + price = 218.0 # float | Order price + stop_price = 220.0 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + is_isolated = 'is_isolated_example' # str | * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin (optional) + list_client_order_id = 'list_client_order_id_example' # str | A unique Id for the entire orderList (optional) + limit_client_order_id = 'limit_client_order_id_example' # str | A unique Id for the limit order (optional) + limit_iceberg_qty = 3.4 # float | (optional) + stop_client_order_id = 'stop_client_order_id_example' # str | A unique Id for the stop loss/stop loss limit leg (optional) + stop_limit_price = 3.4 # float | If provided, stopLimitTimeInForce is required. (optional) + stop_iceberg_qty = 3.4 # float | (optional) + stop_limit_time_in_force = 'stop_limit_time_in_force_example' # str | (optional) + new_order_resp_type = 'new_order_resp_type_example' # str | Set the response JSON. (optional) + side_effect_type = 'side_effect_type_example' # str | Default `NO_SIDE_EFFECT` (optional) + self_trade_prevention_mode = 'EXPIRE_TAKER' # str | The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Margin Account New OCO (TRADE) + api_response = api_instance.sapi_v1_margin_order_oco_post(symbol, side, quantity, price, stop_price, timestamp, signature, is_isolated=is_isolated, list_client_order_id=list_client_order_id, limit_client_order_id=limit_client_order_id, limit_iceberg_qty=limit_iceberg_qty, stop_client_order_id=stop_client_order_id, stop_limit_price=stop_limit_price, stop_iceberg_qty=stop_iceberg_qty, stop_limit_time_in_force=stop_limit_time_in_force, new_order_resp_type=new_order_resp_type, side_effect_type=side_effect_type, self_trade_prevention_mode=self_trade_prevention_mode, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_order_oco_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_order_oco_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **side** | **str**| | + **quantity** | **float**| | + **price** | **float**| Order price | + **stop_price** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **is_isolated** | **str**| * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin | [optional] + **list_client_order_id** | **str**| A unique Id for the entire orderList | [optional] + **limit_client_order_id** | **str**| A unique Id for the limit order | [optional] + **limit_iceberg_qty** | **float**| | [optional] + **stop_client_order_id** | **str**| A unique Id for the stop loss/stop loss limit leg | [optional] + **stop_limit_price** | **float**| If provided, stopLimitTimeInForce is required. | [optional] + **stop_iceberg_qty** | **float**| | [optional] + **stop_limit_time_in_force** | **str**| | [optional] + **new_order_resp_type** | **str**| Set the response JSON. | [optional] + **side_effect_type** | **str**| Default `NO_SIDE_EFFECT` | [optional] + **self_trade_prevention_mode** | **str**| The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginOrderOcoPost200Response**](SapiV1MarginOrderOcoPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | New Margin OCO details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_order_post** +> SapiV1MarginOrderPost200Response sapi_v1_margin_order_post(symbol, side, type, quantity, auto_repay_at_cancel, timestamp, signature, is_isolated=is_isolated, quote_order_qty=quote_order_qty, price=price, stop_price=stop_price, new_client_order_id=new_client_order_id, iceberg_qty=iceberg_qty, new_order_resp_type=new_order_resp_type, side_effect_type=side_effect_type, time_in_force=time_in_force, self_trade_prevention_mode=self_trade_prevention_mode, recv_window=recv_window) + +Margin Account New Order (TRADE) + +Post a new order for margin account. Weight(UID): 6 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_order_post200_response import SapiV1MarginOrderPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + side = 'SELL' # str | + type = 'LIMIT' # str | Order type + quantity = 1.0 # float | + auto_repay_at_cancel = true # bool | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + is_isolated = 'is_isolated_example' # str | * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin (optional) + quote_order_qty = 3.4 # float | Quote quantity (optional) + price = 219.0 # float | Order price (optional) + stop_price = 221.01 # float | Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. (optional) + new_client_order_id = 'new_client_order_id_example' # str | Used to uniquely identify this cancel. Automatically generated by default (optional) + iceberg_qty = 3.4 # float | Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. (optional) + new_order_resp_type = 'new_order_resp_type_example' # str | Set the response JSON. (optional) + side_effect_type = 'side_effect_type_example' # str | Default `NO_SIDE_EFFECT` (optional) + time_in_force = 'GTC' # str | Order time in force (optional) + self_trade_prevention_mode = 'EXPIRE_TAKER' # str | The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Margin Account New Order (TRADE) + api_response = api_instance.sapi_v1_margin_order_post(symbol, side, type, quantity, auto_repay_at_cancel, timestamp, signature, is_isolated=is_isolated, quote_order_qty=quote_order_qty, price=price, stop_price=stop_price, new_client_order_id=new_client_order_id, iceberg_qty=iceberg_qty, new_order_resp_type=new_order_resp_type, side_effect_type=side_effect_type, time_in_force=time_in_force, self_trade_prevention_mode=self_trade_prevention_mode, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_order_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_order_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **side** | **str**| | + **type** | **str**| Order type | + **quantity** | **float**| | + **auto_repay_at_cancel** | **bool**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **is_isolated** | **str**| * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin | [optional] + **quote_order_qty** | **float**| Quote quantity | [optional] + **price** | **float**| Order price | [optional] + **stop_price** | **float**| Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. | [optional] + **new_client_order_id** | **str**| Used to uniquely identify this cancel. Automatically generated by default | [optional] + **iceberg_qty** | **float**| Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. | [optional] + **new_order_resp_type** | **str**| Set the response JSON. | [optional] + **side_effect_type** | **str**| Default `NO_SIDE_EFFECT` | [optional] + **time_in_force** | **str**| Order time in force | [optional] + **self_trade_prevention_mode** | **str**| The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginOrderPost200Response**](SapiV1MarginOrderPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin order info | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_price_index_get** +> SapiV1MarginPriceIndexGet200Response sapi_v1_margin_price_index_get(symbol) + +Query Margin PriceIndex (MARKET_DATA) + +Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_price_index_get200_response import SapiV1MarginPriceIndexGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + + try: + # Query Margin PriceIndex (MARKET_DATA) + api_response = api_instance.sapi_v1_margin_price_index_get(symbol) + print("The response of MarginApi->sapi_v1_margin_price_index_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_price_index_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + +### Return type + +[**SapiV1MarginPriceIndexGet200Response**](SapiV1MarginPriceIndexGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Price index | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_rate_limit_order_get** +> List[SapiV1MarginRateLimitOrderGet200ResponseInner] sapi_v1_margin_rate_limit_order_get(timestamp, signature, is_isolated=is_isolated, symbol=symbol, recv_window=recv_window) + +Query Current Margin Order Count Usage (TRADE) + +Displays the user's current margin order count usage for all intervals. Weight(IP): 20 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_rate_limit_order_get200_response_inner import SapiV1MarginRateLimitOrderGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + is_isolated = 'is_isolated_example' # str | * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin (optional) + symbol = 'symbol_example' # str | isolated symbol, mandatory for isolated margin (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Current Margin Order Count Usage (TRADE) + api_response = api_instance.sapi_v1_margin_rate_limit_order_get(timestamp, signature, is_isolated=is_isolated, symbol=symbol, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_rate_limit_order_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_rate_limit_order_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **is_isolated** | **str**| * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin | [optional] + **symbol** | **str**| isolated symbol, mandatory for isolated margin | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1MarginRateLimitOrderGet200ResponseInner]**](SapiV1MarginRateLimitOrderGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Usage. | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_trade_coeff_get** +> SapiV1MarginTradeCoeffGet200Response sapi_v1_margin_trade_coeff_get(email, timestamp, signature, recv_window=recv_window) + +Get Summary of Margin account (USER_DATA) + +Get personal margin level information Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_trade_coeff_get200_response import SapiV1MarginTradeCoeffGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + email = 'me@email.com' # str | Email Address + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Summary of Margin account (USER_DATA) + api_response = api_instance.sapi_v1_margin_trade_coeff_get(email, timestamp, signature, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_trade_coeff_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_trade_coeff_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Email Address | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginTradeCoeffGet200Response**](SapiV1MarginTradeCoeffGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Summary of Margin Account | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_margin_transfer_get** +> SapiV1MarginTransferGet200Response sapi_v1_margin_transfer_get(timestamp, signature, asset=asset, type=type, start_time=start_time, end_time=end_time, current=current, size=size, isolated_symbol=isolated_symbol, recv_window=recv_window) + +Get Cross Margin Transfer History (USER_DATA) + +- Response in descending order - Returns data for last 7 days by default - Set `archived` to `true` to query data from 6 months ago Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_transfer_get200_response import SapiV1MarginTransferGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'BNB' # str | (optional) + type = 'type_example' # str | (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + isolated_symbol = 'isolated_symbol_example' # str | Isolated symbol (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Cross Margin Transfer History (USER_DATA) + api_response = api_instance.sapi_v1_margin_transfer_get(timestamp, signature, asset=asset, type=type, start_time=start_time, end_time=end_time, current=current, size=size, isolated_symbol=isolated_symbol, recv_window=recv_window) + print("The response of MarginApi->sapi_v1_margin_transfer_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginApi->sapi_v1_margin_transfer_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| | [optional] + **type** | **str**| | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **isolated_symbol** | **str**| Isolated symbol | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginTransferGet200Response**](SapiV1MarginTransferGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin account transfer history, response in descending order | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/MarginOcoOrder.md b/target/python/binance_openapi/docs/MarginOcoOrder.md new file mode 100644 index 0000000..5256820 --- /dev/null +++ b/target/python/binance_openapi/docs/MarginOcoOrder.md @@ -0,0 +1,38 @@ +# MarginOcoOrder + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_list_id** | **int** | | +**contingency_type** | **str** | | +**list_status_type** | **str** | | +**list_order_status** | **str** | | +**list_client_order_id** | **str** | | +**transaction_time** | **int** | | +**symbol** | **str** | | +**is_isolated** | **bool** | | +**orders** | [**List[MarginOcoOrderOrdersInner]**](MarginOcoOrderOrdersInner.md) | | +**order_reports** | [**List[MarginOcoOrderOrderReportsInner]**](MarginOcoOrderOrderReportsInner.md) | | + +## Example + +```python +from openapi_client.models.margin_oco_order import MarginOcoOrder + +# TODO update the JSON string below +json = "{}" +# create an instance of MarginOcoOrder from a JSON string +margin_oco_order_instance = MarginOcoOrder.from_json(json) +# print the JSON string representation of the object +print(MarginOcoOrder.to_json()) + +# convert the object into a dict +margin_oco_order_dict = margin_oco_order_instance.to_dict() +# create an instance of MarginOcoOrder from a dict +margin_oco_order_from_dict = MarginOcoOrder.from_dict(margin_oco_order_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/MarginOcoOrderOrderReportsInner.md b/target/python/binance_openapi/docs/MarginOcoOrderOrderReportsInner.md new file mode 100644 index 0000000..1d5c538 --- /dev/null +++ b/target/python/binance_openapi/docs/MarginOcoOrderOrderReportsInner.md @@ -0,0 +1,42 @@ +# MarginOcoOrderOrderReportsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**orig_client_order_id** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**client_order_id** | **str** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**stop_price** | **str** | | + +## Example + +```python +from openapi_client.models.margin_oco_order_order_reports_inner import MarginOcoOrderOrderReportsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of MarginOcoOrderOrderReportsInner from a JSON string +margin_oco_order_order_reports_inner_instance = MarginOcoOrderOrderReportsInner.from_json(json) +# print the JSON string representation of the object +print(MarginOcoOrderOrderReportsInner.to_json()) + +# convert the object into a dict +margin_oco_order_order_reports_inner_dict = margin_oco_order_order_reports_inner_instance.to_dict() +# create an instance of MarginOcoOrderOrderReportsInner from a dict +margin_oco_order_order_reports_inner_from_dict = MarginOcoOrderOrderReportsInner.from_dict(margin_oco_order_order_reports_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/MarginOcoOrderOrdersInner.md b/target/python/binance_openapi/docs/MarginOcoOrderOrdersInner.md new file mode 100644 index 0000000..adcb483 --- /dev/null +++ b/target/python/binance_openapi/docs/MarginOcoOrderOrdersInner.md @@ -0,0 +1,31 @@ +# MarginOcoOrderOrdersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**client_order_id** | **str** | | + +## Example + +```python +from openapi_client.models.margin_oco_order_orders_inner import MarginOcoOrderOrdersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of MarginOcoOrderOrdersInner from a JSON string +margin_oco_order_orders_inner_instance = MarginOcoOrderOrdersInner.from_json(json) +# print the JSON string representation of the object +print(MarginOcoOrderOrdersInner.to_json()) + +# convert the object into a dict +margin_oco_order_orders_inner_dict = margin_oco_order_orders_inner_instance.to_dict() +# create an instance of MarginOcoOrderOrdersInner from a dict +margin_oco_order_orders_inner_from_dict = MarginOcoOrderOrdersInner.from_dict(margin_oco_order_orders_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/MarginOrder.md b/target/python/binance_openapi/docs/MarginOrder.md new file mode 100644 index 0000000..e48bd5c --- /dev/null +++ b/target/python/binance_openapi/docs/MarginOrder.md @@ -0,0 +1,40 @@ +# MarginOrder + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**orig_client_order_id** | **str** | | +**client_order_id** | **str** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | + +## Example + +```python +from openapi_client.models.margin_order import MarginOrder + +# TODO update the JSON string below +json = "{}" +# create an instance of MarginOrder from a JSON string +margin_order_instance = MarginOrder.from_json(json) +# print the JSON string representation of the object +print(MarginOrder.to_json()) + +# convert the object into a dict +margin_order_dict = margin_order_instance.to_dict() +# create an instance of MarginOrder from a dict +margin_order_from_dict = MarginOrder.from_dict(margin_order_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/MarginOrderDetail.md b/target/python/binance_openapi/docs/MarginOrderDetail.md new file mode 100644 index 0000000..070b03f --- /dev/null +++ b/target/python/binance_openapi/docs/MarginOrderDetail.md @@ -0,0 +1,46 @@ +# MarginOrderDetail + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_order_id** | **str** | | +**cummulative_quote_qty** | **str** | | +**executed_qty** | **str** | | +**iceberg_qty** | **str** | | +**is_working** | **bool** | | +**order_id** | **int** | | +**orig_qty** | **str** | | +**price** | **str** | | +**side** | **str** | | +**status** | **str** | | +**stop_price** | **str** | | +**symbol** | **str** | | +**is_isolated** | **bool** | | +**time** | **int** | | +**time_in_force** | **str** | | +**type** | **str** | | +**update_time** | **int** | | +**self_trade_prevention_mode** | **str** | | + +## Example + +```python +from openapi_client.models.margin_order_detail import MarginOrderDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of MarginOrderDetail from a JSON string +margin_order_detail_instance = MarginOrderDetail.from_json(json) +# print the JSON string representation of the object +print(MarginOrderDetail.to_json()) + +# convert the object into a dict +margin_order_detail_dict = margin_order_detail_instance.to_dict() +# create an instance of MarginOrderDetail from a dict +margin_order_detail_from_dict = MarginOrderDetail.from_dict(margin_order_detail_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/MarginOrderResponseAck.md b/target/python/binance_openapi/docs/MarginOrderResponseAck.md new file mode 100644 index 0000000..df9e528 --- /dev/null +++ b/target/python/binance_openapi/docs/MarginOrderResponseAck.md @@ -0,0 +1,33 @@ +# MarginOrderResponseAck + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**client_order_id** | **str** | | +**is_isolated** | **bool** | | +**transact_time** | **int** | | + +## Example + +```python +from openapi_client.models.margin_order_response_ack import MarginOrderResponseAck + +# TODO update the JSON string below +json = "{}" +# create an instance of MarginOrderResponseAck from a JSON string +margin_order_response_ack_instance = MarginOrderResponseAck.from_json(json) +# print the JSON string representation of the object +print(MarginOrderResponseAck.to_json()) + +# convert the object into a dict +margin_order_response_ack_dict = margin_order_response_ack_instance.to_dict() +# create an instance of MarginOrderResponseAck from a dict +margin_order_response_ack_from_dict = MarginOrderResponseAck.from_dict(margin_order_response_ack_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/MarginOrderResponseFull.md b/target/python/binance_openapi/docs/MarginOrderResponseFull.md new file mode 100644 index 0000000..c1ff76b --- /dev/null +++ b/target/python/binance_openapi/docs/MarginOrderResponseFull.md @@ -0,0 +1,44 @@ +# MarginOrderResponseFull + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**client_order_id** | **str** | | +**transact_time** | **int** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**margin_buy_borrow_amount** | **float** | will not return if no margin trade happens | +**margin_buy_borrow_asset** | **str** | will not return if no margin trade happens | +**is_isolated** | **bool** | | +**fills** | [**List[OrderResponseFullFillsInner]**](OrderResponseFullFillsInner.md) | | + +## Example + +```python +from openapi_client.models.margin_order_response_full import MarginOrderResponseFull + +# TODO update the JSON string below +json = "{}" +# create an instance of MarginOrderResponseFull from a JSON string +margin_order_response_full_instance = MarginOrderResponseFull.from_json(json) +# print the JSON string representation of the object +print(MarginOrderResponseFull.to_json()) + +# convert the object into a dict +margin_order_response_full_dict = margin_order_response_full_instance.to_dict() +# create an instance of MarginOrderResponseFull from a dict +margin_order_response_full_from_dict = MarginOrderResponseFull.from_dict(margin_order_response_full_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/MarginOrderResponseResult.md b/target/python/binance_openapi/docs/MarginOrderResponseResult.md new file mode 100644 index 0000000..fbb34c8 --- /dev/null +++ b/target/python/binance_openapi/docs/MarginOrderResponseResult.md @@ -0,0 +1,41 @@ +# MarginOrderResponseResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**client_order_id** | **str** | | +**transact_time** | **int** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**is_isolated** | **bool** | | +**side** | **str** | | + +## Example + +```python +from openapi_client.models.margin_order_response_result import MarginOrderResponseResult + +# TODO update the JSON string below +json = "{}" +# create an instance of MarginOrderResponseResult from a JSON string +margin_order_response_result_instance = MarginOrderResponseResult.from_json(json) +# print the JSON string representation of the object +print(MarginOrderResponseResult.to_json()) + +# convert the object into a dict +margin_order_response_result_dict = margin_order_response_result_instance.to_dict() +# create an instance of MarginOrderResponseResult from a dict +margin_order_response_result_from_dict = MarginOrderResponseResult.from_dict(margin_order_response_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/MarginStreamApi.md b/target/python/binance_openapi/docs/MarginStreamApi.md new file mode 100644 index 0000000..20e816b --- /dev/null +++ b/target/python/binance_openapi/docs/MarginStreamApi.md @@ -0,0 +1,244 @@ +# openapi_client.MarginStreamApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_user_data_stream_delete**](MarginStreamApi.md#sapi_v1_user_data_stream_delete) | **DELETE** /sapi/v1/userDataStream | Close a ListenKey (USER_STREAM) +[**sapi_v1_user_data_stream_post**](MarginStreamApi.md#sapi_v1_user_data_stream_post) | **POST** /sapi/v1/userDataStream | Create a ListenKey (USER_STREAM) +[**sapi_v1_user_data_stream_put**](MarginStreamApi.md#sapi_v1_user_data_stream_put) | **PUT** /sapi/v1/userDataStream | Ping/Keep-alive a ListenKey (USER_STREAM) + + +# **sapi_v1_user_data_stream_delete** +> object sapi_v1_user_data_stream_delete(listen_key=listen_key) + +Close a ListenKey (USER_STREAM) + +Close out a user data stream. Weight: 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginStreamApi(api_client) + listen_key = 'pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1' # str | User websocket listen key (optional) + + try: + # Close a ListenKey (USER_STREAM) + api_response = api_instance.sapi_v1_user_data_stream_delete(listen_key=listen_key) + print("The response of MarginStreamApi->sapi_v1_user_data_stream_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginStreamApi->sapi_v1_user_data_stream_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listen_key** | **str**| User websocket listen key | [optional] + +### Return type + +**object** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_user_data_stream_post** +> ApiV3UserDataStreamPost200Response sapi_v1_user_data_stream_post() + +Create a ListenKey (USER_STREAM) + +Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_user_data_stream_post200_response import ApiV3UserDataStreamPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginStreamApi(api_client) + + try: + # Create a ListenKey (USER_STREAM) + api_response = api_instance.sapi_v1_user_data_stream_post() + print("The response of MarginStreamApi->sapi_v1_user_data_stream_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginStreamApi->sapi_v1_user_data_stream_post: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ApiV3UserDataStreamPost200Response**](ApiV3UserDataStreamPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin listen key | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_user_data_stream_put** +> object sapi_v1_user_data_stream_put(listen_key=listen_key) + +Ping/Keep-alive a ListenKey (USER_STREAM) + +Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarginStreamApi(api_client) + listen_key = 'pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1' # str | User websocket listen key (optional) + + try: + # Ping/Keep-alive a ListenKey (USER_STREAM) + api_response = api_instance.sapi_v1_user_data_stream_put(listen_key=listen_key) + print("The response of MarginStreamApi->sapi_v1_user_data_stream_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarginStreamApi->sapi_v1_user_data_stream_put: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listen_key** | **str**| User websocket listen key | [optional] + +### Return type + +**object** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/MarginTrade.md b/target/python/binance_openapi/docs/MarginTrade.md new file mode 100644 index 0000000..c8eae5a --- /dev/null +++ b/target/python/binance_openapi/docs/MarginTrade.md @@ -0,0 +1,40 @@ +# MarginTrade + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commission** | **str** | | +**commission_asset** | **str** | | +**id** | **int** | | +**is_best_match** | **bool** | | +**is_buyer** | **bool** | | +**is_maker** | **bool** | | +**order_id** | **int** | | +**price** | **str** | | +**qty** | **str** | | +**symbol** | **str** | | +**is_isolated** | **bool** | | +**time** | **int** | | + +## Example + +```python +from openapi_client.models.margin_trade import MarginTrade + +# TODO update the JSON string below +json = "{}" +# create an instance of MarginTrade from a JSON string +margin_trade_instance = MarginTrade.from_json(json) +# print the JSON string representation of the object +print(MarginTrade.to_json()) + +# convert the object into a dict +margin_trade_dict = margin_trade_instance.to_dict() +# create an instance of MarginTrade from a dict +margin_trade_from_dict = MarginTrade.from_dict(margin_trade_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/MarginTransferDetails.md b/target/python/binance_openapi/docs/MarginTransferDetails.md new file mode 100644 index 0000000..8293b72 --- /dev/null +++ b/target/python/binance_openapi/docs/MarginTransferDetails.md @@ -0,0 +1,30 @@ +# MarginTransferDetails + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[MarginTransferDetailsRowsInner]**](MarginTransferDetailsRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.margin_transfer_details import MarginTransferDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of MarginTransferDetails from a JSON string +margin_transfer_details_instance = MarginTransferDetails.from_json(json) +# print the JSON string representation of the object +print(MarginTransferDetails.to_json()) + +# convert the object into a dict +margin_transfer_details_dict = margin_transfer_details_instance.to_dict() +# create an instance of MarginTransferDetails from a dict +margin_transfer_details_from_dict = MarginTransferDetails.from_dict(margin_transfer_details_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/MarginTransferDetailsRowsInner.md b/target/python/binance_openapi/docs/MarginTransferDetailsRowsInner.md new file mode 100644 index 0000000..122dee3 --- /dev/null +++ b/target/python/binance_openapi/docs/MarginTransferDetailsRowsInner.md @@ -0,0 +1,36 @@ +# MarginTransferDetailsRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **str** | | +**asset** | **str** | | +**status** | **str** | | +**timestamp** | **int** | | +**tx_id** | **int** | | +**type** | **str** | | [optional] +**trans_from** | **str** | | +**trans_to** | **str** | | + +## Example + +```python +from openapi_client.models.margin_transfer_details_rows_inner import MarginTransferDetailsRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of MarginTransferDetailsRowsInner from a JSON string +margin_transfer_details_rows_inner_instance = MarginTransferDetailsRowsInner.from_json(json) +# print the JSON string representation of the object +print(MarginTransferDetailsRowsInner.to_json()) + +# convert the object into a dict +margin_transfer_details_rows_inner_dict = margin_transfer_details_rows_inner_instance.to_dict() +# create an instance of MarginTransferDetailsRowsInner from a dict +margin_transfer_details_rows_inner_from_dict = MarginTransferDetailsRowsInner.from_dict(margin_transfer_details_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/MarketApi.md b/target/python/binance_openapi/docs/MarketApi.md new file mode 100644 index 0000000..6e8b3c5 --- /dev/null +++ b/target/python/binance_openapi/docs/MarketApi.md @@ -0,0 +1,1106 @@ +# openapi_client.MarketApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**api_v3_agg_trades_get**](MarketApi.md#api_v3_agg_trades_get) | **GET** /api/v3/aggTrades | Compressed/Aggregate Trades List +[**api_v3_avg_price_get**](MarketApi.md#api_v3_avg_price_get) | **GET** /api/v3/avgPrice | Current Average Price +[**api_v3_depth_get**](MarketApi.md#api_v3_depth_get) | **GET** /api/v3/depth | Order Book +[**api_v3_exchange_info_get**](MarketApi.md#api_v3_exchange_info_get) | **GET** /api/v3/exchangeInfo | Exchange Information +[**api_v3_historical_trades_get**](MarketApi.md#api_v3_historical_trades_get) | **GET** /api/v3/historicalTrades | Old Trade Lookup +[**api_v3_klines_get**](MarketApi.md#api_v3_klines_get) | **GET** /api/v3/klines | Kline/Candlestick Data +[**api_v3_ping_get**](MarketApi.md#api_v3_ping_get) | **GET** /api/v3/ping | Test Connectivity +[**api_v3_ticker24hr_get**](MarketApi.md#api_v3_ticker24hr_get) | **GET** /api/v3/ticker/24hr | 24hr Ticker Price Change Statistics +[**api_v3_ticker_book_ticker_get**](MarketApi.md#api_v3_ticker_book_ticker_get) | **GET** /api/v3/ticker/bookTicker | Symbol Order Book Ticker +[**api_v3_ticker_get**](MarketApi.md#api_v3_ticker_get) | **GET** /api/v3/ticker | Rolling window price change statistics +[**api_v3_ticker_price_get**](MarketApi.md#api_v3_ticker_price_get) | **GET** /api/v3/ticker/price | Symbol Price Ticker +[**api_v3_ticker_trading_day_get**](MarketApi.md#api_v3_ticker_trading_day_get) | **GET** /api/v3/ticker/tradingDay | Trading Day Ticker +[**api_v3_time_get**](MarketApi.md#api_v3_time_get) | **GET** /api/v3/time | Check Server Time +[**api_v3_trades_get**](MarketApi.md#api_v3_trades_get) | **GET** /api/v3/trades | Recent Trades List +[**api_v3_ui_klines_get**](MarketApi.md#api_v3_ui_klines_get) | **GET** /api/v3/uiKlines | UIKlines + + +# **api_v3_agg_trades_get** +> List[AggTrade] api_v3_agg_trades_get(symbol, from_id=from_id, start_time=start_time, end_time=end_time, limit=limit) + +Compressed/Aggregate Trades List + +Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated. - If `fromId`, `startTime`, and `endTime` are not sent, the most recent aggregate trades will be returned. - Note that if a trade has the following values, this was a duplicate aggregate trade and marked as invalid: p = '0' // price q = '0' // qty f = -1 // first_trade_id l = -1 // last_trade_id Weight(IP): 2 + +### Example + + +```python +import openapi_client +from openapi_client.models.agg_trade import AggTrade +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + from_id = 56 # int | Trade id to fetch from. Default gets most recent trades. (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 5 # int | Default 500; max 1000. (optional) + + try: + # Compressed/Aggregate Trades List + api_response = api_instance.api_v3_agg_trades_get(symbol, from_id=from_id, start_time=start_time, end_time=end_time, limit=limit) + print("The response of MarketApi->api_v3_agg_trades_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_agg_trades_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **from_id** | **int**| Trade id to fetch from. Default gets most recent trades. | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + +### Return type + +[**List[AggTrade]**](AggTrade.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Trade list | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_avg_price_get** +> ApiV3AvgPriceGet200Response api_v3_avg_price_get(symbol) + +Current Average Price + +Current average price for a symbol. Weight(IP): 2 + +### Example + + +```python +import openapi_client +from openapi_client.models.api_v3_avg_price_get200_response import ApiV3AvgPriceGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + + try: + # Current Average Price + api_response = api_instance.api_v3_avg_price_get(symbol) + print("The response of MarketApi->api_v3_avg_price_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_avg_price_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + +### Return type + +[**ApiV3AvgPriceGet200Response**](ApiV3AvgPriceGet200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Average price | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_depth_get** +> ApiV3DepthGet200Response api_v3_depth_get(symbol, limit=limit) + +Order Book + +| Limit | Weight(IP) | |---------------------|-------------| | 1-100 | 5 | | 101-500 | 25 | | 501-1000 | 50 | | 1001-5000 | 250 | + +### Example + + +```python +import openapi_client +from openapi_client.models.api_v3_depth_get200_response import ApiV3DepthGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + limit = 100 # int | If limit > 5000, then the response will truncate to 5000 (optional) (default to 100) + + try: + # Order Book + api_response = api_instance.api_v3_depth_get(symbol, limit=limit) + print("The response of MarketApi->api_v3_depth_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_depth_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **limit** | **int**| If limit > 5000, then the response will truncate to 5000 | [optional] [default to 100] + +### Return type + +[**ApiV3DepthGet200Response**](ApiV3DepthGet200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order book | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_exchange_info_get** +> ApiV3ExchangeInfoGet200Response api_v3_exchange_info_get(symbol=symbol, symbols=symbols, permissions=permissions) + +Exchange Information + +Current exchange trading rules and symbol information - If any symbol provided in either symbol or symbols do not exist, the endpoint will throw an error. - All parameters are optional. - permissions can support single or multiple values (e.g. SPOT, [\"MARGIN\",\"LEVERAGED\"]) - If permissions parameter not provided, the default values will be [\"SPOT\",\"MARGIN\",\"LEVERAGED\"]. - To display all permissions you need to specify them explicitly. (e.g. SPOT, MARGIN,...) Examples of Symbol Permissions Interpretation from the Response: - [[\"A\",\"B\"]] means you may place an order if your account has either permission \"A\" or permission \"B\". - [[\"A\"],[\"B\"]] means you can place an order if your account has permission \"A\" and permission \"B\". - [[\"A\"],[\"B\",\"C\"]] means you can place an order if your account has permission \"A\" and permission \"B\" or permission \"C\". (Inclusive or is applied here, not exclusive or, so your account may have both permission \"B\" and permission \"C\".) Weight(IP): 10 + +### Example + + +```python +import openapi_client +from openapi_client.models.api_v3_exchange_info_get200_response import ApiV3ExchangeInfoGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT (optional) + symbols = '[\"BTCUSDT\",\"BNBBTC\"]' # str | (optional) + permissions = ''SPOT' or ['MARGIN','LEVERAGED']' # str | (optional) + + try: + # Exchange Information + api_response = api_instance.api_v3_exchange_info_get(symbol=symbol, symbols=symbols, permissions=permissions) + print("The response of MarketApi->api_v3_exchange_info_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_exchange_info_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | [optional] + **symbols** | **str**| | [optional] + **permissions** | **str**| | [optional] + +### Return type + +[**ApiV3ExchangeInfoGet200Response**](ApiV3ExchangeInfoGet200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current exchange trading rules and symbol information | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_historical_trades_get** +> List[Trade] api_v3_historical_trades_get(symbol, limit=limit, from_id=from_id) + +Old Trade Lookup + +Get older market trades. Weight(IP): 10 + +### Example + + +```python +import openapi_client +from openapi_client.models.trade import Trade +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + limit = 5 # int | Default 500; max 1000. (optional) + from_id = 56 # int | Trade id to fetch from. Default gets most recent trades. (optional) + + try: + # Old Trade Lookup + api_response = api_instance.api_v3_historical_trades_get(symbol, limit=limit, from_id=from_id) + print("The response of MarketApi->api_v3_historical_trades_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_historical_trades_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **limit** | **int**| Default 500; max 1000. | [optional] + **from_id** | **int**| Trade id to fetch from. Default gets most recent trades. | [optional] + +### Return type + +[**List[Trade]**](Trade.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Trade list | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_klines_get** +> List[List[ApiV3KlinesGet200ResponseInnerInner]] api_v3_klines_get(symbol, interval, start_time=start_time, end_time=end_time, time_zone=time_zone, limit=limit) + +Kline/Candlestick Data + +Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. - If `startTime` and `endTime` are not sent, the most recent klines are returned. Weight(IP): 2 + +### Example + + +```python +import openapi_client +from openapi_client.models.api_v3_klines_get200_response_inner_inner import ApiV3KlinesGet200ResponseInnerInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + interval = '\"1m\"' # str | kline intervals + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + time_zone = 'time_zone_example' # str | Default: 0 (UTC) (optional) + limit = 5 # int | Default 500; max 1000. (optional) + + try: + # Kline/Candlestick Data + api_response = api_instance.api_v3_klines_get(symbol, interval, start_time=start_time, end_time=end_time, time_zone=time_zone, limit=limit) + print("The response of MarketApi->api_v3_klines_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_klines_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **interval** | **str**| kline intervals | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **time_zone** | **str**| Default: 0 (UTC) | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + +### Return type + +**List[List[ApiV3KlinesGet200ResponseInnerInner]]** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Kline data | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_ping_get** +> object api_v3_ping_get() + +Test Connectivity + +Test connectivity to the Rest API. Weight(IP): 1 + +### Example + + +```python +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + + try: + # Test Connectivity + api_response = api_instance.api_v3_ping_get() + print("The response of MarketApi->api_v3_ping_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_ping_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_ticker24hr_get** +> ApiV3Ticker24hrGet200Response api_v3_ticker24hr_get(symbol=symbol, symbols=symbols, type=type) + +24hr Ticker Price Change Statistics + +24 hour rolling window price change statistics. Careful when accessing this with no symbol. - If the symbol is not sent, tickers for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `80` when the symbol parameter is omitted; + +### Example + + +```python +import openapi_client +from openapi_client.models.api_v3_ticker24hr_get200_response import ApiV3Ticker24hrGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT (optional) + symbols = '[\"BTCUSDT\",\"BNBBTC\"]' # str | (optional) + type = 'FULL' # str | Supported values: FULL or MINI. If none provided, the default is FULL (optional) + + try: + # 24hr Ticker Price Change Statistics + api_response = api_instance.api_v3_ticker24hr_get(symbol=symbol, symbols=symbols, type=type) + print("The response of MarketApi->api_v3_ticker24hr_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_ticker24hr_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | [optional] + **symbols** | **str**| | [optional] + **type** | **str**| Supported values: FULL or MINI. If none provided, the default is FULL | [optional] + +### Return type + +[**ApiV3Ticker24hrGet200Response**](ApiV3Ticker24hrGet200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | 24hr ticker | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_ticker_book_ticker_get** +> ApiV3TickerBookTickerGet200Response api_v3_ticker_book_ticker_get(symbol=symbol, symbols=symbols) + +Symbol Order Book Ticker + +Best price/qty on the order book for a symbol or symbols. - If the symbol is not sent, bookTickers for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `4` when the symbol parameter is omitted; + +### Example + + +```python +import openapi_client +from openapi_client.models.api_v3_ticker_book_ticker_get200_response import ApiV3TickerBookTickerGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT (optional) + symbols = '[\"BTCUSDT\",\"BNBBTC\"]' # str | (optional) + + try: + # Symbol Order Book Ticker + api_response = api_instance.api_v3_ticker_book_ticker_get(symbol=symbol, symbols=symbols) + print("The response of MarketApi->api_v3_ticker_book_ticker_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_ticker_book_ticker_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | [optional] + **symbols** | **str**| | [optional] + +### Return type + +[**ApiV3TickerBookTickerGet200Response**](ApiV3TickerBookTickerGet200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order book ticker | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_ticker_get** +> ApiV3TickerGet200Response api_v3_ticker_get(symbol=symbol, symbols=symbols, window_size=window_size, type=type) + +Rolling window price change statistics + +The window used to compute statistics is typically slightly wider than requested windowSize. openTime for /api/v3/ticker always starts on a minute, while the closeTime is the current time of the request. As such, the effective window might be up to 1 minute wider than requested. E.g. If the closeTime is 1641287867099 (January 04, 2022 09:17:47:099 UTC) , and the windowSize is 1d. the openTime will be: 1641201420000 (January 3, 2022, 09:17:00 UTC) Weight(IP): 4 for each requested symbol regardless of windowSize. The weight for this request will cap at 200 once the number of symbols in the request is more than 50. + +### Example + + +```python +import openapi_client +from openapi_client.models.api_v3_ticker_get200_response import ApiV3TickerGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT (optional) + symbols = '[\"BTCUSDT\",\"BNBBTC\"]' # str | (optional) + window_size = 'window_size_example' # str | Defaults to 1d if no parameter provided. Supported windowSize values: 1m,2m....59m for minutes 1h, 2h....23h - for hours 1d...7d - for days. Units cannot be combined (e.g. 1d2h is not allowed) (optional) + type = 'type_example' # str | Supported values: FULL or MINI. If none provided, the default is FULL (optional) + + try: + # Rolling window price change statistics + api_response = api_instance.api_v3_ticker_get(symbol=symbol, symbols=symbols, window_size=window_size, type=type) + print("The response of MarketApi->api_v3_ticker_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_ticker_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | [optional] + **symbols** | **str**| | [optional] + **window_size** | **str**| Defaults to 1d if no parameter provided. Supported windowSize values: 1m,2m....59m for minutes 1h, 2h....23h - for hours 1d...7d - for days. Units cannot be combined (e.g. 1d2h is not allowed) | [optional] + **type** | **str**| Supported values: FULL or MINI. If none provided, the default is FULL | [optional] + +### Return type + +[**ApiV3TickerGet200Response**](ApiV3TickerGet200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Rolling price ticker | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_ticker_price_get** +> ApiV3TickerPriceGet200Response api_v3_ticker_price_get(symbol=symbol, symbols=symbols) + +Symbol Price Ticker + +Latest price for a symbol or symbols. - If the symbol is not sent, prices for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `4` when the symbol parameter is omitted; + +### Example + + +```python +import openapi_client +from openapi_client.models.api_v3_ticker_price_get200_response import ApiV3TickerPriceGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT (optional) + symbols = '[\"BTCUSDT\",\"BNBBTC\"]' # str | (optional) + + try: + # Symbol Price Ticker + api_response = api_instance.api_v3_ticker_price_get(symbol=symbol, symbols=symbols) + print("The response of MarketApi->api_v3_ticker_price_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_ticker_price_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | [optional] + **symbols** | **str**| | [optional] + +### Return type + +[**ApiV3TickerPriceGet200Response**](ApiV3TickerPriceGet200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Price ticker | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_ticker_trading_day_get** +> ApiV3TickerTradingDayGet200Response api_v3_ticker_trading_day_get(symbol=symbol, symbols=symbols, time_zone=time_zone, type=type) + +Trading Day Ticker + +Price change statistics for a trading day. Notes: - Supported values for timeZone: - Hours and minutes (e.g. -1:00, 05:45) - Only hours (e.g. 0, 8, 4) Weight: - `4` for each requested symbol. - The weight for this request will cap at `200` once the number of symbols in the request is more than `50`. + +### Example + + +```python +import openapi_client +from openapi_client.models.api_v3_ticker_trading_day_get200_response import ApiV3TickerTradingDayGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT (optional) + symbols = '[\"BTCUSDT\",\"BNBBTC\"]' # str | (optional) + time_zone = 'time_zone_example' # str | Default: 0 (UTC) (optional) + type = 'FULL' # str | Supported values: FULL or MINI. If none provided, the default is FULL (optional) + + try: + # Trading Day Ticker + api_response = api_instance.api_v3_ticker_trading_day_get(symbol=symbol, symbols=symbols, time_zone=time_zone, type=type) + print("The response of MarketApi->api_v3_ticker_trading_day_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_ticker_trading_day_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | [optional] + **symbols** | **str**| | [optional] + **time_zone** | **str**| Default: 0 (UTC) | [optional] + **type** | **str**| Supported values: FULL or MINI. If none provided, the default is FULL | [optional] + +### Return type + +[**ApiV3TickerTradingDayGet200Response**](ApiV3TickerTradingDayGet200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Trading day ticker | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_time_get** +> ApiV3TimeGet200Response api_v3_time_get() + +Check Server Time + +Test connectivity to the Rest API and get the current server time. Weight(IP): 1 + +### Example + + +```python +import openapi_client +from openapi_client.models.api_v3_time_get200_response import ApiV3TimeGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + + try: + # Check Server Time + api_response = api_instance.api_v3_time_get() + print("The response of MarketApi->api_v3_time_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_time_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ApiV3TimeGet200Response**](ApiV3TimeGet200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Binance server UTC timestamp | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_trades_get** +> List[Trade] api_v3_trades_get(symbol, limit=limit) + +Recent Trades List + +Get recent trades. Weight(IP): 10 + +### Example + + +```python +import openapi_client +from openapi_client.models.trade import Trade +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + limit = 5 # int | Default 500; max 1000. (optional) + + try: + # Recent Trades List + api_response = api_instance.api_v3_trades_get(symbol, limit=limit) + print("The response of MarketApi->api_v3_trades_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_trades_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **limit** | **int**| Default 500; max 1000. | [optional] + +### Return type + +[**List[Trade]**](Trade.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Trade list | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_ui_klines_get** +> List[List[ApiV3KlinesGet200ResponseInnerInner]] api_v3_ui_klines_get(symbol, interval, start_time=start_time, end_time=end_time, time_zone=time_zone, limit=limit) + +UIKlines + +The request is similar to klines having the same parameters and response. uiKlines return modified kline data, optimized for presentation of candlestick charts. Weight(IP): 2 + +### Example + + +```python +import openapi_client +from openapi_client.models.api_v3_klines_get200_response_inner_inner import ApiV3KlinesGet200ResponseInnerInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MarketApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + interval = '\"1m\"' # str | kline intervals + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + time_zone = 'time_zone_example' # str | Default: 0 (UTC) (optional) + limit = 5 # int | Default 500; max 1000. (optional) + + try: + # UIKlines + api_response = api_instance.api_v3_ui_klines_get(symbol, interval, start_time=start_time, end_time=end_time, time_zone=time_zone, limit=limit) + print("The response of MarketApi->api_v3_ui_klines_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarketApi->api_v3_ui_klines_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **interval** | **str**| kline intervals | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **time_zone** | **str**| Default: 0 (UTC) | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + +### Return type + +**List[List[ApiV3KlinesGet200ResponseInnerInner]]** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | UIKline data | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/MiningApi.md b/target/python/binance_openapi/docs/MiningApi.md new file mode 100644 index 0000000..fee1abb --- /dev/null +++ b/target/python/binance_openapi/docs/MiningApi.md @@ -0,0 +1,1200 @@ +# openapi_client.MiningApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_mining_hash_transfer_config_cancel_post**](MiningApi.md#sapi_v1_mining_hash_transfer_config_cancel_post) | **POST** /sapi/v1/mining/hash-transfer/config/cancel | Cancel Hashrate Resale configuration (USER_DATA) +[**sapi_v1_mining_hash_transfer_config_details_list_get**](MiningApi.md#sapi_v1_mining_hash_transfer_config_details_list_get) | **GET** /sapi/v1/mining/hash-transfer/config/details/list | Hashrate Resale List (USER_DATA) +[**sapi_v1_mining_hash_transfer_config_post**](MiningApi.md#sapi_v1_mining_hash_transfer_config_post) | **POST** /sapi/v1/mining/hash-transfer/config | Hashrate Resale Request (USER_DATA) +[**sapi_v1_mining_hash_transfer_profit_details_get**](MiningApi.md#sapi_v1_mining_hash_transfer_profit_details_get) | **GET** /sapi/v1/mining/hash-transfer/profit/details | Hashrate Resale Details (USER_DATA) +[**sapi_v1_mining_payment_list_get**](MiningApi.md#sapi_v1_mining_payment_list_get) | **GET** /sapi/v1/mining/payment/list | Earnings List (USER_DATA) +[**sapi_v1_mining_payment_other_get**](MiningApi.md#sapi_v1_mining_payment_other_get) | **GET** /sapi/v1/mining/payment/other | Extra Bonus List (USER_DATA) +[**sapi_v1_mining_payment_uid_get**](MiningApi.md#sapi_v1_mining_payment_uid_get) | **GET** /sapi/v1/mining/payment/uid | Mining Account Earning (USER_DATA) +[**sapi_v1_mining_pub_algo_list_get**](MiningApi.md#sapi_v1_mining_pub_algo_list_get) | **GET** /sapi/v1/mining/pub/algoList | Acquiring Algorithm (MARKET_DATA) +[**sapi_v1_mining_pub_coin_list_get**](MiningApi.md#sapi_v1_mining_pub_coin_list_get) | **GET** /sapi/v1/mining/pub/coinList | Acquiring CoinName (MARKET_DATA) +[**sapi_v1_mining_statistics_user_list_get**](MiningApi.md#sapi_v1_mining_statistics_user_list_get) | **GET** /sapi/v1/mining/statistics/user/list | Account List (USER_DATA) +[**sapi_v1_mining_statistics_user_status_get**](MiningApi.md#sapi_v1_mining_statistics_user_status_get) | **GET** /sapi/v1/mining/statistics/user/status | Statistic List (USER_DATA) +[**sapi_v1_mining_worker_detail_get**](MiningApi.md#sapi_v1_mining_worker_detail_get) | **GET** /sapi/v1/mining/worker/detail | Request for Detail Miner List (USER_DATA) +[**sapi_v1_mining_worker_list_get**](MiningApi.md#sapi_v1_mining_worker_list_get) | **GET** /sapi/v1/mining/worker/list | Request for Miner List (USER_DATA) + + +# **sapi_v1_mining_hash_transfer_config_cancel_post** +> SapiV1MiningHashTransferConfigCancelPost200Response sapi_v1_mining_hash_transfer_config_cancel_post(config_id, user_name, timestamp, signature, recv_window=recv_window) + +Cancel Hashrate Resale configuration (USER_DATA) + +Weight(IP): 5 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_mining_hash_transfer_config_cancel_post200_response import SapiV1MiningHashTransferConfigCancelPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MiningApi(api_client) + config_id = 'config_id_example' # str | Mining ID + user_name = 'user_name_example' # str | Mining Account + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Cancel Hashrate Resale configuration (USER_DATA) + api_response = api_instance.sapi_v1_mining_hash_transfer_config_cancel_post(config_id, user_name, timestamp, signature, recv_window=recv_window) + print("The response of MiningApi->sapi_v1_mining_hash_transfer_config_cancel_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MiningApi->sapi_v1_mining_hash_transfer_config_cancel_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **config_id** | **str**| Mining ID | + **user_name** | **str**| Mining Account | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MiningHashTransferConfigCancelPost200Response**](SapiV1MiningHashTransferConfigCancelPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success flag | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_mining_hash_transfer_config_details_list_get** +> SapiV1MiningHashTransferConfigDetailsListGet200Response sapi_v1_mining_hash_transfer_config_details_list_get(timestamp, signature, page_index=page_index, page_size=page_size, recv_window=recv_window) + +Hashrate Resale List (USER_DATA) + +Weight(IP): 5 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response import SapiV1MiningHashTransferConfigDetailsListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MiningApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + page_index = 56 # int | Page number, default is first page, start form 1 (optional) + page_size = 'page_size_example' # str | Number of pages, minimum 10, maximum 200 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Hashrate Resale List (USER_DATA) + api_response = api_instance.sapi_v1_mining_hash_transfer_config_details_list_get(timestamp, signature, page_index=page_index, page_size=page_size, recv_window=recv_window) + print("The response of MiningApi->sapi_v1_mining_hash_transfer_config_details_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MiningApi->sapi_v1_mining_hash_transfer_config_details_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **page_index** | **int**| Page number, default is first page, start form 1 | [optional] + **page_size** | **str**| Number of pages, minimum 10, maximum 200 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MiningHashTransferConfigDetailsListGet200Response**](SapiV1MiningHashTransferConfigDetailsListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of hashrate resales | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_mining_hash_transfer_config_post** +> SapiV1MiningHashTransferConfigPost200Response sapi_v1_mining_hash_transfer_config_post(user_name, algo, to_pool_user, hash_rate, timestamp, signature, start_date=start_date, end_date=end_date, recv_window=recv_window) + +Hashrate Resale Request (USER_DATA) + +Weight(IP): 5 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_mining_hash_transfer_config_post200_response import SapiV1MiningHashTransferConfigPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MiningApi(api_client) + user_name = 'user_name_example' # str | Mining Account + algo = 'algo_example' # str | Algorithm(sha256) + to_pool_user = 'to_pool_user_example' # str | Mining Account + hash_rate = 'hash_rate_example' # str | Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than 500000) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_date = 'start_date_example' # str | Search date, millisecond timestamp, while empty query all (optional) + end_date = 'end_date_example' # str | Search date, millisecond timestamp, while empty query all (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Hashrate Resale Request (USER_DATA) + api_response = api_instance.sapi_v1_mining_hash_transfer_config_post(user_name, algo, to_pool_user, hash_rate, timestamp, signature, start_date=start_date, end_date=end_date, recv_window=recv_window) + print("The response of MiningApi->sapi_v1_mining_hash_transfer_config_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MiningApi->sapi_v1_mining_hash_transfer_config_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_name** | **str**| Mining Account | + **algo** | **str**| Algorithm(sha256) | + **to_pool_user** | **str**| Mining Account | + **hash_rate** | **str**| Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than 500000) | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_date** | **str**| Search date, millisecond timestamp, while empty query all | [optional] + **end_date** | **str**| Search date, millisecond timestamp, while empty query all | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MiningHashTransferConfigPost200Response**](SapiV1MiningHashTransferConfigPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Mining Account Id | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_mining_hash_transfer_profit_details_get** +> SapiV1MiningHashTransferProfitDetailsGet200Response sapi_v1_mining_hash_transfer_profit_details_get(config_id, user_name, timestamp, signature, page_index=page_index, page_size=page_size, recv_window=recv_window) + +Hashrate Resale Details (USER_DATA) + +Weight(IP): 5 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response import SapiV1MiningHashTransferProfitDetailsGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MiningApi(api_client) + config_id = 'config_id_example' # str | Mining ID + user_name = 'user_name_example' # str | Mining Account + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + page_index = 56 # int | Page number, default is first page, start form 1 (optional) + page_size = 'page_size_example' # str | Number of pages, minimum 10, maximum 200 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Hashrate Resale Details (USER_DATA) + api_response = api_instance.sapi_v1_mining_hash_transfer_profit_details_get(config_id, user_name, timestamp, signature, page_index=page_index, page_size=page_size, recv_window=recv_window) + print("The response of MiningApi->sapi_v1_mining_hash_transfer_profit_details_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MiningApi->sapi_v1_mining_hash_transfer_profit_details_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **config_id** | **str**| Mining ID | + **user_name** | **str**| Mining Account | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **page_index** | **int**| Page number, default is first page, start form 1 | [optional] + **page_size** | **str**| Number of pages, minimum 10, maximum 200 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MiningHashTransferProfitDetailsGet200Response**](SapiV1MiningHashTransferProfitDetailsGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of hashrate resale details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_mining_payment_list_get** +> SapiV1MiningPaymentListGet200Response sapi_v1_mining_payment_list_get(algo, user_name, timestamp, signature, coin=coin, start_date=start_date, end_date=end_date, page_index=page_index, page_size=page_size, recv_window=recv_window) + +Earnings List (USER_DATA) + +Weight(IP): 5 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_mining_payment_list_get200_response import SapiV1MiningPaymentListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MiningApi(api_client) + algo = 'algo_example' # str | Algorithm(sha256) + user_name = 'user_name_example' # str | Mining Account + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + coin = 'BNB' # str | Coin name (optional) + start_date = 'start_date_example' # str | Search date, millisecond timestamp, while empty query all (optional) + end_date = 'end_date_example' # str | Search date, millisecond timestamp, while empty query all (optional) + page_index = 56 # int | Page number, default is first page, start form 1 (optional) + page_size = 'page_size_example' # str | Number of pages, minimum 10, maximum 200 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Earnings List (USER_DATA) + api_response = api_instance.sapi_v1_mining_payment_list_get(algo, user_name, timestamp, signature, coin=coin, start_date=start_date, end_date=end_date, page_index=page_index, page_size=page_size, recv_window=recv_window) + print("The response of MiningApi->sapi_v1_mining_payment_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MiningApi->sapi_v1_mining_payment_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **algo** | **str**| Algorithm(sha256) | + **user_name** | **str**| Mining Account | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **coin** | **str**| Coin name | [optional] + **start_date** | **str**| Search date, millisecond timestamp, while empty query all | [optional] + **end_date** | **str**| Search date, millisecond timestamp, while empty query all | [optional] + **page_index** | **int**| Page number, default is first page, start form 1 | [optional] + **page_size** | **str**| Number of pages, minimum 10, maximum 200 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MiningPaymentListGet200Response**](SapiV1MiningPaymentListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of earnings | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_mining_payment_other_get** +> SapiV1MiningPaymentOtherGet200Response sapi_v1_mining_payment_other_get(algo, user_name, timestamp, signature, coin=coin, start_date=start_date, end_date=end_date, page_index=page_index, page_size=page_size, recv_window=recv_window) + +Extra Bonus List (USER_DATA) + +Weight(IP): 5 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_mining_payment_other_get200_response import SapiV1MiningPaymentOtherGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MiningApi(api_client) + algo = 'algo_example' # str | Algorithm(sha256) + user_name = 'user_name_example' # str | Mining Account + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + coin = 'BNB' # str | Coin name (optional) + start_date = 'start_date_example' # str | Search date, millisecond timestamp, while empty query all (optional) + end_date = 'end_date_example' # str | Search date, millisecond timestamp, while empty query all (optional) + page_index = 56 # int | Page number, default is first page, start form 1 (optional) + page_size = 'page_size_example' # str | Number of pages, minimum 10, maximum 200 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Extra Bonus List (USER_DATA) + api_response = api_instance.sapi_v1_mining_payment_other_get(algo, user_name, timestamp, signature, coin=coin, start_date=start_date, end_date=end_date, page_index=page_index, page_size=page_size, recv_window=recv_window) + print("The response of MiningApi->sapi_v1_mining_payment_other_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MiningApi->sapi_v1_mining_payment_other_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **algo** | **str**| Algorithm(sha256) | + **user_name** | **str**| Mining Account | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **coin** | **str**| Coin name | [optional] + **start_date** | **str**| Search date, millisecond timestamp, while empty query all | [optional] + **end_date** | **str**| Search date, millisecond timestamp, while empty query all | [optional] + **page_index** | **int**| Page number, default is first page, start form 1 | [optional] + **page_size** | **str**| Number of pages, minimum 10, maximum 200 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MiningPaymentOtherGet200Response**](SapiV1MiningPaymentOtherGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of extra bonuses | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_mining_payment_uid_get** +> SapiV1MiningPaymentUidGet200Response sapi_v1_mining_payment_uid_get(algo, timestamp, signature, start_date=start_date, end_date=end_date, page_index=page_index, page_size=page_size, recv_window=recv_window) + +Mining Account Earning (USER_DATA) + +Weight(IP): 5 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response import SapiV1MiningPaymentUidGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MiningApi(api_client) + algo = 'algo_example' # str | Algorithm(sha256) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_date = 'start_date_example' # str | Search date, millisecond timestamp, while empty query all (optional) + end_date = 'end_date_example' # str | Search date, millisecond timestamp, while empty query all (optional) + page_index = 56 # int | Page number, default is first page, start form 1 (optional) + page_size = 'page_size_example' # str | Number of pages, minimum 10, maximum 200 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Mining Account Earning (USER_DATA) + api_response = api_instance.sapi_v1_mining_payment_uid_get(algo, timestamp, signature, start_date=start_date, end_date=end_date, page_index=page_index, page_size=page_size, recv_window=recv_window) + print("The response of MiningApi->sapi_v1_mining_payment_uid_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MiningApi->sapi_v1_mining_payment_uid_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **algo** | **str**| Algorithm(sha256) | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_date** | **str**| Search date, millisecond timestamp, while empty query all | [optional] + **end_date** | **str**| Search date, millisecond timestamp, while empty query all | [optional] + **page_index** | **int**| Page number, default is first page, start form 1 | [optional] + **page_size** | **str**| Number of pages, minimum 10, maximum 200 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MiningPaymentUidGet200Response**](SapiV1MiningPaymentUidGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Mining account earnings | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_mining_pub_algo_list_get** +> SapiV1MiningPubAlgoListGet200Response sapi_v1_mining_pub_algo_list_get() + +Acquiring Algorithm (MARKET_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_mining_pub_algo_list_get200_response import SapiV1MiningPubAlgoListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MiningApi(api_client) + + try: + # Acquiring Algorithm (MARKET_DATA) + api_response = api_instance.sapi_v1_mining_pub_algo_list_get() + print("The response of MiningApi->sapi_v1_mining_pub_algo_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MiningApi->sapi_v1_mining_pub_algo_list_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**SapiV1MiningPubAlgoListGet200Response**](SapiV1MiningPubAlgoListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Algorithm information | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_mining_pub_coin_list_get** +> SapiV1MiningPubCoinListGet200Response sapi_v1_mining_pub_coin_list_get() + +Acquiring CoinName (MARKET_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_mining_pub_coin_list_get200_response import SapiV1MiningPubCoinListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MiningApi(api_client) + + try: + # Acquiring CoinName (MARKET_DATA) + api_response = api_instance.sapi_v1_mining_pub_coin_list_get() + print("The response of MiningApi->sapi_v1_mining_pub_coin_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MiningApi->sapi_v1_mining_pub_coin_list_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**SapiV1MiningPubCoinListGet200Response**](SapiV1MiningPubCoinListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Coin information | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_mining_statistics_user_list_get** +> SapiV1MiningStatisticsUserListGet200Response sapi_v1_mining_statistics_user_list_get(algo, user_name, timestamp, signature, recv_window=recv_window) + +Account List (USER_DATA) + +Weight(IP): 5 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response import SapiV1MiningStatisticsUserListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MiningApi(api_client) + algo = 'algo_example' # str | Algorithm(sha256) + user_name = 'user_name_example' # str | Mining Account + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Account List (USER_DATA) + api_response = api_instance.sapi_v1_mining_statistics_user_list_get(algo, user_name, timestamp, signature, recv_window=recv_window) + print("The response of MiningApi->sapi_v1_mining_statistics_user_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MiningApi->sapi_v1_mining_statistics_user_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **algo** | **str**| Algorithm(sha256) | + **user_name** | **str**| Mining Account | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MiningStatisticsUserListGet200Response**](SapiV1MiningStatisticsUserListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of mining accounts | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_mining_statistics_user_status_get** +> SapiV1MiningStatisticsUserStatusGet200Response sapi_v1_mining_statistics_user_status_get(algo, user_name, timestamp, signature, recv_window=recv_window) + +Statistic List (USER_DATA) + +Weight(IP): 5 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response import SapiV1MiningStatisticsUserStatusGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MiningApi(api_client) + algo = 'algo_example' # str | Algorithm(sha256) + user_name = 'user_name_example' # str | Mining Account + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Statistic List (USER_DATA) + api_response = api_instance.sapi_v1_mining_statistics_user_status_get(algo, user_name, timestamp, signature, recv_window=recv_window) + print("The response of MiningApi->sapi_v1_mining_statistics_user_status_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MiningApi->sapi_v1_mining_statistics_user_status_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **algo** | **str**| Algorithm(sha256) | + **user_name** | **str**| Mining Account | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MiningStatisticsUserStatusGet200Response**](SapiV1MiningStatisticsUserStatusGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Mining account statistics | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_mining_worker_detail_get** +> SapiV1MiningWorkerDetailGet200Response sapi_v1_mining_worker_detail_get(algo, user_name, worker_name, timestamp, signature, recv_window=recv_window) + +Request for Detail Miner List (USER_DATA) + +Weight(IP): 5 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response import SapiV1MiningWorkerDetailGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MiningApi(api_client) + algo = 'algo_example' # str | Algorithm(sha256) + user_name = 'user_name_example' # str | Mining Account + worker_name = 'worker_name_example' # str | Miner’s name + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Request for Detail Miner List (USER_DATA) + api_response = api_instance.sapi_v1_mining_worker_detail_get(algo, user_name, worker_name, timestamp, signature, recv_window=recv_window) + print("The response of MiningApi->sapi_v1_mining_worker_detail_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MiningApi->sapi_v1_mining_worker_detail_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **algo** | **str**| Algorithm(sha256) | + **user_name** | **str**| Mining Account | + **worker_name** | **str**| Miner’s name | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MiningWorkerDetailGet200Response**](SapiV1MiningWorkerDetailGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of workers' hashrates' | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_mining_worker_list_get** +> SapiV1MiningWorkerListGet200Response sapi_v1_mining_worker_list_get(algo, user_name, timestamp, signature, page_index=page_index, sort=sort, sort_column=sort_column, worker_status=worker_status, recv_window=recv_window) + +Request for Miner List (USER_DATA) + +Weight(IP): 5 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_mining_worker_list_get200_response import SapiV1MiningWorkerListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.MiningApi(api_client) + algo = 'algo_example' # str | Algorithm(sha256) + user_name = 'user_name_example' # str | Mining Account + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + page_index = 56 # int | Page number, default is first page, start form 1 (optional) + sort = 56 # int | sort sequence(default=0)0 positive sequence, 1 negative sequence (optional) + sort_column = 56 # int | Sort by( default 1): 1: miner name, 2: real-time computing power, 3: daily average computing power, 4: real-time rejection rate, 5: last submission time (optional) + worker_status = 56 # int | miners status(default=0)0 all, 1 valid, 2 invalid, 3 failure (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Request for Miner List (USER_DATA) + api_response = api_instance.sapi_v1_mining_worker_list_get(algo, user_name, timestamp, signature, page_index=page_index, sort=sort, sort_column=sort_column, worker_status=worker_status, recv_window=recv_window) + print("The response of MiningApi->sapi_v1_mining_worker_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MiningApi->sapi_v1_mining_worker_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **algo** | **str**| Algorithm(sha256) | + **user_name** | **str**| Mining Account | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **page_index** | **int**| Page number, default is first page, start form 1 | [optional] + **sort** | **int**| sort sequence(default=0)0 positive sequence, 1 negative sequence | [optional] + **sort_column** | **int**| Sort by( default 1): 1: miner name, 2: real-time computing power, 3: daily average computing power, 4: real-time rejection rate, 5: last submission time | [optional] + **worker_status** | **int**| miners status(default=0)0 all, 1 valid, 2 invalid, 3 failure | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MiningWorkerListGet200Response**](SapiV1MiningWorkerListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of workers | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/MyTrade.md b/target/python/binance_openapi/docs/MyTrade.md new file mode 100644 index 0000000..cc1ad25 --- /dev/null +++ b/target/python/binance_openapi/docs/MyTrade.md @@ -0,0 +1,41 @@ +# MyTrade + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**id** | **int** | Trade id | +**order_id** | **int** | | +**order_list_id** | **int** | | +**price** | **str** | Price | +**qty** | **str** | Amount of base asset | +**quote_qty** | **str** | Amount of quote asset | +**commission** | **str** | | +**commission_asset** | **str** | | +**time** | **int** | Trade timestamp | +**is_buyer** | **bool** | | +**is_maker** | **bool** | | +**is_best_match** | **bool** | | + +## Example + +```python +from openapi_client.models.my_trade import MyTrade + +# TODO update the JSON string below +json = "{}" +# create an instance of MyTrade from a JSON string +my_trade_instance = MyTrade.from_json(json) +# print the JSON string representation of the object +print(MyTrade.to_json()) + +# convert the object into a dict +my_trade_dict = my_trade_instance.to_dict() +# create an instance of MyTrade from a dict +my_trade_from_dict = MyTrade.from_dict(my_trade_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/NFTApi.md b/target/python/binance_openapi/docs/NFTApi.md new file mode 100644 index 0000000..0a5535e --- /dev/null +++ b/target/python/binance_openapi/docs/NFTApi.md @@ -0,0 +1,382 @@ +# openapi_client.NFTApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_nft_history_deposit_get**](NFTApi.md#sapi_v1_nft_history_deposit_get) | **GET** /sapi/v1/nft/history/deposit | Get NFT Deposit History(USER_DATA) +[**sapi_v1_nft_history_transactions_get**](NFTApi.md#sapi_v1_nft_history_transactions_get) | **GET** /sapi/v1/nft/history/transactions | Get NFT Transaction History (USER_DATA) +[**sapi_v1_nft_history_withdraw_get**](NFTApi.md#sapi_v1_nft_history_withdraw_get) | **GET** /sapi/v1/nft/history/withdraw | Get NFT Withdraw History (USER_DATA) +[**sapi_v1_nft_user_get_asset_get**](NFTApi.md#sapi_v1_nft_user_get_asset_get) | **GET** /sapi/v1/nft/user/getAsset | Get NFT Asset (USER_DATA) + + +# **sapi_v1_nft_history_deposit_get** +> SapiV1NftHistoryDepositGet200Response sapi_v1_nft_history_deposit_get(timestamp, signature, start_time=start_time, end_time=end_time, limit=limit, page=page, recv_window=recv_window) + +Get NFT Deposit History(USER_DATA) + +- The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_nft_history_deposit_get200_response import SapiV1NftHistoryDepositGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.NFTApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 50 # int | Default 50, Max 50 (optional) + page = 1 # int | Default 1 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get NFT Deposit History(USER_DATA) + api_response = api_instance.sapi_v1_nft_history_deposit_get(timestamp, signature, start_time=start_time, end_time=end_time, limit=limit, page=page, recv_window=recv_window) + print("The response of NFTApi->sapi_v1_nft_history_deposit_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NFTApi->sapi_v1_nft_history_deposit_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| Default 50, Max 50 | [optional] + **page** | **int**| Default 1 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1NftHistoryDepositGet200Response**](SapiV1NftHistoryDepositGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | NFT Deposit History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_nft_history_transactions_get** +> SapiV1NftHistoryTransactionsGet200Response sapi_v1_nft_history_transactions_get(order_type, timestamp, signature, start_time=start_time, end_time=end_time, limit=limit, page=page, recv_window=recv_window) + +Get NFT Transaction History (USER_DATA) + +- The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response import SapiV1NftHistoryTransactionsGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.NFTApi(api_client) + order_type = 1 # int | 0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 50 # int | Default 50, Max 50 (optional) + page = 1 # int | Default 1 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get NFT Transaction History (USER_DATA) + api_response = api_instance.sapi_v1_nft_history_transactions_get(order_type, timestamp, signature, start_time=start_time, end_time=end_time, limit=limit, page=page, recv_window=recv_window) + print("The response of NFTApi->sapi_v1_nft_history_transactions_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NFTApi->sapi_v1_nft_history_transactions_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order_type** | **int**| 0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| Default 50, Max 50 | [optional] + **page** | **int**| Default 1 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1NftHistoryTransactionsGet200Response**](SapiV1NftHistoryTransactionsGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | NFT Transaction History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_nft_history_withdraw_get** +> SapiV1NftHistoryWithdrawGet200Response sapi_v1_nft_history_withdraw_get(timestamp, signature, start_time=start_time, end_time=end_time, limit=limit, page=page, recv_window=recv_window) + +Get NFT Withdraw History (USER_DATA) + +- The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_nft_history_withdraw_get200_response import SapiV1NftHistoryWithdrawGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.NFTApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 50 # int | Default 50, Max 50 (optional) + page = 1 # int | Default 1 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get NFT Withdraw History (USER_DATA) + api_response = api_instance.sapi_v1_nft_history_withdraw_get(timestamp, signature, start_time=start_time, end_time=end_time, limit=limit, page=page, recv_window=recv_window) + print("The response of NFTApi->sapi_v1_nft_history_withdraw_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NFTApi->sapi_v1_nft_history_withdraw_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| Default 50, Max 50 | [optional] + **page** | **int**| Default 1 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1NftHistoryWithdrawGet200Response**](SapiV1NftHistoryWithdrawGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | NFT Withdraw History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_nft_user_get_asset_get** +> SapiV1NftUserGetAssetGet200Response sapi_v1_nft_user_get_asset_get(timestamp, signature, limit=limit, page=page, recv_window=recv_window) + +Get NFT Asset (USER_DATA) + +Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_nft_user_get_asset_get200_response import SapiV1NftUserGetAssetGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.NFTApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + limit = 50 # int | Default 50, Max 50 (optional) + page = 1 # int | Default 1 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get NFT Asset (USER_DATA) + api_response = api_instance.sapi_v1_nft_user_get_asset_get(timestamp, signature, limit=limit, page=page, recv_window=recv_window) + print("The response of NFTApi->sapi_v1_nft_user_get_asset_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NFTApi->sapi_v1_nft_user_get_asset_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **limit** | **int**| Default 50, Max 50 | [optional] + **page** | **int**| Default 1 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1NftUserGetAssetGet200Response**](SapiV1NftUserGetAssetGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Asset Information | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/OcoOrder.md b/target/python/binance_openapi/docs/OcoOrder.md new file mode 100644 index 0000000..2b6f3c3 --- /dev/null +++ b/target/python/binance_openapi/docs/OcoOrder.md @@ -0,0 +1,37 @@ +# OcoOrder + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_list_id** | **int** | | +**contingency_type** | **str** | | +**list_status_type** | **str** | | +**list_order_status** | **str** | | +**list_client_order_id** | **str** | | +**transaction_time** | **int** | | +**symbol** | **str** | | +**orders** | [**List[SapiV1MarginOrderOcoPost200ResponseOrdersInner]**](SapiV1MarginOrderOcoPost200ResponseOrdersInner.md) | | +**order_reports** | [**List[OcoOrderOrderReportsInner]**](OcoOrderOrderReportsInner.md) | | + +## Example + +```python +from openapi_client.models.oco_order import OcoOrder + +# TODO update the JSON string below +json = "{}" +# create an instance of OcoOrder from a JSON string +oco_order_instance = OcoOrder.from_json(json) +# print the JSON string representation of the object +print(OcoOrder.to_json()) + +# convert the object into a dict +oco_order_dict = oco_order_instance.to_dict() +# create an instance of OcoOrder from a dict +oco_order_from_dict = OcoOrder.from_dict(oco_order_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/OcoOrderOrderReportsInner.md b/target/python/binance_openapi/docs/OcoOrderOrderReportsInner.md new file mode 100644 index 0000000..818f1ed --- /dev/null +++ b/target/python/binance_openapi/docs/OcoOrderOrderReportsInner.md @@ -0,0 +1,44 @@ +# OcoOrderOrderReportsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**orig_client_order_id** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**client_order_id** | **str** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**stop_price** | **str** | | +**self_trade_prevention_mode** | **str** | | +**transact_time** | **int** | | + +## Example + +```python +from openapi_client.models.oco_order_order_reports_inner import OcoOrderOrderReportsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of OcoOrderOrderReportsInner from a JSON string +oco_order_order_reports_inner_instance = OcoOrderOrderReportsInner.from_json(json) +# print the JSON string representation of the object +print(OcoOrderOrderReportsInner.to_json()) + +# convert the object into a dict +oco_order_order_reports_inner_dict = oco_order_order_reports_inner_instance.to_dict() +# create an instance of OcoOrderOrderReportsInner from a dict +oco_order_order_reports_inner_from_dict = OcoOrderOrderReportsInner.from_dict(oco_order_order_reports_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/Order.md b/target/python/binance_openapi/docs/Order.md new file mode 100644 index 0000000..5531152 --- /dev/null +++ b/target/python/binance_openapi/docs/Order.md @@ -0,0 +1,43 @@ +# Order + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**orig_client_order_id** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | Unless OCO, value will be -1 | +**client_order_id** | **str** | | +**transact_time** | **int** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**self_trade_prevention_mode** | **str** | | + +## Example + +```python +from openapi_client.models.order import Order + +# TODO update the JSON string below +json = "{}" +# create an instance of Order from a JSON string +order_instance = Order.from_json(json) +# print the JSON string representation of the object +print(Order.to_json()) + +# convert the object into a dict +order_dict = order_instance.to_dict() +# create an instance of Order from a dict +order_from_dict = Order.from_dict(order_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/OrderDetails.md b/target/python/binance_openapi/docs/OrderDetails.md new file mode 100644 index 0000000..810cc22 --- /dev/null +++ b/target/python/binance_openapi/docs/OrderDetails.md @@ -0,0 +1,50 @@ +# OrderDetails + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | Unless OCO, value will be -1 | +**client_order_id** | **str** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**stop_price** | **str** | | +**iceberg_qty** | **str** | | +**time** | **int** | | +**update_time** | **int** | | +**is_working** | **bool** | | +**working_time** | **int** | | +**orig_quote_order_qty** | **str** | | +**self_trade_prevention_mode** | **str** | | +**prevented_match_id** | **int** | | [optional] +**prevented_quantity** | **str** | | [optional] + +## Example + +```python +from openapi_client.models.order_details import OrderDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of OrderDetails from a JSON string +order_details_instance = OrderDetails.from_json(json) +# print the JSON string representation of the object +print(OrderDetails.to_json()) + +# convert the object into a dict +order_details_dict = order_details_instance.to_dict() +# create an instance of OrderDetails from a dict +order_details_from_dict = OrderDetails.from_dict(order_details_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/OrderResponseAck.md b/target/python/binance_openapi/docs/OrderResponseAck.md new file mode 100644 index 0000000..3875013 --- /dev/null +++ b/target/python/binance_openapi/docs/OrderResponseAck.md @@ -0,0 +1,33 @@ +# OrderResponseAck + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**client_order_id** | **str** | | +**transact_time** | **int** | | + +## Example + +```python +from openapi_client.models.order_response_ack import OrderResponseAck + +# TODO update the JSON string below +json = "{}" +# create an instance of OrderResponseAck from a JSON string +order_response_ack_instance = OrderResponseAck.from_json(json) +# print the JSON string representation of the object +print(OrderResponseAck.to_json()) + +# convert the object into a dict +order_response_ack_dict = order_response_ack_instance.to_dict() +# create an instance of OrderResponseAck from a dict +order_response_ack_from_dict = OrderResponseAck.from_dict(order_response_ack_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/OrderResponseFull.md b/target/python/binance_openapi/docs/OrderResponseFull.md new file mode 100644 index 0000000..1a6183b --- /dev/null +++ b/target/python/binance_openapi/docs/OrderResponseFull.md @@ -0,0 +1,46 @@ +# OrderResponseFull + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**client_order_id** | **str** | | +**transact_time** | **int** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**strategy_id** | **int** | | [optional] +**strategy_type** | **int** | | [optional] +**working_time** | **int** | | +**self_trade_prevention_mode** | **str** | | +**fills** | [**List[OrderResponseFullFillsInner]**](OrderResponseFullFillsInner.md) | | + +## Example + +```python +from openapi_client.models.order_response_full import OrderResponseFull + +# TODO update the JSON string below +json = "{}" +# create an instance of OrderResponseFull from a JSON string +order_response_full_instance = OrderResponseFull.from_json(json) +# print the JSON string representation of the object +print(OrderResponseFull.to_json()) + +# convert the object into a dict +order_response_full_dict = order_response_full_instance.to_dict() +# create an instance of OrderResponseFull from a dict +order_response_full_from_dict = OrderResponseFull.from_dict(order_response_full_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/OrderResponseFullFillsInner.md b/target/python/binance_openapi/docs/OrderResponseFullFillsInner.md new file mode 100644 index 0000000..09b171d --- /dev/null +++ b/target/python/binance_openapi/docs/OrderResponseFullFillsInner.md @@ -0,0 +1,32 @@ +# OrderResponseFullFillsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**price** | **str** | | +**qty** | **str** | | +**commission** | **str** | | +**commission_asset** | **str** | | + +## Example + +```python +from openapi_client.models.order_response_full_fills_inner import OrderResponseFullFillsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of OrderResponseFullFillsInner from a JSON string +order_response_full_fills_inner_instance = OrderResponseFullFillsInner.from_json(json) +# print the JSON string representation of the object +print(OrderResponseFullFillsInner.to_json()) + +# convert the object into a dict +order_response_full_fills_inner_dict = order_response_full_fills_inner_instance.to_dict() +# create an instance of OrderResponseFullFillsInner from a dict +order_response_full_fills_inner_from_dict = OrderResponseFullFillsInner.from_dict(order_response_full_fills_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/OrderResponseResult.md b/target/python/binance_openapi/docs/OrderResponseResult.md new file mode 100644 index 0000000..1063123 --- /dev/null +++ b/target/python/binance_openapi/docs/OrderResponseResult.md @@ -0,0 +1,45 @@ +# OrderResponseResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**client_order_id** | **str** | | +**transact_time** | **int** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**strategy_id** | **int** | | [optional] +**strategy_type** | **int** | | [optional] +**working_time** | **int** | | +**self_trade_prevention_mode** | **str** | | + +## Example + +```python +from openapi_client.models.order_response_result import OrderResponseResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OrderResponseResult from a JSON string +order_response_result_instance = OrderResponseResult.from_json(json) +# print the JSON string representation of the object +print(OrderResponseResult.to_json()) + +# convert the object into a dict +order_response_result_dict = order_response_result_instance.to_dict() +# create an instance of OrderResponseResult from a dict +order_response_result_from_dict = OrderResponseResult.from_dict(order_response_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/PayApi.md b/target/python/binance_openapi/docs/PayApi.md new file mode 100644 index 0000000..8d51f6f --- /dev/null +++ b/target/python/binance_openapi/docs/PayApi.md @@ -0,0 +1,100 @@ +# openapi_client.PayApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_pay_transactions_get**](PayApi.md#sapi_v1_pay_transactions_get) | **GET** /sapi/v1/pay/transactions | Get Pay Trade History (USER_DATA) + + +# **sapi_v1_pay_transactions_get** +> SapiV1PayTransactionsGet200Response sapi_v1_pay_transactions_get(timestamp, signature, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + +Get Pay Trade History (USER_DATA) + +- If startTime and endTime are not sent, the recent 90 days' data will be returned. - The max interval between startTime and endTime is 90 days. - Support for querying orders within the last 18 months. Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_pay_transactions_get200_response import SapiV1PayTransactionsGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.PayApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 100 # int | default 100, max 100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Pay Trade History (USER_DATA) + api_response = api_instance.sapi_v1_pay_transactions_get(timestamp, signature, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + print("The response of PayApi->sapi_v1_pay_transactions_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PayApi->sapi_v1_pay_transactions_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| default 100, max 100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1PayTransactionsGet200Response**](SapiV1PayTransactionsGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Pay History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/PortfolioMarginApi.md b/target/python/binance_openapi/docs/PortfolioMarginApi.md new file mode 100644 index 0000000..a1e4ace --- /dev/null +++ b/target/python/binance_openapi/docs/PortfolioMarginApi.md @@ -0,0 +1,1111 @@ +# openapi_client.PortfolioMarginApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_portfolio_account_get**](PortfolioMarginApi.md#sapi_v1_portfolio_account_get) | **GET** /sapi/v1/portfolio/account | Portfolio Margin Account (USER_DATA) +[**sapi_v1_portfolio_asset_collection_post**](PortfolioMarginApi.md#sapi_v1_portfolio_asset_collection_post) | **POST** /sapi/v1/portfolio/asset-collection | Fund Collection by Asset (USER_DATA) +[**sapi_v1_portfolio_asset_index_price_get**](PortfolioMarginApi.md#sapi_v1_portfolio_asset_index_price_get) | **GET** /sapi/v1/portfolio/asset-index-price | Query Portfolio Margin Asset Index Price (MARKET_DATA) +[**sapi_v1_portfolio_auto_collection_post**](PortfolioMarginApi.md#sapi_v1_portfolio_auto_collection_post) | **POST** /sapi/v1/portfolio/auto-collection | Fund Auto-collection (USER_DATA) +[**sapi_v1_portfolio_bnb_transfer_post**](PortfolioMarginApi.md#sapi_v1_portfolio_bnb_transfer_post) | **POST** /sapi/v1/portfolio/bnb-transfer | BNB Transfer (USER_DATA) +[**sapi_v1_portfolio_collateral_rate_get**](PortfolioMarginApi.md#sapi_v1_portfolio_collateral_rate_get) | **GET** /sapi/v1/portfolio/collateralRate | Portfolio Margin Collateral Rate (MARKET_DATA) +[**sapi_v1_portfolio_interest_history_get**](PortfolioMarginApi.md#sapi_v1_portfolio_interest_history_get) | **GET** /sapi/v1/portfolio/interest-history | Query Classic Portfolio Margin Negative Balance Interest History (USER_DATA) +[**sapi_v1_portfolio_margin_asset_leverage_get**](PortfolioMarginApi.md#sapi_v1_portfolio_margin_asset_leverage_get) | **GET** /sapi/v1/portfolio/margin-asset-leverage | Get Portfolio Margin Asset Leverage (USER_DATA) +[**sapi_v1_portfolio_pm_loan_get**](PortfolioMarginApi.md#sapi_v1_portfolio_pm_loan_get) | **GET** /sapi/v1/portfolio/pmLoan | Portfolio Margin Bankruptcy Loan Amount (USER_DATA) +[**sapi_v1_portfolio_repay_futures_negative_balance_post**](PortfolioMarginApi.md#sapi_v1_portfolio_repay_futures_negative_balance_post) | **POST** /sapi/v1/portfolio/repay-futures-negative-balance | Repay futures Negative Balance (USER_DATA) +[**sapi_v1_portfolio_repay_futures_switch_get**](PortfolioMarginApi.md#sapi_v1_portfolio_repay_futures_switch_get) | **GET** /sapi/v1/portfolio/repay-futures-switch | Get Auto-repay-futures Status (USER_DATA) +[**sapi_v1_portfolio_repay_futures_switch_post**](PortfolioMarginApi.md#sapi_v1_portfolio_repay_futures_switch_post) | **POST** /sapi/v1/portfolio/repay-futures-switch | Change Auto-repay-futures Status (USER_DATA) +[**sapi_v1_portfolio_repay_post**](PortfolioMarginApi.md#sapi_v1_portfolio_repay_post) | **POST** /sapi/v1/portfolio/repay | Portfolio Margin Bankruptcy Loan Repay (USER_DATA) + + +# **sapi_v1_portfolio_account_get** +> SapiV1PortfolioAccountGet200Response sapi_v1_portfolio_account_get(timestamp, signature, recv_window=recv_window) + +Portfolio Margin Account (USER_DATA) + +Get the account info 'Weight(IP): 1' + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_portfolio_account_get200_response import SapiV1PortfolioAccountGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.PortfolioMarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Portfolio Margin Account (USER_DATA) + api_response = api_instance.sapi_v1_portfolio_account_get(timestamp, signature, recv_window=recv_window) + print("The response of PortfolioMarginApi->sapi_v1_portfolio_account_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PortfolioMarginApi->sapi_v1_portfolio_account_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1PortfolioAccountGet200Response**](SapiV1PortfolioAccountGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Portfolio account. | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_portfolio_asset_collection_post** +> SapiV1PortfolioAutoCollectionPost200Response sapi_v1_portfolio_asset_collection_post(asset, timestamp, signature, recv_window=recv_window) + +Fund Collection by Asset (USER_DATA) + +Transfers specific asset from Futures Account to Margin account Weight(IP): 60 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_portfolio_auto_collection_post200_response import SapiV1PortfolioAutoCollectionPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.PortfolioMarginApi(api_client) + asset = 'BTC' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Fund Collection by Asset (USER_DATA) + api_response = api_instance.sapi_v1_portfolio_asset_collection_post(asset, timestamp, signature, recv_window=recv_window) + print("The response of PortfolioMarginApi->sapi_v1_portfolio_asset_collection_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PortfolioMarginApi->sapi_v1_portfolio_asset_collection_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1PortfolioAutoCollectionPost200Response**](SapiV1PortfolioAutoCollectionPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_portfolio_asset_index_price_get** +> List[SapiV1PortfolioAssetIndexPriceGet200ResponseInner] sapi_v1_portfolio_asset_index_price_get(asset=asset) + +Query Portfolio Margin Asset Index Price (MARKET_DATA) + +Query Portfolio Margin Asset Index Price Weight(IP): - 1 if send asset - 50 if not send asset + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_portfolio_asset_index_price_get200_response_inner import SapiV1PortfolioAssetIndexPriceGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.PortfolioMarginApi(api_client) + asset = 'BTC' # str | (optional) + + try: + # Query Portfolio Margin Asset Index Price (MARKET_DATA) + api_response = api_instance.sapi_v1_portfolio_asset_index_price_get(asset=asset) + print("The response of PortfolioMarginApi->sapi_v1_portfolio_asset_index_price_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PortfolioMarginApi->sapi_v1_portfolio_asset_index_price_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | **str**| | [optional] + +### Return type + +[**List[SapiV1PortfolioAssetIndexPriceGet200ResponseInner]**](SapiV1PortfolioAssetIndexPriceGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | asset price index | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_portfolio_auto_collection_post** +> SapiV1PortfolioAutoCollectionPost200Response sapi_v1_portfolio_auto_collection_post(timestamp, signature, recv_window=recv_window) + +Fund Auto-collection (USER_DATA) + +Transfers all assets from Futures Account to Margin account Weight(IP): 1500 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_portfolio_auto_collection_post200_response import SapiV1PortfolioAutoCollectionPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.PortfolioMarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Fund Auto-collection (USER_DATA) + api_response = api_instance.sapi_v1_portfolio_auto_collection_post(timestamp, signature, recv_window=recv_window) + print("The response of PortfolioMarginApi->sapi_v1_portfolio_auto_collection_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PortfolioMarginApi->sapi_v1_portfolio_auto_collection_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1PortfolioAutoCollectionPost200Response**](SapiV1PortfolioAutoCollectionPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_portfolio_bnb_transfer_post** +> SapiV1MarginBorrowRepayPost200Response sapi_v1_portfolio_bnb_transfer_post(transfer_side, amount, timestamp, signature, recv_window=recv_window) + +BNB Transfer (USER_DATA) + +BNB transfer can be between Margin Account and USDM Account Weight(IP): 1500 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_borrow_repay_post200_response import SapiV1MarginBorrowRepayPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.PortfolioMarginApi(api_client) + transfer_side = 'TO_UM' # str | + amount = 1.01 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # BNB Transfer (USER_DATA) + api_response = api_instance.sapi_v1_portfolio_bnb_transfer_post(transfer_side, amount, timestamp, signature, recv_window=recv_window) + print("The response of PortfolioMarginApi->sapi_v1_portfolio_bnb_transfer_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PortfolioMarginApi->sapi_v1_portfolio_bnb_transfer_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **transfer_side** | **str**| | + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginBorrowRepayPost200Response**](SapiV1MarginBorrowRepayPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_portfolio_collateral_rate_get** +> List[SapiV1PortfolioCollateralRateGet200ResponseInner] sapi_v1_portfolio_collateral_rate_get() + +Portfolio Margin Collateral Rate (MARKET_DATA) + +Portfolio Margin Collateral Rate. Weight(IP): 50 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_portfolio_collateral_rate_get200_response_inner import SapiV1PortfolioCollateralRateGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.PortfolioMarginApi(api_client) + + try: + # Portfolio Margin Collateral Rate (MARKET_DATA) + api_response = api_instance.sapi_v1_portfolio_collateral_rate_get() + print("The response of PortfolioMarginApi->sapi_v1_portfolio_collateral_rate_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PortfolioMarginApi->sapi_v1_portfolio_collateral_rate_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[SapiV1PortfolioCollateralRateGet200ResponseInner]**](SapiV1PortfolioCollateralRateGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Portfolio Margin Collateral Rate. | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_portfolio_interest_history_get** +> List[SapiV1PortfolioInterestHistoryGet200ResponseInner] sapi_v1_portfolio_interest_history_get(asset, timestamp, signature, start_time=start_time, end_time=end_time, size=size, recv_window=recv_window) + +Query Classic Portfolio Margin Negative Balance Interest History (USER_DATA) + +Query interest history of negative balance for portfolio margin. Weight(IP): 50 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_portfolio_interest_history_get200_response_inner import SapiV1PortfolioInterestHistoryGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.PortfolioMarginApi(api_client) + asset = 'BTC' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Classic Portfolio Margin Negative Balance Interest History (USER_DATA) + api_response = api_instance.sapi_v1_portfolio_interest_history_get(asset, timestamp, signature, start_time=start_time, end_time=end_time, size=size, recv_window=recv_window) + print("The response of PortfolioMarginApi->sapi_v1_portfolio_interest_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PortfolioMarginApi->sapi_v1_portfolio_interest_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1PortfolioInterestHistoryGet200ResponseInner]**](SapiV1PortfolioInterestHistoryGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Balance interest history | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_portfolio_margin_asset_leverage_get** +> List[SapiV1PortfolioMarginAssetLeverageGet200ResponseInner] sapi_v1_portfolio_margin_asset_leverage_get() + +Get Portfolio Margin Asset Leverage (USER_DATA) + +Weight(IP): 50 + +### Example + + +```python +import openapi_client +from openapi_client.models.sapi_v1_portfolio_margin_asset_leverage_get200_response_inner import SapiV1PortfolioMarginAssetLeverageGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.PortfolioMarginApi(api_client) + + try: + # Get Portfolio Margin Asset Leverage (USER_DATA) + api_response = api_instance.sapi_v1_portfolio_margin_asset_leverage_get() + print("The response of PortfolioMarginApi->sapi_v1_portfolio_margin_asset_leverage_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PortfolioMarginApi->sapi_v1_portfolio_margin_asset_leverage_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[SapiV1PortfolioMarginAssetLeverageGet200ResponseInner]**](SapiV1PortfolioMarginAssetLeverageGet200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Classic Portfolio Margin Collateral Rate | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_portfolio_pm_loan_get** +> SapiV1PortfolioPmLoanGet200Response sapi_v1_portfolio_pm_loan_get(timestamp, signature, recv_window=recv_window) + +Portfolio Margin Bankruptcy Loan Amount (USER_DATA) + +Query Portfolio Margin Bankruptcy Loan Amount. Weight(UID): 500 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_portfolio_pm_loan_get200_response import SapiV1PortfolioPmLoanGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.PortfolioMarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Portfolio Margin Bankruptcy Loan Amount (USER_DATA) + api_response = api_instance.sapi_v1_portfolio_pm_loan_get(timestamp, signature, recv_window=recv_window) + print("The response of PortfolioMarginApi->sapi_v1_portfolio_pm_loan_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PortfolioMarginApi->sapi_v1_portfolio_pm_loan_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1PortfolioPmLoanGet200Response**](SapiV1PortfolioPmLoanGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Portfolio Margin Bankruptcy Loan Amount. | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_portfolio_repay_futures_negative_balance_post** +> SapiV1PortfolioAutoCollectionPost200Response sapi_v1_portfolio_repay_futures_negative_balance_post(timestamp, signature, recv_window=recv_window) + +Repay futures Negative Balance (USER_DATA) + +Repay futures Negative Balance Weight(IP): 1500 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_portfolio_auto_collection_post200_response import SapiV1PortfolioAutoCollectionPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.PortfolioMarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Repay futures Negative Balance (USER_DATA) + api_response = api_instance.sapi_v1_portfolio_repay_futures_negative_balance_post(timestamp, signature, recv_window=recv_window) + print("The response of PortfolioMarginApi->sapi_v1_portfolio_repay_futures_negative_balance_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PortfolioMarginApi->sapi_v1_portfolio_repay_futures_negative_balance_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1PortfolioAutoCollectionPost200Response**](SapiV1PortfolioAutoCollectionPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_portfolio_repay_futures_switch_get** +> SapiV1PortfolioRepayFuturesSwitchGet200Response sapi_v1_portfolio_repay_futures_switch_get(timestamp, signature, recv_window=recv_window) + +Get Auto-repay-futures Status (USER_DATA) + +Query Auto-repay-futures Status Weight(IP): 30 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_portfolio_repay_futures_switch_get200_response import SapiV1PortfolioRepayFuturesSwitchGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.PortfolioMarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Auto-repay-futures Status (USER_DATA) + api_response = api_instance.sapi_v1_portfolio_repay_futures_switch_get(timestamp, signature, recv_window=recv_window) + print("The response of PortfolioMarginApi->sapi_v1_portfolio_repay_futures_switch_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PortfolioMarginApi->sapi_v1_portfolio_repay_futures_switch_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1PortfolioRepayFuturesSwitchGet200Response**](SapiV1PortfolioRepayFuturesSwitchGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_portfolio_repay_futures_switch_post** +> SapiV1PortfolioAutoCollectionPost200Response sapi_v1_portfolio_repay_futures_switch_post(auto_repay, timestamp, signature, recv_window=recv_window) + +Change Auto-repay-futures Status (USER_DATA) + +Change Auto-repay-futures Status Weight(IP): 1500 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_portfolio_auto_collection_post200_response import SapiV1PortfolioAutoCollectionPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.PortfolioMarginApi(api_client) + auto_repay = true # bool | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Change Auto-repay-futures Status (USER_DATA) + api_response = api_instance.sapi_v1_portfolio_repay_futures_switch_post(auto_repay, timestamp, signature, recv_window=recv_window) + print("The response of PortfolioMarginApi->sapi_v1_portfolio_repay_futures_switch_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PortfolioMarginApi->sapi_v1_portfolio_repay_futures_switch_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **auto_repay** | **bool**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1PortfolioAutoCollectionPost200Response**](SapiV1PortfolioAutoCollectionPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_portfolio_repay_post** +> SapiV1PortfolioRepayPost200Response sapi_v1_portfolio_repay_post(timestamp, signature, var_from=var_from, recv_window=recv_window) + +Portfolio Margin Bankruptcy Loan Repay (USER_DATA) + +Repay Portfolio Margin Bankruptcy Loan. Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_portfolio_repay_post200_response import SapiV1PortfolioRepayPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.PortfolioMarginApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + var_from = 'SPOT' # str | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Portfolio Margin Bankruptcy Loan Repay (USER_DATA) + api_response = api_instance.sapi_v1_portfolio_repay_post(timestamp, signature, var_from=var_from, recv_window=recv_window) + print("The response of PortfolioMarginApi->sapi_v1_portfolio_repay_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PortfolioMarginApi->sapi_v1_portfolio_repay_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **var_from** | **str**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1PortfolioRepayPost200Response**](SapiV1PortfolioRepayPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Transaction. | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/PriceTicker.md b/target/python/binance_openapi/docs/PriceTicker.md new file mode 100644 index 0000000..8a3f011 --- /dev/null +++ b/target/python/binance_openapi/docs/PriceTicker.md @@ -0,0 +1,30 @@ +# PriceTicker + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**price** | **str** | | + +## Example + +```python +from openapi_client.models.price_ticker import PriceTicker + +# TODO update the JSON string below +json = "{}" +# create an instance of PriceTicker from a JSON string +price_ticker_instance = PriceTicker.from_json(json) +# print the JSON string representation of the object +print(PriceTicker.to_json()) + +# convert the object into a dict +price_ticker_dict = price_ticker_instance.to_dict() +# create an instance of PriceTicker from a dict +price_ticker_from_dict = PriceTicker.from_dict(price_ticker_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/RebateApi.md b/target/python/binance_openapi/docs/RebateApi.md new file mode 100644 index 0000000..9d56b13 --- /dev/null +++ b/target/python/binance_openapi/docs/RebateApi.md @@ -0,0 +1,100 @@ +# openapi_client.RebateApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_rebate_tax_query_get**](RebateApi.md#sapi_v1_rebate_tax_query_get) | **GET** /sapi/v1/rebate/taxQuery | Get Spot Rebate History Records (USER_DATA) + + +# **sapi_v1_rebate_tax_query_get** +> SapiV1RebateTaxQueryGet200Response sapi_v1_rebate_tax_query_get(timestamp, signature, start_time=start_time, end_time=end_time, page=page, recv_window=recv_window) + +Get Spot Rebate History Records (USER_DATA) + +- The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. - The earliest startTime is supported on June 10, 2020 Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response import SapiV1RebateTaxQueryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.RebateApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + page = 1 # int | default 1 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Spot Rebate History Records (USER_DATA) + api_response = api_instance.sapi_v1_rebate_tax_query_get(timestamp, signature, start_time=start_time, end_time=end_time, page=page, recv_window=recv_window) + print("The response of RebateApi->sapi_v1_rebate_tax_query_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RebateApi->sapi_v1_rebate_tax_query_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **page** | **int**| default 1 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1RebateTaxQueryGet200Response**](SapiV1RebateTaxQueryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Rebate History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/RepaymentInfo.md b/target/python/binance_openapi/docs/RepaymentInfo.md new file mode 100644 index 0000000..9a125cc --- /dev/null +++ b/target/python/binance_openapi/docs/RepaymentInfo.md @@ -0,0 +1,35 @@ +# RepaymentInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**remaining_principal** | **str** | | +**remaining_interest** | **str** | | +**collateral_coin** | **str** | | +**remaining_collateral** | **str** | | +**current_ltv** | **str** | | +**repay_status** | **str** | | + +## Example + +```python +from openapi_client.models.repayment_info import RepaymentInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of RepaymentInfo from a JSON string +repayment_info_instance = RepaymentInfo.from_json(json) +# print the JSON string representation of the object +print(RepaymentInfo.to_json()) + +# convert the object into a dict +repayment_info_dict = repayment_info_instance.to_dict() +# create an instance of RepaymentInfo from a dict +repayment_info_from_dict = RepaymentInfo.from_dict(repayment_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/RepaymentInfo2.md b/target/python/binance_openapi/docs/RepaymentInfo2.md new file mode 100644 index 0000000..c1f77df --- /dev/null +++ b/target/python/binance_openapi/docs/RepaymentInfo2.md @@ -0,0 +1,31 @@ +# RepaymentInfo2 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**collateral_coin** | **str** | | +**repay_status** | **str** | | + +## Example + +```python +from openapi_client.models.repayment_info2 import RepaymentInfo2 + +# TODO update the JSON string below +json = "{}" +# create an instance of RepaymentInfo2 from a JSON string +repayment_info2_instance = RepaymentInfo2.from_json(json) +# print the JSON string representation of the object +print(RepaymentInfo2.to_json()) + +# convert the object into a dict +repayment_info2_dict = repayment_info2_instance.to_dict() +# create an instance of RepaymentInfo2 from a dict +repayment_info2_from_dict = RepaymentInfo2.from_dict(repayment_info2_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AccountApiRestrictionsGet200Response.md b/target/python/binance_openapi/docs/SapiV1AccountApiRestrictionsGet200Response.md new file mode 100644 index 0000000..cfcefc4 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AccountApiRestrictionsGet200Response.md @@ -0,0 +1,40 @@ +# SapiV1AccountApiRestrictionsGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip_restrict** | **bool** | | +**create_time** | **int** | | +**enable_internal_transfer** | **bool** | This option authorizes this key to transfer funds between your master account and your sub account instantly | +**enable_futures** | **bool** | API Key created before your futures account opened does not support futures API service | +**enable_portfolio_margin_trading** | **bool** | API Key created before your activate portfolio margin does not support portfolio margin API service | [optional] +**enable_vanilla_options** | **bool** | Authorizes this key to Vanilla options trading | +**permits_universal_transfer** | **bool** | 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 | +**enable_reading** | **bool** | | +**enable_spot_and_margin_trading** | **bool** | | +**enable_withdrawals** | **bool** | This option allows you to withdraw via API. You must apply the IP Access Restriction filter in order to enable withdrawals | +**enable_margin** | **bool** | This option can be adjusted after the Cross Margin account transfer is completed | +**trading_authority_expiration_time** | **int** | Expiration time for spot and margin trading permission | + +## Example + +```python +from openapi_client.models.sapi_v1_account_api_restrictions_get200_response import SapiV1AccountApiRestrictionsGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AccountApiRestrictionsGet200Response from a JSON string +sapi_v1_account_api_restrictions_get200_response_instance = SapiV1AccountApiRestrictionsGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AccountApiRestrictionsGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_account_api_restrictions_get200_response_dict = sapi_v1_account_api_restrictions_get200_response_instance.to_dict() +# create an instance of SapiV1AccountApiRestrictionsGet200Response from a dict +sapi_v1_account_api_restrictions_get200_response_from_dict = SapiV1AccountApiRestrictionsGet200Response.from_dict(sapi_v1_account_api_restrictions_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200Response.md b/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200Response.md new file mode 100644 index 0000000..4f35f2b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200Response.md @@ -0,0 +1,29 @@ +# SapiV1AccountApiTradingStatusGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SapiV1AccountApiTradingStatusGet200ResponseData**](SapiV1AccountApiTradingStatusGet200ResponseData.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response import SapiV1AccountApiTradingStatusGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AccountApiTradingStatusGet200Response from a JSON string +sapi_v1_account_api_trading_status_get200_response_instance = SapiV1AccountApiTradingStatusGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AccountApiTradingStatusGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_account_api_trading_status_get200_response_dict = sapi_v1_account_api_trading_status_get200_response_instance.to_dict() +# create an instance of SapiV1AccountApiTradingStatusGet200Response from a dict +sapi_v1_account_api_trading_status_get200_response_from_dict = SapiV1AccountApiTradingStatusGet200Response.from_dict(sapi_v1_account_api_trading_status_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseData.md b/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseData.md new file mode 100644 index 0000000..cc18d3e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseData.md @@ -0,0 +1,33 @@ +# SapiV1AccountApiTradingStatusGet200ResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_locked** | **bool** | API trading function is locked or not | +**planned_recover_time** | **int** | If API trading function is locked, this is the planned recover time | +**trigger_condition** | [**SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition**](SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition.md) | | +**indicators** | [**SapiV1AccountApiTradingStatusGet200ResponseDataIndicators**](SapiV1AccountApiTradingStatusGet200ResponseDataIndicators.md) | | +**update_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data import SapiV1AccountApiTradingStatusGet200ResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AccountApiTradingStatusGet200ResponseData from a JSON string +sapi_v1_account_api_trading_status_get200_response_data_instance = SapiV1AccountApiTradingStatusGet200ResponseData.from_json(json) +# print the JSON string representation of the object +print(SapiV1AccountApiTradingStatusGet200ResponseData.to_json()) + +# convert the object into a dict +sapi_v1_account_api_trading_status_get200_response_data_dict = sapi_v1_account_api_trading_status_get200_response_data_instance.to_dict() +# create an instance of SapiV1AccountApiTradingStatusGet200ResponseData from a dict +sapi_v1_account_api_trading_status_get200_response_data_from_dict = SapiV1AccountApiTradingStatusGet200ResponseData.from_dict(sapi_v1_account_api_trading_status_get200_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseDataIndicators.md b/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseDataIndicators.md new file mode 100644 index 0000000..475801f --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseDataIndicators.md @@ -0,0 +1,30 @@ +# SapiV1AccountApiTradingStatusGet200ResponseDataIndicators + +The indicators updated every 30 seconds + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**btcusdt** | [**List[SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner]**](SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_indicators import SapiV1AccountApiTradingStatusGet200ResponseDataIndicators + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AccountApiTradingStatusGet200ResponseDataIndicators from a JSON string +sapi_v1_account_api_trading_status_get200_response_data_indicators_instance = SapiV1AccountApiTradingStatusGet200ResponseDataIndicators.from_json(json) +# print the JSON string representation of the object +print(SapiV1AccountApiTradingStatusGet200ResponseDataIndicators.to_json()) + +# convert the object into a dict +sapi_v1_account_api_trading_status_get200_response_data_indicators_dict = sapi_v1_account_api_trading_status_get200_response_data_indicators_instance.to_dict() +# create an instance of SapiV1AccountApiTradingStatusGet200ResponseDataIndicators from a dict +sapi_v1_account_api_trading_status_get200_response_data_indicators_from_dict = SapiV1AccountApiTradingStatusGet200ResponseDataIndicators.from_dict(sapi_v1_account_api_trading_status_get200_response_data_indicators_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner.md b/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner.md new file mode 100644 index 0000000..5492350 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner.md @@ -0,0 +1,32 @@ +# SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**i** | **str** | Unfilled Ratio (UFR) | +**c** | **int** | Count of all orders | +**v** | **float** | Current UFR value | +**t** | **float** | Trigger UFR value | + +## Example + +```python +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner import SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner from a JSON string +sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner_instance = SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner.to_json()) + +# convert the object into a dict +sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner_dict = sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner_instance.to_dict() +# create an instance of SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner from a dict +sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner_from_dict = SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner.from_dict(sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition.md b/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition.md new file mode 100644 index 0000000..2ec8f8d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition.md @@ -0,0 +1,31 @@ +# SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**gcr** | **int** | Number of GTC orders | +**ifer** | **int** | Number of FOK/IOC orders | +**ufr** | **int** | Number of orders | + +## Example + +```python +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_trigger_condition import SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition from a JSON string +sapi_v1_account_api_trading_status_get200_response_data_trigger_condition_instance = SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition.from_json(json) +# print the JSON string representation of the object +print(SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition.to_json()) + +# convert the object into a dict +sapi_v1_account_api_trading_status_get200_response_data_trigger_condition_dict = sapi_v1_account_api_trading_status_get200_response_data_trigger_condition_instance.to_dict() +# create an instance of SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition from a dict +sapi_v1_account_api_trading_status_get200_response_data_trigger_condition_from_dict = SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition.from_dict(sapi_v1_account_api_trading_status_get200_response_data_trigger_condition_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AccountInfoGet200Response.md b/target/python/binance_openapi/docs/SapiV1AccountInfoGet200Response.md new file mode 100644 index 0000000..08d8997 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AccountInfoGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1AccountInfoGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vip_level** | **int** | | +**is_margin_enabled** | **bool** | true or false for margin. | +**is_future_enabled** | **bool** | true or false for futures. | + +## Example + +```python +from openapi_client.models.sapi_v1_account_info_get200_response import SapiV1AccountInfoGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AccountInfoGet200Response from a JSON string +sapi_v1_account_info_get200_response_instance = SapiV1AccountInfoGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AccountInfoGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_account_info_get200_response_dict = sapi_v1_account_info_get200_response_instance.to_dict() +# create an instance of SapiV1AccountInfoGet200Response from a dict +sapi_v1_account_info_get200_response_from_dict = SapiV1AccountInfoGet200Response.from_dict(sapi_v1_account_info_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AccountSnapshotGet200Response.md b/target/python/binance_openapi/docs/SapiV1AccountSnapshotGet200Response.md new file mode 100644 index 0000000..2835fb7 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AccountSnapshotGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1AccountSnapshotGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**snapshot_vos** | [**List[SnapshotFuturesSnapshotVosInner]**](SnapshotFuturesSnapshotVosInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_account_snapshot_get200_response import SapiV1AccountSnapshotGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AccountSnapshotGet200Response from a JSON string +sapi_v1_account_snapshot_get200_response_instance = SapiV1AccountSnapshotGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AccountSnapshotGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_account_snapshot_get200_response_dict = sapi_v1_account_snapshot_get200_response_instance.to_dict() +# create an instance of SapiV1AccountSnapshotGet200Response from a dict +sapi_v1_account_snapshot_get200_response_from_dict = SapiV1AccountSnapshotGet200Response.from_dict(sapi_v1_account_snapshot_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AccountStatusGet200Response.md b/target/python/binance_openapi/docs/SapiV1AccountStatusGet200Response.md new file mode 100644 index 0000000..4b5db0a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AccountStatusGet200Response.md @@ -0,0 +1,29 @@ +# SapiV1AccountStatusGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_account_status_get200_response import SapiV1AccountStatusGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AccountStatusGet200Response from a JSON string +sapi_v1_account_status_get200_response_instance = SapiV1AccountStatusGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AccountStatusGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_account_status_get200_response_dict = sapi_v1_account_status_get200_response_instance.to_dict() +# create an instance of SapiV1AccountStatusGet200Response from a dict +sapi_v1_account_status_get200_response_from_dict = SapiV1AccountStatusGet200Response.from_dict(sapi_v1_account_status_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoFuturesHistoricalOrdersGet200Response.md b/target/python/binance_openapi/docs/SapiV1AlgoFuturesHistoricalOrdersGet200Response.md new file mode 100644 index 0000000..f2cb072 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoFuturesHistoricalOrdersGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1AlgoFuturesHistoricalOrdersGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**orders** | [**List[SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner]**](SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_futures_historical_orders_get200_response import SapiV1AlgoFuturesHistoricalOrdersGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoFuturesHistoricalOrdersGet200Response from a JSON string +sapi_v1_algo_futures_historical_orders_get200_response_instance = SapiV1AlgoFuturesHistoricalOrdersGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoFuturesHistoricalOrdersGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_algo_futures_historical_orders_get200_response_dict = sapi_v1_algo_futures_historical_orders_get200_response_instance.to_dict() +# create an instance of SapiV1AlgoFuturesHistoricalOrdersGet200Response from a dict +sapi_v1_algo_futures_historical_orders_get200_response_from_dict = SapiV1AlgoFuturesHistoricalOrdersGet200Response.from_dict(sapi_v1_algo_futures_historical_orders_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner.md b/target/python/binance_openapi/docs/SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner.md new file mode 100644 index 0000000..fe3ecde --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner.md @@ -0,0 +1,42 @@ +# SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**algo_id** | **int** | | +**symbol** | **str** | | +**side** | **str** | | +**position_side** | **str** | | +**total_qty** | **str** | | +**executed_qty** | **str** | | +**executed_amt** | **str** | | +**avg_price** | **str** | | +**client_algo_id** | **str** | | +**book_time** | **int** | | +**end_time** | **int** | | +**algo_status** | **str** | | +**algo_type** | **str** | | +**urgency** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_futures_historical_orders_get200_response_orders_inner import SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner from a JSON string +sapi_v1_algo_futures_historical_orders_get200_response_orders_inner_instance = SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner.to_json()) + +# convert the object into a dict +sapi_v1_algo_futures_historical_orders_get200_response_orders_inner_dict = sapi_v1_algo_futures_historical_orders_get200_response_orders_inner_instance.to_dict() +# create an instance of SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner from a dict +sapi_v1_algo_futures_historical_orders_get200_response_orders_inner_from_dict = SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner.from_dict(sapi_v1_algo_futures_historical_orders_get200_response_orders_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoFuturesNewOrderVpPost200Response.md b/target/python/binance_openapi/docs/SapiV1AlgoFuturesNewOrderVpPost200Response.md new file mode 100644 index 0000000..27a415d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoFuturesNewOrderVpPost200Response.md @@ -0,0 +1,32 @@ +# SapiV1AlgoFuturesNewOrderVpPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_algo_id** | **str** | | +**success** | **bool** | | +**code** | **int** | | +**msg** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_futures_new_order_vp_post200_response import SapiV1AlgoFuturesNewOrderVpPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoFuturesNewOrderVpPost200Response from a JSON string +sapi_v1_algo_futures_new_order_vp_post200_response_instance = SapiV1AlgoFuturesNewOrderVpPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoFuturesNewOrderVpPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_algo_futures_new_order_vp_post200_response_dict = sapi_v1_algo_futures_new_order_vp_post200_response_instance.to_dict() +# create an instance of SapiV1AlgoFuturesNewOrderVpPost200Response from a dict +sapi_v1_algo_futures_new_order_vp_post200_response_from_dict = SapiV1AlgoFuturesNewOrderVpPost200Response.from_dict(sapi_v1_algo_futures_new_order_vp_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoFuturesOpenOrdersGet200Response.md b/target/python/binance_openapi/docs/SapiV1AlgoFuturesOpenOrdersGet200Response.md new file mode 100644 index 0000000..24d866a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoFuturesOpenOrdersGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1AlgoFuturesOpenOrdersGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**orders** | [**List[SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner]**](SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_algo_futures_open_orders_get200_response import SapiV1AlgoFuturesOpenOrdersGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoFuturesOpenOrdersGet200Response from a JSON string +sapi_v1_algo_futures_open_orders_get200_response_instance = SapiV1AlgoFuturesOpenOrdersGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoFuturesOpenOrdersGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_algo_futures_open_orders_get200_response_dict = sapi_v1_algo_futures_open_orders_get200_response_instance.to_dict() +# create an instance of SapiV1AlgoFuturesOpenOrdersGet200Response from a dict +sapi_v1_algo_futures_open_orders_get200_response_from_dict = SapiV1AlgoFuturesOpenOrdersGet200Response.from_dict(sapi_v1_algo_futures_open_orders_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner.md b/target/python/binance_openapi/docs/SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner.md new file mode 100644 index 0000000..c12fb36 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner.md @@ -0,0 +1,42 @@ +# SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**algo_id** | **int** | | +**symbol** | **str** | | +**side** | **str** | | +**position_side** | **str** | | +**total_qty** | **str** | | +**executed_qty** | **str** | | +**executed_amt** | **str** | | +**avg_price** | **str** | | +**client_algo_id** | **str** | | +**book_time** | **int** | | +**end_time** | **int** | | +**algo_status** | **str** | | +**algo_type** | **str** | | +**urgency** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_futures_open_orders_get200_response_orders_inner import SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner from a JSON string +sapi_v1_algo_futures_open_orders_get200_response_orders_inner_instance = SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner.to_json()) + +# convert the object into a dict +sapi_v1_algo_futures_open_orders_get200_response_orders_inner_dict = sapi_v1_algo_futures_open_orders_get200_response_orders_inner_instance.to_dict() +# create an instance of SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner from a dict +sapi_v1_algo_futures_open_orders_get200_response_orders_inner_from_dict = SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner.from_dict(sapi_v1_algo_futures_open_orders_get200_response_orders_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoFuturesOrderDelete200Response.md b/target/python/binance_openapi/docs/SapiV1AlgoFuturesOrderDelete200Response.md new file mode 100644 index 0000000..b0ca4e8 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoFuturesOrderDelete200Response.md @@ -0,0 +1,32 @@ +# SapiV1AlgoFuturesOrderDelete200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**algo_id** | **int** | | +**success** | **bool** | | +**code** | **int** | | +**msg** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_futures_order_delete200_response import SapiV1AlgoFuturesOrderDelete200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoFuturesOrderDelete200Response from a JSON string +sapi_v1_algo_futures_order_delete200_response_instance = SapiV1AlgoFuturesOrderDelete200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoFuturesOrderDelete200Response.to_json()) + +# convert the object into a dict +sapi_v1_algo_futures_order_delete200_response_dict = sapi_v1_algo_futures_order_delete200_response_instance.to_dict() +# create an instance of SapiV1AlgoFuturesOrderDelete200Response from a dict +sapi_v1_algo_futures_order_delete200_response_from_dict = SapiV1AlgoFuturesOrderDelete200Response.from_dict(sapi_v1_algo_futures_order_delete200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoFuturesSubOrdersGet200Response.md b/target/python/binance_openapi/docs/SapiV1AlgoFuturesSubOrdersGet200Response.md new file mode 100644 index 0000000..3655d73 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoFuturesSubOrdersGet200Response.md @@ -0,0 +1,32 @@ +# SapiV1AlgoFuturesSubOrdersGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**executed_qty** | **str** | | +**executed_amt** | **str** | | +**sub_orders** | [**List[SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner]**](SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_futures_sub_orders_get200_response import SapiV1AlgoFuturesSubOrdersGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoFuturesSubOrdersGet200Response from a JSON string +sapi_v1_algo_futures_sub_orders_get200_response_instance = SapiV1AlgoFuturesSubOrdersGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoFuturesSubOrdersGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_algo_futures_sub_orders_get200_response_dict = sapi_v1_algo_futures_sub_orders_get200_response_instance.to_dict() +# create an instance of SapiV1AlgoFuturesSubOrdersGet200Response from a dict +sapi_v1_algo_futures_sub_orders_get200_response_from_dict = SapiV1AlgoFuturesSubOrdersGet200Response.from_dict(sapi_v1_algo_futures_sub_orders_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner.md b/target/python/binance_openapi/docs/SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner.md new file mode 100644 index 0000000..1dd2233 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner.md @@ -0,0 +1,42 @@ +# SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**algo_id** | **int** | | +**order_id** | **int** | | +**order_status** | **str** | | +**executed_qty** | **str** | | [optional] +**executed_amt** | **str** | | +**fee_amt** | **str** | | +**fee_asset** | **str** | | +**book_time** | **int** | | +**avg_price** | **str** | | +**side** | **str** | | +**symbol** | **str** | | +**sub_id** | **int** | | +**time_in_force** | **str** | | +**orig_qty** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner import SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner from a JSON string +sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner_instance = SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner.to_json()) + +# convert the object into a dict +sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner_dict = sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner_instance.to_dict() +# create an instance of SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner from a dict +sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner_from_dict = SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner.from_dict(sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoSpotHistoricalOrdersGet200Response.md b/target/python/binance_openapi/docs/SapiV1AlgoSpotHistoricalOrdersGet200Response.md new file mode 100644 index 0000000..fdbe201 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoSpotHistoricalOrdersGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1AlgoSpotHistoricalOrdersGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**orders** | [**List[SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner]**](SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_spot_historical_orders_get200_response import SapiV1AlgoSpotHistoricalOrdersGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoSpotHistoricalOrdersGet200Response from a JSON string +sapi_v1_algo_spot_historical_orders_get200_response_instance = SapiV1AlgoSpotHistoricalOrdersGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoSpotHistoricalOrdersGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_algo_spot_historical_orders_get200_response_dict = sapi_v1_algo_spot_historical_orders_get200_response_instance.to_dict() +# create an instance of SapiV1AlgoSpotHistoricalOrdersGet200Response from a dict +sapi_v1_algo_spot_historical_orders_get200_response_from_dict = SapiV1AlgoSpotHistoricalOrdersGet200Response.from_dict(sapi_v1_algo_spot_historical_orders_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner.md b/target/python/binance_openapi/docs/SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner.md new file mode 100644 index 0000000..1bfb7b9 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner.md @@ -0,0 +1,41 @@ +# SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**algo_id** | **int** | | +**symbol** | **str** | | +**side** | **str** | | +**total_qty** | **str** | | +**executed_qty** | **str** | | +**executed_amt** | **str** | | +**avg_price** | **str** | | +**client_algo_id** | **str** | | +**book_time** | **int** | | +**end_time** | **int** | | +**algo_status** | **str** | | +**algo_type** | **str** | | +**urgency** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_spot_historical_orders_get200_response_orders_inner import SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner from a JSON string +sapi_v1_algo_spot_historical_orders_get200_response_orders_inner_instance = SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner.to_json()) + +# convert the object into a dict +sapi_v1_algo_spot_historical_orders_get200_response_orders_inner_dict = sapi_v1_algo_spot_historical_orders_get200_response_orders_inner_instance.to_dict() +# create an instance of SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner from a dict +sapi_v1_algo_spot_historical_orders_get200_response_orders_inner_from_dict = SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner.from_dict(sapi_v1_algo_spot_historical_orders_get200_response_orders_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoSpotNewOrderTwapPost200Response.md b/target/python/binance_openapi/docs/SapiV1AlgoSpotNewOrderTwapPost200Response.md new file mode 100644 index 0000000..6eaef6a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoSpotNewOrderTwapPost200Response.md @@ -0,0 +1,32 @@ +# SapiV1AlgoSpotNewOrderTwapPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_algo_id** | **str** | | +**success** | **bool** | | +**code** | **int** | | +**msg** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_spot_new_order_twap_post200_response import SapiV1AlgoSpotNewOrderTwapPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoSpotNewOrderTwapPost200Response from a JSON string +sapi_v1_algo_spot_new_order_twap_post200_response_instance = SapiV1AlgoSpotNewOrderTwapPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoSpotNewOrderTwapPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_algo_spot_new_order_twap_post200_response_dict = sapi_v1_algo_spot_new_order_twap_post200_response_instance.to_dict() +# create an instance of SapiV1AlgoSpotNewOrderTwapPost200Response from a dict +sapi_v1_algo_spot_new_order_twap_post200_response_from_dict = SapiV1AlgoSpotNewOrderTwapPost200Response.from_dict(sapi_v1_algo_spot_new_order_twap_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoSpotOpenOrdersGet200Response.md b/target/python/binance_openapi/docs/SapiV1AlgoSpotOpenOrdersGet200Response.md new file mode 100644 index 0000000..687bf2c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoSpotOpenOrdersGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1AlgoSpotOpenOrdersGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**orders** | [**List[SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner]**](SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_spot_open_orders_get200_response import SapiV1AlgoSpotOpenOrdersGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoSpotOpenOrdersGet200Response from a JSON string +sapi_v1_algo_spot_open_orders_get200_response_instance = SapiV1AlgoSpotOpenOrdersGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoSpotOpenOrdersGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_algo_spot_open_orders_get200_response_dict = sapi_v1_algo_spot_open_orders_get200_response_instance.to_dict() +# create an instance of SapiV1AlgoSpotOpenOrdersGet200Response from a dict +sapi_v1_algo_spot_open_orders_get200_response_from_dict = SapiV1AlgoSpotOpenOrdersGet200Response.from_dict(sapi_v1_algo_spot_open_orders_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner.md b/target/python/binance_openapi/docs/SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner.md new file mode 100644 index 0000000..26ef6f7 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner.md @@ -0,0 +1,41 @@ +# SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**algo_id** | **int** | | +**symbol** | **str** | | +**side** | **str** | | +**total_qty** | **str** | | +**executed_qty** | **str** | | +**executed_amt** | **str** | | +**avg_price** | **str** | | +**client_algo_id** | **str** | | +**book_time** | **int** | | +**end_time** | **int** | | +**algo_status** | **str** | | +**algo_type** | **str** | | +**urgency** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_spot_open_orders_get200_response_orders_inner import SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner from a JSON string +sapi_v1_algo_spot_open_orders_get200_response_orders_inner_instance = SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner.to_json()) + +# convert the object into a dict +sapi_v1_algo_spot_open_orders_get200_response_orders_inner_dict = sapi_v1_algo_spot_open_orders_get200_response_orders_inner_instance.to_dict() +# create an instance of SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner from a dict +sapi_v1_algo_spot_open_orders_get200_response_orders_inner_from_dict = SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner.from_dict(sapi_v1_algo_spot_open_orders_get200_response_orders_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoSpotOrderDelete200Response.md b/target/python/binance_openapi/docs/SapiV1AlgoSpotOrderDelete200Response.md new file mode 100644 index 0000000..c4c2ab7 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoSpotOrderDelete200Response.md @@ -0,0 +1,32 @@ +# SapiV1AlgoSpotOrderDelete200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**algo_id** | **int** | | +**success** | **bool** | | +**code** | **int** | | +**msg** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_spot_order_delete200_response import SapiV1AlgoSpotOrderDelete200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoSpotOrderDelete200Response from a JSON string +sapi_v1_algo_spot_order_delete200_response_instance = SapiV1AlgoSpotOrderDelete200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoSpotOrderDelete200Response.to_json()) + +# convert the object into a dict +sapi_v1_algo_spot_order_delete200_response_dict = sapi_v1_algo_spot_order_delete200_response_instance.to_dict() +# create an instance of SapiV1AlgoSpotOrderDelete200Response from a dict +sapi_v1_algo_spot_order_delete200_response_from_dict = SapiV1AlgoSpotOrderDelete200Response.from_dict(sapi_v1_algo_spot_order_delete200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoSpotSubOrdersGet200Response.md b/target/python/binance_openapi/docs/SapiV1AlgoSpotSubOrdersGet200Response.md new file mode 100644 index 0000000..0fe9a4f --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoSpotSubOrdersGet200Response.md @@ -0,0 +1,32 @@ +# SapiV1AlgoSpotSubOrdersGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**executed_qty** | **str** | | +**executed_amt** | **str** | | +**sub_orders** | [**List[SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner]**](SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_spot_sub_orders_get200_response import SapiV1AlgoSpotSubOrdersGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoSpotSubOrdersGet200Response from a JSON string +sapi_v1_algo_spot_sub_orders_get200_response_instance = SapiV1AlgoSpotSubOrdersGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoSpotSubOrdersGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_algo_spot_sub_orders_get200_response_dict = sapi_v1_algo_spot_sub_orders_get200_response_instance.to_dict() +# create an instance of SapiV1AlgoSpotSubOrdersGet200Response from a dict +sapi_v1_algo_spot_sub_orders_get200_response_from_dict = SapiV1AlgoSpotSubOrdersGet200Response.from_dict(sapi_v1_algo_spot_sub_orders_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner.md b/target/python/binance_openapi/docs/SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner.md new file mode 100644 index 0000000..a2f6972 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner.md @@ -0,0 +1,42 @@ +# SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**algo_id** | **int** | | +**order_id** | **int** | | +**order_status** | **str** | | +**executed_qty** | **str** | | +**executed_amt** | **str** | | +**fee_amt** | **str** | | +**fee_asset** | **str** | | +**book_time** | **int** | | +**avg_price** | **str** | | +**side** | **str** | | +**symbol** | **str** | | +**sub_id** | **int** | | +**time_in_force** | **str** | | +**orig_qty** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner import SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner from a JSON string +sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner_instance = SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner.to_json()) + +# convert the object into a dict +sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner_dict = sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner_instance.to_dict() +# create an instance of SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner from a dict +sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner_from_dict = SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner.from_dict(sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetAssetDetailGet200Response.md b/target/python/binance_openapi/docs/SapiV1AssetAssetDetailGet200Response.md new file mode 100644 index 0000000..4884779 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetAssetDetailGet200Response.md @@ -0,0 +1,29 @@ +# SapiV1AssetAssetDetailGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ctr** | [**SapiV1AssetAssetDetailGet200ResponseCTR**](SapiV1AssetAssetDetailGet200ResponseCTR.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_asset_detail_get200_response import SapiV1AssetAssetDetailGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetAssetDetailGet200Response from a JSON string +sapi_v1_asset_asset_detail_get200_response_instance = SapiV1AssetAssetDetailGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetAssetDetailGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_asset_asset_detail_get200_response_dict = sapi_v1_asset_asset_detail_get200_response_instance.to_dict() +# create an instance of SapiV1AssetAssetDetailGet200Response from a dict +sapi_v1_asset_asset_detail_get200_response_from_dict = SapiV1AssetAssetDetailGet200Response.from_dict(sapi_v1_asset_asset_detail_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetAssetDetailGet200ResponseCTR.md b/target/python/binance_openapi/docs/SapiV1AssetAssetDetailGet200ResponseCTR.md new file mode 100644 index 0000000..ec80941 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetAssetDetailGet200ResponseCTR.md @@ -0,0 +1,33 @@ +# SapiV1AssetAssetDetailGet200ResponseCTR + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**min_withdraw_amount** | **str** | | +**deposit_status** | **bool** | deposit status (false if ALL of networks' are false) | +**withdraw_fee** | **int** | | +**withdraw_status** | **bool** | withdrawStatus status (false if ALL of networks' are false) | +**deposit_tip** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_asset_detail_get200_response_ctr import SapiV1AssetAssetDetailGet200ResponseCTR + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetAssetDetailGet200ResponseCTR from a JSON string +sapi_v1_asset_asset_detail_get200_response_ctr_instance = SapiV1AssetAssetDetailGet200ResponseCTR.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetAssetDetailGet200ResponseCTR.to_json()) + +# convert the object into a dict +sapi_v1_asset_asset_detail_get200_response_ctr_dict = sapi_v1_asset_asset_detail_get200_response_ctr_instance.to_dict() +# create an instance of SapiV1AssetAssetDetailGet200ResponseCTR from a dict +sapi_v1_asset_asset_detail_get200_response_ctr_from_dict = SapiV1AssetAssetDetailGet200ResponseCTR.from_dict(sapi_v1_asset_asset_detail_get200_response_ctr_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetAssetDividendGet200Response.md b/target/python/binance_openapi/docs/SapiV1AssetAssetDividendGet200Response.md new file mode 100644 index 0000000..30a7b0c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetAssetDividendGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1AssetAssetDividendGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1AssetAssetDividendGet200ResponseRowsInner]**](SapiV1AssetAssetDividendGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_asset_dividend_get200_response import SapiV1AssetAssetDividendGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetAssetDividendGet200Response from a JSON string +sapi_v1_asset_asset_dividend_get200_response_instance = SapiV1AssetAssetDividendGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetAssetDividendGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_asset_asset_dividend_get200_response_dict = sapi_v1_asset_asset_dividend_get200_response_instance.to_dict() +# create an instance of SapiV1AssetAssetDividendGet200Response from a dict +sapi_v1_asset_asset_dividend_get200_response_from_dict = SapiV1AssetAssetDividendGet200Response.from_dict(sapi_v1_asset_asset_dividend_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetAssetDividendGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1AssetAssetDividendGet200ResponseRowsInner.md new file mode 100644 index 0000000..cecf553 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetAssetDividendGet200ResponseRowsInner.md @@ -0,0 +1,34 @@ +# SapiV1AssetAssetDividendGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**amount** | **str** | | +**asset** | **str** | | +**div_time** | **int** | | +**en_info** | **str** | | +**tran_id** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_asset_dividend_get200_response_rows_inner import SapiV1AssetAssetDividendGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetAssetDividendGet200ResponseRowsInner from a JSON string +sapi_v1_asset_asset_dividend_get200_response_rows_inner_instance = SapiV1AssetAssetDividendGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetAssetDividendGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_asset_asset_dividend_get200_response_rows_inner_dict = sapi_v1_asset_asset_dividend_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1AssetAssetDividendGet200ResponseRowsInner from a dict +sapi_v1_asset_asset_dividend_get200_response_rows_inner_from_dict = SapiV1AssetAssetDividendGet200ResponseRowsInner.from_dict(sapi_v1_asset_asset_dividend_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetConvertTransferPost200Response.md b/target/python/binance_openapi/docs/SapiV1AssetConvertTransferPost200Response.md new file mode 100644 index 0000000..47a4b53 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetConvertTransferPost200Response.md @@ -0,0 +1,30 @@ +# SapiV1AssetConvertTransferPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tran_id** | **int** | | +**status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_convert_transfer_post200_response import SapiV1AssetConvertTransferPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetConvertTransferPost200Response from a JSON string +sapi_v1_asset_convert_transfer_post200_response_instance = SapiV1AssetConvertTransferPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetConvertTransferPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_asset_convert_transfer_post200_response_dict = sapi_v1_asset_convert_transfer_post200_response_instance.to_dict() +# create an instance of SapiV1AssetConvertTransferPost200Response from a dict +sapi_v1_asset_convert_transfer_post200_response_from_dict = SapiV1AssetConvertTransferPost200Response.from_dict(sapi_v1_asset_convert_transfer_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetConvertTransferQueryByPageGet200Response.md b/target/python/binance_openapi/docs/SapiV1AssetConvertTransferQueryByPageGet200Response.md new file mode 100644 index 0000000..7275169 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetConvertTransferQueryByPageGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1AssetConvertTransferQueryByPageGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**rows** | [**List[SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner]**](SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_convert_transfer_query_by_page_get200_response import SapiV1AssetConvertTransferQueryByPageGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetConvertTransferQueryByPageGet200Response from a JSON string +sapi_v1_asset_convert_transfer_query_by_page_get200_response_instance = SapiV1AssetConvertTransferQueryByPageGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetConvertTransferQueryByPageGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_asset_convert_transfer_query_by_page_get200_response_dict = sapi_v1_asset_convert_transfer_query_by_page_get200_response_instance.to_dict() +# create an instance of SapiV1AssetConvertTransferQueryByPageGet200Response from a dict +sapi_v1_asset_convert_transfer_query_by_page_get200_response_from_dict = SapiV1AssetConvertTransferQueryByPageGet200Response.from_dict(sapi_v1_asset_convert_transfer_query_by_page_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner.md new file mode 100644 index 0000000..8ce211e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner.md @@ -0,0 +1,37 @@ +# SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tran_id** | **int** | | +**type** | **int** | | +**time** | **int** | | +**deducted_asset** | **str** | | +**deducted_amount** | **str** | | +**target_asset** | **str** | | +**target_amount** | **str** | | +**status** | **str** | | +**account_type** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner import SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner from a JSON string +sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner_instance = SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner_dict = sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner from a dict +sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner_from_dict = SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner.from_dict(sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetCustodyTransferHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1AssetCustodyTransferHistoryGet200Response.md new file mode 100644 index 0000000..02cf31a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetCustodyTransferHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1AssetCustodyTransferHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**rows** | [**List[SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner]**](SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_custody_transfer_history_get200_response import SapiV1AssetCustodyTransferHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetCustodyTransferHistoryGet200Response from a JSON string +sapi_v1_asset_custody_transfer_history_get200_response_instance = SapiV1AssetCustodyTransferHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetCustodyTransferHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_asset_custody_transfer_history_get200_response_dict = sapi_v1_asset_custody_transfer_history_get200_response_instance.to_dict() +# create an instance of SapiV1AssetCustodyTransferHistoryGet200Response from a dict +sapi_v1_asset_custody_transfer_history_get200_response_from_dict = SapiV1AssetCustodyTransferHistoryGet200Response.from_dict(sapi_v1_asset_custody_transfer_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..4736590 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner.md @@ -0,0 +1,33 @@ +# SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_tran_id** | **str** | | +**transfer_type** | **str** | | +**asset** | **str** | | +**amount** | **str** | | +**time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_custody_transfer_history_get200_response_rows_inner import SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_asset_custody_transfer_history_get200_response_rows_inner_instance = SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_asset_custody_transfer_history_get200_response_rows_inner_dict = sapi_v1_asset_custody_transfer_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner from a dict +sapi_v1_asset_custody_transfer_history_get200_response_rows_inner_from_dict = SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner.from_dict(sapi_v1_asset_custody_transfer_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetDribbletGet200Response.md b/target/python/binance_openapi/docs/SapiV1AssetDribbletGet200Response.md new file mode 100644 index 0000000..bf97112 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetDribbletGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1AssetDribbletGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | Total counts of exchange | +**user_asset_dribblets** | [**List[SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner]**](SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_dribblet_get200_response import SapiV1AssetDribbletGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetDribbletGet200Response from a JSON string +sapi_v1_asset_dribblet_get200_response_instance = SapiV1AssetDribbletGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetDribbletGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_asset_dribblet_get200_response_dict = sapi_v1_asset_dribblet_get200_response_instance.to_dict() +# create an instance of SapiV1AssetDribbletGet200Response from a dict +sapi_v1_asset_dribblet_get200_response_from_dict = SapiV1AssetDribbletGet200Response.from_dict(sapi_v1_asset_dribblet_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner.md b/target/python/binance_openapi/docs/SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner.md new file mode 100644 index 0000000..0629642 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner.md @@ -0,0 +1,33 @@ +# SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**operate_time** | **int** | | +**total_transfered_amount** | **str** | Total transfered BNB amount for this exchange. | +**total_service_charge_amount** | **str** | Total service charge amount for this exchange. | +**trans_id** | **int** | | +**user_asset_dribblet_details** | [**List[SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner]**](SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner import SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner from a JSON string +sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_instance = SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner.to_json()) + +# convert the object into a dict +sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_dict = sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_instance.to_dict() +# create an instance of SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner from a dict +sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_from_dict = SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner.from_dict(sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.md b/target/python/binance_openapi/docs/SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.md new file mode 100644 index 0000000..8d3747b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.md @@ -0,0 +1,34 @@ +# SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trans_id** | **int** | | +**service_charge_amount** | **str** | | +**amount** | **str** | | +**operate_time** | **int** | | +**transfered_amount** | **str** | | +**from_asset** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner import SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner from a JSON string +sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner_instance = SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.to_json()) + +# convert the object into a dict +sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner_dict = sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner_instance.to_dict() +# create an instance of SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner from a dict +sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner_from_dict = SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.from_dict(sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetDustBtcPost200Response.md b/target/python/binance_openapi/docs/SapiV1AssetDustBtcPost200Response.md new file mode 100644 index 0000000..602a5c1 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetDustBtcPost200Response.md @@ -0,0 +1,32 @@ +# SapiV1AssetDustBtcPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**details** | [**List[SapiV1AssetDustBtcPost200ResponseDetailsInner]**](SapiV1AssetDustBtcPost200ResponseDetailsInner.md) | | +**total_transfer_btc** | **str** | | +**total_transfer_bnb** | **str** | | +**dribblet_percentage** | **str** | Commission fee | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_dust_btc_post200_response import SapiV1AssetDustBtcPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetDustBtcPost200Response from a JSON string +sapi_v1_asset_dust_btc_post200_response_instance = SapiV1AssetDustBtcPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetDustBtcPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_asset_dust_btc_post200_response_dict = sapi_v1_asset_dust_btc_post200_response_instance.to_dict() +# create an instance of SapiV1AssetDustBtcPost200Response from a dict +sapi_v1_asset_dust_btc_post200_response_from_dict = SapiV1AssetDustBtcPost200Response.from_dict(sapi_v1_asset_dust_btc_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetDustBtcPost200ResponseDetailsInner.md b/target/python/binance_openapi/docs/SapiV1AssetDustBtcPost200ResponseDetailsInner.md new file mode 100644 index 0000000..5868364 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetDustBtcPost200ResponseDetailsInner.md @@ -0,0 +1,35 @@ +# SapiV1AssetDustBtcPost200ResponseDetailsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**asset_full_name** | **str** | | +**amount_free** | **str** | Convertible amount | +**to_btc** | **str** | BTC amount | +**to_bnb** | **str** | BNB amount(Not deducted commission fee | +**to_bnb_off_exchange** | **str** | BNB amount(Deducted commission fee | +**exchange** | **str** | Commission fee | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_dust_btc_post200_response_details_inner import SapiV1AssetDustBtcPost200ResponseDetailsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetDustBtcPost200ResponseDetailsInner from a JSON string +sapi_v1_asset_dust_btc_post200_response_details_inner_instance = SapiV1AssetDustBtcPost200ResponseDetailsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetDustBtcPost200ResponseDetailsInner.to_json()) + +# convert the object into a dict +sapi_v1_asset_dust_btc_post200_response_details_inner_dict = sapi_v1_asset_dust_btc_post200_response_details_inner_instance.to_dict() +# create an instance of SapiV1AssetDustBtcPost200ResponseDetailsInner from a dict +sapi_v1_asset_dust_btc_post200_response_details_inner_from_dict = SapiV1AssetDustBtcPost200ResponseDetailsInner.from_dict(sapi_v1_asset_dust_btc_post200_response_details_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetDustPost200Response.md b/target/python/binance_openapi/docs/SapiV1AssetDustPost200Response.md new file mode 100644 index 0000000..a6bdbab --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetDustPost200Response.md @@ -0,0 +1,31 @@ +# SapiV1AssetDustPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_service_charge** | **str** | | +**total_transfered** | **str** | | +**transfer_result** | [**List[SapiV1AssetDustPost200ResponseTransferResultInner]**](SapiV1AssetDustPost200ResponseTransferResultInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_dust_post200_response import SapiV1AssetDustPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetDustPost200Response from a JSON string +sapi_v1_asset_dust_post200_response_instance = SapiV1AssetDustPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetDustPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_asset_dust_post200_response_dict = sapi_v1_asset_dust_post200_response_instance.to_dict() +# create an instance of SapiV1AssetDustPost200Response from a dict +sapi_v1_asset_dust_post200_response_from_dict = SapiV1AssetDustPost200Response.from_dict(sapi_v1_asset_dust_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetDustPost200ResponseTransferResultInner.md b/target/python/binance_openapi/docs/SapiV1AssetDustPost200ResponseTransferResultInner.md new file mode 100644 index 0000000..31272d6 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetDustPost200ResponseTransferResultInner.md @@ -0,0 +1,34 @@ +# SapiV1AssetDustPost200ResponseTransferResultInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **str** | | +**from_asset** | **str** | | +**operate_time** | **int** | | +**service_charge_amount** | **str** | | +**tran_id** | **int** | | +**transfered_amount** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_dust_post200_response_transfer_result_inner import SapiV1AssetDustPost200ResponseTransferResultInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetDustPost200ResponseTransferResultInner from a JSON string +sapi_v1_asset_dust_post200_response_transfer_result_inner_instance = SapiV1AssetDustPost200ResponseTransferResultInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetDustPost200ResponseTransferResultInner.to_json()) + +# convert the object into a dict +sapi_v1_asset_dust_post200_response_transfer_result_inner_dict = sapi_v1_asset_dust_post200_response_transfer_result_inner_instance.to_dict() +# create an instance of SapiV1AssetDustPost200ResponseTransferResultInner from a dict +sapi_v1_asset_dust_post200_response_transfer_result_inner_from_dict = SapiV1AssetDustPost200ResponseTransferResultInner.from_dict(sapi_v1_asset_dust_post200_response_transfer_result_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetGetFundingAssetPost200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1AssetGetFundingAssetPost200ResponseInner.md new file mode 100644 index 0000000..9cab109 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetGetFundingAssetPost200ResponseInner.md @@ -0,0 +1,34 @@ +# SapiV1AssetGetFundingAssetPost200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**free** | **str** | | +**locked** | **str** | | +**freeze** | **str** | | +**withdrawing** | **str** | | +**btc_valuation** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_get_funding_asset_post200_response_inner import SapiV1AssetGetFundingAssetPost200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetGetFundingAssetPost200ResponseInner from a JSON string +sapi_v1_asset_get_funding_asset_post200_response_inner_instance = SapiV1AssetGetFundingAssetPost200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetGetFundingAssetPost200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_asset_get_funding_asset_post200_response_inner_dict = sapi_v1_asset_get_funding_asset_post200_response_inner_instance.to_dict() +# create an instance of SapiV1AssetGetFundingAssetPost200ResponseInner from a dict +sapi_v1_asset_get_funding_asset_post200_response_inner_from_dict = SapiV1AssetGetFundingAssetPost200ResponseInner.from_dict(sapi_v1_asset_get_funding_asset_post200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response.md b/target/python/binance_openapi/docs/SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response.md new file mode 100644 index 0000000..28ae25a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**rows** | [**List[SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner]**](SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response import SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response from a JSON string +sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_instance = SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_dict = sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_instance.to_dict() +# create an instance of SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response from a dict +sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_from_dict = SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response.from_dict(sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner.md new file mode 100644 index 0000000..ee2353d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner.md @@ -0,0 +1,34 @@ +# SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**create_time** | **int** | | +**tran_id** | **int** | | +**type** | **int** | | +**asset** | **str** | | +**amount** | **str** | | +**status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner import SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner from a JSON string +sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner_instance = SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner_dict = sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner from a dict +sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner_from_dict = SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner.from_dict(sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetTradeFeeGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1AssetTradeFeeGet200ResponseInner.md new file mode 100644 index 0000000..f1abb26 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetTradeFeeGet200ResponseInner.md @@ -0,0 +1,31 @@ +# SapiV1AssetTradeFeeGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**maker_commission** | **str** | | +**taker_commission** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_trade_fee_get200_response_inner import SapiV1AssetTradeFeeGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetTradeFeeGet200ResponseInner from a JSON string +sapi_v1_asset_trade_fee_get200_response_inner_instance = SapiV1AssetTradeFeeGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetTradeFeeGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_asset_trade_fee_get200_response_inner_dict = sapi_v1_asset_trade_fee_get200_response_inner_instance.to_dict() +# create an instance of SapiV1AssetTradeFeeGet200ResponseInner from a dict +sapi_v1_asset_trade_fee_get200_response_inner_from_dict = SapiV1AssetTradeFeeGet200ResponseInner.from_dict(sapi_v1_asset_trade_fee_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetTransferGet200Response.md b/target/python/binance_openapi/docs/SapiV1AssetTransferGet200Response.md new file mode 100644 index 0000000..de9965b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetTransferGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1AssetTransferGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**rows** | [**List[SapiV1AssetTransferGet200ResponseRowsInner]**](SapiV1AssetTransferGet200ResponseRowsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_transfer_get200_response import SapiV1AssetTransferGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetTransferGet200Response from a JSON string +sapi_v1_asset_transfer_get200_response_instance = SapiV1AssetTransferGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetTransferGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_asset_transfer_get200_response_dict = sapi_v1_asset_transfer_get200_response_instance.to_dict() +# create an instance of SapiV1AssetTransferGet200Response from a dict +sapi_v1_asset_transfer_get200_response_from_dict = SapiV1AssetTransferGet200Response.from_dict(sapi_v1_asset_transfer_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetTransferGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1AssetTransferGet200ResponseRowsInner.md new file mode 100644 index 0000000..6b00597 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetTransferGet200ResponseRowsInner.md @@ -0,0 +1,34 @@ +# SapiV1AssetTransferGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**amount** | **str** | | +**type** | **str** | | +**status** | **str** | | +**tran_id** | **int** | | +**timestamp** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_transfer_get200_response_rows_inner import SapiV1AssetTransferGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetTransferGet200ResponseRowsInner from a JSON string +sapi_v1_asset_transfer_get200_response_rows_inner_instance = SapiV1AssetTransferGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetTransferGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_asset_transfer_get200_response_rows_inner_dict = sapi_v1_asset_transfer_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1AssetTransferGet200ResponseRowsInner from a dict +sapi_v1_asset_transfer_get200_response_rows_inner_from_dict = SapiV1AssetTransferGet200ResponseRowsInner.from_dict(sapi_v1_asset_transfer_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetTransferPost200Response.md b/target/python/binance_openapi/docs/SapiV1AssetTransferPost200Response.md new file mode 100644 index 0000000..73e3a23 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetTransferPost200Response.md @@ -0,0 +1,29 @@ +# SapiV1AssetTransferPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tran_id** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_transfer_post200_response import SapiV1AssetTransferPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetTransferPost200Response from a JSON string +sapi_v1_asset_transfer_post200_response_instance = SapiV1AssetTransferPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetTransferPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_asset_transfer_post200_response_dict = sapi_v1_asset_transfer_post200_response_instance.to_dict() +# create an instance of SapiV1AssetTransferPost200Response from a dict +sapi_v1_asset_transfer_post200_response_from_dict = SapiV1AssetTransferPost200Response.from_dict(sapi_v1_asset_transfer_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1AssetWalletBalanceGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1AssetWalletBalanceGet200ResponseInner.md new file mode 100644 index 0000000..7f25024 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1AssetWalletBalanceGet200ResponseInner.md @@ -0,0 +1,31 @@ +# SapiV1AssetWalletBalanceGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**activate** | **bool** | | +**balance** | **str** | | +**wallet_name** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_asset_wallet_balance_get200_response_inner import SapiV1AssetWalletBalanceGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1AssetWalletBalanceGet200ResponseInner from a JSON string +sapi_v1_asset_wallet_balance_get200_response_inner_instance = SapiV1AssetWalletBalanceGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1AssetWalletBalanceGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_asset_wallet_balance_get200_response_inner_dict = sapi_v1_asset_wallet_balance_get200_response_inner_instance.to_dict() +# create an instance of SapiV1AssetWalletBalanceGet200ResponseInner from a dict +sapi_v1_asset_wallet_balance_get200_response_inner_from_dict = SapiV1AssetWalletBalanceGet200ResponseInner.from_dict(sapi_v1_asset_wallet_balance_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1BlvtRedeemPost200Response.md b/target/python/binance_openapi/docs/SapiV1BlvtRedeemPost200Response.md new file mode 100644 index 0000000..90130a2 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1BlvtRedeemPost200Response.md @@ -0,0 +1,34 @@ +# SapiV1BlvtRedeemPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**status** | **str** | S, P, and F for \"success\", \"pending\", and \"failure\" | +**token_name** | **str** | | +**redeem_amount** | **str** | Redemption token amount | +**amount** | **str** | Redemption value in usdt | +**timestamp** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_blvt_redeem_post200_response import SapiV1BlvtRedeemPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1BlvtRedeemPost200Response from a JSON string +sapi_v1_blvt_redeem_post200_response_instance = SapiV1BlvtRedeemPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1BlvtRedeemPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_blvt_redeem_post200_response_dict = sapi_v1_blvt_redeem_post200_response_instance.to_dict() +# create an instance of SapiV1BlvtRedeemPost200Response from a dict +sapi_v1_blvt_redeem_post200_response_from_dict = SapiV1BlvtRedeemPost200Response.from_dict(sapi_v1_blvt_redeem_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1BlvtRedeemRecordGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1BlvtRedeemRecordGet200ResponseInner.md new file mode 100644 index 0000000..24829ef --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1BlvtRedeemRecordGet200ResponseInner.md @@ -0,0 +1,35 @@ +# SapiV1BlvtRedeemRecordGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**token_name** | **str** | | +**amount** | **str** | Redemption amount | +**nav** | **str** | NAV of redemption | +**fee** | **str** | Reemption fee | +**net_proceed** | **str** | Net redemption value in usdt | +**timestamp** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_blvt_redeem_record_get200_response_inner import SapiV1BlvtRedeemRecordGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1BlvtRedeemRecordGet200ResponseInner from a JSON string +sapi_v1_blvt_redeem_record_get200_response_inner_instance = SapiV1BlvtRedeemRecordGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1BlvtRedeemRecordGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_blvt_redeem_record_get200_response_inner_dict = sapi_v1_blvt_redeem_record_get200_response_inner_instance.to_dict() +# create an instance of SapiV1BlvtRedeemRecordGet200ResponseInner from a dict +sapi_v1_blvt_redeem_record_get200_response_inner_from_dict = SapiV1BlvtRedeemRecordGet200ResponseInner.from_dict(sapi_v1_blvt_redeem_record_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1BlvtSubscribePost200Response.md b/target/python/binance_openapi/docs/SapiV1BlvtSubscribePost200Response.md new file mode 100644 index 0000000..3e70644 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1BlvtSubscribePost200Response.md @@ -0,0 +1,34 @@ +# SapiV1BlvtSubscribePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**status** | **str** | S, P, and F for \"success\", \"pending\", and \"failure\" | +**token_name** | **str** | | +**amount** | **str** | subscribed token amount | +**cost** | **str** | subscription cost in usdt | +**timestamp** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_blvt_subscribe_post200_response import SapiV1BlvtSubscribePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1BlvtSubscribePost200Response from a JSON string +sapi_v1_blvt_subscribe_post200_response_instance = SapiV1BlvtSubscribePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1BlvtSubscribePost200Response.to_json()) + +# convert the object into a dict +sapi_v1_blvt_subscribe_post200_response_dict = sapi_v1_blvt_subscribe_post200_response_instance.to_dict() +# create an instance of SapiV1BlvtSubscribePost200Response from a dict +sapi_v1_blvt_subscribe_post200_response_from_dict = SapiV1BlvtSubscribePost200Response.from_dict(sapi_v1_blvt_subscribe_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1BlvtSubscribeRecordGet200Response.md b/target/python/binance_openapi/docs/SapiV1BlvtSubscribeRecordGet200Response.md new file mode 100644 index 0000000..59020a6 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1BlvtSubscribeRecordGet200Response.md @@ -0,0 +1,35 @@ +# SapiV1BlvtSubscribeRecordGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**token_name** | **str** | | +**amount** | **str** | Subscription amount | +**nav** | **str** | NAV price of subscription | +**fee** | **str** | Subscription fee in usdt | +**total_charge** | **str** | Subscription cost in usdt | +**timestamp** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_blvt_subscribe_record_get200_response import SapiV1BlvtSubscribeRecordGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1BlvtSubscribeRecordGet200Response from a JSON string +sapi_v1_blvt_subscribe_record_get200_response_instance = SapiV1BlvtSubscribeRecordGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1BlvtSubscribeRecordGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_blvt_subscribe_record_get200_response_dict = sapi_v1_blvt_subscribe_record_get200_response_instance.to_dict() +# create an instance of SapiV1BlvtSubscribeRecordGet200Response from a dict +sapi_v1_blvt_subscribe_record_get200_response_from_dict = SapiV1BlvtSubscribeRecordGet200Response.from_dict(sapi_v1_blvt_subscribe_record_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1BlvtTokenInfoGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1BlvtTokenInfoGet200ResponseInner.md new file mode 100644 index 0000000..27018ff --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1BlvtTokenInfoGet200ResponseInner.md @@ -0,0 +1,43 @@ +# SapiV1BlvtTokenInfoGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token_name** | **str** | | +**description** | **str** | | +**underlying** | **str** | | +**token_issued** | **str** | | +**basket** | **str** | | +**current_baskets** | [**List[SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner]**](SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner.md) | | +**nav** | **str** | | +**real_leverage** | **str** | | +**funding_rate** | **str** | | +**daily_management_fee** | **str** | | +**purchase_fee_pct** | **str** | | +**daily_purchase_limit** | **str** | | +**redeem_fee_pct** | **str** | | +**daily_redeem_limit** | **str** | | +**timestamp** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_blvt_token_info_get200_response_inner import SapiV1BlvtTokenInfoGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1BlvtTokenInfoGet200ResponseInner from a JSON string +sapi_v1_blvt_token_info_get200_response_inner_instance = SapiV1BlvtTokenInfoGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1BlvtTokenInfoGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_blvt_token_info_get200_response_inner_dict = sapi_v1_blvt_token_info_get200_response_inner_instance.to_dict() +# create an instance of SapiV1BlvtTokenInfoGet200ResponseInner from a dict +sapi_v1_blvt_token_info_get200_response_inner_from_dict = SapiV1BlvtTokenInfoGet200ResponseInner.from_dict(sapi_v1_blvt_token_info_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner.md b/target/python/binance_openapi/docs/SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner.md new file mode 100644 index 0000000..e8acf49 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner.md @@ -0,0 +1,31 @@ +# SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**amount** | **str** | | +**notional_value** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner import SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner from a JSON string +sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner_instance = SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner.to_json()) + +# convert the object into a dict +sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner_dict = sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner_instance.to_dict() +# create an instance of SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner from a dict +sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner_from_dict = SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner.from_dict(sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1BlvtUserLimitGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1BlvtUserLimitGet200ResponseInner.md new file mode 100644 index 0000000..46ba7e1 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1BlvtUserLimitGet200ResponseInner.md @@ -0,0 +1,31 @@ +# SapiV1BlvtUserLimitGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token_name** | **str** | | +**user_daily_total_purchase_limit** | **str** | USDT | +**user_daily_total_redeem_limit** | **str** | USDT | + +## Example + +```python +from openapi_client.models.sapi_v1_blvt_user_limit_get200_response_inner import SapiV1BlvtUserLimitGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1BlvtUserLimitGet200ResponseInner from a JSON string +sapi_v1_blvt_user_limit_get200_response_inner_instance = SapiV1BlvtUserLimitGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1BlvtUserLimitGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_blvt_user_limit_get200_response_inner_dict = sapi_v1_blvt_user_limit_get200_response_inner_instance.to_dict() +# create an instance of SapiV1BlvtUserLimitGet200ResponseInner from a dict +sapi_v1_blvt_user_limit_get200_response_inner_from_dict = SapiV1BlvtUserLimitGet200ResponseInner.from_dict(sapi_v1_blvt_user_limit_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1C2cOrderMatchListUserOrderHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1C2cOrderMatchListUserOrderHistoryGet200Response.md new file mode 100644 index 0000000..6d5fa5c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1C2cOrderMatchListUserOrderHistoryGet200Response.md @@ -0,0 +1,33 @@ +# SapiV1C2cOrderMatchListUserOrderHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**message** | **str** | | +**data** | [**List[SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner]**](SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner.md) | | +**total** | **int** | | +**success** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_c2c_order_match_list_user_order_history_get200_response import SapiV1C2cOrderMatchListUserOrderHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1C2cOrderMatchListUserOrderHistoryGet200Response from a JSON string +sapi_v1_c2c_order_match_list_user_order_history_get200_response_instance = SapiV1C2cOrderMatchListUserOrderHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1C2cOrderMatchListUserOrderHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_c2c_order_match_list_user_order_history_get200_response_dict = sapi_v1_c2c_order_match_list_user_order_history_get200_response_instance.to_dict() +# create an instance of SapiV1C2cOrderMatchListUserOrderHistoryGet200Response from a dict +sapi_v1_c2c_order_match_list_user_order_history_get200_response_from_dict = SapiV1C2cOrderMatchListUserOrderHistoryGet200Response.from_dict(sapi_v1_c2c_order_match_list_user_order_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner.md b/target/python/binance_openapi/docs/SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner.md new file mode 100644 index 0000000..22fae11 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner.md @@ -0,0 +1,42 @@ +# SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_number** | **str** | | +**adv_no** | **str** | | +**trade_type** | **str** | | +**asset** | **str** | | +**fiat** | **str** | | +**fiat_symbol** | **str** | | +**amount** | **str** | Quantity (in Crypto) | +**total_price** | **str** | | +**unit_price** | **str** | Unit Price (in Fiat) | +**order_status** | **str** | PENDING, TRADING, BUYER_PAYED, DISTRIBUTING, COMPLETED, IN_APPEAL, CANCELLED, CANCELLED_BY_SYSTEM | +**create_time** | **int** | | +**commission** | **str** | Transaction Fee (in Crypto) | +**counter_part_nick_name** | **str** | | +**advertisement_role** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner import SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner from a JSON string +sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner_instance = SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner.to_json()) + +# convert the object into a dict +sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner_dict = sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner_instance.to_dict() +# create an instance of SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner from a dict +sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner_from_dict = SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner.from_dict(sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1CapitalConfigGetallGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1CapitalConfigGetallGet200ResponseInner.md new file mode 100644 index 0000000..da9f49d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1CapitalConfigGetallGet200ResponseInner.md @@ -0,0 +1,42 @@ +# SapiV1CapitalConfigGetallGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**coin** | **str** | | +**deposit_all_enable** | **bool** | | +**free** | **str** | | +**freeze** | **str** | | +**ipoable** | **str** | | +**ipoing** | **str** | | +**is_legal_money** | **bool** | | +**locked** | **str** | | +**name** | **str** | | +**network_list** | [**List[SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner]**](SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner.md) | | +**storage** | **str** | | +**trading** | **bool** | | +**withdraw_all_enable** | **bool** | | +**withdrawing** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_capital_config_getall_get200_response_inner import SapiV1CapitalConfigGetallGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1CapitalConfigGetallGet200ResponseInner from a JSON string +sapi_v1_capital_config_getall_get200_response_inner_instance = SapiV1CapitalConfigGetallGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1CapitalConfigGetallGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_capital_config_getall_get200_response_inner_dict = sapi_v1_capital_config_getall_get200_response_inner_instance.to_dict() +# create an instance of SapiV1CapitalConfigGetallGet200ResponseInner from a dict +sapi_v1_capital_config_getall_get200_response_inner_from_dict = SapiV1CapitalConfigGetallGet200ResponseInner.from_dict(sapi_v1_capital_config_getall_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner.md b/target/python/binance_openapi/docs/SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner.md new file mode 100644 index 0000000..8313855 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner.md @@ -0,0 +1,46 @@ +# SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address_regex** | **str** | | +**coin** | **str** | | +**deposit_desc** | **str** | shown only when \"depositEnable\" is false. | +**deposit_enable** | **bool** | | +**is_default** | **bool** | | +**memo_regex** | **str** | | +**min_confirm** | **int** | min number for balance confirmation. | +**name** | **str** | | +**network** | **str** | | +**special_tips** | **str** | | +**un_lock_confirm** | **int** | confirmation number for balance unlock. | +**withdraw_desc** | **str** | shown only when \"withdrawEnable\" is false | +**withdraw_enable** | **bool** | | +**withdraw_fee** | **str** | | +**withdraw_integer_multiple** | **str** | | +**withdraw_max** | **str** | | +**withdraw_min** | **str** | | +**same_address** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_capital_config_getall_get200_response_inner_network_list_inner import SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner from a JSON string +sapi_v1_capital_config_getall_get200_response_inner_network_list_inner_instance = SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner.to_json()) + +# convert the object into a dict +sapi_v1_capital_config_getall_get200_response_inner_network_list_inner_dict = sapi_v1_capital_config_getall_get200_response_inner_network_list_inner_instance.to_dict() +# create an instance of SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner from a dict +sapi_v1_capital_config_getall_get200_response_inner_network_list_inner_from_dict = SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner.from_dict(sapi_v1_capital_config_getall_get200_response_inner_network_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1CapitalContractConvertibleCoinsGet200Response.md b/target/python/binance_openapi/docs/SapiV1CapitalContractConvertibleCoinsGet200Response.md new file mode 100644 index 0000000..405de7f --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1CapitalContractConvertibleCoinsGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1CapitalContractConvertibleCoinsGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**convert_enabled** | **bool** | | +**coins** | **List[str]** | | +**exchange_rates** | [**SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates**](SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_capital_contract_convertible_coins_get200_response import SapiV1CapitalContractConvertibleCoinsGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1CapitalContractConvertibleCoinsGet200Response from a JSON string +sapi_v1_capital_contract_convertible_coins_get200_response_instance = SapiV1CapitalContractConvertibleCoinsGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1CapitalContractConvertibleCoinsGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_capital_contract_convertible_coins_get200_response_dict = sapi_v1_capital_contract_convertible_coins_get200_response_instance.to_dict() +# create an instance of SapiV1CapitalContractConvertibleCoinsGet200Response from a dict +sapi_v1_capital_contract_convertible_coins_get200_response_from_dict = SapiV1CapitalContractConvertibleCoinsGet200Response.from_dict(sapi_v1_capital_contract_convertible_coins_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates.md b/target/python/binance_openapi/docs/SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates.md new file mode 100644 index 0000000..dc7f6c7 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates.md @@ -0,0 +1,31 @@ +# SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**usdc** | **str** | | +**tusd** | **str** | | +**usdp** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates import SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates from a JSON string +sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates_instance = SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates.from_json(json) +# print the JSON string representation of the object +print(SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates.to_json()) + +# convert the object into a dict +sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates_dict = sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates_instance.to_dict() +# create an instance of SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates from a dict +sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates_from_dict = SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates.from_dict(sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1CapitalDepositAddressGet200Response.md b/target/python/binance_openapi/docs/SapiV1CapitalDepositAddressGet200Response.md new file mode 100644 index 0000000..aab5431 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1CapitalDepositAddressGet200Response.md @@ -0,0 +1,32 @@ +# SapiV1CapitalDepositAddressGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | | +**coin** | **str** | | +**tag** | **str** | | +**url** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_capital_deposit_address_get200_response import SapiV1CapitalDepositAddressGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1CapitalDepositAddressGet200Response from a JSON string +sapi_v1_capital_deposit_address_get200_response_instance = SapiV1CapitalDepositAddressGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1CapitalDepositAddressGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_capital_deposit_address_get200_response_dict = sapi_v1_capital_deposit_address_get200_response_instance.to_dict() +# create an instance of SapiV1CapitalDepositAddressGet200Response from a dict +sapi_v1_capital_deposit_address_get200_response_from_dict = SapiV1CapitalDepositAddressGet200Response.from_dict(sapi_v1_capital_deposit_address_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1CapitalDepositAddressListGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1CapitalDepositAddressListGet200ResponseInner.md new file mode 100644 index 0000000..d927c16 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1CapitalDepositAddressListGet200ResponseInner.md @@ -0,0 +1,31 @@ +# SapiV1CapitalDepositAddressListGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**coin** | **str** | | +**address** | **str** | | +**is_default** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_capital_deposit_address_list_get200_response_inner import SapiV1CapitalDepositAddressListGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1CapitalDepositAddressListGet200ResponseInner from a JSON string +sapi_v1_capital_deposit_address_list_get200_response_inner_instance = SapiV1CapitalDepositAddressListGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1CapitalDepositAddressListGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_capital_deposit_address_list_get200_response_inner_dict = sapi_v1_capital_deposit_address_list_get200_response_inner_instance.to_dict() +# create an instance of SapiV1CapitalDepositAddressListGet200ResponseInner from a dict +sapi_v1_capital_deposit_address_list_get200_response_inner_from_dict = SapiV1CapitalDepositAddressListGet200ResponseInner.from_dict(sapi_v1_capital_deposit_address_list_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1CapitalDepositCreditApplyPost200Response.md b/target/python/binance_openapi/docs/SapiV1CapitalDepositCreditApplyPost200Response.md new file mode 100644 index 0000000..c1e804a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1CapitalDepositCreditApplyPost200Response.md @@ -0,0 +1,32 @@ +# SapiV1CapitalDepositCreditApplyPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**message** | **str** | | +**data** | **bool** | | +**success** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_capital_deposit_credit_apply_post200_response import SapiV1CapitalDepositCreditApplyPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1CapitalDepositCreditApplyPost200Response from a JSON string +sapi_v1_capital_deposit_credit_apply_post200_response_instance = SapiV1CapitalDepositCreditApplyPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1CapitalDepositCreditApplyPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_capital_deposit_credit_apply_post200_response_dict = sapi_v1_capital_deposit_credit_apply_post200_response_instance.to_dict() +# create an instance of SapiV1CapitalDepositCreditApplyPost200Response from a dict +sapi_v1_capital_deposit_credit_apply_post200_response_from_dict = SapiV1CapitalDepositCreditApplyPost200Response.from_dict(sapi_v1_capital_deposit_credit_apply_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1CapitalDepositHisrecGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1CapitalDepositHisrecGet200ResponseInner.md new file mode 100644 index 0000000..2877f48 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1CapitalDepositHisrecGet200ResponseInner.md @@ -0,0 +1,39 @@ +# SapiV1CapitalDepositHisrecGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **str** | | +**coin** | **str** | | +**network** | **str** | | +**status** | **int** | | +**address** | **str** | | +**address_tag** | **str** | | +**tx_id** | **str** | | +**insert_time** | **int** | | +**transfer_type** | **int** | | +**unlock_confirm** | **str** | confirm times for unlocking | +**confirm_times** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_capital_deposit_hisrec_get200_response_inner import SapiV1CapitalDepositHisrecGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1CapitalDepositHisrecGet200ResponseInner from a JSON string +sapi_v1_capital_deposit_hisrec_get200_response_inner_instance = SapiV1CapitalDepositHisrecGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1CapitalDepositHisrecGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_capital_deposit_hisrec_get200_response_inner_dict = sapi_v1_capital_deposit_hisrec_get200_response_inner_instance.to_dict() +# create an instance of SapiV1CapitalDepositHisrecGet200ResponseInner from a dict +sapi_v1_capital_deposit_hisrec_get200_response_inner_from_dict = SapiV1CapitalDepositHisrecGet200ResponseInner.from_dict(sapi_v1_capital_deposit_hisrec_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1CapitalDepositSubAddressGet200Response.md b/target/python/binance_openapi/docs/SapiV1CapitalDepositSubAddressGet200Response.md new file mode 100644 index 0000000..e7b2bfa --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1CapitalDepositSubAddressGet200Response.md @@ -0,0 +1,32 @@ +# SapiV1CapitalDepositSubAddressGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | | +**coin** | **str** | | +**tag** | **str** | | +**url** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_capital_deposit_sub_address_get200_response import SapiV1CapitalDepositSubAddressGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1CapitalDepositSubAddressGet200Response from a JSON string +sapi_v1_capital_deposit_sub_address_get200_response_instance = SapiV1CapitalDepositSubAddressGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1CapitalDepositSubAddressGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_capital_deposit_sub_address_get200_response_dict = sapi_v1_capital_deposit_sub_address_get200_response_instance.to_dict() +# create an instance of SapiV1CapitalDepositSubAddressGet200Response from a dict +sapi_v1_capital_deposit_sub_address_get200_response_from_dict = SapiV1CapitalDepositSubAddressGet200Response.from_dict(sapi_v1_capital_deposit_sub_address_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1CapitalDepositSubHisrecGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1CapitalDepositSubHisrecGet200ResponseInner.md new file mode 100644 index 0000000..2cc26ad --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1CapitalDepositSubHisrecGet200ResponseInner.md @@ -0,0 +1,38 @@ +# SapiV1CapitalDepositSubHisrecGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **str** | | +**coin** | **str** | | +**network** | **str** | | +**status** | **int** | | +**address** | **str** | | +**address_tag** | **str** | | +**tx_id** | **str** | | +**insert_time** | **int** | | +**transfer_type** | **int** | | +**confirm_times** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_capital_deposit_sub_hisrec_get200_response_inner import SapiV1CapitalDepositSubHisrecGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1CapitalDepositSubHisrecGet200ResponseInner from a JSON string +sapi_v1_capital_deposit_sub_hisrec_get200_response_inner_instance = SapiV1CapitalDepositSubHisrecGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1CapitalDepositSubHisrecGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_capital_deposit_sub_hisrec_get200_response_inner_dict = sapi_v1_capital_deposit_sub_hisrec_get200_response_inner_instance.to_dict() +# create an instance of SapiV1CapitalDepositSubHisrecGet200ResponseInner from a dict +sapi_v1_capital_deposit_sub_hisrec_get200_response_inner_from_dict = SapiV1CapitalDepositSubHisrecGet200ResponseInner.from_dict(sapi_v1_capital_deposit_sub_hisrec_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1CapitalWithdrawAddressListGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1CapitalWithdrawAddressListGet200ResponseInner.md new file mode 100644 index 0000000..3309ff5 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1CapitalWithdrawAddressListGet200ResponseInner.md @@ -0,0 +1,36 @@ +# SapiV1CapitalWithdrawAddressListGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | | +**address_tag** | **str** | | +**coin** | **str** | | +**name** | **str** | | +**network** | **str** | | +**origin** | **str** | | +**origin_type** | **str** | | +**white_status** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_capital_withdraw_address_list_get200_response_inner import SapiV1CapitalWithdrawAddressListGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1CapitalWithdrawAddressListGet200ResponseInner from a JSON string +sapi_v1_capital_withdraw_address_list_get200_response_inner_instance = SapiV1CapitalWithdrawAddressListGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1CapitalWithdrawAddressListGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_capital_withdraw_address_list_get200_response_inner_dict = sapi_v1_capital_withdraw_address_list_get200_response_inner_instance.to_dict() +# create an instance of SapiV1CapitalWithdrawAddressListGet200ResponseInner from a dict +sapi_v1_capital_withdraw_address_list_get200_response_inner_from_dict = SapiV1CapitalWithdrawAddressListGet200ResponseInner.from_dict(sapi_v1_capital_withdraw_address_list_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1CapitalWithdrawApplyPost200Response.md b/target/python/binance_openapi/docs/SapiV1CapitalWithdrawApplyPost200Response.md new file mode 100644 index 0000000..25d2d59 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1CapitalWithdrawApplyPost200Response.md @@ -0,0 +1,29 @@ +# SapiV1CapitalWithdrawApplyPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_capital_withdraw_apply_post200_response import SapiV1CapitalWithdrawApplyPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1CapitalWithdrawApplyPost200Response from a JSON string +sapi_v1_capital_withdraw_apply_post200_response_instance = SapiV1CapitalWithdrawApplyPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1CapitalWithdrawApplyPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_capital_withdraw_apply_post200_response_dict = sapi_v1_capital_withdraw_apply_post200_response_instance.to_dict() +# create an instance of SapiV1CapitalWithdrawApplyPost200Response from a dict +sapi_v1_capital_withdraw_apply_post200_response_from_dict = SapiV1CapitalWithdrawApplyPost200Response.from_dict(sapi_v1_capital_withdraw_apply_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1CapitalWithdrawHistoryGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1CapitalWithdrawHistoryGet200ResponseInner.md new file mode 100644 index 0000000..a3c8851 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1CapitalWithdrawHistoryGet200ResponseInner.md @@ -0,0 +1,41 @@ +# SapiV1CapitalWithdrawHistoryGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | | +**amount** | **str** | | +**apply_time** | **str** | | +**coin** | **str** | | +**id** | **str** | | +**withdraw_order_id** | **str** | will not be returned if there's no withdrawOrderId for this withdraw. | +**network** | **str** | | +**transfer_type** | **int** | 1 for internal transfer, 0 for external transfer | +**status** | **int** | | +**transaction_fee** | **str** | | +**confirm_no** | **int** | | [optional] +**info** | **str** | Reason for withdrawal failure | [optional] +**tx_id** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_capital_withdraw_history_get200_response_inner import SapiV1CapitalWithdrawHistoryGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1CapitalWithdrawHistoryGet200ResponseInner from a JSON string +sapi_v1_capital_withdraw_history_get200_response_inner_instance = SapiV1CapitalWithdrawHistoryGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1CapitalWithdrawHistoryGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_capital_withdraw_history_get200_response_inner_dict = sapi_v1_capital_withdraw_history_get200_response_inner_instance.to_dict() +# create an instance of SapiV1CapitalWithdrawHistoryGet200ResponseInner from a dict +sapi_v1_capital_withdraw_history_get200_response_inner_from_dict = SapiV1CapitalWithdrawHistoryGet200ResponseInner.from_dict(sapi_v1_capital_withdraw_history_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ConvertAcceptQuotePost200Response.md b/target/python/binance_openapi/docs/SapiV1ConvertAcceptQuotePost200Response.md new file mode 100644 index 0000000..03fcc1e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ConvertAcceptQuotePost200Response.md @@ -0,0 +1,31 @@ +# SapiV1ConvertAcceptQuotePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | | +**create_time** | **int** | | +**order_status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_convert_accept_quote_post200_response import SapiV1ConvertAcceptQuotePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ConvertAcceptQuotePost200Response from a JSON string +sapi_v1_convert_accept_quote_post200_response_instance = SapiV1ConvertAcceptQuotePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ConvertAcceptQuotePost200Response.to_json()) + +# convert the object into a dict +sapi_v1_convert_accept_quote_post200_response_dict = sapi_v1_convert_accept_quote_post200_response_instance.to_dict() +# create an instance of SapiV1ConvertAcceptQuotePost200Response from a dict +sapi_v1_convert_accept_quote_post200_response_from_dict = SapiV1ConvertAcceptQuotePost200Response.from_dict(sapi_v1_convert_accept_quote_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ConvertAssetInfoGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1ConvertAssetInfoGet200ResponseInner.md new file mode 100644 index 0000000..720ae2e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ConvertAssetInfoGet200ResponseInner.md @@ -0,0 +1,30 @@ +# SapiV1ConvertAssetInfoGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**fraction** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_convert_asset_info_get200_response_inner import SapiV1ConvertAssetInfoGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ConvertAssetInfoGet200ResponseInner from a JSON string +sapi_v1_convert_asset_info_get200_response_inner_instance = SapiV1ConvertAssetInfoGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1ConvertAssetInfoGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_convert_asset_info_get200_response_inner_dict = sapi_v1_convert_asset_info_get200_response_inner_instance.to_dict() +# create an instance of SapiV1ConvertAssetInfoGet200ResponseInner from a dict +sapi_v1_convert_asset_info_get200_response_inner_from_dict = SapiV1ConvertAssetInfoGet200ResponseInner.from_dict(sapi_v1_convert_asset_info_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ConvertExchangeInfoGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1ConvertExchangeInfoGet200ResponseInner.md new file mode 100644 index 0000000..81a2556 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ConvertExchangeInfoGet200ResponseInner.md @@ -0,0 +1,34 @@ +# SapiV1ConvertExchangeInfoGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from_asset** | **str** | | +**to_asset** | **str** | | +**from_asset_min_amount** | **str** | | +**from_asset_max_amount** | **str** | | +**to_asset_min_amount** | **str** | | +**to_asset_max_amount** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_convert_exchange_info_get200_response_inner import SapiV1ConvertExchangeInfoGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ConvertExchangeInfoGet200ResponseInner from a JSON string +sapi_v1_convert_exchange_info_get200_response_inner_instance = SapiV1ConvertExchangeInfoGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1ConvertExchangeInfoGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_convert_exchange_info_get200_response_inner_dict = sapi_v1_convert_exchange_info_get200_response_inner_instance.to_dict() +# create an instance of SapiV1ConvertExchangeInfoGet200ResponseInner from a dict +sapi_v1_convert_exchange_info_get200_response_inner_from_dict = SapiV1ConvertExchangeInfoGet200ResponseInner.from_dict(sapi_v1_convert_exchange_info_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ConvertGetQuotePost200Response.md b/target/python/binance_openapi/docs/SapiV1ConvertGetQuotePost200Response.md new file mode 100644 index 0000000..4439716 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ConvertGetQuotePost200Response.md @@ -0,0 +1,34 @@ +# SapiV1ConvertGetQuotePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quote_id** | **str** | | +**ratio** | **str** | | +**inverse_ratio** | **str** | | +**valid_timestamp** | **int** | | +**to_amount** | **str** | | +**from_amount** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_convert_get_quote_post200_response import SapiV1ConvertGetQuotePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ConvertGetQuotePost200Response from a JSON string +sapi_v1_convert_get_quote_post200_response_instance = SapiV1ConvertGetQuotePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ConvertGetQuotePost200Response.to_json()) + +# convert the object into a dict +sapi_v1_convert_get_quote_post200_response_dict = sapi_v1_convert_get_quote_post200_response_instance.to_dict() +# create an instance of SapiV1ConvertGetQuotePost200Response from a dict +sapi_v1_convert_get_quote_post200_response_from_dict = SapiV1ConvertGetQuotePost200Response.from_dict(sapi_v1_convert_get_quote_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ConvertLimitCancelOrderPost200Response.md b/target/python/binance_openapi/docs/SapiV1ConvertLimitCancelOrderPost200Response.md new file mode 100644 index 0000000..4f025e2 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ConvertLimitCancelOrderPost200Response.md @@ -0,0 +1,30 @@ +# SapiV1ConvertLimitCancelOrderPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | | +**status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_convert_limit_cancel_order_post200_response import SapiV1ConvertLimitCancelOrderPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ConvertLimitCancelOrderPost200Response from a JSON string +sapi_v1_convert_limit_cancel_order_post200_response_instance = SapiV1ConvertLimitCancelOrderPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ConvertLimitCancelOrderPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_convert_limit_cancel_order_post200_response_dict = sapi_v1_convert_limit_cancel_order_post200_response_instance.to_dict() +# create an instance of SapiV1ConvertLimitCancelOrderPost200Response from a dict +sapi_v1_convert_limit_cancel_order_post200_response_from_dict = SapiV1ConvertLimitCancelOrderPost200Response.from_dict(sapi_v1_convert_limit_cancel_order_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ConvertLimitPlaceOrderPost200Response.md b/target/python/binance_openapi/docs/SapiV1ConvertLimitPlaceOrderPost200Response.md new file mode 100644 index 0000000..32ee46b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ConvertLimitPlaceOrderPost200Response.md @@ -0,0 +1,30 @@ +# SapiV1ConvertLimitPlaceOrderPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | | +**status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_convert_limit_place_order_post200_response import SapiV1ConvertLimitPlaceOrderPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ConvertLimitPlaceOrderPost200Response from a JSON string +sapi_v1_convert_limit_place_order_post200_response_instance = SapiV1ConvertLimitPlaceOrderPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ConvertLimitPlaceOrderPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_convert_limit_place_order_post200_response_dict = sapi_v1_convert_limit_place_order_post200_response_instance.to_dict() +# create an instance of SapiV1ConvertLimitPlaceOrderPost200Response from a dict +sapi_v1_convert_limit_place_order_post200_response_from_dict = SapiV1ConvertLimitPlaceOrderPost200Response.from_dict(sapi_v1_convert_limit_place_order_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ConvertLimitQueryOpenOrdersGet200Response.md b/target/python/binance_openapi/docs/SapiV1ConvertLimitQueryOpenOrdersGet200Response.md new file mode 100644 index 0000000..be36006 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ConvertLimitQueryOpenOrdersGet200Response.md @@ -0,0 +1,29 @@ +# SapiV1ConvertLimitQueryOpenOrdersGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | [**List[SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner]**](SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_convert_limit_query_open_orders_get200_response import SapiV1ConvertLimitQueryOpenOrdersGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ConvertLimitQueryOpenOrdersGet200Response from a JSON string +sapi_v1_convert_limit_query_open_orders_get200_response_instance = SapiV1ConvertLimitQueryOpenOrdersGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ConvertLimitQueryOpenOrdersGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_convert_limit_query_open_orders_get200_response_dict = sapi_v1_convert_limit_query_open_orders_get200_response_instance.to_dict() +# create an instance of SapiV1ConvertLimitQueryOpenOrdersGet200Response from a dict +sapi_v1_convert_limit_query_open_orders_get200_response_from_dict = SapiV1ConvertLimitQueryOpenOrdersGet200Response.from_dict(sapi_v1_convert_limit_query_open_orders_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner.md b/target/python/binance_openapi/docs/SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner.md new file mode 100644 index 0000000..21ac76c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner.md @@ -0,0 +1,39 @@ +# SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quote_id** | **str** | | +**order_id** | **int** | | +**order_status** | **str** | | +**from_asset** | **str** | | +**from_amount** | **str** | | +**to_asset** | **str** | | +**to_amount** | **str** | | +**ratio** | **str** | | +**inverse_ratio** | **str** | | +**create_time** | **int** | | +**expired_timestamp** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_convert_limit_query_open_orders_get200_response_list_inner import SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner from a JSON string +sapi_v1_convert_limit_query_open_orders_get200_response_list_inner_instance = SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner.to_json()) + +# convert the object into a dict +sapi_v1_convert_limit_query_open_orders_get200_response_list_inner_dict = sapi_v1_convert_limit_query_open_orders_get200_response_list_inner_instance.to_dict() +# create an instance of SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner from a dict +sapi_v1_convert_limit_query_open_orders_get200_response_list_inner_from_dict = SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner.from_dict(sapi_v1_convert_limit_query_open_orders_get200_response_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ConvertOrderStatusGet200Response.md b/target/python/binance_openapi/docs/SapiV1ConvertOrderStatusGet200Response.md new file mode 100644 index 0000000..96a62d0 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ConvertOrderStatusGet200Response.md @@ -0,0 +1,37 @@ +# SapiV1ConvertOrderStatusGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | | +**order_status** | **str** | | +**from_asset** | **str** | | +**from_amount** | **str** | | +**to_asset** | **str** | | +**to_amount** | **str** | | +**ratio** | **str** | | +**inverse_ratio** | **str** | | +**create_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_convert_order_status_get200_response import SapiV1ConvertOrderStatusGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ConvertOrderStatusGet200Response from a JSON string +sapi_v1_convert_order_status_get200_response_instance = SapiV1ConvertOrderStatusGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ConvertOrderStatusGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_convert_order_status_get200_response_dict = sapi_v1_convert_order_status_get200_response_instance.to_dict() +# create an instance of SapiV1ConvertOrderStatusGet200Response from a dict +sapi_v1_convert_order_status_get200_response_from_dict = SapiV1ConvertOrderStatusGet200Response.from_dict(sapi_v1_convert_order_status_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ConvertTradeFlowGet200Response.md b/target/python/binance_openapi/docs/SapiV1ConvertTradeFlowGet200Response.md new file mode 100644 index 0000000..39e0894 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ConvertTradeFlowGet200Response.md @@ -0,0 +1,33 @@ +# SapiV1ConvertTradeFlowGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | [**List[SapiV1ConvertTradeFlowGet200ResponseListInner]**](SapiV1ConvertTradeFlowGet200ResponseListInner.md) | | +**start_time** | **int** | | +**end_time** | **int** | | +**limit** | **int** | | +**more_data** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_convert_trade_flow_get200_response import SapiV1ConvertTradeFlowGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ConvertTradeFlowGet200Response from a JSON string +sapi_v1_convert_trade_flow_get200_response_instance = SapiV1ConvertTradeFlowGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ConvertTradeFlowGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_convert_trade_flow_get200_response_dict = sapi_v1_convert_trade_flow_get200_response_instance.to_dict() +# create an instance of SapiV1ConvertTradeFlowGet200Response from a dict +sapi_v1_convert_trade_flow_get200_response_from_dict = SapiV1ConvertTradeFlowGet200Response.from_dict(sapi_v1_convert_trade_flow_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ConvertTradeFlowGet200ResponseListInner.md b/target/python/binance_openapi/docs/SapiV1ConvertTradeFlowGet200ResponseListInner.md new file mode 100644 index 0000000..850f7fe --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ConvertTradeFlowGet200ResponseListInner.md @@ -0,0 +1,38 @@ +# SapiV1ConvertTradeFlowGet200ResponseListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quote_id** | **str** | | +**order_id** | **int** | | +**order_status** | **str** | | +**from_asset** | **str** | | +**from_amount** | **str** | | +**to_asset** | **str** | | +**to_amount** | **str** | | +**ratio** | **str** | price ratio | +**inverse_ratio** | **str** | inverse price | +**create_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_convert_trade_flow_get200_response_list_inner import SapiV1ConvertTradeFlowGet200ResponseListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ConvertTradeFlowGet200ResponseListInner from a JSON string +sapi_v1_convert_trade_flow_get200_response_list_inner_instance = SapiV1ConvertTradeFlowGet200ResponseListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1ConvertTradeFlowGet200ResponseListInner.to_json()) + +# convert the object into a dict +sapi_v1_convert_trade_flow_get200_response_list_inner_dict = sapi_v1_convert_trade_flow_get200_response_list_inner_instance.to_dict() +# create an instance of SapiV1ConvertTradeFlowGet200ResponseListInner from a dict +sapi_v1_convert_trade_flow_get200_response_list_inner_from_dict = SapiV1ConvertTradeFlowGet200ResponseListInner.from_dict(sapi_v1_convert_trade_flow_get200_response_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1DciProductAccountsGet200Response.md b/target/python/binance_openapi/docs/SapiV1DciProductAccountsGet200Response.md new file mode 100644 index 0000000..61a1cca --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1DciProductAccountsGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1DciProductAccountsGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_amount_in_btc** | **str** | Total BTC amounts in Dual Investment | +**total_amount_in_usdt** | **str** | Total USDT equivalents in BTC in Dual Investment | + +## Example + +```python +from openapi_client.models.sapi_v1_dci_product_accounts_get200_response import SapiV1DciProductAccountsGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1DciProductAccountsGet200Response from a JSON string +sapi_v1_dci_product_accounts_get200_response_instance = SapiV1DciProductAccountsGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1DciProductAccountsGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_dci_product_accounts_get200_response_dict = sapi_v1_dci_product_accounts_get200_response_instance.to_dict() +# create an instance of SapiV1DciProductAccountsGet200Response from a dict +sapi_v1_dci_product_accounts_get200_response_from_dict = SapiV1DciProductAccountsGet200Response.from_dict(sapi_v1_dci_product_accounts_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1DciProductAutoCompoundEditStatusPost200Response.md b/target/python/binance_openapi/docs/SapiV1DciProductAutoCompoundEditStatusPost200Response.md new file mode 100644 index 0000000..22580d5 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1DciProductAutoCompoundEditStatusPost200Response.md @@ -0,0 +1,30 @@ +# SapiV1DciProductAutoCompoundEditStatusPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**position_id** | **str** | | +**auto_compound_plan** | **str** | NONE, STANDARD, ADVANCED | + +## Example + +```python +from openapi_client.models.sapi_v1_dci_product_auto_compound_edit_status_post200_response import SapiV1DciProductAutoCompoundEditStatusPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1DciProductAutoCompoundEditStatusPost200Response from a JSON string +sapi_v1_dci_product_auto_compound_edit_status_post200_response_instance = SapiV1DciProductAutoCompoundEditStatusPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1DciProductAutoCompoundEditStatusPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_dci_product_auto_compound_edit_status_post200_response_dict = sapi_v1_dci_product_auto_compound_edit_status_post200_response_instance.to_dict() +# create an instance of SapiV1DciProductAutoCompoundEditStatusPost200Response from a dict +sapi_v1_dci_product_auto_compound_edit_status_post200_response_from_dict = SapiV1DciProductAutoCompoundEditStatusPost200Response.from_dict(sapi_v1_dci_product_auto_compound_edit_status_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1DciProductListGet200Response.md b/target/python/binance_openapi/docs/SapiV1DciProductListGet200Response.md new file mode 100644 index 0000000..6ac9edd --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1DciProductListGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1DciProductListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**list** | [**List[SapiV1DciProductListGet200ResponseListInner]**](SapiV1DciProductListGet200ResponseListInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_dci_product_list_get200_response import SapiV1DciProductListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1DciProductListGet200Response from a JSON string +sapi_v1_dci_product_list_get200_response_instance = SapiV1DciProductListGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1DciProductListGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_dci_product_list_get200_response_dict = sapi_v1_dci_product_list_get200_response_instance.to_dict() +# create an instance of SapiV1DciProductListGet200Response from a dict +sapi_v1_dci_product_list_get200_response_from_dict = SapiV1DciProductListGet200Response.from_dict(sapi_v1_dci_product_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1DciProductListGet200ResponseListInner.md b/target/python/binance_openapi/docs/SapiV1DciProductListGet200ResponseListInner.md new file mode 100644 index 0000000..22f5d67 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1DciProductListGet200ResponseListInner.md @@ -0,0 +1,45 @@ +# SapiV1DciProductListGet200ResponseListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**invest_coin** | **str** | | +**exercised_coin** | **str** | | +**strike_price** | **str** | | +**duration** | **int** | | +**settle_date** | **int** | | +**purchase_decimal** | **int** | | +**purchase_end_time** | **int** | | +**can_purchase** | **bool** | | +**apr** | **str** | | +**order_id** | **int** | | +**min_amount** | **str** | | +**max_amount** | **str** | | +**create_timestamp** | **int** | | +**option_type** | **str** | | +**is_auto_compound_enable** | **bool** | | +**auto_compound_plan_list** | **List[str]** | | + +## Example + +```python +from openapi_client.models.sapi_v1_dci_product_list_get200_response_list_inner import SapiV1DciProductListGet200ResponseListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1DciProductListGet200ResponseListInner from a JSON string +sapi_v1_dci_product_list_get200_response_list_inner_instance = SapiV1DciProductListGet200ResponseListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1DciProductListGet200ResponseListInner.to_json()) + +# convert the object into a dict +sapi_v1_dci_product_list_get200_response_list_inner_dict = sapi_v1_dci_product_list_get200_response_list_inner_instance.to_dict() +# create an instance of SapiV1DciProductListGet200ResponseListInner from a dict +sapi_v1_dci_product_list_get200_response_list_inner_from_dict = SapiV1DciProductListGet200ResponseListInner.from_dict(sapi_v1_dci_product_list_get200_response_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1DciProductPositionsGet200Response.md b/target/python/binance_openapi/docs/SapiV1DciProductPositionsGet200Response.md new file mode 100644 index 0000000..e2ddcab --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1DciProductPositionsGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1DciProductPositionsGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**list** | [**List[SapiV1DciProductPositionsGet200ResponseListInner]**](SapiV1DciProductPositionsGet200ResponseListInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_dci_product_positions_get200_response import SapiV1DciProductPositionsGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1DciProductPositionsGet200Response from a JSON string +sapi_v1_dci_product_positions_get200_response_instance = SapiV1DciProductPositionsGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1DciProductPositionsGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_dci_product_positions_get200_response_dict = sapi_v1_dci_product_positions_get200_response_instance.to_dict() +# create an instance of SapiV1DciProductPositionsGet200Response from a dict +sapi_v1_dci_product_positions_get200_response_from_dict = SapiV1DciProductPositionsGet200Response.from_dict(sapi_v1_dci_product_positions_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1DciProductPositionsGet200ResponseListInner.md b/target/python/binance_openapi/docs/SapiV1DciProductPositionsGet200ResponseListInner.md new file mode 100644 index 0000000..7aec58a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1DciProductPositionsGet200ResponseListInner.md @@ -0,0 +1,41 @@ +# SapiV1DciProductPositionsGet200ResponseListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**invest_coin** | **str** | | +**exercised_coin** | **str** | | +**subscription_amount** | **str** | | +**strike_price** | **str** | | +**duration** | **int** | | +**settle_date** | **int** | | +**purchase_status** | **str** | | +**apr** | **str** | | +**order_id** | **int** | | +**purchase_end_time** | **int** | | +**option_type** | **str** | | +**auto_compound_plan** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_dci_product_positions_get200_response_list_inner import SapiV1DciProductPositionsGet200ResponseListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1DciProductPositionsGet200ResponseListInner from a JSON string +sapi_v1_dci_product_positions_get200_response_list_inner_instance = SapiV1DciProductPositionsGet200ResponseListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1DciProductPositionsGet200ResponseListInner.to_json()) + +# convert the object into a dict +sapi_v1_dci_product_positions_get200_response_list_inner_dict = sapi_v1_dci_product_positions_get200_response_list_inner_instance.to_dict() +# create an instance of SapiV1DciProductPositionsGet200ResponseListInner from a dict +sapi_v1_dci_product_positions_get200_response_list_inner_from_dict = SapiV1DciProductPositionsGet200ResponseListInner.from_dict(sapi_v1_dci_product_positions_get200_response_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1DciProductSubscribePost200Response.md b/target/python/binance_openapi/docs/SapiV1DciProductSubscribePost200Response.md new file mode 100644 index 0000000..7441b90 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1DciProductSubscribePost200Response.md @@ -0,0 +1,41 @@ +# SapiV1DciProductSubscribePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**position_id** | **int** | | +**invest_coin** | **str** | | +**exercised_coin** | **str** | | +**subscription_amount** | **str** | | +**duration** | **int** | | +**auto_compound_plan** | **str** | STANDARD, ADVANCED, this field won't display when autocompound is set to None | +**strike_price** | **str** | | +**settle_date** | **int** | | +**purchase_status** | **str** | | +**apr** | **str** | | +**order_id** | **int** | | +**purchase_time** | **int** | | +**option_type** | **str** | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_dci_product_subscribe_post200_response import SapiV1DciProductSubscribePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1DciProductSubscribePost200Response from a JSON string +sapi_v1_dci_product_subscribe_post200_response_instance = SapiV1DciProductSubscribePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1DciProductSubscribePost200Response.to_json()) + +# convert the object into a dict +sapi_v1_dci_product_subscribe_post200_response_dict = sapi_v1_dci_product_subscribe_post200_response_instance.to_dict() +# create an instance of SapiV1DciProductSubscribePost200Response from a dict +sapi_v1_dci_product_subscribe_post200_response_from_dict = SapiV1DciProductSubscribePost200Response.from_dict(sapi_v1_dci_product_subscribe_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRateHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRateHistoryGet200Response.md new file mode 100644 index 0000000..f3f9406 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRateHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1EthStakingEthHistoryRateHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner]**](SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_eth_history_rate_history_get200_response import SapiV1EthStakingEthHistoryRateHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingEthHistoryRateHistoryGet200Response from a JSON string +sapi_v1_eth_staking_eth_history_rate_history_get200_response_instance = SapiV1EthStakingEthHistoryRateHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingEthHistoryRateHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_eth_history_rate_history_get200_response_dict = sapi_v1_eth_staking_eth_history_rate_history_get200_response_instance.to_dict() +# create an instance of SapiV1EthStakingEthHistoryRateHistoryGet200Response from a dict +sapi_v1_eth_staking_eth_history_rate_history_get200_response_from_dict = SapiV1EthStakingEthHistoryRateHistoryGet200Response.from_dict(sapi_v1_eth_staking_eth_history_rate_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..125c74c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner.md @@ -0,0 +1,31 @@ +# SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**annual_percentage_rate** | **str** | BETH APR | +**exchange_rate** | **str** | BETH value per 1 WBETH | +**time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner_instance = SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner_dict = sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner from a dict +sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner_from_dict = SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner.from_dict(sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response.md new file mode 100644 index 0000000..05e7c5d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner]**](SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_eth_history_redemption_history_get200_response import SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response from a JSON string +sapi_v1_eth_staking_eth_history_redemption_history_get200_response_instance = SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_eth_history_redemption_history_get200_response_dict = sapi_v1_eth_staking_eth_history_redemption_history_get200_response_instance.to_dict() +# create an instance of SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response from a dict +sapi_v1_eth_staking_eth_history_redemption_history_get200_response_from_dict = SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response.from_dict(sapi_v1_eth_staking_eth_history_redemption_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..6245bcc --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner.md @@ -0,0 +1,36 @@ +# SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | | +**arrival_time** | **int** | | +**asset** | **str** | | +**amount** | **str** | | +**status** | **str** | PENDING, SUCCESS, FAILED | +**distribute_asset** | **str** | | +**distribute_amount** | **str** | | +**conversion_ratio** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner_instance = SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner_dict = sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner from a dict +sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner_from_dict = SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner.from_dict(sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRewardsHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRewardsHistoryGet200Response.md new file mode 100644 index 0000000..c0eb7ad --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRewardsHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1EthStakingEthHistoryRewardsHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner]**](SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_eth_history_rewards_history_get200_response import SapiV1EthStakingEthHistoryRewardsHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingEthHistoryRewardsHistoryGet200Response from a JSON string +sapi_v1_eth_staking_eth_history_rewards_history_get200_response_instance = SapiV1EthStakingEthHistoryRewardsHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingEthHistoryRewardsHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_eth_history_rewards_history_get200_response_dict = sapi_v1_eth_staking_eth_history_rewards_history_get200_response_instance.to_dict() +# create an instance of SapiV1EthStakingEthHistoryRewardsHistoryGet200Response from a dict +sapi_v1_eth_staking_eth_history_rewards_history_get200_response_from_dict = SapiV1EthStakingEthHistoryRewardsHistoryGet200Response.from_dict(sapi_v1_eth_staking_eth_history_rewards_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..ab8c5b2 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner.md @@ -0,0 +1,34 @@ +# SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | | +**asset** | **str** | | +**holding** | **str** | BETH holding balance | +**amount** | **str** | Distributed rewards | +**annual_percentage_rate** | **str** | 0.5 means 50% here | +**status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner_instance = SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner_dict = sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner from a dict +sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner_from_dict = SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner.from_dict(sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryStakingHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryStakingHistoryGet200Response.md new file mode 100644 index 0000000..cb54761 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryStakingHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1EthStakingEthHistoryStakingHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner]**](SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_eth_history_staking_history_get200_response import SapiV1EthStakingEthHistoryStakingHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingEthHistoryStakingHistoryGet200Response from a JSON string +sapi_v1_eth_staking_eth_history_staking_history_get200_response_instance = SapiV1EthStakingEthHistoryStakingHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingEthHistoryStakingHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_eth_history_staking_history_get200_response_dict = sapi_v1_eth_staking_eth_history_staking_history_get200_response_instance.to_dict() +# create an instance of SapiV1EthStakingEthHistoryStakingHistoryGet200Response from a dict +sapi_v1_eth_staking_eth_history_staking_history_get200_response_from_dict = SapiV1EthStakingEthHistoryStakingHistoryGet200Response.from_dict(sapi_v1_eth_staking_eth_history_staking_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..509315e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner.md @@ -0,0 +1,34 @@ +# SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | | +**asset** | **str** | | +**amount** | **str** | | +**status** | **str** | PENDING, SUCCESS, FAILED | +**distribute_amount** | **str** | | +**conversion_ratio** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner_instance = SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner_dict = sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner from a dict +sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner_from_dict = SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner.from_dict(sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response.md new file mode 100644 index 0000000..c36a43b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**est_rewards_in_eth** | **str** | | +**rows** | [**List[SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner]**](SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response import SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response from a JSON string +sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_instance = SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_dict = sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_instance.to_dict() +# create an instance of SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response from a dict +sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_from_dict = SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response.from_dict(sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..880c368 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner.md @@ -0,0 +1,33 @@ +# SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | | +**amount_in_eth** | **str** | Estimated rewards accrued within WBETH | +**holding** | **str** | WBETH holding balance | +**holding_in_eth** | **str** | | +**annual_percentage_rate** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner_instance = SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner_dict = sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner from a dict +sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner_from_dict = SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner.from_dict(sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingEthQuotaGet200Response.md b/target/python/binance_openapi/docs/SapiV1EthStakingEthQuotaGet200Response.md new file mode 100644 index 0000000..4473282 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingEthQuotaGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1EthStakingEthQuotaGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**left_staking_personal_quota** | **str** | Show min(Daily available limit, total personal staking quota) | +**left_redemption_personal_quota** | **str** | Show min(Daily personal redeem quota, total redemption limit) | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_eth_quota_get200_response import SapiV1EthStakingEthQuotaGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingEthQuotaGet200Response from a JSON string +sapi_v1_eth_staking_eth_quota_get200_response_instance = SapiV1EthStakingEthQuotaGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingEthQuotaGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_eth_quota_get200_response_dict = sapi_v1_eth_staking_eth_quota_get200_response_instance.to_dict() +# create an instance of SapiV1EthStakingEthQuotaGet200Response from a dict +sapi_v1_eth_staking_eth_quota_get200_response_from_dict = SapiV1EthStakingEthQuotaGet200Response.from_dict(sapi_v1_eth_staking_eth_quota_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingEthRedeemPost200Response.md b/target/python/binance_openapi/docs/SapiV1EthStakingEthRedeemPost200Response.md new file mode 100644 index 0000000..8233874 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingEthRedeemPost200Response.md @@ -0,0 +1,32 @@ +# SapiV1EthStakingEthRedeemPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | +**arrival_time** | **int** | | +**eth_amount** | **str** | | +**conversion_ratio** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_eth_redeem_post200_response import SapiV1EthStakingEthRedeemPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingEthRedeemPost200Response from a JSON string +sapi_v1_eth_staking_eth_redeem_post200_response_instance = SapiV1EthStakingEthRedeemPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingEthRedeemPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_eth_redeem_post200_response_dict = sapi_v1_eth_staking_eth_redeem_post200_response_instance.to_dict() +# create an instance of SapiV1EthStakingEthRedeemPost200Response from a dict +sapi_v1_eth_staking_eth_redeem_post200_response_from_dict = SapiV1EthStakingEthRedeemPost200Response.from_dict(sapi_v1_eth_staking_eth_redeem_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response.md new file mode 100644 index 0000000..49e7786 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner]**](SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response import SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response from a JSON string +sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_instance = SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_dict = sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_instance.to_dict() +# create an instance of SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response from a dict +sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_from_dict = SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response.from_dict(sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..536acc7 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner.md @@ -0,0 +1,35 @@ +# SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | | +**from_asset** | **str** | | +**from_amount** | **str** | | +**to_asset** | **str** | | +**to_amount** | **str** | | +**exchange_rate** | **str** | BETH amount per 1 WBETH | +**status** | **str** | PENDING, SUCCESS, FAILED | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner import SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner_instance = SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner_dict = sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner from a dict +sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner_from_dict = SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner.from_dict(sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryWrapHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryWrapHistoryGet200Response.md new file mode 100644 index 0000000..72e3605 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryWrapHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1EthStakingWbethHistoryWrapHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner]**](SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response import SapiV1EthStakingWbethHistoryWrapHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingWbethHistoryWrapHistoryGet200Response from a JSON string +sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_instance = SapiV1EthStakingWbethHistoryWrapHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingWbethHistoryWrapHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_dict = sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_instance.to_dict() +# create an instance of SapiV1EthStakingWbethHistoryWrapHistoryGet200Response from a dict +sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_from_dict = SapiV1EthStakingWbethHistoryWrapHistoryGet200Response.from_dict(sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..f588894 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner.md @@ -0,0 +1,35 @@ +# SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | | +**from_asset** | **str** | | +**from_amount** | **str** | | +**to_asset** | **str** | | +**to_amount** | **str** | | +**exchange_rate** | **str** | BETH amount per 1 WBETH | +**status** | **str** | PENDING, SUCCESS, FAILED | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner import SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner_instance = SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner_dict = sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner from a dict +sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner_from_dict = SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner.from_dict(sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1EthStakingWbethWrapPost200Response.md b/target/python/binance_openapi/docs/SapiV1EthStakingWbethWrapPost200Response.md new file mode 100644 index 0000000..9b2af54 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1EthStakingWbethWrapPost200Response.md @@ -0,0 +1,31 @@ +# SapiV1EthStakingWbethWrapPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | +**wbeth_amount** | **str** | | +**exchange_rate** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_eth_staking_wbeth_wrap_post200_response import SapiV1EthStakingWbethWrapPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1EthStakingWbethWrapPost200Response from a JSON string +sapi_v1_eth_staking_wbeth_wrap_post200_response_instance = SapiV1EthStakingWbethWrapPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1EthStakingWbethWrapPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_eth_staking_wbeth_wrap_post200_response_dict = sapi_v1_eth_staking_wbeth_wrap_post200_response_instance.to_dict() +# create an instance of SapiV1EthStakingWbethWrapPost200Response from a dict +sapi_v1_eth_staking_wbeth_wrap_post200_response_from_dict = SapiV1EthStakingWbethWrapPost200Response.from_dict(sapi_v1_eth_staking_wbeth_wrap_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1FiatOrdersGet200Response.md b/target/python/binance_openapi/docs/SapiV1FiatOrdersGet200Response.md new file mode 100644 index 0000000..8183f9b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1FiatOrdersGet200Response.md @@ -0,0 +1,33 @@ +# SapiV1FiatOrdersGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**message** | **str** | | +**data** | [**List[SapiV1FiatOrdersGet200ResponseDataInner]**](SapiV1FiatOrdersGet200ResponseDataInner.md) | | +**total** | **int** | | +**success** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_fiat_orders_get200_response import SapiV1FiatOrdersGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1FiatOrdersGet200Response from a JSON string +sapi_v1_fiat_orders_get200_response_instance = SapiV1FiatOrdersGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1FiatOrdersGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_fiat_orders_get200_response_dict = sapi_v1_fiat_orders_get200_response_instance.to_dict() +# create an instance of SapiV1FiatOrdersGet200Response from a dict +sapi_v1_fiat_orders_get200_response_from_dict = SapiV1FiatOrdersGet200Response.from_dict(sapi_v1_fiat_orders_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1FiatOrdersGet200ResponseDataInner.md b/target/python/binance_openapi/docs/SapiV1FiatOrdersGet200ResponseDataInner.md new file mode 100644 index 0000000..c2e4fc8 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1FiatOrdersGet200ResponseDataInner.md @@ -0,0 +1,37 @@ +# SapiV1FiatOrdersGet200ResponseDataInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_no** | **str** | | +**fiat_currency** | **str** | | +**indicated_amount** | **str** | | +**amount** | **str** | | +**total_fee** | **str** | | +**method** | **str** | | +**status** | **str** | Processing, Failed, Successful, Finished, Refunding, Refunded, Refund Failed, Order Partial credit Stopped | +**create_time** | **int** | | +**update_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_fiat_orders_get200_response_data_inner import SapiV1FiatOrdersGet200ResponseDataInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1FiatOrdersGet200ResponseDataInner from a JSON string +sapi_v1_fiat_orders_get200_response_data_inner_instance = SapiV1FiatOrdersGet200ResponseDataInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1FiatOrdersGet200ResponseDataInner.to_json()) + +# convert the object into a dict +sapi_v1_fiat_orders_get200_response_data_inner_dict = sapi_v1_fiat_orders_get200_response_data_inner_instance.to_dict() +# create an instance of SapiV1FiatOrdersGet200ResponseDataInner from a dict +sapi_v1_fiat_orders_get200_response_data_inner_from_dict = SapiV1FiatOrdersGet200ResponseDataInner.from_dict(sapi_v1_fiat_orders_get200_response_data_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1FiatPaymentsGet200Response.md b/target/python/binance_openapi/docs/SapiV1FiatPaymentsGet200Response.md new file mode 100644 index 0000000..c88a850 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1FiatPaymentsGet200Response.md @@ -0,0 +1,33 @@ +# SapiV1FiatPaymentsGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**message** | **str** | | +**data** | [**List[SapiV1FiatPaymentsGet200ResponseDataInner]**](SapiV1FiatPaymentsGet200ResponseDataInner.md) | | +**total** | **int** | | +**success** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_fiat_payments_get200_response import SapiV1FiatPaymentsGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1FiatPaymentsGet200Response from a JSON string +sapi_v1_fiat_payments_get200_response_instance = SapiV1FiatPaymentsGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1FiatPaymentsGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_fiat_payments_get200_response_dict = sapi_v1_fiat_payments_get200_response_instance.to_dict() +# create an instance of SapiV1FiatPaymentsGet200Response from a dict +sapi_v1_fiat_payments_get200_response_from_dict = SapiV1FiatPaymentsGet200Response.from_dict(sapi_v1_fiat_payments_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1FiatPaymentsGet200ResponseDataInner.md b/target/python/binance_openapi/docs/SapiV1FiatPaymentsGet200ResponseDataInner.md new file mode 100644 index 0000000..18e9082 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1FiatPaymentsGet200ResponseDataInner.md @@ -0,0 +1,38 @@ +# SapiV1FiatPaymentsGet200ResponseDataInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_no** | **str** | | +**source_amount** | **str** | Fiat trade amount | +**fiat_currency** | **str** | Fiat token | +**obtain_amount** | **str** | Crypto trade amount | +**crypto_currency** | **str** | Crypto token | +**total_fee** | **str** | Trade fee | +**price** | **str** | | +**status** | **str** | Processing, Completed, Failed, Refunded | +**create_time** | **int** | | +**update_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_fiat_payments_get200_response_data_inner import SapiV1FiatPaymentsGet200ResponseDataInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1FiatPaymentsGet200ResponseDataInner from a JSON string +sapi_v1_fiat_payments_get200_response_data_inner_instance = SapiV1FiatPaymentsGet200ResponseDataInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1FiatPaymentsGet200ResponseDataInner.to_json()) + +# convert the object into a dict +sapi_v1_fiat_payments_get200_response_data_inner_dict = sapi_v1_fiat_payments_get200_response_data_inner_instance.to_dict() +# create an instance of SapiV1FiatPaymentsGet200ResponseDataInner from a dict +sapi_v1_fiat_payments_get200_response_data_inner_from_dict = SapiV1FiatPaymentsGet200ResponseDataInner.from_dict(sapi_v1_fiat_payments_get200_response_data_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1FuturesHistDataLinkGet200Response.md b/target/python/binance_openapi/docs/SapiV1FuturesHistDataLinkGet200Response.md new file mode 100644 index 0000000..49974ac --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1FuturesHistDataLinkGet200Response.md @@ -0,0 +1,29 @@ +# SapiV1FuturesHistDataLinkGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[SapiV1FuturesHistDataLinkGet200ResponseDataInner]**](SapiV1FuturesHistDataLinkGet200ResponseDataInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_futures_hist_data_link_get200_response import SapiV1FuturesHistDataLinkGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1FuturesHistDataLinkGet200Response from a JSON string +sapi_v1_futures_hist_data_link_get200_response_instance = SapiV1FuturesHistDataLinkGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1FuturesHistDataLinkGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_futures_hist_data_link_get200_response_dict = sapi_v1_futures_hist_data_link_get200_response_instance.to_dict() +# create an instance of SapiV1FuturesHistDataLinkGet200Response from a dict +sapi_v1_futures_hist_data_link_get200_response_from_dict = SapiV1FuturesHistDataLinkGet200Response.from_dict(sapi_v1_futures_hist_data_link_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1FuturesHistDataLinkGet200ResponseDataInner.md b/target/python/binance_openapi/docs/SapiV1FuturesHistDataLinkGet200ResponseDataInner.md new file mode 100644 index 0000000..2ea6e89 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1FuturesHistDataLinkGet200ResponseDataInner.md @@ -0,0 +1,30 @@ +# SapiV1FuturesHistDataLinkGet200ResponseDataInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**day** | **str** | | +**url** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_futures_hist_data_link_get200_response_data_inner import SapiV1FuturesHistDataLinkGet200ResponseDataInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1FuturesHistDataLinkGet200ResponseDataInner from a JSON string +sapi_v1_futures_hist_data_link_get200_response_data_inner_instance = SapiV1FuturesHistDataLinkGet200ResponseDataInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1FuturesHistDataLinkGet200ResponseDataInner.to_json()) + +# convert the object into a dict +sapi_v1_futures_hist_data_link_get200_response_data_inner_dict = sapi_v1_futures_hist_data_link_get200_response_data_inner_instance.to_dict() +# create an instance of SapiV1FuturesHistDataLinkGet200ResponseDataInner from a dict +sapi_v1_futures_hist_data_link_get200_response_data_inner_from_dict = SapiV1FuturesHistDataLinkGet200ResponseDataInner.from_dict(sapi_v1_futures_hist_data_link_get200_response_data_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1FuturesTransferGet200Response.md b/target/python/binance_openapi/docs/SapiV1FuturesTransferGet200Response.md new file mode 100644 index 0000000..1cefcd3 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1FuturesTransferGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1FuturesTransferGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1FuturesTransferGet200ResponseRowsInner]**](SapiV1FuturesTransferGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_futures_transfer_get200_response import SapiV1FuturesTransferGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1FuturesTransferGet200Response from a JSON string +sapi_v1_futures_transfer_get200_response_instance = SapiV1FuturesTransferGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1FuturesTransferGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_futures_transfer_get200_response_dict = sapi_v1_futures_transfer_get200_response_instance.to_dict() +# create an instance of SapiV1FuturesTransferGet200Response from a dict +sapi_v1_futures_transfer_get200_response_from_dict = SapiV1FuturesTransferGet200Response.from_dict(sapi_v1_futures_transfer_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1FuturesTransferGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1FuturesTransferGet200ResponseRowsInner.md new file mode 100644 index 0000000..e7c6034 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1FuturesTransferGet200ResponseRowsInner.md @@ -0,0 +1,34 @@ +# SapiV1FuturesTransferGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**tran_id** | **int** | | +**amount** | **str** | | +**type** | **str** | | +**timestamp** | **int** | | +**status** | **str** | one of PENDING (pending to execution), CONFIRMED (successfully transfered), FAILED (execution failed, nothing happened to your account); | + +## Example + +```python +from openapi_client.models.sapi_v1_futures_transfer_get200_response_rows_inner import SapiV1FuturesTransferGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1FuturesTransferGet200ResponseRowsInner from a JSON string +sapi_v1_futures_transfer_get200_response_rows_inner_instance = SapiV1FuturesTransferGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1FuturesTransferGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_futures_transfer_get200_response_rows_inner_dict = sapi_v1_futures_transfer_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1FuturesTransferGet200ResponseRowsInner from a dict +sapi_v1_futures_transfer_get200_response_rows_inner_from_dict = SapiV1FuturesTransferGet200ResponseRowsInner.from_dict(sapi_v1_futures_transfer_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1GiftcardBuyCodeTokenLimitGet200Response.md b/target/python/binance_openapi/docs/SapiV1GiftcardBuyCodeTokenLimitGet200Response.md new file mode 100644 index 0000000..805e651 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1GiftcardBuyCodeTokenLimitGet200Response.md @@ -0,0 +1,32 @@ +# SapiV1GiftcardBuyCodeTokenLimitGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**message** | **str** | | +**data** | [**SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData**](SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData.md) | | +**success** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_giftcard_buy_code_token_limit_get200_response import SapiV1GiftcardBuyCodeTokenLimitGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1GiftcardBuyCodeTokenLimitGet200Response from a JSON string +sapi_v1_giftcard_buy_code_token_limit_get200_response_instance = SapiV1GiftcardBuyCodeTokenLimitGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1GiftcardBuyCodeTokenLimitGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_giftcard_buy_code_token_limit_get200_response_dict = sapi_v1_giftcard_buy_code_token_limit_get200_response_instance.to_dict() +# create an instance of SapiV1GiftcardBuyCodeTokenLimitGet200Response from a dict +sapi_v1_giftcard_buy_code_token_limit_get200_response_from_dict = SapiV1GiftcardBuyCodeTokenLimitGet200Response.from_dict(sapi_v1_giftcard_buy_code_token_limit_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData.md b/target/python/binance_openapi/docs/SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData.md new file mode 100644 index 0000000..42fc5c6 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData.md @@ -0,0 +1,31 @@ +# SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**coin** | **str** | | [optional] +**from_min** | **str** | | [optional] +**from_max** | **str** | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_giftcard_buy_code_token_limit_get200_response_data import SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData from a JSON string +sapi_v1_giftcard_buy_code_token_limit_get200_response_data_instance = SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData.from_json(json) +# print the JSON string representation of the object +print(SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData.to_json()) + +# convert the object into a dict +sapi_v1_giftcard_buy_code_token_limit_get200_response_data_dict = sapi_v1_giftcard_buy_code_token_limit_get200_response_data_instance.to_dict() +# create an instance of SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData from a dict +sapi_v1_giftcard_buy_code_token_limit_get200_response_data_from_dict = SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData.from_dict(sapi_v1_giftcard_buy_code_token_limit_get200_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1GiftcardCreateCodePost200Response.md b/target/python/binance_openapi/docs/SapiV1GiftcardCreateCodePost200Response.md new file mode 100644 index 0000000..3afc450 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1GiftcardCreateCodePost200Response.md @@ -0,0 +1,32 @@ +# SapiV1GiftcardCreateCodePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**message** | **str** | | +**data** | [**SapiV1GiftcardCreateCodePost200ResponseData**](SapiV1GiftcardCreateCodePost200ResponseData.md) | | +**success** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_giftcard_create_code_post200_response import SapiV1GiftcardCreateCodePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1GiftcardCreateCodePost200Response from a JSON string +sapi_v1_giftcard_create_code_post200_response_instance = SapiV1GiftcardCreateCodePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1GiftcardCreateCodePost200Response.to_json()) + +# convert the object into a dict +sapi_v1_giftcard_create_code_post200_response_dict = sapi_v1_giftcard_create_code_post200_response_instance.to_dict() +# create an instance of SapiV1GiftcardCreateCodePost200Response from a dict +sapi_v1_giftcard_create_code_post200_response_from_dict = SapiV1GiftcardCreateCodePost200Response.from_dict(sapi_v1_giftcard_create_code_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1GiftcardCreateCodePost200ResponseData.md b/target/python/binance_openapi/docs/SapiV1GiftcardCreateCodePost200ResponseData.md new file mode 100644 index 0000000..80c7985 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1GiftcardCreateCodePost200ResponseData.md @@ -0,0 +1,31 @@ +# SapiV1GiftcardCreateCodePost200ResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reference_no** | **str** | | +**code** | **str** | | +**expired_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_giftcard_create_code_post200_response_data import SapiV1GiftcardCreateCodePost200ResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1GiftcardCreateCodePost200ResponseData from a JSON string +sapi_v1_giftcard_create_code_post200_response_data_instance = SapiV1GiftcardCreateCodePost200ResponseData.from_json(json) +# print the JSON string representation of the object +print(SapiV1GiftcardCreateCodePost200ResponseData.to_json()) + +# convert the object into a dict +sapi_v1_giftcard_create_code_post200_response_data_dict = sapi_v1_giftcard_create_code_post200_response_data_instance.to_dict() +# create an instance of SapiV1GiftcardCreateCodePost200ResponseData from a dict +sapi_v1_giftcard_create_code_post200_response_data_from_dict = SapiV1GiftcardCreateCodePost200ResponseData.from_dict(sapi_v1_giftcard_create_code_post200_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1GiftcardCryptographyRsaPublicKeyGet200Response.md b/target/python/binance_openapi/docs/SapiV1GiftcardCryptographyRsaPublicKeyGet200Response.md new file mode 100644 index 0000000..54cf775 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1GiftcardCryptographyRsaPublicKeyGet200Response.md @@ -0,0 +1,32 @@ +# SapiV1GiftcardCryptographyRsaPublicKeyGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**message** | **str** | | +**data** | **str** | | +**success** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_giftcard_cryptography_rsa_public_key_get200_response import SapiV1GiftcardCryptographyRsaPublicKeyGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1GiftcardCryptographyRsaPublicKeyGet200Response from a JSON string +sapi_v1_giftcard_cryptography_rsa_public_key_get200_response_instance = SapiV1GiftcardCryptographyRsaPublicKeyGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1GiftcardCryptographyRsaPublicKeyGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_giftcard_cryptography_rsa_public_key_get200_response_dict = sapi_v1_giftcard_cryptography_rsa_public_key_get200_response_instance.to_dict() +# create an instance of SapiV1GiftcardCryptographyRsaPublicKeyGet200Response from a dict +sapi_v1_giftcard_cryptography_rsa_public_key_get200_response_from_dict = SapiV1GiftcardCryptographyRsaPublicKeyGet200Response.from_dict(sapi_v1_giftcard_cryptography_rsa_public_key_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1GiftcardRedeemCodePost200Response.md b/target/python/binance_openapi/docs/SapiV1GiftcardRedeemCodePost200Response.md new file mode 100644 index 0000000..6ee19a1 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1GiftcardRedeemCodePost200Response.md @@ -0,0 +1,32 @@ +# SapiV1GiftcardRedeemCodePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**message** | **str** | | +**data** | [**SapiV1GiftcardRedeemCodePost200ResponseData**](SapiV1GiftcardRedeemCodePost200ResponseData.md) | | +**success** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_giftcard_redeem_code_post200_response import SapiV1GiftcardRedeemCodePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1GiftcardRedeemCodePost200Response from a JSON string +sapi_v1_giftcard_redeem_code_post200_response_instance = SapiV1GiftcardRedeemCodePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1GiftcardRedeemCodePost200Response.to_json()) + +# convert the object into a dict +sapi_v1_giftcard_redeem_code_post200_response_dict = sapi_v1_giftcard_redeem_code_post200_response_instance.to_dict() +# create an instance of SapiV1GiftcardRedeemCodePost200Response from a dict +sapi_v1_giftcard_redeem_code_post200_response_from_dict = SapiV1GiftcardRedeemCodePost200Response.from_dict(sapi_v1_giftcard_redeem_code_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1GiftcardRedeemCodePost200ResponseData.md b/target/python/binance_openapi/docs/SapiV1GiftcardRedeemCodePost200ResponseData.md new file mode 100644 index 0000000..ad1b328 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1GiftcardRedeemCodePost200ResponseData.md @@ -0,0 +1,32 @@ +# SapiV1GiftcardRedeemCodePost200ResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | | +**amount** | **str** | | +**reference_no** | **str** | | +**identity_no** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_giftcard_redeem_code_post200_response_data import SapiV1GiftcardRedeemCodePost200ResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1GiftcardRedeemCodePost200ResponseData from a JSON string +sapi_v1_giftcard_redeem_code_post200_response_data_instance = SapiV1GiftcardRedeemCodePost200ResponseData.from_json(json) +# print the JSON string representation of the object +print(SapiV1GiftcardRedeemCodePost200ResponseData.to_json()) + +# convert the object into a dict +sapi_v1_giftcard_redeem_code_post200_response_data_dict = sapi_v1_giftcard_redeem_code_post200_response_data_instance.to_dict() +# create an instance of SapiV1GiftcardRedeemCodePost200ResponseData from a dict +sapi_v1_giftcard_redeem_code_post200_response_data_from_dict = SapiV1GiftcardRedeemCodePost200ResponseData.from_dict(sapi_v1_giftcard_redeem_code_post200_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1GiftcardVerifyGet200Response.md b/target/python/binance_openapi/docs/SapiV1GiftcardVerifyGet200Response.md new file mode 100644 index 0000000..c48e9ae --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1GiftcardVerifyGet200Response.md @@ -0,0 +1,32 @@ +# SapiV1GiftcardVerifyGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**message** | **str** | | +**data** | [**SapiV1GiftcardVerifyGet200ResponseData**](SapiV1GiftcardVerifyGet200ResponseData.md) | | +**success** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_giftcard_verify_get200_response import SapiV1GiftcardVerifyGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1GiftcardVerifyGet200Response from a JSON string +sapi_v1_giftcard_verify_get200_response_instance = SapiV1GiftcardVerifyGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1GiftcardVerifyGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_giftcard_verify_get200_response_dict = sapi_v1_giftcard_verify_get200_response_instance.to_dict() +# create an instance of SapiV1GiftcardVerifyGet200Response from a dict +sapi_v1_giftcard_verify_get200_response_from_dict = SapiV1GiftcardVerifyGet200Response.from_dict(sapi_v1_giftcard_verify_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1GiftcardVerifyGet200ResponseData.md b/target/python/binance_openapi/docs/SapiV1GiftcardVerifyGet200ResponseData.md new file mode 100644 index 0000000..2fbb8a1 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1GiftcardVerifyGet200ResponseData.md @@ -0,0 +1,31 @@ +# SapiV1GiftcardVerifyGet200ResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**valid** | **bool** | | +**token** | **str** | | +**amount** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_giftcard_verify_get200_response_data import SapiV1GiftcardVerifyGet200ResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1GiftcardVerifyGet200ResponseData from a JSON string +sapi_v1_giftcard_verify_get200_response_data_instance = SapiV1GiftcardVerifyGet200ResponseData.from_json(json) +# print the JSON string representation of the object +print(SapiV1GiftcardVerifyGet200ResponseData.to_json()) + +# convert the object into a dict +sapi_v1_giftcard_verify_get200_response_data_dict = sapi_v1_giftcard_verify_get200_response_data_instance.to_dict() +# create an instance of SapiV1GiftcardVerifyGet200ResponseData from a dict +sapi_v1_giftcard_verify_get200_response_data_from_dict = SapiV1GiftcardVerifyGet200ResponseData.from_dict(sapi_v1_giftcard_verify_get200_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestAllAssetGet200Response.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestAllAssetGet200Response.md new file mode 100644 index 0000000..adf8d6f --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestAllAssetGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LendingAutoInvestAllAssetGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**target_assets** | **List[str]** | | +**source_assets** | **List[str]** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_all_asset_get200_response import SapiV1LendingAutoInvestAllAssetGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestAllAssetGet200Response from a JSON string +sapi_v1_lending_auto_invest_all_asset_get200_response_instance = SapiV1LendingAutoInvestAllAssetGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestAllAssetGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_all_asset_get200_response_dict = sapi_v1_lending_auto_invest_all_asset_get200_response_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestAllAssetGet200Response from a dict +sapi_v1_lending_auto_invest_all_asset_get200_response_from_dict = SapiV1LendingAutoInvestAllAssetGet200Response.from_dict(sapi_v1_lending_auto_invest_all_asset_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestHistoryListGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestHistoryListGet200ResponseInner.md new file mode 100644 index 0000000..4563a5c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestHistoryListGet200ResponseInner.md @@ -0,0 +1,46 @@ +# SapiV1LendingAutoInvestHistoryListGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**target_asset** | **str** | | +**plan_type** | **str** | | +**plan_name** | **str** | | +**plan_id** | **int** | | +**transaction_date_time** | **int** | | +**transaction_status** | **str** | | +**failed_type** | **str** | | +**source_asset** | **str** | | +**source_asset_amount** | **str** | | +**target_asset_amount** | **str** | | +**source_wallet** | **str** | | +**flexible_used** | **str** | | +**transaction_fee** | **str** | | +**transaction_fee_unit** | **str** | | +**execution_price** | **str** | | +**execution_type** | **str** | | +**subscription_cycle** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_history_list_get200_response_inner import SapiV1LendingAutoInvestHistoryListGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestHistoryListGet200ResponseInner from a JSON string +sapi_v1_lending_auto_invest_history_list_get200_response_inner_instance = SapiV1LendingAutoInvestHistoryListGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestHistoryListGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_history_list_get200_response_inner_dict = sapi_v1_lending_auto_invest_history_list_get200_response_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestHistoryListGet200ResponseInner from a dict +sapi_v1_lending_auto_invest_history_list_get200_response_inner_from_dict = SapiV1LendingAutoInvestHistoryListGet200ResponseInner.from_dict(sapi_v1_lending_auto_invest_history_list_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexInfoGet200Response.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexInfoGet200Response.md new file mode 100644 index 0000000..83cd260 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexInfoGet200Response.md @@ -0,0 +1,32 @@ +# SapiV1LendingAutoInvestIndexInfoGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index_id** | **int** | | +**index_name** | **str** | | +**status** | **str** | | +**asset_allocation** | [**List[SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner]**](SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_index_info_get200_response import SapiV1LendingAutoInvestIndexInfoGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestIndexInfoGet200Response from a JSON string +sapi_v1_lending_auto_invest_index_info_get200_response_instance = SapiV1LendingAutoInvestIndexInfoGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestIndexInfoGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_index_info_get200_response_dict = sapi_v1_lending_auto_invest_index_info_get200_response_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestIndexInfoGet200Response from a dict +sapi_v1_lending_auto_invest_index_info_get200_response_from_dict = SapiV1LendingAutoInvestIndexInfoGet200Response.from_dict(sapi_v1_lending_auto_invest_index_info_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner.md new file mode 100644 index 0000000..b2877d2 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner.md @@ -0,0 +1,30 @@ +# SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**target_asset** | **str** | | +**allocation** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner import SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner from a JSON string +sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner_instance = SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner_dict = sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner from a dict +sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner_from_dict = SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner.from_dict(sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexUserSummaryGet200Response.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexUserSummaryGet200Response.md new file mode 100644 index 0000000..d7f599c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexUserSummaryGet200Response.md @@ -0,0 +1,35 @@ +# SapiV1LendingAutoInvestIndexUserSummaryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index_id** | **int** | | +**total_invested_in_usd** | **str** | | +**current_invested_in_usd** | **str** | current invest | +**pnl_in_usd** | **str** | PNL of the plan in USD based on current amount | +**roi** | **str** | ROI of the plan based on current amount | +**asset_allocation** | [**List[SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner]**](SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner.md) | | +**details** | [**List[SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner]**](SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response import SapiV1LendingAutoInvestIndexUserSummaryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestIndexUserSummaryGet200Response from a JSON string +sapi_v1_lending_auto_invest_index_user_summary_get200_response_instance = SapiV1LendingAutoInvestIndexUserSummaryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestIndexUserSummaryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_index_user_summary_get200_response_dict = sapi_v1_lending_auto_invest_index_user_summary_get200_response_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestIndexUserSummaryGet200Response from a dict +sapi_v1_lending_auto_invest_index_user_summary_get200_response_from_dict = SapiV1LendingAutoInvestIndexUserSummaryGet200Response.from_dict(sapi_v1_lending_auto_invest_index_user_summary_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner.md new file mode 100644 index 0000000..b414cc1 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner.md @@ -0,0 +1,30 @@ +# SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**target_asset** | **str** | for pie chart | +**allocation** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner import SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner from a JSON string +sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner_instance = SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner_dict = sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner from a dict +sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner_from_dict = SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner.from_dict(sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner.md new file mode 100644 index 0000000..85f5b21 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner.md @@ -0,0 +1,39 @@ +# SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**target_asset** | **str** | | +**average_price_in_usd** | **str** | average price of the asset in USD | +**total_invested_in_usd** | **str** | total source asset invested for this target asset in equivilent of USD | +**current_invested_in_usd** | **str** | current invest | +**purchased_amount** | **str** | purchased amount of target asset | +**pnl_in_usd** | **str** | PNL denominated in USD | +**roi** | **str** | ROI calculated in decimal | +**percentage** | **str** | asset allocation in the plan. If it's single plan, then it's 100 | +**available_amount** | **str** | | +**redeemed_amount** | **str** | | +**asset_value_in_usd** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner import SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner from a JSON string +sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner_instance = SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner_dict = sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner from a dict +sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner_from_dict = SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner.from_dict(sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestOneOffPost200Response.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestOneOffPost200Response.md new file mode 100644 index 0000000..e99da69 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestOneOffPost200Response.md @@ -0,0 +1,30 @@ +# SapiV1LendingAutoInvestOneOffPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_id** | **int** | | +**wait_second** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_post200_response import SapiV1LendingAutoInvestOneOffPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestOneOffPost200Response from a JSON string +sapi_v1_lending_auto_invest_one_off_post200_response_instance = SapiV1LendingAutoInvestOneOffPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestOneOffPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_one_off_post200_response_dict = sapi_v1_lending_auto_invest_one_off_post200_response_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestOneOffPost200Response from a dict +sapi_v1_lending_auto_invest_one_off_post200_response_from_dict = SapiV1LendingAutoInvestOneOffPost200Response.from_dict(sapi_v1_lending_auto_invest_one_off_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestOneOffPostDetailsParameterInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestOneOffPostDetailsParameterInner.md new file mode 100644 index 0000000..acc0bda --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestOneOffPostDetailsParameterInner.md @@ -0,0 +1,30 @@ +# SapiV1LendingAutoInvestOneOffPostDetailsParameterInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**target_asset** | **str** | | [optional] +**percentage** | **int** | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner import SapiV1LendingAutoInvestOneOffPostDetailsParameterInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestOneOffPostDetailsParameterInner from a JSON string +sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner_instance = SapiV1LendingAutoInvestOneOffPostDetailsParameterInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestOneOffPostDetailsParameterInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner_dict = sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestOneOffPostDetailsParameterInner from a dict +sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner_from_dict = SapiV1LendingAutoInvestOneOffPostDetailsParameterInner.from_dict(sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestOneOffStatusGet200Response.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestOneOffStatusGet200Response.md new file mode 100644 index 0000000..c5e886d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestOneOffStatusGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LendingAutoInvestOneOffStatusGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_id** | **int** | | +**status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_status_get200_response import SapiV1LendingAutoInvestOneOffStatusGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestOneOffStatusGet200Response from a JSON string +sapi_v1_lending_auto_invest_one_off_status_get200_response_instance = SapiV1LendingAutoInvestOneOffStatusGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestOneOffStatusGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_one_off_status_get200_response_dict = sapi_v1_lending_auto_invest_one_off_status_get200_response_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestOneOffStatusGet200Response from a dict +sapi_v1_lending_auto_invest_one_off_status_get200_response_from_dict = SapiV1LendingAutoInvestOneOffStatusGet200Response.from_dict(sapi_v1_lending_auto_invest_one_off_status_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanAddPost200Response.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanAddPost200Response.md new file mode 100644 index 0000000..0613a7f --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanAddPost200Response.md @@ -0,0 +1,30 @@ +# SapiV1LendingAutoInvestPlanAddPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **int** | | +**next_execution_date_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_plan_add_post200_response import SapiV1LendingAutoInvestPlanAddPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestPlanAddPost200Response from a JSON string +sapi_v1_lending_auto_invest_plan_add_post200_response_instance = SapiV1LendingAutoInvestPlanAddPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestPlanAddPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_plan_add_post200_response_dict = sapi_v1_lending_auto_invest_plan_add_post200_response_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestPlanAddPost200Response from a dict +sapi_v1_lending_auto_invest_plan_add_post200_response_from_dict = SapiV1LendingAutoInvestPlanAddPost200Response.from_dict(sapi_v1_lending_auto_invest_plan_add_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner.md new file mode 100644 index 0000000..3557d12 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner.md @@ -0,0 +1,30 @@ +# SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**target_asset** | **str** | | [optional] +**percentage** | **int** | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner import SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner from a JSON string +sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner_instance = SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner_dict = sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner from a dict +sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner_from_dict = SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner.from_dict(sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanEditStatusPost200Response.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanEditStatusPost200Response.md new file mode 100644 index 0000000..83ff8c0 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanEditStatusPost200Response.md @@ -0,0 +1,31 @@ +# SapiV1LendingAutoInvestPlanEditStatusPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **int** | | +**next_execution_date_time** | **int** | | +**status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_plan_edit_status_post200_response import SapiV1LendingAutoInvestPlanEditStatusPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestPlanEditStatusPost200Response from a JSON string +sapi_v1_lending_auto_invest_plan_edit_status_post200_response_instance = SapiV1LendingAutoInvestPlanEditStatusPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestPlanEditStatusPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_plan_edit_status_post200_response_dict = sapi_v1_lending_auto_invest_plan_edit_status_post200_response_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestPlanEditStatusPost200Response from a dict +sapi_v1_lending_auto_invest_plan_edit_status_post200_response_from_dict = SapiV1LendingAutoInvestPlanEditStatusPost200Response.from_dict(sapi_v1_lending_auto_invest_plan_edit_status_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanIdGet200Response.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanIdGet200Response.md new file mode 100644 index 0000000..831f0dd --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanIdGet200Response.md @@ -0,0 +1,33 @@ +# SapiV1LendingAutoInvestPlanIdGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_value_in_usd** | **str** | | [optional] +**plan_value_in_btc** | **str** | | [optional] +**pnl_in_usd** | **str** | | [optional] +**roi** | **str** | | [optional] +**plan** | [**List[SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner]**](SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response import SapiV1LendingAutoInvestPlanIdGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestPlanIdGet200Response from a JSON string +sapi_v1_lending_auto_invest_plan_id_get200_response_instance = SapiV1LendingAutoInvestPlanIdGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestPlanIdGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_plan_id_get200_response_dict = sapi_v1_lending_auto_invest_plan_id_get200_response_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestPlanIdGet200Response from a dict +sapi_v1_lending_auto_invest_plan_id_get200_response_from_dict = SapiV1LendingAutoInvestPlanIdGet200Response.from_dict(sapi_v1_lending_auto_invest_plan_id_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner.md new file mode 100644 index 0000000..197c31f --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner.md @@ -0,0 +1,43 @@ +# SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **int** | | +**plan_type** | **str** | | +**edit_allowed** | **str** | | +**flexible_allowed_to_use** | **str** | | +**creation_date_time** | **int** | | +**first_execution_date_time** | **int** | | +**next_execution_date_time** | **int** | | +**status** | **str** | | +**target_asset** | **str** | | +**source_asset** | **str** | | +**total_invested_in_usd** | **str** | | +**plan_value_in_usd** | **str** | | +**pnl_in_usd** | **str** | | +**roi** | **str** | | +**details** | [**List[SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner]**](SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner import SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner from a JSON string +sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_instance = SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_dict = sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner from a dict +sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_from_dict = SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner.from_dict(sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner.md new file mode 100644 index 0000000..375f7c6 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner.md @@ -0,0 +1,42 @@ +# SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**target_asset** | **str** | | +**average_price_in_usd** | **str** | | +**total_invested_in_usd** | **str** | | +**purchased_amount** | **str** | | +**purchased_amount_unit** | **str** | | +**pnl_in_usd** | **str** | | +**roi** | **str** | | +**percentage** | **str** | | +**asset_status** | **str** | | +**available_amount** | **str** | | +**available_amount_unit** | **str** | | +**redeemed_amout** | **str** | | +**redeemed_amout_unit** | **str** | | +**asset_value_in_usd** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner import SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner from a JSON string +sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner_instance = SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner_dict = sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner from a dict +sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner_from_dict = SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner.from_dict(sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanListGet200Response.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanListGet200Response.md new file mode 100644 index 0000000..75e0893 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanListGet200Response.md @@ -0,0 +1,33 @@ +# SapiV1LendingAutoInvestPlanListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_value_in_usd** | **str** | | +**plan_value_in_btc** | **str** | | +**pnl_in_usd** | **str** | | +**roi** | **str** | | +**plan** | [**List[SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner]**](SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_plan_list_get200_response import SapiV1LendingAutoInvestPlanListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestPlanListGet200Response from a JSON string +sapi_v1_lending_auto_invest_plan_list_get200_response_instance = SapiV1LendingAutoInvestPlanListGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestPlanListGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_plan_list_get200_response_dict = sapi_v1_lending_auto_invest_plan_list_get200_response_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestPlanListGet200Response from a dict +sapi_v1_lending_auto_invest_plan_list_get200_response_from_dict = SapiV1LendingAutoInvestPlanListGet200Response.from_dict(sapi_v1_lending_auto_invest_plan_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner.md new file mode 100644 index 0000000..2d6d57d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner.md @@ -0,0 +1,50 @@ +# SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **int** | | +**plan_type** | **str** | | +**edit_allowed** | **str** | | +**creation_date_time** | **int** | | +**first_execution_date_time** | **int** | | +**next_execution_date_time** | **int** | | +**status** | **str** | | +**last_updated_date_time** | **int** | | +**target_asset** | **str** | | +**total_target_amount** | **str** | | +**source_asset** | **str** | | +**total_invested_in_usd** | **str** | | +**subscription_amount** | **str** | | +**subscription_cycle** | **str** | | +**subscription_start_day** | **str** | | +**subscription_start_weekday** | **str** | | +**subscription_start_time** | **str** | | +**source_wallet** | **str** | | +**flexible_allowed_to_use** | **str** | | +**plan_value_in_usd** | **str** | | +**pnl_in_usd** | **str** | | +**roi** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner import SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner from a JSON string +sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner_instance = SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner_dict = sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner from a dict +sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner_from_dict = SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner.from_dict(sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner.md new file mode 100644 index 0000000..ec88415 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner.md @@ -0,0 +1,35 @@ +# SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index_id** | **int** | | +**index_name** | **str** | | +**rebalance_id** | **int** | | +**status** | **str** | | +**rebalance_fee** | **str** | | +**rebalance_fee_unit** | **str** | | +**transaction_details** | [**List[SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner]**](SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner import SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner from a JSON string +sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_instance = SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_dict = sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner from a dict +sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_from_dict = SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner.from_dict(sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner.md new file mode 100644 index 0000000..551a3b7 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner.md @@ -0,0 +1,32 @@ +# SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**transaction_date_time** | **int** | | +**rebalance_direction** | **str** | | +**rebalance_amount** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner import SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner from a JSON string +sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner_instance = SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner_dict = sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner from a dict +sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner_from_dict = SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner.from_dict(sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner.md new file mode 100644 index 0000000..645ea37 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner.md @@ -0,0 +1,37 @@ +# SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index_id** | **int** | | +**index_name** | **str** | | +**redemption_id** | **int** | | +**status** | **str** | | +**asset** | **str** | | +**amount** | **str** | | +**redemption_date_time** | **int** | | +**transaction_fee** | **str** | | +**transaction_fee_unit** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_redeem_history_get200_response_inner import SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner from a JSON string +sapi_v1_lending_auto_invest_redeem_history_get200_response_inner_instance = SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_redeem_history_get200_response_inner_dict = sapi_v1_lending_auto_invest_redeem_history_get200_response_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner from a dict +sapi_v1_lending_auto_invest_redeem_history_get200_response_inner_from_dict = SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner.from_dict(sapi_v1_lending_auto_invest_redeem_history_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestRedeemPost200Response.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestRedeemPost200Response.md new file mode 100644 index 0000000..47eda67 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestRedeemPost200Response.md @@ -0,0 +1,29 @@ +# SapiV1LendingAutoInvestRedeemPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**redemption_id** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_redeem_post200_response import SapiV1LendingAutoInvestRedeemPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestRedeemPost200Response from a JSON string +sapi_v1_lending_auto_invest_redeem_post200_response_instance = SapiV1LendingAutoInvestRedeemPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestRedeemPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_redeem_post200_response_dict = sapi_v1_lending_auto_invest_redeem_post200_response_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestRedeemPost200Response from a dict +sapi_v1_lending_auto_invest_redeem_post200_response_from_dict = SapiV1LendingAutoInvestRedeemPost200Response.from_dict(sapi_v1_lending_auto_invest_redeem_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestSourceAssetListGet200Response.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestSourceAssetListGet200Response.md new file mode 100644 index 0000000..648a9c8 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestSourceAssetListGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LendingAutoInvestSourceAssetListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fee_rate** | **str** | | +**source_assets** | [**List[SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner]**](SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_source_asset_list_get200_response import SapiV1LendingAutoInvestSourceAssetListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestSourceAssetListGet200Response from a JSON string +sapi_v1_lending_auto_invest_source_asset_list_get200_response_instance = SapiV1LendingAutoInvestSourceAssetListGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestSourceAssetListGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_source_asset_list_get200_response_dict = sapi_v1_lending_auto_invest_source_asset_list_get200_response_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestSourceAssetListGet200Response from a dict +sapi_v1_lending_auto_invest_source_asset_list_get200_response_from_dict = SapiV1LendingAutoInvestSourceAssetListGet200Response.from_dict(sapi_v1_lending_auto_invest_source_asset_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner.md new file mode 100644 index 0000000..22b84d1 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner.md @@ -0,0 +1,33 @@ +# SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source_asset** | **str** | | +**asset_min_amount** | **str** | | +**asset_max_amount** | **str** | | +**scale** | **str** | | +**flexible_amount** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner import SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner from a JSON string +sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner_instance = SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner_dict = sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner from a dict +sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner_from_dict = SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner.from_dict(sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetListGet200Response.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetListGet200Response.md new file mode 100644 index 0000000..8fc0d4d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetListGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LendingAutoInvestTargetAssetListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**target_assets** | **str** | | [optional] +**auto_invest_asset_list** | [**List[SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner]**](SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response import SapiV1LendingAutoInvestTargetAssetListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestTargetAssetListGet200Response from a JSON string +sapi_v1_lending_auto_invest_target_asset_list_get200_response_instance = SapiV1LendingAutoInvestTargetAssetListGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestTargetAssetListGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_target_asset_list_get200_response_dict = sapi_v1_lending_auto_invest_target_asset_list_get200_response_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestTargetAssetListGet200Response from a dict +sapi_v1_lending_auto_invest_target_asset_list_get200_response_from_dict = SapiV1LendingAutoInvestTargetAssetListGet200Response.from_dict(sapi_v1_lending_auto_invest_target_asset_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner.md new file mode 100644 index 0000000..9d1bfd6 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner.md @@ -0,0 +1,30 @@ +# SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**target_asset** | **str** | | +**roi_and_dimension_type_list** | [**List[SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner]**](SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner import SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner from a JSON string +sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_instance = SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_dict = sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner from a dict +sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_from_dict = SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner.from_dict(sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner.md new file mode 100644 index 0000000..d0cf02c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner.md @@ -0,0 +1,31 @@ +# SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**simulate_roi** | **str** | | +**dimension_value** | **str** | | +**dimension_unit** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner import SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner from a JSON string +sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner_instance = SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner_dict = sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner from a dict +sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner_from_dict = SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner.from_dict(sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner.md new file mode 100644 index 0000000..234f351 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner.md @@ -0,0 +1,30 @@ +# SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_date** | **str** | | +**simulate_roi** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner import SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner from a JSON string +sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner_instance = SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner_dict = sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner_instance.to_dict() +# create an instance of SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner from a dict +sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner_from_dict = SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner.from_dict(sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingCustomizedFixedPurchasePost200Response.md b/target/python/binance_openapi/docs/SapiV1LendingCustomizedFixedPurchasePost200Response.md new file mode 100644 index 0000000..0562850 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingCustomizedFixedPurchasePost200Response.md @@ -0,0 +1,29 @@ +# SapiV1LendingCustomizedFixedPurchasePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purchase_id** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_customized_fixed_purchase_post200_response import SapiV1LendingCustomizedFixedPurchasePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingCustomizedFixedPurchasePost200Response from a JSON string +sapi_v1_lending_customized_fixed_purchase_post200_response_instance = SapiV1LendingCustomizedFixedPurchasePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingCustomizedFixedPurchasePost200Response.to_json()) + +# convert the object into a dict +sapi_v1_lending_customized_fixed_purchase_post200_response_dict = sapi_v1_lending_customized_fixed_purchase_post200_response_instance.to_dict() +# create an instance of SapiV1LendingCustomizedFixedPurchasePost200Response from a dict +sapi_v1_lending_customized_fixed_purchase_post200_response_from_dict = SapiV1LendingCustomizedFixedPurchasePost200Response.from_dict(sapi_v1_lending_customized_fixed_purchase_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingPositionChangedPost200Response.md b/target/python/binance_openapi/docs/SapiV1LendingPositionChangedPost200Response.md new file mode 100644 index 0000000..da5c7b1 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingPositionChangedPost200Response.md @@ -0,0 +1,31 @@ +# SapiV1LendingPositionChangedPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**daily_purchase_id** | **int** | | +**success** | **bool** | | +**time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_position_changed_post200_response import SapiV1LendingPositionChangedPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingPositionChangedPost200Response from a JSON string +sapi_v1_lending_position_changed_post200_response_instance = SapiV1LendingPositionChangedPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingPositionChangedPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_lending_position_changed_post200_response_dict = sapi_v1_lending_position_changed_post200_response_instance.to_dict() +# create an instance of SapiV1LendingPositionChangedPost200Response from a dict +sapi_v1_lending_position_changed_post200_response_from_dict = SapiV1LendingPositionChangedPost200Response.from_dict(sapi_v1_lending_position_changed_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingProjectListGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1LendingProjectListGet200ResponseInner.md new file mode 100644 index 0000000..0235ab4 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingProjectListGet200ResponseInner.md @@ -0,0 +1,44 @@ +# SapiV1LendingProjectListGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**display_priority** | **int** | | +**duration** | **int** | | +**interest_per_lot** | **str** | | +**interest_rate** | **str** | | +**lot_size** | **str** | | +**lots_low_limit** | **int** | | +**lots_purchased** | **int** | | +**lots_up_limit** | **int** | | +**max_lots_per_user** | **int** | | +**need_kyc** | **bool** | | +**project_id** | **str** | | +**project_name** | **str** | | +**status** | **str** | | +**type** | **str** | | +**with_area_limitation** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_project_list_get200_response_inner import SapiV1LendingProjectListGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingProjectListGet200ResponseInner from a JSON string +sapi_v1_lending_project_list_get200_response_inner_instance = SapiV1LendingProjectListGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingProjectListGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_project_list_get200_response_inner_dict = sapi_v1_lending_project_list_get200_response_inner_instance.to_dict() +# create an instance of SapiV1LendingProjectListGet200ResponseInner from a dict +sapi_v1_lending_project_list_get200_response_inner_from_dict = SapiV1LendingProjectListGet200ResponseInner.from_dict(sapi_v1_lending_project_list_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LendingProjectPositionListGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1LendingProjectPositionListGet200ResponseInner.md new file mode 100644 index 0000000..d37285c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LendingProjectPositionListGet200ResponseInner.md @@ -0,0 +1,45 @@ +# SapiV1LendingProjectPositionListGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**can_transfer** | **bool** | | +**create_timestamp** | **int** | | +**duration** | **int** | | +**end_time** | **int** | | +**interest** | **str** | | +**interest_rate** | **str** | | +**lot** | **int** | | +**position_id** | **int** | | +**principal** | **str** | | +**project_id** | **str** | | +**project_name** | **str** | | +**purchase_time** | **int** | | +**redeem_date** | **date** | | +**start_time** | **int** | | +**status** | **str** | | +**type** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_lending_project_position_list_get200_response_inner import SapiV1LendingProjectPositionListGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LendingProjectPositionListGet200ResponseInner from a JSON string +sapi_v1_lending_project_position_list_get200_response_inner_instance = SapiV1LendingProjectPositionListGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LendingProjectPositionListGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_lending_project_position_list_get200_response_inner_dict = sapi_v1_lending_project_position_list_get200_response_inner_instance.to_dict() +# create an instance of SapiV1LendingProjectPositionListGet200ResponseInner from a dict +sapi_v1_lending_project_position_list_get200_response_inner_from_dict = SapiV1LendingProjectPositionListGet200ResponseInner.from_dict(sapi_v1_lending_project_position_list_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanAdjustLtvPost200Response.md b/target/python/binance_openapi/docs/SapiV1LoanAdjustLtvPost200Response.md new file mode 100644 index 0000000..158eb95 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanAdjustLtvPost200Response.md @@ -0,0 +1,33 @@ +# SapiV1LoanAdjustLtvPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**collateral_coin** | **str** | | +**direction** | **str** | | +**amount** | **str** | | +**current_ltv** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_adjust_ltv_post200_response import SapiV1LoanAdjustLtvPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanAdjustLtvPost200Response from a JSON string +sapi_v1_loan_adjust_ltv_post200_response_instance = SapiV1LoanAdjustLtvPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanAdjustLtvPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_adjust_ltv_post200_response_dict = sapi_v1_loan_adjust_ltv_post200_response_instance.to_dict() +# create an instance of SapiV1LoanAdjustLtvPost200Response from a dict +sapi_v1_loan_adjust_ltv_post200_response_from_dict = SapiV1LoanAdjustLtvPost200Response.from_dict(sapi_v1_loan_adjust_ltv_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanBorrowHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1LoanBorrowHistoryGet200Response.md new file mode 100644 index 0000000..c2fc7b0 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanBorrowHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LoanBorrowHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1LoanBorrowHistoryGet200ResponseRowsInner]**](SapiV1LoanBorrowHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_borrow_history_get200_response import SapiV1LoanBorrowHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanBorrowHistoryGet200Response from a JSON string +sapi_v1_loan_borrow_history_get200_response_instance = SapiV1LoanBorrowHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanBorrowHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_borrow_history_get200_response_dict = sapi_v1_loan_borrow_history_get200_response_instance.to_dict() +# create an instance of SapiV1LoanBorrowHistoryGet200Response from a dict +sapi_v1_loan_borrow_history_get200_response_from_dict = SapiV1LoanBorrowHistoryGet200Response.from_dict(sapi_v1_loan_borrow_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanBorrowHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1LoanBorrowHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..c3dd047 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanBorrowHistoryGet200ResponseRowsInner.md @@ -0,0 +1,37 @@ +# SapiV1LoanBorrowHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | | +**loan_coin** | **str** | | +**initial_loan_amount** | **str** | | +**hourly_interest_rate** | **str** | | +**loan_term** | **str** | | +**collateral_coin** | **str** | | +**initial_collateral_amount** | **str** | | +**borrow_time** | **int** | | +**status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_borrow_history_get200_response_rows_inner import SapiV1LoanBorrowHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanBorrowHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_loan_borrow_history_get200_response_rows_inner_instance = SapiV1LoanBorrowHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanBorrowHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_borrow_history_get200_response_rows_inner_dict = sapi_v1_loan_borrow_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1LoanBorrowHistoryGet200ResponseRowsInner from a dict +sapi_v1_loan_borrow_history_get200_response_rows_inner_from_dict = SapiV1LoanBorrowHistoryGet200ResponseRowsInner.from_dict(sapi_v1_loan_borrow_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanBorrowPost200Response.md b/target/python/binance_openapi/docs/SapiV1LoanBorrowPost200Response.md new file mode 100644 index 0000000..d798edb --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanBorrowPost200Response.md @@ -0,0 +1,34 @@ +# SapiV1LoanBorrowPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**loan_amount** | **str** | | +**collateral_coin** | **str** | | +**collateral_amount** | **str** | | +**hourly_interest_rate** | **str** | | +**order_id** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_borrow_post200_response import SapiV1LoanBorrowPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanBorrowPost200Response from a JSON string +sapi_v1_loan_borrow_post200_response_instance = SapiV1LoanBorrowPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanBorrowPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_borrow_post200_response_dict = sapi_v1_loan_borrow_post200_response_instance.to_dict() +# create an instance of SapiV1LoanBorrowPost200Response from a dict +sapi_v1_loan_borrow_post200_response_from_dict = SapiV1LoanBorrowPost200Response.from_dict(sapi_v1_loan_borrow_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanCollateralDataGet200Response.md b/target/python/binance_openapi/docs/SapiV1LoanCollateralDataGet200Response.md new file mode 100644 index 0000000..a930db1 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanCollateralDataGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LoanCollateralDataGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1LoanCollateralDataGet200ResponseRowsInner]**](SapiV1LoanCollateralDataGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_collateral_data_get200_response import SapiV1LoanCollateralDataGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanCollateralDataGet200Response from a JSON string +sapi_v1_loan_collateral_data_get200_response_instance = SapiV1LoanCollateralDataGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanCollateralDataGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_collateral_data_get200_response_dict = sapi_v1_loan_collateral_data_get200_response_instance.to_dict() +# create an instance of SapiV1LoanCollateralDataGet200Response from a dict +sapi_v1_loan_collateral_data_get200_response_from_dict = SapiV1LoanCollateralDataGet200Response.from_dict(sapi_v1_loan_collateral_data_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanCollateralDataGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1LoanCollateralDataGet200ResponseRowsInner.md new file mode 100644 index 0000000..129126c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanCollateralDataGet200ResponseRowsInner.md @@ -0,0 +1,34 @@ +# SapiV1LoanCollateralDataGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collateral_coin** | **str** | | +**initial_ltv** | **str** | | +**margin_call_ltv** | **str** | | +**liquidation_ltv** | **str** | | +**max_limit** | **str** | | +**vip_level** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_collateral_data_get200_response_rows_inner import SapiV1LoanCollateralDataGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanCollateralDataGet200ResponseRowsInner from a JSON string +sapi_v1_loan_collateral_data_get200_response_rows_inner_instance = SapiV1LoanCollateralDataGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanCollateralDataGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_collateral_data_get200_response_rows_inner_dict = sapi_v1_loan_collateral_data_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1LoanCollateralDataGet200ResponseRowsInner from a dict +sapi_v1_loan_collateral_data_get200_response_rows_inner_from_dict = SapiV1LoanCollateralDataGet200ResponseRowsInner.from_dict(sapi_v1_loan_collateral_data_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanCustomizeMarginCallPost200Response.md b/target/python/binance_openapi/docs/SapiV1LoanCustomizeMarginCallPost200Response.md new file mode 100644 index 0000000..3c5045d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanCustomizeMarginCallPost200Response.md @@ -0,0 +1,30 @@ +# SapiV1LoanCustomizeMarginCallPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner]**](SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_customize_margin_call_post200_response import SapiV1LoanCustomizeMarginCallPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanCustomizeMarginCallPost200Response from a JSON string +sapi_v1_loan_customize_margin_call_post200_response_instance = SapiV1LoanCustomizeMarginCallPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanCustomizeMarginCallPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_customize_margin_call_post200_response_dict = sapi_v1_loan_customize_margin_call_post200_response_instance.to_dict() +# create an instance of SapiV1LoanCustomizeMarginCallPost200Response from a dict +sapi_v1_loan_customize_margin_call_post200_response_from_dict = SapiV1LoanCustomizeMarginCallPost200Response.from_dict(sapi_v1_loan_customize_margin_call_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner.md new file mode 100644 index 0000000..d5cad83 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner.md @@ -0,0 +1,33 @@ +# SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **str** | | +**collateral_coin** | **str** | | +**pre_margin_call** | **str** | | +**after_margin_call** | **str** | | +**customize_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_customize_margin_call_post200_response_rows_inner import SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner from a JSON string +sapi_v1_loan_customize_margin_call_post200_response_rows_inner_instance = SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_customize_margin_call_post200_response_rows_inner_dict = sapi_v1_loan_customize_margin_call_post200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner from a dict +sapi_v1_loan_customize_margin_call_post200_response_rows_inner_from_dict = SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner.from_dict(sapi_v1_loan_customize_margin_call_post200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanIncomeGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1LoanIncomeGet200ResponseInner.md new file mode 100644 index 0000000..e2fdaaa --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanIncomeGet200ResponseInner.md @@ -0,0 +1,33 @@ +# SapiV1LoanIncomeGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**type** | **str** | | +**amount** | **str** | | +**timestamp** | **int** | | +**tran_id** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_income_get200_response_inner import SapiV1LoanIncomeGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanIncomeGet200ResponseInner from a JSON string +sapi_v1_loan_income_get200_response_inner_instance = SapiV1LoanIncomeGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanIncomeGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_income_get200_response_inner_dict = sapi_v1_loan_income_get200_response_inner_instance.to_dict() +# create an instance of SapiV1LoanIncomeGet200ResponseInner from a dict +sapi_v1_loan_income_get200_response_inner_from_dict = SapiV1LoanIncomeGet200ResponseInner.from_dict(sapi_v1_loan_income_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanLoanableDataGet200Response.md b/target/python/binance_openapi/docs/SapiV1LoanLoanableDataGet200Response.md new file mode 100644 index 0000000..44234ea --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanLoanableDataGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LoanLoanableDataGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1LoanLoanableDataGet200ResponseRowsInner]**](SapiV1LoanLoanableDataGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_loanable_data_get200_response import SapiV1LoanLoanableDataGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanLoanableDataGet200Response from a JSON string +sapi_v1_loan_loanable_data_get200_response_instance = SapiV1LoanLoanableDataGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanLoanableDataGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_loanable_data_get200_response_dict = sapi_v1_loan_loanable_data_get200_response_instance.to_dict() +# create an instance of SapiV1LoanLoanableDataGet200Response from a dict +sapi_v1_loan_loanable_data_get200_response_from_dict = SapiV1LoanLoanableDataGet200Response.from_dict(sapi_v1_loan_loanable_data_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanLoanableDataGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1LoanLoanableDataGet200ResponseRowsInner.md new file mode 100644 index 0000000..f485357 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanLoanableDataGet200ResponseRowsInner.md @@ -0,0 +1,42 @@ +# SapiV1LoanLoanableDataGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**var_7d_hourly_interest_rate** | **str** | | +**var_7d_daily_interest_rate** | **str** | | +**var_14d_hourly_interest_rate** | **str** | | +**var_14d_daily_interest_rate** | **str** | | +**var_30d_hourly_interest_rate** | **str** | | +**var_30d_daily_interest_rate** | **str** | | +**var_90d_hourly_interest_rate** | **str** | | +**var_90d_daily_interest_rate** | **str** | | +**var_180d_hourly_interest_rate** | **str** | | +**var_180d_daily_interest_rate** | **str** | | +**min_limit** | **str** | | +**max_limit** | **str** | | +**vip_level** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_loanable_data_get200_response_rows_inner import SapiV1LoanLoanableDataGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanLoanableDataGet200ResponseRowsInner from a JSON string +sapi_v1_loan_loanable_data_get200_response_rows_inner_instance = SapiV1LoanLoanableDataGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanLoanableDataGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_loanable_data_get200_response_rows_inner_dict = sapi_v1_loan_loanable_data_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1LoanLoanableDataGet200ResponseRowsInner from a dict +sapi_v1_loan_loanable_data_get200_response_rows_inner_from_dict = SapiV1LoanLoanableDataGet200ResponseRowsInner.from_dict(sapi_v1_loan_loanable_data_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanLtvAdjustmentHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1LoanLtvAdjustmentHistoryGet200Response.md new file mode 100644 index 0000000..0e66ae2 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanLtvAdjustmentHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LoanLtvAdjustmentHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner]**](SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_ltv_adjustment_history_get200_response import SapiV1LoanLtvAdjustmentHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanLtvAdjustmentHistoryGet200Response from a JSON string +sapi_v1_loan_ltv_adjustment_history_get200_response_instance = SapiV1LoanLtvAdjustmentHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanLtvAdjustmentHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_ltv_adjustment_history_get200_response_dict = sapi_v1_loan_ltv_adjustment_history_get200_response_instance.to_dict() +# create an instance of SapiV1LoanLtvAdjustmentHistoryGet200Response from a dict +sapi_v1_loan_ltv_adjustment_history_get200_response_from_dict = SapiV1LoanLtvAdjustmentHistoryGet200Response.from_dict(sapi_v1_loan_ltv_adjustment_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..bf70e90 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner.md @@ -0,0 +1,36 @@ +# SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**collateral_coin** | **str** | | +**direction** | **str** | | +**amount** | **str** | | +**pre_ltv** | **str** | | +**after_ltv** | **str** | | +**adjust_time** | **int** | | +**order_id** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner import SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner_instance = SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner_dict = sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner from a dict +sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner_from_dict = SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner.from_dict(sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanOngoingOrdersGet200Response.md b/target/python/binance_openapi/docs/SapiV1LoanOngoingOrdersGet200Response.md new file mode 100644 index 0000000..9c3ab9f --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanOngoingOrdersGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LoanOngoingOrdersGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1LoanOngoingOrdersGet200ResponseRowsInner]**](SapiV1LoanOngoingOrdersGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_ongoing_orders_get200_response import SapiV1LoanOngoingOrdersGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanOngoingOrdersGet200Response from a JSON string +sapi_v1_loan_ongoing_orders_get200_response_instance = SapiV1LoanOngoingOrdersGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanOngoingOrdersGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_ongoing_orders_get200_response_dict = sapi_v1_loan_ongoing_orders_get200_response_instance.to_dict() +# create an instance of SapiV1LoanOngoingOrdersGet200Response from a dict +sapi_v1_loan_ongoing_orders_get200_response_from_dict = SapiV1LoanOngoingOrdersGet200Response.from_dict(sapi_v1_loan_ongoing_orders_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanOngoingOrdersGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1LoanOngoingOrdersGet200ResponseRowsInner.md new file mode 100644 index 0000000..bbfc3d5 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanOngoingOrdersGet200ResponseRowsInner.md @@ -0,0 +1,36 @@ +# SapiV1LoanOngoingOrdersGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | | +**loan_coin** | **str** | | +**total_debt** | **str** | | +**residual_interest** | **str** | | +**collateral_coin** | **str** | | +**collateral_amount** | **str** | | +**current_ltv** | **str** | | +**expiration_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_ongoing_orders_get200_response_rows_inner import SapiV1LoanOngoingOrdersGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanOngoingOrdersGet200ResponseRowsInner from a JSON string +sapi_v1_loan_ongoing_orders_get200_response_rows_inner_instance = SapiV1LoanOngoingOrdersGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanOngoingOrdersGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_ongoing_orders_get200_response_rows_inner_dict = sapi_v1_loan_ongoing_orders_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1LoanOngoingOrdersGet200ResponseRowsInner from a dict +sapi_v1_loan_ongoing_orders_get200_response_rows_inner_from_dict = SapiV1LoanOngoingOrdersGet200ResponseRowsInner.from_dict(sapi_v1_loan_ongoing_orders_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanRepayCollateralRateGet200Response.md b/target/python/binance_openapi/docs/SapiV1LoanRepayCollateralRateGet200Response.md new file mode 100644 index 0000000..1685a29 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanRepayCollateralRateGet200Response.md @@ -0,0 +1,32 @@ +# SapiV1LoanRepayCollateralRateGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**collateral_coin** | **str** | | +**repay_amount** | **str** | | +**rate** | **str** | rate of collateral coin/loan coin | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_repay_collateral_rate_get200_response import SapiV1LoanRepayCollateralRateGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanRepayCollateralRateGet200Response from a JSON string +sapi_v1_loan_repay_collateral_rate_get200_response_instance = SapiV1LoanRepayCollateralRateGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanRepayCollateralRateGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_repay_collateral_rate_get200_response_dict = sapi_v1_loan_repay_collateral_rate_get200_response_instance.to_dict() +# create an instance of SapiV1LoanRepayCollateralRateGet200Response from a dict +sapi_v1_loan_repay_collateral_rate_get200_response_from_dict = SapiV1LoanRepayCollateralRateGet200Response.from_dict(sapi_v1_loan_repay_collateral_rate_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanRepayHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1LoanRepayHistoryGet200Response.md new file mode 100644 index 0000000..1dd87da --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanRepayHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LoanRepayHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1LoanRepayHistoryGet200ResponseRowsInner]**](SapiV1LoanRepayHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_repay_history_get200_response import SapiV1LoanRepayHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanRepayHistoryGet200Response from a JSON string +sapi_v1_loan_repay_history_get200_response_instance = SapiV1LoanRepayHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanRepayHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_repay_history_get200_response_dict = sapi_v1_loan_repay_history_get200_response_instance.to_dict() +# create an instance of SapiV1LoanRepayHistoryGet200Response from a dict +sapi_v1_loan_repay_history_get200_response_from_dict = SapiV1LoanRepayHistoryGet200Response.from_dict(sapi_v1_loan_repay_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanRepayHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1LoanRepayHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..63884f5 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanRepayHistoryGet200ResponseRowsInner.md @@ -0,0 +1,37 @@ +# SapiV1LoanRepayHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**repay_amount** | **str** | | +**collateral_coin** | **str** | | +**collateral_used** | **str** | | +**collateral_return** | **str** | | +**repay_type** | **str** | | +**repay_status** | **str** | 'repayType': '1' // 1 for 'repay with borrowed coin', 2 for 'repay with collateral' 'repayStatus': 'Repaid' // Repaid, Repaying, Failed | +**repay_time** | **int** | | +**order_id** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_repay_history_get200_response_rows_inner import SapiV1LoanRepayHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanRepayHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_loan_repay_history_get200_response_rows_inner_instance = SapiV1LoanRepayHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanRepayHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_repay_history_get200_response_rows_inner_dict = sapi_v1_loan_repay_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1LoanRepayHistoryGet200ResponseRowsInner from a dict +sapi_v1_loan_repay_history_get200_response_rows_inner_from_dict = SapiV1LoanRepayHistoryGet200ResponseRowsInner.from_dict(sapi_v1_loan_repay_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanRepayPost200Response.md b/target/python/binance_openapi/docs/SapiV1LoanRepayPost200Response.md new file mode 100644 index 0000000..f057de8 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanRepayPost200Response.md @@ -0,0 +1,35 @@ +# SapiV1LoanRepayPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**remaining_principal** | **str** | | +**remaining_interest** | **str** | | +**collateral_coin** | **str** | | +**remaining_collateral** | **str** | | +**current_ltv** | **str** | | +**repay_status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_repay_post200_response import SapiV1LoanRepayPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanRepayPost200Response from a JSON string +sapi_v1_loan_repay_post200_response_instance = SapiV1LoanRepayPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanRepayPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_repay_post200_response_dict = sapi_v1_loan_repay_post200_response_instance.to_dict() +# create an instance of SapiV1LoanRepayPost200Response from a dict +sapi_v1_loan_repay_post200_response_from_dict = SapiV1LoanRepayPost200Response.from_dict(sapi_v1_loan_repay_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipBorrowPost200Response.md b/target/python/binance_openapi/docs/SapiV1LoanVipBorrowPost200Response.md new file mode 100644 index 0000000..41b5410 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipBorrowPost200Response.md @@ -0,0 +1,36 @@ +# SapiV1LoanVipBorrowPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_account_id** | **str** | | +**request_id** | **str** | | +**loan_coin** | **str** | | +**is_flexible_rate** | **str** | | +**loan_amount** | **str** | | +**collateral_account_id** | **str** | | +**collateral_coin** | **str** | | +**loan_term** | **str** | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_borrow_post200_response import SapiV1LoanVipBorrowPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipBorrowPost200Response from a JSON string +sapi_v1_loan_vip_borrow_post200_response_instance = SapiV1LoanVipBorrowPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipBorrowPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_borrow_post200_response_dict = sapi_v1_loan_vip_borrow_post200_response_instance.to_dict() +# create an instance of SapiV1LoanVipBorrowPost200Response from a dict +sapi_v1_loan_vip_borrow_post200_response_from_dict = SapiV1LoanVipBorrowPost200Response.from_dict(sapi_v1_loan_vip_borrow_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipCollateralAccountGet200Response.md b/target/python/binance_openapi/docs/SapiV1LoanVipCollateralAccountGet200Response.md new file mode 100644 index 0000000..5f3a1b2 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipCollateralAccountGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LoanVipCollateralAccountGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1LoanVipCollateralAccountGet200ResponseRowsInner]**](SapiV1LoanVipCollateralAccountGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_collateral_account_get200_response import SapiV1LoanVipCollateralAccountGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipCollateralAccountGet200Response from a JSON string +sapi_v1_loan_vip_collateral_account_get200_response_instance = SapiV1LoanVipCollateralAccountGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipCollateralAccountGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_collateral_account_get200_response_dict = sapi_v1_loan_vip_collateral_account_get200_response_instance.to_dict() +# create an instance of SapiV1LoanVipCollateralAccountGet200Response from a dict +sapi_v1_loan_vip_collateral_account_get200_response_from_dict = SapiV1LoanVipCollateralAccountGet200Response.from_dict(sapi_v1_loan_vip_collateral_account_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipCollateralAccountGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1LoanVipCollateralAccountGet200ResponseRowsInner.md new file mode 100644 index 0000000..0afe722 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipCollateralAccountGet200ResponseRowsInner.md @@ -0,0 +1,31 @@ +# SapiV1LoanVipCollateralAccountGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collateral_account_id** | **str** | | +**collateral_coin** | **str** | | +**collateral_value** | **str** | locked collateral value shown in USD value | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_collateral_account_get200_response_rows_inner import SapiV1LoanVipCollateralAccountGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipCollateralAccountGet200ResponseRowsInner from a JSON string +sapi_v1_loan_vip_collateral_account_get200_response_rows_inner_instance = SapiV1LoanVipCollateralAccountGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipCollateralAccountGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_collateral_account_get200_response_rows_inner_dict = sapi_v1_loan_vip_collateral_account_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1LoanVipCollateralAccountGet200ResponseRowsInner from a dict +sapi_v1_loan_vip_collateral_account_get200_response_rows_inner_from_dict = SapiV1LoanVipCollateralAccountGet200ResponseRowsInner.from_dict(sapi_v1_loan_vip_collateral_account_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipCollateralDataGet200Response.md b/target/python/binance_openapi/docs/SapiV1LoanVipCollateralDataGet200Response.md new file mode 100644 index 0000000..39fad86 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipCollateralDataGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LoanVipCollateralDataGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1LoanVipCollateralDataGet200ResponseRowsInner]**](SapiV1LoanVipCollateralDataGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_collateral_data_get200_response import SapiV1LoanVipCollateralDataGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipCollateralDataGet200Response from a JSON string +sapi_v1_loan_vip_collateral_data_get200_response_instance = SapiV1LoanVipCollateralDataGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipCollateralDataGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_collateral_data_get200_response_dict = sapi_v1_loan_vip_collateral_data_get200_response_instance.to_dict() +# create an instance of SapiV1LoanVipCollateralDataGet200Response from a dict +sapi_v1_loan_vip_collateral_data_get200_response_from_dict = SapiV1LoanVipCollateralDataGet200Response.from_dict(sapi_v1_loan_vip_collateral_data_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipCollateralDataGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1LoanVipCollateralDataGet200ResponseRowsInner.md new file mode 100644 index 0000000..5b9a929 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipCollateralDataGet200ResponseRowsInner.md @@ -0,0 +1,37 @@ +# SapiV1LoanVipCollateralDataGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collateral_coin** | **str** | | +**var_1st_collateral_ratio** | **str** | | +**var_1st_collateral_range** | **str** | | +**var_2nd_collateral_ratio** | **str** | | +**var_2nd_collateral_range** | **str** | | +**var_3rd_collateral_ratio** | **str** | | +**var_3rd_collateral_range** | **str** | | +**var_4th_collateral_ratio** | **str** | | +**var_4th_collateral_range** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_collateral_data_get200_response_rows_inner import SapiV1LoanVipCollateralDataGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipCollateralDataGet200ResponseRowsInner from a JSON string +sapi_v1_loan_vip_collateral_data_get200_response_rows_inner_instance = SapiV1LoanVipCollateralDataGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipCollateralDataGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_collateral_data_get200_response_rows_inner_dict = sapi_v1_loan_vip_collateral_data_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1LoanVipCollateralDataGet200ResponseRowsInner from a dict +sapi_v1_loan_vip_collateral_data_get200_response_rows_inner_from_dict = SapiV1LoanVipCollateralDataGet200ResponseRowsInner.from_dict(sapi_v1_loan_vip_collateral_data_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipLoanableDataGet200Response.md b/target/python/binance_openapi/docs/SapiV1LoanVipLoanableDataGet200Response.md new file mode 100644 index 0000000..406b3e4 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipLoanableDataGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LoanVipLoanableDataGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**rows** | [**List[SapiV1LoanVipLoanableDataGet200ResponseRowsInner]**](SapiV1LoanVipLoanableDataGet200ResponseRowsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_loanable_data_get200_response import SapiV1LoanVipLoanableDataGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipLoanableDataGet200Response from a JSON string +sapi_v1_loan_vip_loanable_data_get200_response_instance = SapiV1LoanVipLoanableDataGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipLoanableDataGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_loanable_data_get200_response_dict = sapi_v1_loan_vip_loanable_data_get200_response_instance.to_dict() +# create an instance of SapiV1LoanVipLoanableDataGet200Response from a dict +sapi_v1_loan_vip_loanable_data_get200_response_from_dict = SapiV1LoanVipLoanableDataGet200Response.from_dict(sapi_v1_loan_vip_loanable_data_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipLoanableDataGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1LoanVipLoanableDataGet200ResponseRowsInner.md new file mode 100644 index 0000000..15aba11 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipLoanableDataGet200ResponseRowsInner.md @@ -0,0 +1,38 @@ +# SapiV1LoanVipLoanableDataGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**flexible_daily_interest_rate** | **str** | | +**flexible_yearly_interest_rate** | **str** | | +**var_30d_daily_interest_rate** | **str** | | +**var_30d_yearly_interest_rate** | **str** | | +**var_60d_daily_interest_rate** | **str** | | +**var_60d_yearly_interest_rate** | **str** | | +**min_limit** | **str** | | +**max_limit** | **str** | | +**vip_level** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_loanable_data_get200_response_rows_inner import SapiV1LoanVipLoanableDataGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipLoanableDataGet200ResponseRowsInner from a JSON string +sapi_v1_loan_vip_loanable_data_get200_response_rows_inner_instance = SapiV1LoanVipLoanableDataGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipLoanableDataGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_loanable_data_get200_response_rows_inner_dict = sapi_v1_loan_vip_loanable_data_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1LoanVipLoanableDataGet200ResponseRowsInner from a dict +sapi_v1_loan_vip_loanable_data_get200_response_rows_inner_from_dict = SapiV1LoanVipLoanableDataGet200ResponseRowsInner.from_dict(sapi_v1_loan_vip_loanable_data_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipOngoingOrdersGet200Response.md b/target/python/binance_openapi/docs/SapiV1LoanVipOngoingOrdersGet200Response.md new file mode 100644 index 0000000..7a65b80 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipOngoingOrdersGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LoanVipOngoingOrdersGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner]**](SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_ongoing_orders_get200_response import SapiV1LoanVipOngoingOrdersGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipOngoingOrdersGet200Response from a JSON string +sapi_v1_loan_vip_ongoing_orders_get200_response_instance = SapiV1LoanVipOngoingOrdersGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipOngoingOrdersGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_ongoing_orders_get200_response_dict = sapi_v1_loan_vip_ongoing_orders_get200_response_instance.to_dict() +# create an instance of SapiV1LoanVipOngoingOrdersGet200Response from a dict +sapi_v1_loan_vip_ongoing_orders_get200_response_from_dict = SapiV1LoanVipOngoingOrdersGet200Response.from_dict(sapi_v1_loan_vip_ongoing_orders_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner.md new file mode 100644 index 0000000..e1adc8e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner.md @@ -0,0 +1,42 @@ +# SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **int** | | +**loan_coin** | **str** | | +**total_debt** | **str** | | +**residual_interest** | **str** | | +**collateral_account_id** | **str** | | +**collateral_coin** | **str** | | +**collateral_value** | **str** | locked collateral value shown in USD value | +**total_collateral_value_after_haircut** | **str** | | [optional] +**locked_collateral_value** | **str** | | [optional] +**current_ltv** | **str** | | +**expiration_time** | **int** | | +**loan_date** | **str** | | +**loan_rate** | **str** | | +**loan_term** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner import SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner from a JSON string +sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner_instance = SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner_dict = sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner from a dict +sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner_from_dict = SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner.from_dict(sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipRenewPost200Response.md b/target/python/binance_openapi/docs/SapiV1LoanVipRenewPost200Response.md new file mode 100644 index 0000000..56472ea --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipRenewPost200Response.md @@ -0,0 +1,34 @@ +# SapiV1LoanVipRenewPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_account_id** | **str** | | +**loan_coin** | **str** | | +**loan_amount** | **str** | | +**collateral_account_id** | **str** | | +**collateral_coin** | **str** | | +**loan_term** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_renew_post200_response import SapiV1LoanVipRenewPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipRenewPost200Response from a JSON string +sapi_v1_loan_vip_renew_post200_response_instance = SapiV1LoanVipRenewPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipRenewPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_renew_post200_response_dict = sapi_v1_loan_vip_renew_post200_response_instance.to_dict() +# create an instance of SapiV1LoanVipRenewPost200Response from a dict +sapi_v1_loan_vip_renew_post200_response_from_dict = SapiV1LoanVipRenewPost200Response.from_dict(sapi_v1_loan_vip_renew_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipRepayHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1LoanVipRepayHistoryGet200Response.md new file mode 100644 index 0000000..17e1aca --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipRepayHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LoanVipRepayHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1LoanVipRepayHistoryGet200ResponseRowsInner]**](SapiV1LoanVipRepayHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_repay_history_get200_response import SapiV1LoanVipRepayHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipRepayHistoryGet200Response from a JSON string +sapi_v1_loan_vip_repay_history_get200_response_instance = SapiV1LoanVipRepayHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipRepayHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_repay_history_get200_response_dict = sapi_v1_loan_vip_repay_history_get200_response_instance.to_dict() +# create an instance of SapiV1LoanVipRepayHistoryGet200Response from a dict +sapi_v1_loan_vip_repay_history_get200_response_from_dict = SapiV1LoanVipRepayHistoryGet200Response.from_dict(sapi_v1_loan_vip_repay_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipRepayHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1LoanVipRepayHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..7a5bdaf --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipRepayHistoryGet200ResponseRowsInner.md @@ -0,0 +1,34 @@ +# SapiV1LoanVipRepayHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**repay_amount** | **str** | | +**collateral_coin** | **str** | | +**repay_status** | **str** | Repaid, Repaying, Failed | +**repay_time** | **str** | | +**order_id** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_repay_history_get200_response_rows_inner import SapiV1LoanVipRepayHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipRepayHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_loan_vip_repay_history_get200_response_rows_inner_instance = SapiV1LoanVipRepayHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipRepayHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_repay_history_get200_response_rows_inner_dict = sapi_v1_loan_vip_repay_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1LoanVipRepayHistoryGet200ResponseRowsInner from a dict +sapi_v1_loan_vip_repay_history_get200_response_rows_inner_from_dict = SapiV1LoanVipRepayHistoryGet200ResponseRowsInner.from_dict(sapi_v1_loan_vip_repay_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipRepayPost200Response.md b/target/python/binance_openapi/docs/SapiV1LoanVipRepayPost200Response.md new file mode 100644 index 0000000..0b420c0 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipRepayPost200Response.md @@ -0,0 +1,35 @@ +# SapiV1LoanVipRepayPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**repay_amount** | **str** | | +**remaining_principal** | **str** | | +**remaining_interest** | **str** | | +**collateral_coin** | **str** | | +**current_ltv** | **str** | | +**repay_status** | **str** | Repaid, Repaying, Failed | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_repay_post200_response import SapiV1LoanVipRepayPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipRepayPost200Response from a JSON string +sapi_v1_loan_vip_repay_post200_response_instance = SapiV1LoanVipRepayPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipRepayPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_repay_post200_response_dict = sapi_v1_loan_vip_repay_post200_response_instance.to_dict() +# create an instance of SapiV1LoanVipRepayPost200Response from a dict +sapi_v1_loan_vip_repay_post200_response_from_dict = SapiV1LoanVipRepayPost200Response.from_dict(sapi_v1_loan_vip_repay_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipRequestDataGet200Response.md b/target/python/binance_openapi/docs/SapiV1LoanVipRequestDataGet200Response.md new file mode 100644 index 0000000..8d356f7 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipRequestDataGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1LoanVipRequestDataGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**rows** | [**List[SapiV1LoanVipRequestDataGet200ResponseRowsInner]**](SapiV1LoanVipRequestDataGet200ResponseRowsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_request_data_get200_response import SapiV1LoanVipRequestDataGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipRequestDataGet200Response from a JSON string +sapi_v1_loan_vip_request_data_get200_response_instance = SapiV1LoanVipRequestDataGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipRequestDataGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_request_data_get200_response_dict = sapi_v1_loan_vip_request_data_get200_response_instance.to_dict() +# create an instance of SapiV1LoanVipRequestDataGet200Response from a dict +sapi_v1_loan_vip_request_data_get200_response_from_dict = SapiV1LoanVipRequestDataGet200Response.from_dict(sapi_v1_loan_vip_request_data_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipRequestDataGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1LoanVipRequestDataGet200ResponseRowsInner.md new file mode 100644 index 0000000..c1bb5ac --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipRequestDataGet200ResponseRowsInner.md @@ -0,0 +1,37 @@ +# SapiV1LoanVipRequestDataGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_account_id** | **str** | | +**order_id** | **str** | | +**request_id** | **str** | | +**loan_coin** | **str** | | +**loan_amount** | **str** | | +**collateral_account_id** | **str** | | +**collateral_coin** | **str** | | +**loan_term** | **int** | | +**status** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_request_data_get200_response_rows_inner import SapiV1LoanVipRequestDataGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipRequestDataGet200ResponseRowsInner from a JSON string +sapi_v1_loan_vip_request_data_get200_response_rows_inner_instance = SapiV1LoanVipRequestDataGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipRequestDataGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_request_data_get200_response_rows_inner_dict = sapi_v1_loan_vip_request_data_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1LoanVipRequestDataGet200ResponseRowsInner from a dict +sapi_v1_loan_vip_request_data_get200_response_rows_inner_from_dict = SapiV1LoanVipRequestDataGet200ResponseRowsInner.from_dict(sapi_v1_loan_vip_request_data_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1LoanVipRequestInterestRateGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1LoanVipRequestInterestRateGet200ResponseInner.md new file mode 100644 index 0000000..e81c8cc --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1LoanVipRequestInterestRateGet200ResponseInner.md @@ -0,0 +1,32 @@ +# SapiV1LoanVipRequestInterestRateGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**flexible_daily_interest_rate** | **str** | | +**flexible_yearly_interest_rate** | **str** | | +**time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_loan_vip_request_interest_rate_get200_response_inner import SapiV1LoanVipRequestInterestRateGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1LoanVipRequestInterestRateGet200ResponseInner from a JSON string +sapi_v1_loan_vip_request_interest_rate_get200_response_inner_instance = SapiV1LoanVipRequestInterestRateGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1LoanVipRequestInterestRateGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_loan_vip_request_interest_rate_get200_response_inner_dict = sapi_v1_loan_vip_request_interest_rate_get200_response_inner_instance.to_dict() +# create an instance of SapiV1LoanVipRequestInterestRateGet200ResponseInner from a dict +sapi_v1_loan_vip_request_interest_rate_get200_response_inner_from_dict = SapiV1LoanVipRequestInterestRateGet200ResponseInner.from_dict(sapi_v1_loan_vip_request_interest_rate_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200Response.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200Response.md new file mode 100644 index 0000000..a29e177 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1ManagedSubaccountAccountSnapshotGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**snapshot_vos** | [**List[SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner]**](SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response import SapiV1ManagedSubaccountAccountSnapshotGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200Response from a JSON string +sapi_v1_managed_subaccount_account_snapshot_get200_response_instance = SapiV1ManagedSubaccountAccountSnapshotGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountAccountSnapshotGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_account_snapshot_get200_response_dict = sapi_v1_managed_subaccount_account_snapshot_get200_response_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200Response from a dict +sapi_v1_managed_subaccount_account_snapshot_get200_response_from_dict = SapiV1ManagedSubaccountAccountSnapshotGet200Response.from_dict(sapi_v1_managed_subaccount_account_snapshot_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner.md new file mode 100644 index 0000000..bfb8e01 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner.md @@ -0,0 +1,31 @@ +# SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData**](SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData.md) | | +**type** | **str** | | +**update_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner from a JSON string +sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_instance = SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_dict = sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner from a dict +sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_from_dict = SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner.from_dict(sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData.md new file mode 100644 index 0000000..db33dfa --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData.md @@ -0,0 +1,30 @@ +# SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**balances** | [**List[SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner]**](SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner.md) | | +**total_asset_of_btc** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData from a JSON string +sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_instance = SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_dict = sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData from a dict +sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_from_dict = SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData.from_dict(sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner.md new file mode 100644 index 0000000..75584fe --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner.md @@ -0,0 +1,31 @@ +# SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**free** | **str** | | +**locked** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner from a JSON string +sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner_instance = SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner_dict = sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner from a dict +sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner_from_dict = SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner.from_dict(sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAssetGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAssetGet200ResponseInner.md new file mode 100644 index 0000000..ce5ff7a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountAssetGet200ResponseInner.md @@ -0,0 +1,34 @@ +# SapiV1ManagedSubaccountAssetGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**coin** | **str** | | +**name** | **str** | | +**total_balance** | **str** | | +**available_balance** | **str** | | +**in_order** | **str** | | +**btc_value** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_asset_get200_response_inner import SapiV1ManagedSubaccountAssetGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountAssetGet200ResponseInner from a JSON string +sapi_v1_managed_subaccount_asset_get200_response_inner_instance = SapiV1ManagedSubaccountAssetGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountAssetGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_asset_get200_response_inner_dict = sapi_v1_managed_subaccount_asset_get200_response_inner_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountAssetGet200ResponseInner from a dict +sapi_v1_managed_subaccount_asset_get200_response_inner_from_dict = SapiV1ManagedSubaccountAssetGet200ResponseInner.from_dict(sapi_v1_managed_subaccount_asset_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountDepositAddressGet200Response.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountDepositAddressGet200Response.md new file mode 100644 index 0000000..fdd73ea --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountDepositAddressGet200Response.md @@ -0,0 +1,32 @@ +# SapiV1ManagedSubaccountDepositAddressGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**coin** | **str** | | +**address** | **str** | | +**tag** | **str** | | +**url** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_deposit_address_get200_response import SapiV1ManagedSubaccountDepositAddressGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountDepositAddressGet200Response from a JSON string +sapi_v1_managed_subaccount_deposit_address_get200_response_instance = SapiV1ManagedSubaccountDepositAddressGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountDepositAddressGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_deposit_address_get200_response_dict = sapi_v1_managed_subaccount_deposit_address_get200_response_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountDepositAddressGet200Response from a dict +sapi_v1_managed_subaccount_deposit_address_get200_response_from_dict = SapiV1ManagedSubaccountDepositAddressGet200Response.from_dict(sapi_v1_managed_subaccount_deposit_address_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountDepositPost200Response.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountDepositPost200Response.md new file mode 100644 index 0000000..2cde40a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountDepositPost200Response.md @@ -0,0 +1,29 @@ +# SapiV1ManagedSubaccountDepositPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tran_id** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_deposit_post200_response import SapiV1ManagedSubaccountDepositPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountDepositPost200Response from a JSON string +sapi_v1_managed_subaccount_deposit_post200_response_instance = SapiV1ManagedSubaccountDepositPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountDepositPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_deposit_post200_response_dict = sapi_v1_managed_subaccount_deposit_post200_response_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountDepositPost200Response from a dict +sapi_v1_managed_subaccount_deposit_post200_response_from_dict = SapiV1ManagedSubaccountDepositPost200Response.from_dict(sapi_v1_managed_subaccount_deposit_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200Response.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200Response.md new file mode 100644 index 0000000..9b6d20e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1ManagedSubaccountFetchFutureAssetGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**message** | **str** | | +**snapshot_vos** | [**List[SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner]**](SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response import SapiV1ManagedSubaccountFetchFutureAssetGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200Response from a JSON string +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_instance = SapiV1ManagedSubaccountFetchFutureAssetGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountFetchFutureAssetGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_dict = sapi_v1_managed_subaccount_fetch_future_asset_get200_response_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200Response from a dict +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_from_dict = SapiV1ManagedSubaccountFetchFutureAssetGet200Response.from_dict(sapi_v1_managed_subaccount_fetch_future_asset_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner.md new file mode 100644 index 0000000..ac42319 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner.md @@ -0,0 +1,31 @@ +# SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**update_time** | **int** | | +**data** | [**SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData**](SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner from a JSON string +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_instance = SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_dict = sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner from a dict +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_from_dict = SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner.from_dict(sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData.md new file mode 100644 index 0000000..0eb6fad --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData.md @@ -0,0 +1,30 @@ +# SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assets** | [**List[SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner]**](SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner.md) | | +**position** | [**List[SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner]**](SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData from a JSON string +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_instance = SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_dict = sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData from a dict +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_from_dict = SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData.from_dict(sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner.md new file mode 100644 index 0000000..d8405b2 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner.md @@ -0,0 +1,31 @@ +# SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**margin_balance** | **float** | | +**wallet_balance** | **float** | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner from a JSON string +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner_instance = SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner_dict = sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner from a dict +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner_from_dict = SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner.from_dict(sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner.md new file mode 100644 index 0000000..9806bce --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner.md @@ -0,0 +1,32 @@ +# SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**entry_price** | **float** | | +**mark_price** | **float** | | +**position_amt** | **float** | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner from a JSON string +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner_instance = SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner_dict = sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner from a dict +sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner_from_dict = SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner.from_dict(sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountInfoGet200Response.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountInfoGet200Response.md new file mode 100644 index 0000000..bd22290 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountInfoGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1ManagedSubaccountInfoGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**manager_sub_user_info_vo_list** | [**List[SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner]**](SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_info_get200_response import SapiV1ManagedSubaccountInfoGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountInfoGet200Response from a JSON string +sapi_v1_managed_subaccount_info_get200_response_instance = SapiV1ManagedSubaccountInfoGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountInfoGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_info_get200_response_dict = sapi_v1_managed_subaccount_info_get200_response_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountInfoGet200Response from a dict +sapi_v1_managed_subaccount_info_get200_response_from_dict = SapiV1ManagedSubaccountInfoGet200Response.from_dict(sapi_v1_managed_subaccount_info_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner.md new file mode 100644 index 0000000..126910f --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner.md @@ -0,0 +1,39 @@ +# SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**root_user_id** | **int** | | +**managersub_user_id** | **int** | | +**bind_parent_user_id** | **int** | | +**email** | **str** | | [optional] +**insert_time_stamp** | **int** | | +**bind_parent_email** | **str** | | +**is_sub_user_enabled** | **bool** | | +**is_user_active** | **bool** | | +**is_margin_enabled** | **bool** | | +**is_future_enabled** | **bool** | | +**is_signed_lvt_risk_agreement** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner import SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner from a JSON string +sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner_instance = SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner_dict = sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner from a dict +sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner_from_dict = SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner.from_dict(sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountMarginAssetGet200Response.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountMarginAssetGet200Response.md new file mode 100644 index 0000000..de23435 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountMarginAssetGet200Response.md @@ -0,0 +1,33 @@ +# SapiV1ManagedSubaccountMarginAssetGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**margin_level** | **str** | | +**total_asset_of_btc** | **str** | | +**total_liability_of_btc** | **str** | | +**total_net_asset_of_btc** | **str** | | +**user_assets** | [**List[SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner]**](SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_margin_asset_get200_response import SapiV1ManagedSubaccountMarginAssetGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountMarginAssetGet200Response from a JSON string +sapi_v1_managed_subaccount_margin_asset_get200_response_instance = SapiV1ManagedSubaccountMarginAssetGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountMarginAssetGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_margin_asset_get200_response_dict = sapi_v1_managed_subaccount_margin_asset_get200_response_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountMarginAssetGet200Response from a dict +sapi_v1_managed_subaccount_margin_asset_get200_response_from_dict = SapiV1ManagedSubaccountMarginAssetGet200Response.from_dict(sapi_v1_managed_subaccount_margin_asset_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner.md new file mode 100644 index 0000000..469eeba --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner.md @@ -0,0 +1,34 @@ +# SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**borrowed** | **str** | | +**free** | **str** | | +**interest** | **str** | | +**locked** | **str** | | +**net_asset** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner import SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner from a JSON string +sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner_instance = SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner_dict = sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner from a dict +sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner_from_dict = SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner.from_dict(sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response.md new file mode 100644 index 0000000..7f3c85f --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**manager_sub_transfer_history_vos** | [**List[SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner]**](SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response import SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response from a JSON string +sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_instance = SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_dict = sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response from a dict +sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_from_dict = SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response.from_dict(sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner.md new file mode 100644 index 0000000..c70dfd1 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner.md @@ -0,0 +1,38 @@ +# SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from_email** | **str** | | +**from_account_type** | **str** | | +**to_email** | **str** | | +**to_account_type** | **str** | | +**asset** | **str** | | +**amount** | **str** | | +**scheduled_data** | **int** | | +**create_time** | **int** | | +**status** | **str** | | +**tran_id** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner import SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner from a JSON string +sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner_instance = SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner_dict = sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner from a dict +sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner_from_dict = SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner.from_dict(sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogGet200Response.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogGet200Response.md new file mode 100644 index 0000000..a226672 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1ManagedSubaccountQueryTransLogGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**manager_sub_transfer_history_vos** | [**List[SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner]**](SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_get200_response import SapiV1ManagedSubaccountQueryTransLogGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountQueryTransLogGet200Response from a JSON string +sapi_v1_managed_subaccount_query_trans_log_get200_response_instance = SapiV1ManagedSubaccountQueryTransLogGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountQueryTransLogGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_query_trans_log_get200_response_dict = sapi_v1_managed_subaccount_query_trans_log_get200_response_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountQueryTransLogGet200Response from a dict +sapi_v1_managed_subaccount_query_trans_log_get200_response_from_dict = SapiV1ManagedSubaccountQueryTransLogGet200Response.from_dict(sapi_v1_managed_subaccount_query_trans_log_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner.md b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner.md new file mode 100644 index 0000000..b053063 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner.md @@ -0,0 +1,38 @@ +# SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from_email** | **str** | | +**from_account_type** | **str** | | +**to_email** | **str** | | +**to_account_type** | **str** | | +**asset** | **str** | | +**amount** | **str** | | +**scheduled_data** | **int** | | +**create_time** | **int** | | +**status** | **str** | | +**tran_id** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner import SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner from a JSON string +sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner_instance = SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner.to_json()) + +# convert the object into a dict +sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner_dict = sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner_instance.to_dict() +# create an instance of SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner from a dict +sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner_from_dict = SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner.from_dict(sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginAccountGet200Response.md b/target/python/binance_openapi/docs/SapiV1MarginAccountGet200Response.md new file mode 100644 index 0000000..1fdc690 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginAccountGet200Response.md @@ -0,0 +1,36 @@ +# SapiV1MarginAccountGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**borrow_enabled** | **bool** | | +**margin_level** | **str** | | +**total_asset_of_btc** | **str** | | +**total_liability_of_btc** | **str** | | +**total_net_asset_of_btc** | **str** | | +**trade_enabled** | **bool** | | +**transfer_enabled** | **bool** | | +**user_assets** | [**List[SapiV1MarginAccountGet200ResponseUserAssetsInner]**](SapiV1MarginAccountGet200ResponseUserAssetsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_account_get200_response import SapiV1MarginAccountGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginAccountGet200Response from a JSON string +sapi_v1_margin_account_get200_response_instance = SapiV1MarginAccountGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginAccountGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_account_get200_response_dict = sapi_v1_margin_account_get200_response_instance.to_dict() +# create an instance of SapiV1MarginAccountGet200Response from a dict +sapi_v1_margin_account_get200_response_from_dict = SapiV1MarginAccountGet200Response.from_dict(sapi_v1_margin_account_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginAccountGet200ResponseUserAssetsInner.md b/target/python/binance_openapi/docs/SapiV1MarginAccountGet200ResponseUserAssetsInner.md new file mode 100644 index 0000000..aedd616 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginAccountGet200ResponseUserAssetsInner.md @@ -0,0 +1,34 @@ +# SapiV1MarginAccountGet200ResponseUserAssetsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**borrowed** | **str** | | +**free** | **str** | | +**interest** | **str** | | +**locked** | **str** | | +**net_asset** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_account_get200_response_user_assets_inner import SapiV1MarginAccountGet200ResponseUserAssetsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginAccountGet200ResponseUserAssetsInner from a JSON string +sapi_v1_margin_account_get200_response_user_assets_inner_instance = SapiV1MarginAccountGet200ResponseUserAssetsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginAccountGet200ResponseUserAssetsInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_account_get200_response_user_assets_inner_dict = sapi_v1_margin_account_get200_response_user_assets_inner_instance.to_dict() +# create an instance of SapiV1MarginAccountGet200ResponseUserAssetsInner from a dict +sapi_v1_margin_account_get200_response_user_assets_inner_from_dict = SapiV1MarginAccountGet200ResponseUserAssetsInner.from_dict(sapi_v1_margin_account_get200_response_user_assets_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginAllAssetsGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginAllAssetsGet200ResponseInner.md new file mode 100644 index 0000000..166876c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginAllAssetsGet200ResponseInner.md @@ -0,0 +1,34 @@ +# SapiV1MarginAllAssetsGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_full_name** | **str** | | +**asset_name** | **str** | | +**is_borrowable** | **bool** | | +**is_mortgageable** | **bool** | | +**user_min_borrow** | **str** | | +**user_min_repay** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_all_assets_get200_response_inner import SapiV1MarginAllAssetsGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginAllAssetsGet200ResponseInner from a JSON string +sapi_v1_margin_all_assets_get200_response_inner_instance = SapiV1MarginAllAssetsGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginAllAssetsGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_all_assets_get200_response_inner_dict = sapi_v1_margin_all_assets_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginAllAssetsGet200ResponseInner from a dict +sapi_v1_margin_all_assets_get200_response_inner_from_dict = SapiV1MarginAllAssetsGet200ResponseInner.from_dict(sapi_v1_margin_all_assets_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginAllPairsGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginAllPairsGet200ResponseInner.md new file mode 100644 index 0000000..8145c70 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginAllPairsGet200ResponseInner.md @@ -0,0 +1,35 @@ +# SapiV1MarginAllPairsGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base** | **str** | | +**id** | **int** | | +**is_buy_allowed** | **bool** | | +**is_margin_trade** | **bool** | | +**is_sell_allowed** | **bool** | | +**quote** | **str** | | +**symbol** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_all_pairs_get200_response_inner import SapiV1MarginAllPairsGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginAllPairsGet200ResponseInner from a JSON string +sapi_v1_margin_all_pairs_get200_response_inner_instance = SapiV1MarginAllPairsGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginAllPairsGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_all_pairs_get200_response_inner_dict = sapi_v1_margin_all_pairs_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginAllPairsGet200ResponseInner from a dict +sapi_v1_margin_all_pairs_get200_response_inner_from_dict = SapiV1MarginAllPairsGet200ResponseInner.from_dict(sapi_v1_margin_all_pairs_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginAvailableInventoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1MarginAvailableInventoryGet200Response.md new file mode 100644 index 0000000..412b870 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginAvailableInventoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1MarginAvailableInventoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assets** | [**SapiV1MarginAvailableInventoryGet200ResponseAssets**](SapiV1MarginAvailableInventoryGet200ResponseAssets.md) | | +**update_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_available_inventory_get200_response import SapiV1MarginAvailableInventoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginAvailableInventoryGet200Response from a JSON string +sapi_v1_margin_available_inventory_get200_response_instance = SapiV1MarginAvailableInventoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginAvailableInventoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_available_inventory_get200_response_dict = sapi_v1_margin_available_inventory_get200_response_instance.to_dict() +# create an instance of SapiV1MarginAvailableInventoryGet200Response from a dict +sapi_v1_margin_available_inventory_get200_response_from_dict = SapiV1MarginAvailableInventoryGet200Response.from_dict(sapi_v1_margin_available_inventory_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginAvailableInventoryGet200ResponseAssets.md b/target/python/binance_openapi/docs/SapiV1MarginAvailableInventoryGet200ResponseAssets.md new file mode 100644 index 0000000..6eae545 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginAvailableInventoryGet200ResponseAssets.md @@ -0,0 +1,32 @@ +# SapiV1MarginAvailableInventoryGet200ResponseAssets + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**matic** | **str** | | +**stpt** | **str** | | +**tvk** | **str** | | +**shib** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_available_inventory_get200_response_assets import SapiV1MarginAvailableInventoryGet200ResponseAssets + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginAvailableInventoryGet200ResponseAssets from a JSON string +sapi_v1_margin_available_inventory_get200_response_assets_instance = SapiV1MarginAvailableInventoryGet200ResponseAssets.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginAvailableInventoryGet200ResponseAssets.to_json()) + +# convert the object into a dict +sapi_v1_margin_available_inventory_get200_response_assets_dict = sapi_v1_margin_available_inventory_get200_response_assets_instance.to_dict() +# create an instance of SapiV1MarginAvailableInventoryGet200ResponseAssets from a dict +sapi_v1_margin_available_inventory_get200_response_assets_from_dict = SapiV1MarginAvailableInventoryGet200ResponseAssets.from_dict(sapi_v1_margin_available_inventory_get200_response_assets_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginBorrowRepayGet200Response.md b/target/python/binance_openapi/docs/SapiV1MarginBorrowRepayGet200Response.md new file mode 100644 index 0000000..66b121e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginBorrowRepayGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1MarginBorrowRepayGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1MarginBorrowRepayGet200ResponseRowsInner]**](SapiV1MarginBorrowRepayGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_borrow_repay_get200_response import SapiV1MarginBorrowRepayGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginBorrowRepayGet200Response from a JSON string +sapi_v1_margin_borrow_repay_get200_response_instance = SapiV1MarginBorrowRepayGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginBorrowRepayGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_borrow_repay_get200_response_dict = sapi_v1_margin_borrow_repay_get200_response_instance.to_dict() +# create an instance of SapiV1MarginBorrowRepayGet200Response from a dict +sapi_v1_margin_borrow_repay_get200_response_from_dict = SapiV1MarginBorrowRepayGet200Response.from_dict(sapi_v1_margin_borrow_repay_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginBorrowRepayGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1MarginBorrowRepayGet200ResponseRowsInner.md new file mode 100644 index 0000000..6f36507 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginBorrowRepayGet200ResponseRowsInner.md @@ -0,0 +1,36 @@ +# SapiV1MarginBorrowRepayGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**isolated_symbol** | **str** | Isolated symbol, will not be returned for crossed margin | [optional] +**amount** | **str** | Total amount borrowed/repaid | [optional] +**asset** | **str** | | +**interest** | **str** | Interest repaid | [optional] +**principal** | **str** | Principal repaid | +**status** | **str** | one of PENDING (pending execution), CONFIRMED (successfully execution), FAILED (execution failed, nothing happened to your account) | +**timestamp** | **int** | | +**tx_id** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_borrow_repay_get200_response_rows_inner import SapiV1MarginBorrowRepayGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginBorrowRepayGet200ResponseRowsInner from a JSON string +sapi_v1_margin_borrow_repay_get200_response_rows_inner_instance = SapiV1MarginBorrowRepayGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginBorrowRepayGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_borrow_repay_get200_response_rows_inner_dict = sapi_v1_margin_borrow_repay_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1MarginBorrowRepayGet200ResponseRowsInner from a dict +sapi_v1_margin_borrow_repay_get200_response_rows_inner_from_dict = SapiV1MarginBorrowRepayGet200ResponseRowsInner.from_dict(sapi_v1_margin_borrow_repay_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginBorrowRepayPost200Response.md b/target/python/binance_openapi/docs/SapiV1MarginBorrowRepayPost200Response.md new file mode 100644 index 0000000..a22af5b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginBorrowRepayPost200Response.md @@ -0,0 +1,29 @@ +# SapiV1MarginBorrowRepayPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tran_id** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_borrow_repay_post200_response import SapiV1MarginBorrowRepayPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginBorrowRepayPost200Response from a JSON string +sapi_v1_margin_borrow_repay_post200_response_instance = SapiV1MarginBorrowRepayPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginBorrowRepayPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_borrow_repay_post200_response_dict = sapi_v1_margin_borrow_repay_post200_response_instance.to_dict() +# create an instance of SapiV1MarginBorrowRepayPost200Response from a dict +sapi_v1_margin_borrow_repay_post200_response_from_dict = SapiV1MarginBorrowRepayPost200Response.from_dict(sapi_v1_margin_borrow_repay_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginCapitalFlowGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginCapitalFlowGet200ResponseInner.md new file mode 100644 index 0000000..d0839b2 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginCapitalFlowGet200ResponseInner.md @@ -0,0 +1,35 @@ +# SapiV1MarginCapitalFlowGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**tran_id** | **int** | | +**timestamp** | **int** | | +**asset** | **str** | | +**symbol** | **str** | | +**type** | **str** | | +**amount** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_capital_flow_get200_response_inner import SapiV1MarginCapitalFlowGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginCapitalFlowGet200ResponseInner from a JSON string +sapi_v1_margin_capital_flow_get200_response_inner_instance = SapiV1MarginCapitalFlowGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginCapitalFlowGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_capital_flow_get200_response_inner_dict = sapi_v1_margin_capital_flow_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginCapitalFlowGet200ResponseInner from a dict +sapi_v1_margin_capital_flow_get200_response_inner_from_dict = SapiV1MarginCapitalFlowGet200ResponseInner.from_dict(sapi_v1_margin_capital_flow_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner.md new file mode 100644 index 0000000..38b6a00 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner.md @@ -0,0 +1,30 @@ +# SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collaterals** | [**List[SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner]**](SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner.md) | | +**asset_names** | **List[str]** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner import SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner from a JSON string +sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_instance = SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_dict = sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner from a dict +sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_from_dict = SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner.from_dict(sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner.md b/target/python/binance_openapi/docs/SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner.md new file mode 100644 index 0000000..4869c22 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner.md @@ -0,0 +1,31 @@ +# SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**min_usd_value** | **str** | | +**max_usd_value** | **str** | | +**discount_rate** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner import SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner from a JSON string +sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner_instance = SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner_dict = sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner_instance.to_dict() +# create an instance of SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner from a dict +sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner_from_dict = SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner.from_dict(sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginCrossMarginDataGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginCrossMarginDataGet200ResponseInner.md new file mode 100644 index 0000000..c6ea998 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginCrossMarginDataGet200ResponseInner.md @@ -0,0 +1,36 @@ +# SapiV1MarginCrossMarginDataGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vip_level** | **int** | | +**coin** | **str** | | +**transfer_in** | **bool** | | +**borrowable** | **bool** | | +**daily_interest** | **str** | | +**yearly_interest** | **str** | | +**borrow_limit** | **str** | | +**marginable_pairs** | **List[str]** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_cross_margin_data_get200_response_inner import SapiV1MarginCrossMarginDataGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginCrossMarginDataGet200ResponseInner from a JSON string +sapi_v1_margin_cross_margin_data_get200_response_inner_instance = SapiV1MarginCrossMarginDataGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginCrossMarginDataGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_cross_margin_data_get200_response_inner_dict = sapi_v1_margin_cross_margin_data_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginCrossMarginDataGet200ResponseInner from a dict +sapi_v1_margin_cross_margin_data_get200_response_inner_from_dict = SapiV1MarginCrossMarginDataGet200ResponseInner.from_dict(sapi_v1_margin_cross_margin_data_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginDelistScheduleGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginDelistScheduleGet200ResponseInner.md new file mode 100644 index 0000000..bda9183 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginDelistScheduleGet200ResponseInner.md @@ -0,0 +1,31 @@ +# SapiV1MarginDelistScheduleGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**delist_time** | **int** | | [optional] +**cross_margin_assets** | **List[str]** | | [optional] +**isolated_margin_symbols** | **List[str]** | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_margin_delist_schedule_get200_response_inner import SapiV1MarginDelistScheduleGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginDelistScheduleGet200ResponseInner from a JSON string +sapi_v1_margin_delist_schedule_get200_response_inner_instance = SapiV1MarginDelistScheduleGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginDelistScheduleGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_delist_schedule_get200_response_inner_dict = sapi_v1_margin_delist_schedule_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginDelistScheduleGet200ResponseInner from a dict +sapi_v1_margin_delist_schedule_get200_response_inner_from_dict = SapiV1MarginDelistScheduleGet200ResponseInner.from_dict(sapi_v1_margin_delist_schedule_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginExchangeSmallLiabilityGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginExchangeSmallLiabilityGet200ResponseInner.md new file mode 100644 index 0000000..98bcb1f --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginExchangeSmallLiabilityGet200ResponseInner.md @@ -0,0 +1,33 @@ +# SapiV1MarginExchangeSmallLiabilityGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**interest** | **str** | | +**principal** | **str** | | +**liability_asset** | **str** | | +**liability_qty** | **float** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_exchange_small_liability_get200_response_inner import SapiV1MarginExchangeSmallLiabilityGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginExchangeSmallLiabilityGet200ResponseInner from a JSON string +sapi_v1_margin_exchange_small_liability_get200_response_inner_instance = SapiV1MarginExchangeSmallLiabilityGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginExchangeSmallLiabilityGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_exchange_small_liability_get200_response_inner_dict = sapi_v1_margin_exchange_small_liability_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginExchangeSmallLiabilityGet200ResponseInner from a dict +sapi_v1_margin_exchange_small_liability_get200_response_inner_from_dict = SapiV1MarginExchangeSmallLiabilityGet200ResponseInner.from_dict(sapi_v1_margin_exchange_small_liability_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginExchangeSmallLiabilityHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1MarginExchangeSmallLiabilityHistoryGet200Response.md new file mode 100644 index 0000000..755209a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginExchangeSmallLiabilityHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1MarginExchangeSmallLiabilityHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**rows** | [**List[SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner]**](SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_exchange_small_liability_history_get200_response import SapiV1MarginExchangeSmallLiabilityHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginExchangeSmallLiabilityHistoryGet200Response from a JSON string +sapi_v1_margin_exchange_small_liability_history_get200_response_instance = SapiV1MarginExchangeSmallLiabilityHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginExchangeSmallLiabilityHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_exchange_small_liability_history_get200_response_dict = sapi_v1_margin_exchange_small_liability_history_get200_response_instance.to_dict() +# create an instance of SapiV1MarginExchangeSmallLiabilityHistoryGet200Response from a dict +sapi_v1_margin_exchange_small_liability_history_get200_response_from_dict = SapiV1MarginExchangeSmallLiabilityHistoryGet200Response.from_dict(sapi_v1_margin_exchange_small_liability_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..a0c4ad8 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner.md @@ -0,0 +1,34 @@ +# SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**amount** | **str** | | +**target_asset** | **str** | | +**target_amount** | **str** | | +**biz_type** | **str** | | +**timestamp** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner import SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner_instance = SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner_dict = sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner from a dict +sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner_from_dict = SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner.from_dict(sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginForceLiquidationRecGet200Response.md b/target/python/binance_openapi/docs/SapiV1MarginForceLiquidationRecGet200Response.md new file mode 100644 index 0000000..d83814d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginForceLiquidationRecGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1MarginForceLiquidationRecGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1MarginForceLiquidationRecGet200ResponseRowsInner]**](SapiV1MarginForceLiquidationRecGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_force_liquidation_rec_get200_response import SapiV1MarginForceLiquidationRecGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginForceLiquidationRecGet200Response from a JSON string +sapi_v1_margin_force_liquidation_rec_get200_response_instance = SapiV1MarginForceLiquidationRecGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginForceLiquidationRecGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_force_liquidation_rec_get200_response_dict = sapi_v1_margin_force_liquidation_rec_get200_response_instance.to_dict() +# create an instance of SapiV1MarginForceLiquidationRecGet200Response from a dict +sapi_v1_margin_force_liquidation_rec_get200_response_from_dict = SapiV1MarginForceLiquidationRecGet200Response.from_dict(sapi_v1_margin_force_liquidation_rec_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginForceLiquidationRecGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1MarginForceLiquidationRecGet200ResponseRowsInner.md new file mode 100644 index 0000000..d029789 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginForceLiquidationRecGet200ResponseRowsInner.md @@ -0,0 +1,38 @@ +# SapiV1MarginForceLiquidationRecGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**avg_price** | **str** | | +**executed_qty** | **str** | | +**order_id** | **int** | | +**price** | **str** | | +**qty** | **str** | | +**side** | **str** | | +**symbol** | **str** | | +**time_in_force** | **str** | | +**is_isolated** | **bool** | | +**updated_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner import SapiV1MarginForceLiquidationRecGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginForceLiquidationRecGet200ResponseRowsInner from a JSON string +sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner_instance = SapiV1MarginForceLiquidationRecGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginForceLiquidationRecGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner_dict = sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1MarginForceLiquidationRecGet200ResponseRowsInner from a dict +sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner_from_dict = SapiV1MarginForceLiquidationRecGet200ResponseRowsInner.from_dict(sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginInterestHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1MarginInterestHistoryGet200Response.md new file mode 100644 index 0000000..5e13464 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginInterestHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1MarginInterestHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1MarginInterestHistoryGet200ResponseRowsInner]**](SapiV1MarginInterestHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_interest_history_get200_response import SapiV1MarginInterestHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginInterestHistoryGet200Response from a JSON string +sapi_v1_margin_interest_history_get200_response_instance = SapiV1MarginInterestHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginInterestHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_interest_history_get200_response_dict = sapi_v1_margin_interest_history_get200_response_instance.to_dict() +# create an instance of SapiV1MarginInterestHistoryGet200Response from a dict +sapi_v1_margin_interest_history_get200_response_from_dict = SapiV1MarginInterestHistoryGet200Response.from_dict(sapi_v1_margin_interest_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginInterestHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1MarginInterestHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..b814a24 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginInterestHistoryGet200ResponseRowsInner.md @@ -0,0 +1,35 @@ +# SapiV1MarginInterestHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**isolated_symbol** | **str** | | +**asset** | **str** | | +**interest** | **str** | | +**interest_accured_time** | **int** | | +**interest_rate** | **str** | | +**principal** | **str** | | +**type** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_interest_history_get200_response_rows_inner import SapiV1MarginInterestHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginInterestHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_margin_interest_history_get200_response_rows_inner_instance = SapiV1MarginInterestHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginInterestHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_interest_history_get200_response_rows_inner_dict = sapi_v1_margin_interest_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1MarginInterestHistoryGet200ResponseRowsInner from a dict +sapi_v1_margin_interest_history_get200_response_rows_inner_from_dict = SapiV1MarginInterestHistoryGet200ResponseRowsInner.from_dict(sapi_v1_margin_interest_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginInterestRateHistoryGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginInterestRateHistoryGet200ResponseInner.md new file mode 100644 index 0000000..bebbb1a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginInterestRateHistoryGet200ResponseInner.md @@ -0,0 +1,32 @@ +# SapiV1MarginInterestRateHistoryGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**daily_interest_rate** | **str** | | +**timestamp** | **int** | | +**vip_level** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_interest_rate_history_get200_response_inner import SapiV1MarginInterestRateHistoryGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginInterestRateHistoryGet200ResponseInner from a JSON string +sapi_v1_margin_interest_rate_history_get200_response_inner_instance = SapiV1MarginInterestRateHistoryGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginInterestRateHistoryGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_interest_rate_history_get200_response_inner_dict = sapi_v1_margin_interest_rate_history_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginInterestRateHistoryGet200ResponseInner from a dict +sapi_v1_margin_interest_rate_history_get200_response_inner_from_dict = SapiV1MarginInterestRateHistoryGet200ResponseInner.from_dict(sapi_v1_margin_interest_rate_history_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginIsolatedAccountLimitGet200Response.md b/target/python/binance_openapi/docs/SapiV1MarginIsolatedAccountLimitGet200Response.md new file mode 100644 index 0000000..b0b55b9 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginIsolatedAccountLimitGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1MarginIsolatedAccountLimitGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled_account** | **int** | | +**max_account** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_isolated_account_limit_get200_response import SapiV1MarginIsolatedAccountLimitGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginIsolatedAccountLimitGet200Response from a JSON string +sapi_v1_margin_isolated_account_limit_get200_response_instance = SapiV1MarginIsolatedAccountLimitGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginIsolatedAccountLimitGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_isolated_account_limit_get200_response_dict = sapi_v1_margin_isolated_account_limit_get200_response_instance.to_dict() +# create an instance of SapiV1MarginIsolatedAccountLimitGet200Response from a dict +sapi_v1_margin_isolated_account_limit_get200_response_from_dict = SapiV1MarginIsolatedAccountLimitGet200Response.from_dict(sapi_v1_margin_isolated_account_limit_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginIsolatedAccountPost200Response.md b/target/python/binance_openapi/docs/SapiV1MarginIsolatedAccountPost200Response.md new file mode 100644 index 0000000..45783e3 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginIsolatedAccountPost200Response.md @@ -0,0 +1,30 @@ +# SapiV1MarginIsolatedAccountPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | +**symbol** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_isolated_account_post200_response import SapiV1MarginIsolatedAccountPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginIsolatedAccountPost200Response from a JSON string +sapi_v1_margin_isolated_account_post200_response_instance = SapiV1MarginIsolatedAccountPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginIsolatedAccountPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_isolated_account_post200_response_dict = sapi_v1_margin_isolated_account_post200_response_instance.to_dict() +# create an instance of SapiV1MarginIsolatedAccountPost200Response from a dict +sapi_v1_margin_isolated_account_post200_response_from_dict = SapiV1MarginIsolatedAccountPost200Response.from_dict(sapi_v1_margin_isolated_account_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginIsolatedAllPairsGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginIsolatedAllPairsGet200ResponseInner.md new file mode 100644 index 0000000..d5f8146 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginIsolatedAllPairsGet200ResponseInner.md @@ -0,0 +1,34 @@ +# SapiV1MarginIsolatedAllPairsGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**base** | **str** | | +**quote** | **str** | | +**is_margin_trade** | **bool** | | +**is_buy_allowed** | **bool** | | +**is_sell_allowed** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_isolated_all_pairs_get200_response_inner import SapiV1MarginIsolatedAllPairsGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginIsolatedAllPairsGet200ResponseInner from a JSON string +sapi_v1_margin_isolated_all_pairs_get200_response_inner_instance = SapiV1MarginIsolatedAllPairsGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginIsolatedAllPairsGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_isolated_all_pairs_get200_response_inner_dict = sapi_v1_margin_isolated_all_pairs_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginIsolatedAllPairsGet200ResponseInner from a dict +sapi_v1_margin_isolated_all_pairs_get200_response_inner_from_dict = SapiV1MarginIsolatedAllPairsGet200ResponseInner.from_dict(sapi_v1_margin_isolated_all_pairs_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginIsolatedMarginDataGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginIsolatedMarginDataGet200ResponseInner.md new file mode 100644 index 0000000..e29335b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginIsolatedMarginDataGet200ResponseInner.md @@ -0,0 +1,32 @@ +# SapiV1MarginIsolatedMarginDataGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vip_level** | **int** | | [optional] +**symbol** | **str** | | [optional] +**leverage** | **str** | | [optional] +**data** | [**List[SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner]**](SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_margin_isolated_margin_data_get200_response_inner import SapiV1MarginIsolatedMarginDataGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginIsolatedMarginDataGet200ResponseInner from a JSON string +sapi_v1_margin_isolated_margin_data_get200_response_inner_instance = SapiV1MarginIsolatedMarginDataGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginIsolatedMarginDataGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_isolated_margin_data_get200_response_inner_dict = sapi_v1_margin_isolated_margin_data_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginIsolatedMarginDataGet200ResponseInner from a dict +sapi_v1_margin_isolated_margin_data_get200_response_inner_from_dict = SapiV1MarginIsolatedMarginDataGet200ResponseInner.from_dict(sapi_v1_margin_isolated_margin_data_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner.md b/target/python/binance_openapi/docs/SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner.md new file mode 100644 index 0000000..97917f7 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner.md @@ -0,0 +1,31 @@ +# SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**coin** | **str** | | [optional] +**daily_interest** | **str** | | [optional] +**borrow_limit** | **str** | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner import SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner from a JSON string +sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner_instance = SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner_dict = sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner_instance.to_dict() +# create an instance of SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner from a dict +sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner_from_dict = SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner.from_dict(sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginIsolatedMarginTierGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginIsolatedMarginTierGet200ResponseInner.md new file mode 100644 index 0000000..9667da9 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginIsolatedMarginTierGet200ResponseInner.md @@ -0,0 +1,35 @@ +# SapiV1MarginIsolatedMarginTierGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | [optional] +**tier** | **int** | | [optional] +**effective_multiple** | **str** | | [optional] +**initial_risk_ratio** | **str** | | [optional] +**liquidation_risk_ratio** | **str** | | [optional] +**base_asset_max_borrowable** | **str** | | [optional] +**quote_asset_max_borrowable** | **str** | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_margin_isolated_margin_tier_get200_response_inner import SapiV1MarginIsolatedMarginTierGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginIsolatedMarginTierGet200ResponseInner from a JSON string +sapi_v1_margin_isolated_margin_tier_get200_response_inner_instance = SapiV1MarginIsolatedMarginTierGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginIsolatedMarginTierGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_isolated_margin_tier_get200_response_inner_dict = sapi_v1_margin_isolated_margin_tier_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginIsolatedMarginTierGet200ResponseInner from a dict +sapi_v1_margin_isolated_margin_tier_get200_response_inner_from_dict = SapiV1MarginIsolatedMarginTierGet200ResponseInner.from_dict(sapi_v1_margin_isolated_margin_tier_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginLeverageBracketGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginLeverageBracketGet200ResponseInner.md new file mode 100644 index 0000000..0a7d12a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginLeverageBracketGet200ResponseInner.md @@ -0,0 +1,31 @@ +# SapiV1MarginLeverageBracketGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_names** | **List[str]** | | +**rank** | **int** | | +**brackets** | [**List[SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner]**](SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_leverage_bracket_get200_response_inner import SapiV1MarginLeverageBracketGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginLeverageBracketGet200ResponseInner from a JSON string +sapi_v1_margin_leverage_bracket_get200_response_inner_instance = SapiV1MarginLeverageBracketGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginLeverageBracketGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_leverage_bracket_get200_response_inner_dict = sapi_v1_margin_leverage_bracket_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginLeverageBracketGet200ResponseInner from a dict +sapi_v1_margin_leverage_bracket_get200_response_inner_from_dict = SapiV1MarginLeverageBracketGet200ResponseInner.from_dict(sapi_v1_margin_leverage_bracket_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner.md b/target/python/binance_openapi/docs/SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner.md new file mode 100644 index 0000000..cf554af --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner.md @@ -0,0 +1,33 @@ +# SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**leverage** | **int** | | [optional] +**max_debt** | **float** | | [optional] +**maintenance_margin_rate** | **float** | | [optional] +**initial_margin_rate** | **float** | | [optional] +**fast_num** | **float** | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner import SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner from a JSON string +sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner_instance = SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner_dict = sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner_instance.to_dict() +# create an instance of SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner from a dict +sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner_from_dict = SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner.from_dict(sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginMaxBorrowableGet200Response.md b/target/python/binance_openapi/docs/SapiV1MarginMaxBorrowableGet200Response.md new file mode 100644 index 0000000..a6c5189 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginMaxBorrowableGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1MarginMaxBorrowableGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **str** | account's currently max borrowable amount with sufficient system availability | +**borrow_limit** | **str** | max borrowable amount limited by the account level | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_max_borrowable_get200_response import SapiV1MarginMaxBorrowableGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginMaxBorrowableGet200Response from a JSON string +sapi_v1_margin_max_borrowable_get200_response_instance = SapiV1MarginMaxBorrowableGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginMaxBorrowableGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_max_borrowable_get200_response_dict = sapi_v1_margin_max_borrowable_get200_response_instance.to_dict() +# create an instance of SapiV1MarginMaxBorrowableGet200Response from a dict +sapi_v1_margin_max_borrowable_get200_response_from_dict = SapiV1MarginMaxBorrowableGet200Response.from_dict(sapi_v1_margin_max_borrowable_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginMaxLeveragePost200Response.md b/target/python/binance_openapi/docs/SapiV1MarginMaxLeveragePost200Response.md new file mode 100644 index 0000000..fbf4f16 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginMaxLeveragePost200Response.md @@ -0,0 +1,29 @@ +# SapiV1MarginMaxLeveragePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_max_leverage_post200_response import SapiV1MarginMaxLeveragePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginMaxLeveragePost200Response from a JSON string +sapi_v1_margin_max_leverage_post200_response_instance = SapiV1MarginMaxLeveragePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginMaxLeveragePost200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_max_leverage_post200_response_dict = sapi_v1_margin_max_leverage_post200_response_instance.to_dict() +# create an instance of SapiV1MarginMaxLeveragePost200Response from a dict +sapi_v1_margin_max_leverage_post200_response_from_dict = SapiV1MarginMaxLeveragePost200Response.from_dict(sapi_v1_margin_max_leverage_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginMaxTransferableGet200Response.md b/target/python/binance_openapi/docs/SapiV1MarginMaxTransferableGet200Response.md new file mode 100644 index 0000000..a9ed9b9 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginMaxTransferableGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1MarginMaxTransferableGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **str** | Account's currently max borrowable amount with sufficient system availability | +**borrow_limit** | **str** | Max borrowable amount limited by the account level | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_max_transferable_get200_response import SapiV1MarginMaxTransferableGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginMaxTransferableGet200Response from a JSON string +sapi_v1_margin_max_transferable_get200_response_instance = SapiV1MarginMaxTransferableGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginMaxTransferableGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_max_transferable_get200_response_dict = sapi_v1_margin_max_transferable_get200_response_instance.to_dict() +# create an instance of SapiV1MarginMaxTransferableGet200Response from a dict +sapi_v1_margin_max_transferable_get200_response_from_dict = SapiV1MarginMaxTransferableGet200Response.from_dict(sapi_v1_margin_max_transferable_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginNextHourlyInterestRateGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginNextHourlyInterestRateGet200ResponseInner.md new file mode 100644 index 0000000..1b7abfe --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginNextHourlyInterestRateGet200ResponseInner.md @@ -0,0 +1,30 @@ +# SapiV1MarginNextHourlyInterestRateGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**next_hourly_interest_rate** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_next_hourly_interest_rate_get200_response_inner import SapiV1MarginNextHourlyInterestRateGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginNextHourlyInterestRateGet200ResponseInner from a JSON string +sapi_v1_margin_next_hourly_interest_rate_get200_response_inner_instance = SapiV1MarginNextHourlyInterestRateGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginNextHourlyInterestRateGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_next_hourly_interest_rate_get200_response_inner_dict = sapi_v1_margin_next_hourly_interest_rate_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginNextHourlyInterestRateGet200ResponseInner from a dict +sapi_v1_margin_next_hourly_interest_rate_get200_response_inner_from_dict = SapiV1MarginNextHourlyInterestRateGet200ResponseInner.from_dict(sapi_v1_margin_next_hourly_interest_rate_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginOpenOrderListGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginOpenOrderListGet200ResponseInner.md new file mode 100644 index 0000000..e21946f --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginOpenOrderListGet200ResponseInner.md @@ -0,0 +1,37 @@ +# SapiV1MarginOpenOrderListGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_list_id** | **int** | | +**contingency_type** | **str** | | +**list_status_type** | **str** | | +**list_order_status** | **str** | | +**list_client_order_id** | **str** | | +**transaction_time** | **int** | | +**symbol** | **str** | | +**is_isolated** | **bool** | | +**orders** | [**List[ApiV3OpenOrderListGet200ResponseInnerOrdersInner]**](ApiV3OpenOrderListGet200ResponseInnerOrdersInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_open_order_list_get200_response_inner import SapiV1MarginOpenOrderListGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginOpenOrderListGet200ResponseInner from a JSON string +sapi_v1_margin_open_order_list_get200_response_inner_instance = SapiV1MarginOpenOrderListGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginOpenOrderListGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_open_order_list_get200_response_inner_dict = sapi_v1_margin_open_order_list_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginOpenOrderListGet200ResponseInner from a dict +sapi_v1_margin_open_order_list_get200_response_inner_from_dict = SapiV1MarginOpenOrderListGet200ResponseInner.from_dict(sapi_v1_margin_open_order_list_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginOpenOrdersDelete200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginOpenOrdersDelete200ResponseInner.md new file mode 100644 index 0000000..38b9b35 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginOpenOrdersDelete200ResponseInner.md @@ -0,0 +1,49 @@ +# SapiV1MarginOpenOrdersDelete200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**is_isolated** | **bool** | | +**orig_client_order_id** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**client_order_id** | **str** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**contingency_type** | **str** | | +**list_status_type** | **str** | | +**list_order_status** | **str** | | +**list_client_order_id** | **str** | | +**transaction_time** | **int** | | +**orders** | [**List[MarginOcoOrderOrdersInner]**](MarginOcoOrderOrdersInner.md) | | +**order_reports** | [**List[MarginOcoOrderOrderReportsInner]**](MarginOcoOrderOrderReportsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_open_orders_delete200_response_inner import SapiV1MarginOpenOrdersDelete200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginOpenOrdersDelete200ResponseInner from a JSON string +sapi_v1_margin_open_orders_delete200_response_inner_instance = SapiV1MarginOpenOrdersDelete200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginOpenOrdersDelete200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_open_orders_delete200_response_inner_dict = sapi_v1_margin_open_orders_delete200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginOpenOrdersDelete200ResponseInner from a dict +sapi_v1_margin_open_orders_delete200_response_inner_from_dict = SapiV1MarginOpenOrdersDelete200ResponseInner.from_dict(sapi_v1_margin_open_orders_delete200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginOrderListGet200Response.md b/target/python/binance_openapi/docs/SapiV1MarginOrderListGet200Response.md new file mode 100644 index 0000000..262ef3e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginOrderListGet200Response.md @@ -0,0 +1,37 @@ +# SapiV1MarginOrderListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_list_id** | **int** | | +**contingency_type** | **str** | | +**list_status_type** | **str** | | +**list_order_status** | **str** | | +**list_client_order_id** | **str** | | +**transaction_time** | **int** | | +**symbol** | **str** | | +**is_isolated** | **bool** | | +**orders** | [**List[ApiV3OrderListGet200ResponseOrdersInner]**](ApiV3OrderListGet200ResponseOrdersInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_order_list_get200_response import SapiV1MarginOrderListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginOrderListGet200Response from a JSON string +sapi_v1_margin_order_list_get200_response_instance = SapiV1MarginOrderListGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginOrderListGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_order_list_get200_response_dict = sapi_v1_margin_order_list_get200_response_instance.to_dict() +# create an instance of SapiV1MarginOrderListGet200Response from a dict +sapi_v1_margin_order_list_get200_response_from_dict = SapiV1MarginOrderListGet200Response.from_dict(sapi_v1_margin_order_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginOrderOcoPost200Response.md b/target/python/binance_openapi/docs/SapiV1MarginOrderOcoPost200Response.md new file mode 100644 index 0000000..1ae2071 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginOrderOcoPost200Response.md @@ -0,0 +1,40 @@ +# SapiV1MarginOrderOcoPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_list_id** | **int** | | +**contingency_type** | **str** | | +**list_status_type** | **str** | | +**list_order_status** | **str** | | +**list_client_order_id** | **str** | | +**transaction_time** | **int** | | +**symbol** | **str** | | +**margin_buy_borrow_amount** | **str** | will not return if no margin trade happens | +**margin_buy_borrow_asset** | **str** | will not return if no margin trade happens | +**is_isolated** | **bool** | | +**orders** | [**List[SapiV1MarginOrderOcoPost200ResponseOrdersInner]**](SapiV1MarginOrderOcoPost200ResponseOrdersInner.md) | | +**order_reports** | [**List[SapiV1MarginOrderOcoPost200ResponseOrderReportsInner]**](SapiV1MarginOrderOcoPost200ResponseOrderReportsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_order_oco_post200_response import SapiV1MarginOrderOcoPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginOrderOcoPost200Response from a JSON string +sapi_v1_margin_order_oco_post200_response_instance = SapiV1MarginOrderOcoPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginOrderOcoPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_order_oco_post200_response_dict = sapi_v1_margin_order_oco_post200_response_instance.to_dict() +# create an instance of SapiV1MarginOrderOcoPost200Response from a dict +sapi_v1_margin_order_oco_post200_response_from_dict = SapiV1MarginOrderOcoPost200Response.from_dict(sapi_v1_margin_order_oco_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginOrderOcoPost200ResponseOrderReportsInner.md b/target/python/binance_openapi/docs/SapiV1MarginOrderOcoPost200ResponseOrderReportsInner.md new file mode 100644 index 0000000..dbf2e3c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginOrderOcoPost200ResponseOrderReportsInner.md @@ -0,0 +1,42 @@ +# SapiV1MarginOrderOcoPost200ResponseOrderReportsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**order_list_id** | **int** | | +**client_order_id** | **str** | | +**transact_time** | **int** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**stop_price** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_order_oco_post200_response_order_reports_inner import SapiV1MarginOrderOcoPost200ResponseOrderReportsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginOrderOcoPost200ResponseOrderReportsInner from a JSON string +sapi_v1_margin_order_oco_post200_response_order_reports_inner_instance = SapiV1MarginOrderOcoPost200ResponseOrderReportsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginOrderOcoPost200ResponseOrderReportsInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_order_oco_post200_response_order_reports_inner_dict = sapi_v1_margin_order_oco_post200_response_order_reports_inner_instance.to_dict() +# create an instance of SapiV1MarginOrderOcoPost200ResponseOrderReportsInner from a dict +sapi_v1_margin_order_oco_post200_response_order_reports_inner_from_dict = SapiV1MarginOrderOcoPost200ResponseOrderReportsInner.from_dict(sapi_v1_margin_order_oco_post200_response_order_reports_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginOrderOcoPost200ResponseOrdersInner.md b/target/python/binance_openapi/docs/SapiV1MarginOrderOcoPost200ResponseOrdersInner.md new file mode 100644 index 0000000..c26c23e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginOrderOcoPost200ResponseOrdersInner.md @@ -0,0 +1,31 @@ +# SapiV1MarginOrderOcoPost200ResponseOrdersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**client_order_id** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_order_oco_post200_response_orders_inner import SapiV1MarginOrderOcoPost200ResponseOrdersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginOrderOcoPost200ResponseOrdersInner from a JSON string +sapi_v1_margin_order_oco_post200_response_orders_inner_instance = SapiV1MarginOrderOcoPost200ResponseOrdersInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginOrderOcoPost200ResponseOrdersInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_order_oco_post200_response_orders_inner_dict = sapi_v1_margin_order_oco_post200_response_orders_inner_instance.to_dict() +# create an instance of SapiV1MarginOrderOcoPost200ResponseOrdersInner from a dict +sapi_v1_margin_order_oco_post200_response_orders_inner_from_dict = SapiV1MarginOrderOcoPost200ResponseOrdersInner.from_dict(sapi_v1_margin_order_oco_post200_response_orders_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginOrderPost200Response.md b/target/python/binance_openapi/docs/SapiV1MarginOrderPost200Response.md new file mode 100644 index 0000000..16d6f9c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginOrderPost200Response.md @@ -0,0 +1,44 @@ +# SapiV1MarginOrderPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**order_id** | **int** | | +**client_order_id** | **str** | | +**is_isolated** | **bool** | | +**transact_time** | **int** | | +**price** | **str** | | +**orig_qty** | **str** | | +**executed_qty** | **str** | | +**cummulative_quote_qty** | **str** | | +**status** | **str** | | +**time_in_force** | **str** | | +**type** | **str** | | +**side** | **str** | | +**margin_buy_borrow_amount** | **float** | will not return if no margin trade happens | +**margin_buy_borrow_asset** | **str** | will not return if no margin trade happens | +**fills** | [**List[OrderResponseFullFillsInner]**](OrderResponseFullFillsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_order_post200_response import SapiV1MarginOrderPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginOrderPost200Response from a JSON string +sapi_v1_margin_order_post200_response_instance = SapiV1MarginOrderPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginOrderPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_order_post200_response_dict = sapi_v1_margin_order_post200_response_instance.to_dict() +# create an instance of SapiV1MarginOrderPost200Response from a dict +sapi_v1_margin_order_post200_response_from_dict = SapiV1MarginOrderPost200Response.from_dict(sapi_v1_margin_order_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginPriceIndexGet200Response.md b/target/python/binance_openapi/docs/SapiV1MarginPriceIndexGet200Response.md new file mode 100644 index 0000000..a9a6586 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginPriceIndexGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1MarginPriceIndexGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**calc_time** | **int** | | +**price** | **str** | | +**symbol** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_price_index_get200_response import SapiV1MarginPriceIndexGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginPriceIndexGet200Response from a JSON string +sapi_v1_margin_price_index_get200_response_instance = SapiV1MarginPriceIndexGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginPriceIndexGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_price_index_get200_response_dict = sapi_v1_margin_price_index_get200_response_instance.to_dict() +# create an instance of SapiV1MarginPriceIndexGet200Response from a dict +sapi_v1_margin_price_index_get200_response_from_dict = SapiV1MarginPriceIndexGet200Response.from_dict(sapi_v1_margin_price_index_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginRateLimitOrderGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1MarginRateLimitOrderGet200ResponseInner.md new file mode 100644 index 0000000..ba055f1 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginRateLimitOrderGet200ResponseInner.md @@ -0,0 +1,33 @@ +# SapiV1MarginRateLimitOrderGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rate_limit_type** | **str** | | +**interval** | **str** | | +**interval_num** | **int** | | +**limit** | **int** | | +**count** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_rate_limit_order_get200_response_inner import SapiV1MarginRateLimitOrderGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginRateLimitOrderGet200ResponseInner from a JSON string +sapi_v1_margin_rate_limit_order_get200_response_inner_instance = SapiV1MarginRateLimitOrderGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginRateLimitOrderGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_rate_limit_order_get200_response_inner_dict = sapi_v1_margin_rate_limit_order_get200_response_inner_instance.to_dict() +# create an instance of SapiV1MarginRateLimitOrderGet200ResponseInner from a dict +sapi_v1_margin_rate_limit_order_get200_response_inner_from_dict = SapiV1MarginRateLimitOrderGet200ResponseInner.from_dict(sapi_v1_margin_rate_limit_order_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginTradeCoeffGet200Response.md b/target/python/binance_openapi/docs/SapiV1MarginTradeCoeffGet200Response.md new file mode 100644 index 0000000..19a9e86 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginTradeCoeffGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1MarginTradeCoeffGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**normal_bar** | **str** | Account's currently max borrowable amount with sufficient system availability | [optional] +**margin_call_bar** | **str** | Max borrowable amount limited by the account level | [optional] +**force_liquidation_bar** | **str** | Liquidation Margin Ratio | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_margin_trade_coeff_get200_response import SapiV1MarginTradeCoeffGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginTradeCoeffGet200Response from a JSON string +sapi_v1_margin_trade_coeff_get200_response_instance = SapiV1MarginTradeCoeffGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginTradeCoeffGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_trade_coeff_get200_response_dict = sapi_v1_margin_trade_coeff_get200_response_instance.to_dict() +# create an instance of SapiV1MarginTradeCoeffGet200Response from a dict +sapi_v1_margin_trade_coeff_get200_response_from_dict = SapiV1MarginTradeCoeffGet200Response.from_dict(sapi_v1_margin_trade_coeff_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginTransferGet200Response.md b/target/python/binance_openapi/docs/SapiV1MarginTransferGet200Response.md new file mode 100644 index 0000000..dbf9ed0 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginTransferGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1MarginTransferGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1MarginTransferGet200ResponseRowsInner]**](SapiV1MarginTransferGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_transfer_get200_response import SapiV1MarginTransferGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginTransferGet200Response from a JSON string +sapi_v1_margin_transfer_get200_response_instance = SapiV1MarginTransferGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginTransferGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_margin_transfer_get200_response_dict = sapi_v1_margin_transfer_get200_response_instance.to_dict() +# create an instance of SapiV1MarginTransferGet200Response from a dict +sapi_v1_margin_transfer_get200_response_from_dict = SapiV1MarginTransferGet200Response.from_dict(sapi_v1_margin_transfer_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MarginTransferGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1MarginTransferGet200ResponseRowsInner.md new file mode 100644 index 0000000..b5d198b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MarginTransferGet200ResponseRowsInner.md @@ -0,0 +1,34 @@ +# SapiV1MarginTransferGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **str** | | +**asset** | **str** | | +**status** | **str** | | +**timestamp** | **int** | | +**tx_id** | **int** | | +**type** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_margin_transfer_get200_response_rows_inner import SapiV1MarginTransferGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MarginTransferGet200ResponseRowsInner from a JSON string +sapi_v1_margin_transfer_get200_response_rows_inner_instance = SapiV1MarginTransferGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MarginTransferGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_margin_transfer_get200_response_rows_inner_dict = sapi_v1_margin_transfer_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1MarginTransferGet200ResponseRowsInner from a dict +sapi_v1_margin_transfer_get200_response_rows_inner_from_dict = SapiV1MarginTransferGet200ResponseRowsInner.from_dict(sapi_v1_margin_transfer_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigCancelPost200Response.md b/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigCancelPost200Response.md new file mode 100644 index 0000000..af578b8 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigCancelPost200Response.md @@ -0,0 +1,31 @@ +# SapiV1MiningHashTransferConfigCancelPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**data** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_hash_transfer_config_cancel_post200_response import SapiV1MiningHashTransferConfigCancelPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningHashTransferConfigCancelPost200Response from a JSON string +sapi_v1_mining_hash_transfer_config_cancel_post200_response_instance = SapiV1MiningHashTransferConfigCancelPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningHashTransferConfigCancelPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_mining_hash_transfer_config_cancel_post200_response_dict = sapi_v1_mining_hash_transfer_config_cancel_post200_response_instance.to_dict() +# create an instance of SapiV1MiningHashTransferConfigCancelPost200Response from a dict +sapi_v1_mining_hash_transfer_config_cancel_post200_response_from_dict = SapiV1MiningHashTransferConfigCancelPost200Response.from_dict(sapi_v1_mining_hash_transfer_config_cancel_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigDetailsListGet200Response.md b/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigDetailsListGet200Response.md new file mode 100644 index 0000000..b4945f5 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigDetailsListGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1MiningHashTransferConfigDetailsListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**data** | [**SapiV1MiningHashTransferConfigDetailsListGet200ResponseData**](SapiV1MiningHashTransferConfigDetailsListGet200ResponseData.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response import SapiV1MiningHashTransferConfigDetailsListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningHashTransferConfigDetailsListGet200Response from a JSON string +sapi_v1_mining_hash_transfer_config_details_list_get200_response_instance = SapiV1MiningHashTransferConfigDetailsListGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningHashTransferConfigDetailsListGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_mining_hash_transfer_config_details_list_get200_response_dict = sapi_v1_mining_hash_transfer_config_details_list_get200_response_instance.to_dict() +# create an instance of SapiV1MiningHashTransferConfigDetailsListGet200Response from a dict +sapi_v1_mining_hash_transfer_config_details_list_get200_response_from_dict = SapiV1MiningHashTransferConfigDetailsListGet200Response.from_dict(sapi_v1_mining_hash_transfer_config_details_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigDetailsListGet200ResponseData.md b/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigDetailsListGet200ResponseData.md new file mode 100644 index 0000000..819884e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigDetailsListGet200ResponseData.md @@ -0,0 +1,31 @@ +# SapiV1MiningHashTransferConfigDetailsListGet200ResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config_details** | [**List[SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner]**](SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner.md) | | +**total_num** | **int** | | +**page_size** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response_data import SapiV1MiningHashTransferConfigDetailsListGet200ResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningHashTransferConfigDetailsListGet200ResponseData from a JSON string +sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_instance = SapiV1MiningHashTransferConfigDetailsListGet200ResponseData.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningHashTransferConfigDetailsListGet200ResponseData.to_json()) + +# convert the object into a dict +sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_dict = sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_instance.to_dict() +# create an instance of SapiV1MiningHashTransferConfigDetailsListGet200ResponseData from a dict +sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_from_dict = SapiV1MiningHashTransferConfigDetailsListGet200ResponseData.from_dict(sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner.md b/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner.md new file mode 100644 index 0000000..e037994 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner.md @@ -0,0 +1,36 @@ +# SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config_id** | **int** | Mining ID | +**pool_username** | **str** | Transfer out of subaccount | +**to_pool_username** | **str** | Transfer into subaccount | +**algo_name** | **str** | Transfer algorithm | +**hash_rate** | **int** | Transferred Hashrate quantity | +**start_day** | **int** | Start date | +**end_day** | **int** | End date | +**status** | **int** | 0 Processing, 1:Cancelled, 2:Terminated | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner import SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner from a JSON string +sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner_instance = SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner.to_json()) + +# convert the object into a dict +sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner_dict = sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner_instance.to_dict() +# create an instance of SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner from a dict +sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner_from_dict = SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner.from_dict(sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigPost200Response.md b/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigPost200Response.md new file mode 100644 index 0000000..97f1257 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningHashTransferConfigPost200Response.md @@ -0,0 +1,31 @@ +# SapiV1MiningHashTransferConfigPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**data** | **int** | Mining Account | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_hash_transfer_config_post200_response import SapiV1MiningHashTransferConfigPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningHashTransferConfigPost200Response from a JSON string +sapi_v1_mining_hash_transfer_config_post200_response_instance = SapiV1MiningHashTransferConfigPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningHashTransferConfigPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_mining_hash_transfer_config_post200_response_dict = sapi_v1_mining_hash_transfer_config_post200_response_instance.to_dict() +# create an instance of SapiV1MiningHashTransferConfigPost200Response from a dict +sapi_v1_mining_hash_transfer_config_post200_response_from_dict = SapiV1MiningHashTransferConfigPost200Response.from_dict(sapi_v1_mining_hash_transfer_config_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningHashTransferProfitDetailsGet200Response.md b/target/python/binance_openapi/docs/SapiV1MiningHashTransferProfitDetailsGet200Response.md new file mode 100644 index 0000000..edeb495 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningHashTransferProfitDetailsGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1MiningHashTransferProfitDetailsGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**data** | [**SapiV1MiningHashTransferProfitDetailsGet200ResponseData**](SapiV1MiningHashTransferProfitDetailsGet200ResponseData.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response import SapiV1MiningHashTransferProfitDetailsGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningHashTransferProfitDetailsGet200Response from a JSON string +sapi_v1_mining_hash_transfer_profit_details_get200_response_instance = SapiV1MiningHashTransferProfitDetailsGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningHashTransferProfitDetailsGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_mining_hash_transfer_profit_details_get200_response_dict = sapi_v1_mining_hash_transfer_profit_details_get200_response_instance.to_dict() +# create an instance of SapiV1MiningHashTransferProfitDetailsGet200Response from a dict +sapi_v1_mining_hash_transfer_profit_details_get200_response_from_dict = SapiV1MiningHashTransferProfitDetailsGet200Response.from_dict(sapi_v1_mining_hash_transfer_profit_details_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningHashTransferProfitDetailsGet200ResponseData.md b/target/python/binance_openapi/docs/SapiV1MiningHashTransferProfitDetailsGet200ResponseData.md new file mode 100644 index 0000000..8c1280b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningHashTransferProfitDetailsGet200ResponseData.md @@ -0,0 +1,31 @@ +# SapiV1MiningHashTransferProfitDetailsGet200ResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**profit_transfer_details** | [**List[SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner]**](SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner.md) | | +**total_num** | **int** | | +**page_size** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response_data import SapiV1MiningHashTransferProfitDetailsGet200ResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningHashTransferProfitDetailsGet200ResponseData from a JSON string +sapi_v1_mining_hash_transfer_profit_details_get200_response_data_instance = SapiV1MiningHashTransferProfitDetailsGet200ResponseData.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningHashTransferProfitDetailsGet200ResponseData.to_json()) + +# convert the object into a dict +sapi_v1_mining_hash_transfer_profit_details_get200_response_data_dict = sapi_v1_mining_hash_transfer_profit_details_get200_response_data_instance.to_dict() +# create an instance of SapiV1MiningHashTransferProfitDetailsGet200ResponseData from a dict +sapi_v1_mining_hash_transfer_profit_details_get200_response_data_from_dict = SapiV1MiningHashTransferProfitDetailsGet200ResponseData.from_dict(sapi_v1_mining_hash_transfer_profit_details_get200_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner.md b/target/python/binance_openapi/docs/SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner.md new file mode 100644 index 0000000..09e371d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner.md @@ -0,0 +1,35 @@ +# SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pool_username** | **str** | Transfer out of sub-account | +**to_pool_username** | **str** | Transfer into subaccount | +**algo_name** | **str** | Transfer algorithm | +**hash_rate** | **int** | Transferred Hashrate quantity | +**day** | **int** | Transfer date | +**amount** | **float** | Transfer income | +**coin_name** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner import SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner from a JSON string +sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner_instance = SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner.to_json()) + +# convert the object into a dict +sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner_dict = sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner_instance.to_dict() +# create an instance of SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner from a dict +sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner_from_dict = SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner.from_dict(sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningPaymentListGet200Response.md b/target/python/binance_openapi/docs/SapiV1MiningPaymentListGet200Response.md new file mode 100644 index 0000000..fe0aed0 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningPaymentListGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1MiningPaymentListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**data** | [**SapiV1MiningPaymentListGet200ResponseData**](SapiV1MiningPaymentListGet200ResponseData.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_payment_list_get200_response import SapiV1MiningPaymentListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningPaymentListGet200Response from a JSON string +sapi_v1_mining_payment_list_get200_response_instance = SapiV1MiningPaymentListGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningPaymentListGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_mining_payment_list_get200_response_dict = sapi_v1_mining_payment_list_get200_response_instance.to_dict() +# create an instance of SapiV1MiningPaymentListGet200Response from a dict +sapi_v1_mining_payment_list_get200_response_from_dict = SapiV1MiningPaymentListGet200Response.from_dict(sapi_v1_mining_payment_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningPaymentListGet200ResponseData.md b/target/python/binance_openapi/docs/SapiV1MiningPaymentListGet200ResponseData.md new file mode 100644 index 0000000..204dbaf --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningPaymentListGet200ResponseData.md @@ -0,0 +1,31 @@ +# SapiV1MiningPaymentListGet200ResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_profits** | [**List[SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner]**](SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner.md) | | +**total_num** | **int** | Total Rows | +**page_size** | **int** | Rows per page | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_payment_list_get200_response_data import SapiV1MiningPaymentListGet200ResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningPaymentListGet200ResponseData from a JSON string +sapi_v1_mining_payment_list_get200_response_data_instance = SapiV1MiningPaymentListGet200ResponseData.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningPaymentListGet200ResponseData.to_json()) + +# convert the object into a dict +sapi_v1_mining_payment_list_get200_response_data_dict = sapi_v1_mining_payment_list_get200_response_data_instance.to_dict() +# create an instance of SapiV1MiningPaymentListGet200ResponseData from a dict +sapi_v1_mining_payment_list_get200_response_data_from_dict = SapiV1MiningPaymentListGet200ResponseData.from_dict(sapi_v1_mining_payment_list_get200_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner.md b/target/python/binance_openapi/docs/SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner.md new file mode 100644 index 0000000..f2d0e8a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner.md @@ -0,0 +1,36 @@ +# SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | Mining date | +**type** | **int** | 0:Mining Wallet,5:Mining Address,7:Pool Savings,8:Transferred,31:Income Transfer ,32:Hashrate Resale-Mining Wallet 33:Hashrate Resale-Pool Savings | +**hash_transfer** | **int** | Transferred Hashrate | +**transfer_amount** | **float** | Transferred Income | +**day_hash_rate** | **int** | Daily Hashrate | +**profit_amount** | **float** | Earnings Amount | +**coin_name** | **str** | Coin Type | +**status** | **int** | Status:0:Unpaid, 1:Paying 2:Paid | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_payment_list_get200_response_data_account_profits_inner import SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner from a JSON string +sapi_v1_mining_payment_list_get200_response_data_account_profits_inner_instance = SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner.to_json()) + +# convert the object into a dict +sapi_v1_mining_payment_list_get200_response_data_account_profits_inner_dict = sapi_v1_mining_payment_list_get200_response_data_account_profits_inner_instance.to_dict() +# create an instance of SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner from a dict +sapi_v1_mining_payment_list_get200_response_data_account_profits_inner_from_dict = SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner.from_dict(sapi_v1_mining_payment_list_get200_response_data_account_profits_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningPaymentOtherGet200Response.md b/target/python/binance_openapi/docs/SapiV1MiningPaymentOtherGet200Response.md new file mode 100644 index 0000000..9c227e3 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningPaymentOtherGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1MiningPaymentOtherGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**data** | [**SapiV1MiningPaymentOtherGet200ResponseData**](SapiV1MiningPaymentOtherGet200ResponseData.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_payment_other_get200_response import SapiV1MiningPaymentOtherGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningPaymentOtherGet200Response from a JSON string +sapi_v1_mining_payment_other_get200_response_instance = SapiV1MiningPaymentOtherGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningPaymentOtherGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_mining_payment_other_get200_response_dict = sapi_v1_mining_payment_other_get200_response_instance.to_dict() +# create an instance of SapiV1MiningPaymentOtherGet200Response from a dict +sapi_v1_mining_payment_other_get200_response_from_dict = SapiV1MiningPaymentOtherGet200Response.from_dict(sapi_v1_mining_payment_other_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningPaymentOtherGet200ResponseData.md b/target/python/binance_openapi/docs/SapiV1MiningPaymentOtherGet200ResponseData.md new file mode 100644 index 0000000..9f79256 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningPaymentOtherGet200ResponseData.md @@ -0,0 +1,31 @@ +# SapiV1MiningPaymentOtherGet200ResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**other_profits** | [**List[SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner]**](SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner.md) | | +**total_num** | **int** | Total Rows | +**page_size** | **int** | Rows per page | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_payment_other_get200_response_data import SapiV1MiningPaymentOtherGet200ResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningPaymentOtherGet200ResponseData from a JSON string +sapi_v1_mining_payment_other_get200_response_data_instance = SapiV1MiningPaymentOtherGet200ResponseData.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningPaymentOtherGet200ResponseData.to_json()) + +# convert the object into a dict +sapi_v1_mining_payment_other_get200_response_data_dict = sapi_v1_mining_payment_other_get200_response_data_instance.to_dict() +# create an instance of SapiV1MiningPaymentOtherGet200ResponseData from a dict +sapi_v1_mining_payment_other_get200_response_data_from_dict = SapiV1MiningPaymentOtherGet200ResponseData.from_dict(sapi_v1_mining_payment_other_get200_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner.md b/target/python/binance_openapi/docs/SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner.md new file mode 100644 index 0000000..dc3be5c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner.md @@ -0,0 +1,33 @@ +# SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | Mining date | +**coin_name** | **str** | Coin Name | +**type** | **int** | 1: Merged Mining, 2: Activity Bonus, 3:Rebate 4:Smart Pool 6:Income Transfer 7:Pool Savings | +**profit_amount** | **float** | | +**status** | **int** | 0:Unpaid, 1:Paying 2:Paid | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_payment_other_get200_response_data_other_profits_inner import SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner from a JSON string +sapi_v1_mining_payment_other_get200_response_data_other_profits_inner_instance = SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner.to_json()) + +# convert the object into a dict +sapi_v1_mining_payment_other_get200_response_data_other_profits_inner_dict = sapi_v1_mining_payment_other_get200_response_data_other_profits_inner_instance.to_dict() +# create an instance of SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner from a dict +sapi_v1_mining_payment_other_get200_response_data_other_profits_inner_from_dict = SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner.from_dict(sapi_v1_mining_payment_other_get200_response_data_other_profits_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningPaymentUidGet200Response.md b/target/python/binance_openapi/docs/SapiV1MiningPaymentUidGet200Response.md new file mode 100644 index 0000000..b27bf6b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningPaymentUidGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1MiningPaymentUidGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**data** | [**SapiV1MiningPaymentUidGet200ResponseData**](SapiV1MiningPaymentUidGet200ResponseData.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response import SapiV1MiningPaymentUidGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningPaymentUidGet200Response from a JSON string +sapi_v1_mining_payment_uid_get200_response_instance = SapiV1MiningPaymentUidGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningPaymentUidGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_mining_payment_uid_get200_response_dict = sapi_v1_mining_payment_uid_get200_response_instance.to_dict() +# create an instance of SapiV1MiningPaymentUidGet200Response from a dict +sapi_v1_mining_payment_uid_get200_response_from_dict = SapiV1MiningPaymentUidGet200Response.from_dict(sapi_v1_mining_payment_uid_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningPaymentUidGet200ResponseData.md b/target/python/binance_openapi/docs/SapiV1MiningPaymentUidGet200ResponseData.md new file mode 100644 index 0000000..5c80a39 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningPaymentUidGet200ResponseData.md @@ -0,0 +1,31 @@ +# SapiV1MiningPaymentUidGet200ResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_profits** | [**List[SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner]**](SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner.md) | | +**total_num** | **int** | | +**page_size** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response_data import SapiV1MiningPaymentUidGet200ResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningPaymentUidGet200ResponseData from a JSON string +sapi_v1_mining_payment_uid_get200_response_data_instance = SapiV1MiningPaymentUidGet200ResponseData.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningPaymentUidGet200ResponseData.to_json()) + +# convert the object into a dict +sapi_v1_mining_payment_uid_get200_response_data_dict = sapi_v1_mining_payment_uid_get200_response_data_instance.to_dict() +# create an instance of SapiV1MiningPaymentUidGet200ResponseData from a dict +sapi_v1_mining_payment_uid_get200_response_data_from_dict = SapiV1MiningPaymentUidGet200ResponseData.from_dict(sapi_v1_mining_payment_uid_get200_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner.md b/target/python/binance_openapi/docs/SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner.md new file mode 100644 index 0000000..dae1673 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner.md @@ -0,0 +1,34 @@ +# SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | | +**coin_name** | **str** | | +**type** | **int** | 0:Referral 1:Refund 2:Rebate | +**puid** | **int** | puid | +**sub_name** | **str** | Mining account | +**amount** | **float** | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner import SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner from a JSON string +sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner_instance = SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner.to_json()) + +# convert the object into a dict +sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner_dict = sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner_instance.to_dict() +# create an instance of SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner from a dict +sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner_from_dict = SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner.from_dict(sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningPubAlgoListGet200Response.md b/target/python/binance_openapi/docs/SapiV1MiningPubAlgoListGet200Response.md new file mode 100644 index 0000000..cf93061 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningPubAlgoListGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1MiningPubAlgoListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**data** | [**List[SapiV1MiningPubAlgoListGet200ResponseDataInner]**](SapiV1MiningPubAlgoListGet200ResponseDataInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_pub_algo_list_get200_response import SapiV1MiningPubAlgoListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningPubAlgoListGet200Response from a JSON string +sapi_v1_mining_pub_algo_list_get200_response_instance = SapiV1MiningPubAlgoListGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningPubAlgoListGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_mining_pub_algo_list_get200_response_dict = sapi_v1_mining_pub_algo_list_get200_response_instance.to_dict() +# create an instance of SapiV1MiningPubAlgoListGet200Response from a dict +sapi_v1_mining_pub_algo_list_get200_response_from_dict = SapiV1MiningPubAlgoListGet200Response.from_dict(sapi_v1_mining_pub_algo_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningPubAlgoListGet200ResponseDataInner.md b/target/python/binance_openapi/docs/SapiV1MiningPubAlgoListGet200ResponseDataInner.md new file mode 100644 index 0000000..5a8b805 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningPubAlgoListGet200ResponseDataInner.md @@ -0,0 +1,32 @@ +# SapiV1MiningPubAlgoListGet200ResponseDataInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**algo_name** | **str** | | +**algo_id** | **int** | | +**pool_index** | **int** | | +**unit** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_pub_algo_list_get200_response_data_inner import SapiV1MiningPubAlgoListGet200ResponseDataInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningPubAlgoListGet200ResponseDataInner from a JSON string +sapi_v1_mining_pub_algo_list_get200_response_data_inner_instance = SapiV1MiningPubAlgoListGet200ResponseDataInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningPubAlgoListGet200ResponseDataInner.to_json()) + +# convert the object into a dict +sapi_v1_mining_pub_algo_list_get200_response_data_inner_dict = sapi_v1_mining_pub_algo_list_get200_response_data_inner_instance.to_dict() +# create an instance of SapiV1MiningPubAlgoListGet200ResponseDataInner from a dict +sapi_v1_mining_pub_algo_list_get200_response_data_inner_from_dict = SapiV1MiningPubAlgoListGet200ResponseDataInner.from_dict(sapi_v1_mining_pub_algo_list_get200_response_data_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningPubCoinListGet200Response.md b/target/python/binance_openapi/docs/SapiV1MiningPubCoinListGet200Response.md new file mode 100644 index 0000000..a7f785b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningPubCoinListGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1MiningPubCoinListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**data** | [**List[SapiV1MiningPubCoinListGet200ResponseDataInner]**](SapiV1MiningPubCoinListGet200ResponseDataInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_pub_coin_list_get200_response import SapiV1MiningPubCoinListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningPubCoinListGet200Response from a JSON string +sapi_v1_mining_pub_coin_list_get200_response_instance = SapiV1MiningPubCoinListGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningPubCoinListGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_mining_pub_coin_list_get200_response_dict = sapi_v1_mining_pub_coin_list_get200_response_instance.to_dict() +# create an instance of SapiV1MiningPubCoinListGet200Response from a dict +sapi_v1_mining_pub_coin_list_get200_response_from_dict = SapiV1MiningPubCoinListGet200Response.from_dict(sapi_v1_mining_pub_coin_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningPubCoinListGet200ResponseDataInner.md b/target/python/binance_openapi/docs/SapiV1MiningPubCoinListGet200ResponseDataInner.md new file mode 100644 index 0000000..864e4b7 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningPubCoinListGet200ResponseDataInner.md @@ -0,0 +1,33 @@ +# SapiV1MiningPubCoinListGet200ResponseDataInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**coin_name** | **str** | | +**coin_id** | **int** | | +**pool_index** | **int** | | +**algo_id** | **int** | | +**algo_name** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_pub_coin_list_get200_response_data_inner import SapiV1MiningPubCoinListGet200ResponseDataInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningPubCoinListGet200ResponseDataInner from a JSON string +sapi_v1_mining_pub_coin_list_get200_response_data_inner_instance = SapiV1MiningPubCoinListGet200ResponseDataInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningPubCoinListGet200ResponseDataInner.to_json()) + +# convert the object into a dict +sapi_v1_mining_pub_coin_list_get200_response_data_inner_dict = sapi_v1_mining_pub_coin_list_get200_response_data_inner_instance.to_dict() +# create an instance of SapiV1MiningPubCoinListGet200ResponseDataInner from a dict +sapi_v1_mining_pub_coin_list_get200_response_data_inner_from_dict = SapiV1MiningPubCoinListGet200ResponseDataInner.from_dict(sapi_v1_mining_pub_coin_list_get200_response_data_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserListGet200Response.md b/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserListGet200Response.md new file mode 100644 index 0000000..fb1187b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserListGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1MiningStatisticsUserListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**data** | [**List[SapiV1MiningStatisticsUserListGet200ResponseDataInner]**](SapiV1MiningStatisticsUserListGet200ResponseDataInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response import SapiV1MiningStatisticsUserListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningStatisticsUserListGet200Response from a JSON string +sapi_v1_mining_statistics_user_list_get200_response_instance = SapiV1MiningStatisticsUserListGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningStatisticsUserListGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_mining_statistics_user_list_get200_response_dict = sapi_v1_mining_statistics_user_list_get200_response_instance.to_dict() +# create an instance of SapiV1MiningStatisticsUserListGet200Response from a dict +sapi_v1_mining_statistics_user_list_get200_response_from_dict = SapiV1MiningStatisticsUserListGet200Response.from_dict(sapi_v1_mining_statistics_user_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserListGet200ResponseDataInner.md b/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserListGet200ResponseDataInner.md new file mode 100644 index 0000000..4cca695 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserListGet200ResponseDataInner.md @@ -0,0 +1,31 @@ +# SapiV1MiningStatisticsUserListGet200ResponseDataInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**user_name** | **str** | | +**list** | [**List[SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner]**](SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response_data_inner import SapiV1MiningStatisticsUserListGet200ResponseDataInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningStatisticsUserListGet200ResponseDataInner from a JSON string +sapi_v1_mining_statistics_user_list_get200_response_data_inner_instance = SapiV1MiningStatisticsUserListGet200ResponseDataInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningStatisticsUserListGet200ResponseDataInner.to_json()) + +# convert the object into a dict +sapi_v1_mining_statistics_user_list_get200_response_data_inner_dict = sapi_v1_mining_statistics_user_list_get200_response_data_inner_instance.to_dict() +# create an instance of SapiV1MiningStatisticsUserListGet200ResponseDataInner from a dict +sapi_v1_mining_statistics_user_list_get200_response_data_inner_from_dict = SapiV1MiningStatisticsUserListGet200ResponseDataInner.from_dict(sapi_v1_mining_statistics_user_list_get200_response_data_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner.md b/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner.md new file mode 100644 index 0000000..87cc6bb --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner.md @@ -0,0 +1,31 @@ +# SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | | +**hashrate** | **str** | | +**reject** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner import SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner from a JSON string +sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner_instance = SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner.to_json()) + +# convert the object into a dict +sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner_dict = sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner_instance.to_dict() +# create an instance of SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner from a dict +sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner_from_dict = SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner.from_dict(sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserStatusGet200Response.md b/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserStatusGet200Response.md new file mode 100644 index 0000000..3770144 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserStatusGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1MiningStatisticsUserStatusGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**data** | [**SapiV1MiningStatisticsUserStatusGet200ResponseData**](SapiV1MiningStatisticsUserStatusGet200ResponseData.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response import SapiV1MiningStatisticsUserStatusGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningStatisticsUserStatusGet200Response from a JSON string +sapi_v1_mining_statistics_user_status_get200_response_instance = SapiV1MiningStatisticsUserStatusGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningStatisticsUserStatusGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_mining_statistics_user_status_get200_response_dict = sapi_v1_mining_statistics_user_status_get200_response_instance.to_dict() +# create an instance of SapiV1MiningStatisticsUserStatusGet200Response from a dict +sapi_v1_mining_statistics_user_status_get200_response_from_dict = SapiV1MiningStatisticsUserStatusGet200Response.from_dict(sapi_v1_mining_statistics_user_status_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserStatusGet200ResponseData.md b/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserStatusGet200ResponseData.md new file mode 100644 index 0000000..e6dfbd3 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserStatusGet200ResponseData.md @@ -0,0 +1,37 @@ +# SapiV1MiningStatisticsUserStatusGet200ResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fifteen_min_hash_rate** | **str** | | +**day_hash_rate** | **str** | | +**valid_num** | **int** | | +**invalid_num** | **int** | | +**profit_today** | [**SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday**](SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday.md) | | +**profit_yesterday** | [**SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday**](SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday.md) | | +**user_name** | **str** | | +**unit** | **str** | | +**algo** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response_data import SapiV1MiningStatisticsUserStatusGet200ResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningStatisticsUserStatusGet200ResponseData from a JSON string +sapi_v1_mining_statistics_user_status_get200_response_data_instance = SapiV1MiningStatisticsUserStatusGet200ResponseData.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningStatisticsUserStatusGet200ResponseData.to_json()) + +# convert the object into a dict +sapi_v1_mining_statistics_user_status_get200_response_data_dict = sapi_v1_mining_statistics_user_status_get200_response_data_instance.to_dict() +# create an instance of SapiV1MiningStatisticsUserStatusGet200ResponseData from a dict +sapi_v1_mining_statistics_user_status_get200_response_data_from_dict = SapiV1MiningStatisticsUserStatusGet200ResponseData.from_dict(sapi_v1_mining_statistics_user_status_get200_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday.md b/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday.md new file mode 100644 index 0000000..c509eb2 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday.md @@ -0,0 +1,31 @@ +# SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**btc** | **str** | | +**bsv** | **str** | | +**bch** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response_data_profit_today import SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday from a JSON string +sapi_v1_mining_statistics_user_status_get200_response_data_profit_today_instance = SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday.to_json()) + +# convert the object into a dict +sapi_v1_mining_statistics_user_status_get200_response_data_profit_today_dict = sapi_v1_mining_statistics_user_status_get200_response_data_profit_today_instance.to_dict() +# create an instance of SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday from a dict +sapi_v1_mining_statistics_user_status_get200_response_data_profit_today_from_dict = SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday.from_dict(sapi_v1_mining_statistics_user_status_get200_response_data_profit_today_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningWorkerDetailGet200Response.md b/target/python/binance_openapi/docs/SapiV1MiningWorkerDetailGet200Response.md new file mode 100644 index 0000000..2624048 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningWorkerDetailGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1MiningWorkerDetailGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**data** | [**List[SapiV1MiningWorkerDetailGet200ResponseDataInner]**](SapiV1MiningWorkerDetailGet200ResponseDataInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response import SapiV1MiningWorkerDetailGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningWorkerDetailGet200Response from a JSON string +sapi_v1_mining_worker_detail_get200_response_instance = SapiV1MiningWorkerDetailGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningWorkerDetailGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_mining_worker_detail_get200_response_dict = sapi_v1_mining_worker_detail_get200_response_instance.to_dict() +# create an instance of SapiV1MiningWorkerDetailGet200Response from a dict +sapi_v1_mining_worker_detail_get200_response_from_dict = SapiV1MiningWorkerDetailGet200Response.from_dict(sapi_v1_mining_worker_detail_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningWorkerDetailGet200ResponseDataInner.md b/target/python/binance_openapi/docs/SapiV1MiningWorkerDetailGet200ResponseDataInner.md new file mode 100644 index 0000000..a92efed --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningWorkerDetailGet200ResponseDataInner.md @@ -0,0 +1,31 @@ +# SapiV1MiningWorkerDetailGet200ResponseDataInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**worker_name** | **str** | Mining Account name | +**type** | **str** | Type of hourly hashrate | +**hashrate_datas** | [**List[SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner]**](SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response_data_inner import SapiV1MiningWorkerDetailGet200ResponseDataInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningWorkerDetailGet200ResponseDataInner from a JSON string +sapi_v1_mining_worker_detail_get200_response_data_inner_instance = SapiV1MiningWorkerDetailGet200ResponseDataInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningWorkerDetailGet200ResponseDataInner.to_json()) + +# convert the object into a dict +sapi_v1_mining_worker_detail_get200_response_data_inner_dict = sapi_v1_mining_worker_detail_get200_response_data_inner_instance.to_dict() +# create an instance of SapiV1MiningWorkerDetailGet200ResponseDataInner from a dict +sapi_v1_mining_worker_detail_get200_response_data_inner_from_dict = SapiV1MiningWorkerDetailGet200ResponseDataInner.from_dict(sapi_v1_mining_worker_detail_get200_response_data_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner.md b/target/python/binance_openapi/docs/SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner.md new file mode 100644 index 0000000..e839dff --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner.md @@ -0,0 +1,31 @@ +# SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **int** | | +**hashrate** | **str** | | +**reject** | **int** | Rejection Rate | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner import SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner from a JSON string +sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner_instance = SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner.to_json()) + +# convert the object into a dict +sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner_dict = sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner_instance.to_dict() +# create an instance of SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner from a dict +sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner_from_dict = SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner.from_dict(sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningWorkerListGet200Response.md b/target/python/binance_openapi/docs/SapiV1MiningWorkerListGet200Response.md new file mode 100644 index 0000000..dc906b0 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningWorkerListGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1MiningWorkerListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**data** | [**SapiV1MiningWorkerListGet200ResponseData**](SapiV1MiningWorkerListGet200ResponseData.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_worker_list_get200_response import SapiV1MiningWorkerListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningWorkerListGet200Response from a JSON string +sapi_v1_mining_worker_list_get200_response_instance = SapiV1MiningWorkerListGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningWorkerListGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_mining_worker_list_get200_response_dict = sapi_v1_mining_worker_list_get200_response_instance.to_dict() +# create an instance of SapiV1MiningWorkerListGet200Response from a dict +sapi_v1_mining_worker_list_get200_response_from_dict = SapiV1MiningWorkerListGet200Response.from_dict(sapi_v1_mining_worker_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningWorkerListGet200ResponseData.md b/target/python/binance_openapi/docs/SapiV1MiningWorkerListGet200ResponseData.md new file mode 100644 index 0000000..c8ad74a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningWorkerListGet200ResponseData.md @@ -0,0 +1,31 @@ +# SapiV1MiningWorkerListGet200ResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**worker_datas** | [**List[SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner]**](SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner.md) | | +**total_num** | **int** | | +**page_size** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_worker_list_get200_response_data import SapiV1MiningWorkerListGet200ResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningWorkerListGet200ResponseData from a JSON string +sapi_v1_mining_worker_list_get200_response_data_instance = SapiV1MiningWorkerListGet200ResponseData.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningWorkerListGet200ResponseData.to_json()) + +# convert the object into a dict +sapi_v1_mining_worker_list_get200_response_data_dict = sapi_v1_mining_worker_list_get200_response_data_instance.to_dict() +# create an instance of SapiV1MiningWorkerListGet200ResponseData from a dict +sapi_v1_mining_worker_list_get200_response_data_from_dict = SapiV1MiningWorkerListGet200ResponseData.from_dict(sapi_v1_mining_worker_list_get200_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner.md b/target/python/binance_openapi/docs/SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner.md new file mode 100644 index 0000000..3b46fb0 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner.md @@ -0,0 +1,35 @@ +# SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**worker_id** | **str** | | +**worker_name** | **str** | | +**status** | **int** | Status:1 valid, 2 invalid, 3 no longer valid | +**hash_rate** | **int** | Real-time rate | +**day_hash_rate** | **int** | 24H Hashrate | +**reject_rate** | **int** | Real-time Rejection Rate | +**last_share_time** | **int** | Last submission time | + +## Example + +```python +from openapi_client.models.sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner import SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner from a JSON string +sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner_instance = SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner.to_json()) + +# convert the object into a dict +sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner_dict = sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner_instance.to_dict() +# create an instance of SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner from a dict +sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner_from_dict = SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner.from_dict(sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1NftHistoryDepositGet200Response.md b/target/python/binance_openapi/docs/SapiV1NftHistoryDepositGet200Response.md new file mode 100644 index 0000000..f1cc87a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1NftHistoryDepositGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1NftHistoryDepositGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**list** | [**List[SapiV1NftHistoryDepositGet200ResponseListInner]**](SapiV1NftHistoryDepositGet200ResponseListInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_nft_history_deposit_get200_response import SapiV1NftHistoryDepositGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1NftHistoryDepositGet200Response from a JSON string +sapi_v1_nft_history_deposit_get200_response_instance = SapiV1NftHistoryDepositGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1NftHistoryDepositGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_nft_history_deposit_get200_response_dict = sapi_v1_nft_history_deposit_get200_response_instance.to_dict() +# create an instance of SapiV1NftHistoryDepositGet200Response from a dict +sapi_v1_nft_history_deposit_get200_response_from_dict = SapiV1NftHistoryDepositGet200Response.from_dict(sapi_v1_nft_history_deposit_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1NftHistoryDepositGet200ResponseListInner.md b/target/python/binance_openapi/docs/SapiV1NftHistoryDepositGet200ResponseListInner.md new file mode 100644 index 0000000..23583c9 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1NftHistoryDepositGet200ResponseListInner.md @@ -0,0 +1,33 @@ +# SapiV1NftHistoryDepositGet200ResponseListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**network** | **str** | | +**tx_id** | **int** | | +**contract_adrress** | **str** | | +**token_id** | **str** | | +**timestamp** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_nft_history_deposit_get200_response_list_inner import SapiV1NftHistoryDepositGet200ResponseListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1NftHistoryDepositGet200ResponseListInner from a JSON string +sapi_v1_nft_history_deposit_get200_response_list_inner_instance = SapiV1NftHistoryDepositGet200ResponseListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1NftHistoryDepositGet200ResponseListInner.to_json()) + +# convert the object into a dict +sapi_v1_nft_history_deposit_get200_response_list_inner_dict = sapi_v1_nft_history_deposit_get200_response_list_inner_instance.to_dict() +# create an instance of SapiV1NftHistoryDepositGet200ResponseListInner from a dict +sapi_v1_nft_history_deposit_get200_response_list_inner_from_dict = SapiV1NftHistoryDepositGet200ResponseListInner.from_dict(sapi_v1_nft_history_deposit_get200_response_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1NftHistoryTransactionsGet200Response.md b/target/python/binance_openapi/docs/SapiV1NftHistoryTransactionsGet200Response.md new file mode 100644 index 0000000..993eb36 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1NftHistoryTransactionsGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1NftHistoryTransactionsGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**list** | [**List[SapiV1NftHistoryTransactionsGet200ResponseListInner]**](SapiV1NftHistoryTransactionsGet200ResponseListInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response import SapiV1NftHistoryTransactionsGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1NftHistoryTransactionsGet200Response from a JSON string +sapi_v1_nft_history_transactions_get200_response_instance = SapiV1NftHistoryTransactionsGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1NftHistoryTransactionsGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_nft_history_transactions_get200_response_dict = sapi_v1_nft_history_transactions_get200_response_instance.to_dict() +# create an instance of SapiV1NftHistoryTransactionsGet200Response from a dict +sapi_v1_nft_history_transactions_get200_response_from_dict = SapiV1NftHistoryTransactionsGet200Response.from_dict(sapi_v1_nft_history_transactions_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1NftHistoryTransactionsGet200ResponseListInner.md b/target/python/binance_openapi/docs/SapiV1NftHistoryTransactionsGet200ResponseListInner.md new file mode 100644 index 0000000..33f55b9 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1NftHistoryTransactionsGet200ResponseListInner.md @@ -0,0 +1,33 @@ +# SapiV1NftHistoryTransactionsGet200ResponseListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_no** | **str** | 0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee | +**tokens** | [**List[SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner]**](SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner.md) | | +**trade_time** | **int** | | +**trade_amount** | **str** | | +**trade_currency** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response_list_inner import SapiV1NftHistoryTransactionsGet200ResponseListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1NftHistoryTransactionsGet200ResponseListInner from a JSON string +sapi_v1_nft_history_transactions_get200_response_list_inner_instance = SapiV1NftHistoryTransactionsGet200ResponseListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1NftHistoryTransactionsGet200ResponseListInner.to_json()) + +# convert the object into a dict +sapi_v1_nft_history_transactions_get200_response_list_inner_dict = sapi_v1_nft_history_transactions_get200_response_list_inner_instance.to_dict() +# create an instance of SapiV1NftHistoryTransactionsGet200ResponseListInner from a dict +sapi_v1_nft_history_transactions_get200_response_list_inner_from_dict = SapiV1NftHistoryTransactionsGet200ResponseListInner.from_dict(sapi_v1_nft_history_transactions_get200_response_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner.md b/target/python/binance_openapi/docs/SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner.md new file mode 100644 index 0000000..be01236 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner.md @@ -0,0 +1,31 @@ +# SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**network** | **str** | | +**token_id** | **str** | | +**contract_address** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner import SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner from a JSON string +sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner_instance = SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner.to_json()) + +# convert the object into a dict +sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner_dict = sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner_instance.to_dict() +# create an instance of SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner from a dict +sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner_from_dict = SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner.from_dict(sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1NftHistoryWithdrawGet200Response.md b/target/python/binance_openapi/docs/SapiV1NftHistoryWithdrawGet200Response.md new file mode 100644 index 0000000..531b902 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1NftHistoryWithdrawGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1NftHistoryWithdrawGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**list** | [**List[SapiV1NftHistoryWithdrawGet200ResponseListInner]**](SapiV1NftHistoryWithdrawGet200ResponseListInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_nft_history_withdraw_get200_response import SapiV1NftHistoryWithdrawGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1NftHistoryWithdrawGet200Response from a JSON string +sapi_v1_nft_history_withdraw_get200_response_instance = SapiV1NftHistoryWithdrawGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1NftHistoryWithdrawGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_nft_history_withdraw_get200_response_dict = sapi_v1_nft_history_withdraw_get200_response_instance.to_dict() +# create an instance of SapiV1NftHistoryWithdrawGet200Response from a dict +sapi_v1_nft_history_withdraw_get200_response_from_dict = SapiV1NftHistoryWithdrawGet200Response.from_dict(sapi_v1_nft_history_withdraw_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1NftHistoryWithdrawGet200ResponseListInner.md b/target/python/binance_openapi/docs/SapiV1NftHistoryWithdrawGet200ResponseListInner.md new file mode 100644 index 0000000..2ccc8a3 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1NftHistoryWithdrawGet200ResponseListInner.md @@ -0,0 +1,35 @@ +# SapiV1NftHistoryWithdrawGet200ResponseListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**network** | **str** | | +**tx_id** | **str** | | +**contract_adrress** | **str** | | +**token_id** | **str** | | +**timestamp** | **int** | | +**fee** | **float** | | +**fee_asset** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_nft_history_withdraw_get200_response_list_inner import SapiV1NftHistoryWithdrawGet200ResponseListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1NftHistoryWithdrawGet200ResponseListInner from a JSON string +sapi_v1_nft_history_withdraw_get200_response_list_inner_instance = SapiV1NftHistoryWithdrawGet200ResponseListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1NftHistoryWithdrawGet200ResponseListInner.to_json()) + +# convert the object into a dict +sapi_v1_nft_history_withdraw_get200_response_list_inner_dict = sapi_v1_nft_history_withdraw_get200_response_list_inner_instance.to_dict() +# create an instance of SapiV1NftHistoryWithdrawGet200ResponseListInner from a dict +sapi_v1_nft_history_withdraw_get200_response_list_inner_from_dict = SapiV1NftHistoryWithdrawGet200ResponseListInner.from_dict(sapi_v1_nft_history_withdraw_get200_response_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1NftUserGetAssetGet200Response.md b/target/python/binance_openapi/docs/SapiV1NftUserGetAssetGet200Response.md new file mode 100644 index 0000000..d803f4b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1NftUserGetAssetGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1NftUserGetAssetGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**list** | [**List[SapiV1NftUserGetAssetGet200ResponseListInner]**](SapiV1NftUserGetAssetGet200ResponseListInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_nft_user_get_asset_get200_response import SapiV1NftUserGetAssetGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1NftUserGetAssetGet200Response from a JSON string +sapi_v1_nft_user_get_asset_get200_response_instance = SapiV1NftUserGetAssetGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1NftUserGetAssetGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_nft_user_get_asset_get200_response_dict = sapi_v1_nft_user_get_asset_get200_response_instance.to_dict() +# create an instance of SapiV1NftUserGetAssetGet200Response from a dict +sapi_v1_nft_user_get_asset_get200_response_from_dict = SapiV1NftUserGetAssetGet200Response.from_dict(sapi_v1_nft_user_get_asset_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1NftUserGetAssetGet200ResponseListInner.md b/target/python/binance_openapi/docs/SapiV1NftUserGetAssetGet200ResponseListInner.md new file mode 100644 index 0000000..1538d7e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1NftUserGetAssetGet200ResponseListInner.md @@ -0,0 +1,31 @@ +# SapiV1NftUserGetAssetGet200ResponseListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**network** | **str** | | +**contract_address** | **str** | | +**token_id** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_nft_user_get_asset_get200_response_list_inner import SapiV1NftUserGetAssetGet200ResponseListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1NftUserGetAssetGet200ResponseListInner from a JSON string +sapi_v1_nft_user_get_asset_get200_response_list_inner_instance = SapiV1NftUserGetAssetGet200ResponseListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1NftUserGetAssetGet200ResponseListInner.to_json()) + +# convert the object into a dict +sapi_v1_nft_user_get_asset_get200_response_list_inner_dict = sapi_v1_nft_user_get_asset_get200_response_list_inner_instance.to_dict() +# create an instance of SapiV1NftUserGetAssetGet200ResponseListInner from a dict +sapi_v1_nft_user_get_asset_get200_response_list_inner_from_dict = SapiV1NftUserGetAssetGet200ResponseListInner.from_dict(sapi_v1_nft_user_get_asset_get200_response_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200Response.md b/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200Response.md new file mode 100644 index 0000000..ea80d14 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200Response.md @@ -0,0 +1,32 @@ +# SapiV1PayTransactionsGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**message** | **str** | | +**data** | [**List[SapiV1PayTransactionsGet200ResponseDataInner]**](SapiV1PayTransactionsGet200ResponseDataInner.md) | | +**success** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_pay_transactions_get200_response import SapiV1PayTransactionsGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PayTransactionsGet200Response from a JSON string +sapi_v1_pay_transactions_get200_response_instance = SapiV1PayTransactionsGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1PayTransactionsGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_pay_transactions_get200_response_dict = sapi_v1_pay_transactions_get200_response_instance.to_dict() +# create an instance of SapiV1PayTransactionsGet200Response from a dict +sapi_v1_pay_transactions_get200_response_from_dict = SapiV1PayTransactionsGet200Response.from_dict(sapi_v1_pay_transactions_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInner.md b/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInner.md new file mode 100644 index 0000000..42f736a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInner.md @@ -0,0 +1,38 @@ +# SapiV1PayTransactionsGet200ResponseDataInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_type** | **str** | Enum:PAY(C2B Merchant Acquiring Payment), PAY_REFUND(C2B Merchant Acquiring Payment,refund), C2C(C2C Transfer Payment),CRYPTO_BOX(Crypto box), CRYPTO_BOX_RF(Crypto Box, refund), C2C_HOLDING(Transfer to new Binance user), C2C_HOLDING_RF(Transfer to new Binance user,refund), PAYOUT(B2C Disbursement Payment) | +**transaction_id** | **str** | | +**transaction_time** | **int** | | +**amount** | **str** | order amount(up to 8 decimal places), positive is income, negative is expenditure | +**currency** | **str** | | +**wallet_type** | **int** | | +**wallet_types** | **List[int]** | | +**funds_detail** | [**List[SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner]**](SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner.md) | | +**payer_info** | [**SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo**](SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo.md) | | +**receiver_info** | [**SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo**](SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner import SapiV1PayTransactionsGet200ResponseDataInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PayTransactionsGet200ResponseDataInner from a JSON string +sapi_v1_pay_transactions_get200_response_data_inner_instance = SapiV1PayTransactionsGet200ResponseDataInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1PayTransactionsGet200ResponseDataInner.to_json()) + +# convert the object into a dict +sapi_v1_pay_transactions_get200_response_data_inner_dict = sapi_v1_pay_transactions_get200_response_data_inner_instance.to_dict() +# create an instance of SapiV1PayTransactionsGet200ResponseDataInner from a dict +sapi_v1_pay_transactions_get200_response_data_inner_from_dict = SapiV1PayTransactionsGet200ResponseDataInner.from_dict(sapi_v1_pay_transactions_get200_response_data_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner.md b/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner.md new file mode 100644 index 0000000..3e12aee --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner.md @@ -0,0 +1,30 @@ +# SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | | +**amount** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner import SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner from a JSON string +sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner_instance = SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner.to_json()) + +# convert the object into a dict +sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner_dict = sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner_instance.to_dict() +# create an instance of SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner from a dict +sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner_from_dict = SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner.from_dict(sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo.md b/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo.md new file mode 100644 index 0000000..be7d530 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo.md @@ -0,0 +1,32 @@ +# SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**type** | **str** | | +**binance_id** | **str** | | +**account_id** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_payer_info import SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo from a JSON string +sapi_v1_pay_transactions_get200_response_data_inner_payer_info_instance = SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo.from_json(json) +# print the JSON string representation of the object +print(SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo.to_json()) + +# convert the object into a dict +sapi_v1_pay_transactions_get200_response_data_inner_payer_info_dict = sapi_v1_pay_transactions_get200_response_data_inner_payer_info_instance.to_dict() +# create an instance of SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo from a dict +sapi_v1_pay_transactions_get200_response_data_inner_payer_info_from_dict = SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo.from_dict(sapi_v1_pay_transactions_get200_response_data_inner_payer_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo.md b/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo.md new file mode 100644 index 0000000..a683496 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo.md @@ -0,0 +1,37 @@ +# SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**type** | **str** | | +**email** | **str** | | +**binance_id** | **str** | | +**account_id** | **str** | | +**country_code** | **str** | | +**phone_number** | **str** | | +**mobile_code** | **str** | | +**extend** | [**List[SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner]**](SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner.md) | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_receiver_info import SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo from a JSON string +sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_instance = SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo.from_json(json) +# print the JSON string representation of the object +print(SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo.to_json()) + +# convert the object into a dict +sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_dict = sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_instance.to_dict() +# create an instance of SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo from a dict +sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_from_dict = SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo.from_dict(sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner.md b/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner.md new file mode 100644 index 0000000..4d034ce --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner.md @@ -0,0 +1,31 @@ +# SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**institution_name** | **str** | | +**card_number** | **str** | | +**digital_wallet_id** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner import SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner from a JSON string +sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner_instance = SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner.to_json()) + +# convert the object into a dict +sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner_dict = sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner_instance.to_dict() +# create an instance of SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner from a dict +sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner_from_dict = SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner.from_dict(sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PortfolioAccountGet200Response.md b/target/python/binance_openapi/docs/SapiV1PortfolioAccountGet200Response.md new file mode 100644 index 0000000..f9d801c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PortfolioAccountGet200Response.md @@ -0,0 +1,34 @@ +# SapiV1PortfolioAccountGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uni_mmr** | **str** | Classic Portfolio margin account maintenance margin rate | +**account_equity** | **str** | Account equity, unit is USD | +**actual_equity** | **str** | Actual equity, unit is USD | +**account_maint_margin** | **str** | Classic Portfolio margin account maintenance margin, unit is USD | +**account_status** | **str** | Classic Portfolio margin account status:\"NORMAL\", \"MARGIN_CALL\", \"SUPPLY_MARGIN\", \"REDUCE_ONLY\", \"ACTIVE_LIQUIDATION\", \"FORCE_LIQUIDATION\", \"BANKRUPTED\" | +**account_type** | **str** | PM_1 for classic PM, PM_2 for PM | + +## Example + +```python +from openapi_client.models.sapi_v1_portfolio_account_get200_response import SapiV1PortfolioAccountGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PortfolioAccountGet200Response from a JSON string +sapi_v1_portfolio_account_get200_response_instance = SapiV1PortfolioAccountGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1PortfolioAccountGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_portfolio_account_get200_response_dict = sapi_v1_portfolio_account_get200_response_instance.to_dict() +# create an instance of SapiV1PortfolioAccountGet200Response from a dict +sapi_v1_portfolio_account_get200_response_from_dict = SapiV1PortfolioAccountGet200Response.from_dict(sapi_v1_portfolio_account_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PortfolioAssetIndexPriceGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1PortfolioAssetIndexPriceGet200ResponseInner.md new file mode 100644 index 0000000..7e85a3b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PortfolioAssetIndexPriceGet200ResponseInner.md @@ -0,0 +1,31 @@ +# SapiV1PortfolioAssetIndexPriceGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**asset_index_price** | **str** | | +**time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_portfolio_asset_index_price_get200_response_inner import SapiV1PortfolioAssetIndexPriceGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PortfolioAssetIndexPriceGet200ResponseInner from a JSON string +sapi_v1_portfolio_asset_index_price_get200_response_inner_instance = SapiV1PortfolioAssetIndexPriceGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1PortfolioAssetIndexPriceGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_portfolio_asset_index_price_get200_response_inner_dict = sapi_v1_portfolio_asset_index_price_get200_response_inner_instance.to_dict() +# create an instance of SapiV1PortfolioAssetIndexPriceGet200ResponseInner from a dict +sapi_v1_portfolio_asset_index_price_get200_response_inner_from_dict = SapiV1PortfolioAssetIndexPriceGet200ResponseInner.from_dict(sapi_v1_portfolio_asset_index_price_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PortfolioAutoCollectionPost200Response.md b/target/python/binance_openapi/docs/SapiV1PortfolioAutoCollectionPost200Response.md new file mode 100644 index 0000000..ba01089 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PortfolioAutoCollectionPost200Response.md @@ -0,0 +1,29 @@ +# SapiV1PortfolioAutoCollectionPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**msg** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_portfolio_auto_collection_post200_response import SapiV1PortfolioAutoCollectionPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PortfolioAutoCollectionPost200Response from a JSON string +sapi_v1_portfolio_auto_collection_post200_response_instance = SapiV1PortfolioAutoCollectionPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1PortfolioAutoCollectionPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_portfolio_auto_collection_post200_response_dict = sapi_v1_portfolio_auto_collection_post200_response_instance.to_dict() +# create an instance of SapiV1PortfolioAutoCollectionPost200Response from a dict +sapi_v1_portfolio_auto_collection_post200_response_from_dict = SapiV1PortfolioAutoCollectionPost200Response.from_dict(sapi_v1_portfolio_auto_collection_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PortfolioCollateralRateGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1PortfolioCollateralRateGet200ResponseInner.md new file mode 100644 index 0000000..f9e0b78 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PortfolioCollateralRateGet200ResponseInner.md @@ -0,0 +1,30 @@ +# SapiV1PortfolioCollateralRateGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**collateral_rate** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_portfolio_collateral_rate_get200_response_inner import SapiV1PortfolioCollateralRateGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PortfolioCollateralRateGet200ResponseInner from a JSON string +sapi_v1_portfolio_collateral_rate_get200_response_inner_instance = SapiV1PortfolioCollateralRateGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1PortfolioCollateralRateGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_portfolio_collateral_rate_get200_response_inner_dict = sapi_v1_portfolio_collateral_rate_get200_response_inner_instance.to_dict() +# create an instance of SapiV1PortfolioCollateralRateGet200ResponseInner from a dict +sapi_v1_portfolio_collateral_rate_get200_response_inner_from_dict = SapiV1PortfolioCollateralRateGet200ResponseInner.from_dict(sapi_v1_portfolio_collateral_rate_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PortfolioInterestHistoryGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1PortfolioInterestHistoryGet200ResponseInner.md new file mode 100644 index 0000000..6ef3485 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PortfolioInterestHistoryGet200ResponseInner.md @@ -0,0 +1,33 @@ +# SapiV1PortfolioInterestHistoryGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**interest** | **str** | | +**interest_accrued_time** | **int** | | +**interest_rate** | **str** | | +**principal** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_portfolio_interest_history_get200_response_inner import SapiV1PortfolioInterestHistoryGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PortfolioInterestHistoryGet200ResponseInner from a JSON string +sapi_v1_portfolio_interest_history_get200_response_inner_instance = SapiV1PortfolioInterestHistoryGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1PortfolioInterestHistoryGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_portfolio_interest_history_get200_response_inner_dict = sapi_v1_portfolio_interest_history_get200_response_inner_instance.to_dict() +# create an instance of SapiV1PortfolioInterestHistoryGet200ResponseInner from a dict +sapi_v1_portfolio_interest_history_get200_response_inner_from_dict = SapiV1PortfolioInterestHistoryGet200ResponseInner.from_dict(sapi_v1_portfolio_interest_history_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PortfolioMarginAssetLeverageGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1PortfolioMarginAssetLeverageGet200ResponseInner.md new file mode 100644 index 0000000..2fd236b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PortfolioMarginAssetLeverageGet200ResponseInner.md @@ -0,0 +1,30 @@ +# SapiV1PortfolioMarginAssetLeverageGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | [optional] +**collateral_rate** | **str** | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_portfolio_margin_asset_leverage_get200_response_inner import SapiV1PortfolioMarginAssetLeverageGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PortfolioMarginAssetLeverageGet200ResponseInner from a JSON string +sapi_v1_portfolio_margin_asset_leverage_get200_response_inner_instance = SapiV1PortfolioMarginAssetLeverageGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1PortfolioMarginAssetLeverageGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_portfolio_margin_asset_leverage_get200_response_inner_dict = sapi_v1_portfolio_margin_asset_leverage_get200_response_inner_instance.to_dict() +# create an instance of SapiV1PortfolioMarginAssetLeverageGet200ResponseInner from a dict +sapi_v1_portfolio_margin_asset_leverage_get200_response_inner_from_dict = SapiV1PortfolioMarginAssetLeverageGet200ResponseInner.from_dict(sapi_v1_portfolio_margin_asset_leverage_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PortfolioPmLoanGet200Response.md b/target/python/binance_openapi/docs/SapiV1PortfolioPmLoanGet200Response.md new file mode 100644 index 0000000..74e9852 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PortfolioPmLoanGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1PortfolioPmLoanGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**amount** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_portfolio_pm_loan_get200_response import SapiV1PortfolioPmLoanGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PortfolioPmLoanGet200Response from a JSON string +sapi_v1_portfolio_pm_loan_get200_response_instance = SapiV1PortfolioPmLoanGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1PortfolioPmLoanGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_portfolio_pm_loan_get200_response_dict = sapi_v1_portfolio_pm_loan_get200_response_instance.to_dict() +# create an instance of SapiV1PortfolioPmLoanGet200Response from a dict +sapi_v1_portfolio_pm_loan_get200_response_from_dict = SapiV1PortfolioPmLoanGet200Response.from_dict(sapi_v1_portfolio_pm_loan_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PortfolioRepayFuturesSwitchGet200Response.md b/target/python/binance_openapi/docs/SapiV1PortfolioRepayFuturesSwitchGet200Response.md new file mode 100644 index 0000000..24c038f --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PortfolioRepayFuturesSwitchGet200Response.md @@ -0,0 +1,29 @@ +# SapiV1PortfolioRepayFuturesSwitchGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auto_repay** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_portfolio_repay_futures_switch_get200_response import SapiV1PortfolioRepayFuturesSwitchGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PortfolioRepayFuturesSwitchGet200Response from a JSON string +sapi_v1_portfolio_repay_futures_switch_get200_response_instance = SapiV1PortfolioRepayFuturesSwitchGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1PortfolioRepayFuturesSwitchGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_portfolio_repay_futures_switch_get200_response_dict = sapi_v1_portfolio_repay_futures_switch_get200_response_instance.to_dict() +# create an instance of SapiV1PortfolioRepayFuturesSwitchGet200Response from a dict +sapi_v1_portfolio_repay_futures_switch_get200_response_from_dict = SapiV1PortfolioRepayFuturesSwitchGet200Response.from_dict(sapi_v1_portfolio_repay_futures_switch_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1PortfolioRepayPost200Response.md b/target/python/binance_openapi/docs/SapiV1PortfolioRepayPost200Response.md new file mode 100644 index 0000000..3efe7d1 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1PortfolioRepayPost200Response.md @@ -0,0 +1,29 @@ +# SapiV1PortfolioRepayPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tran_id** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_portfolio_repay_post200_response import SapiV1PortfolioRepayPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1PortfolioRepayPost200Response from a JSON string +sapi_v1_portfolio_repay_post200_response_instance = SapiV1PortfolioRepayPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1PortfolioRepayPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_portfolio_repay_post200_response_dict = sapi_v1_portfolio_repay_post200_response_instance.to_dict() +# create an instance of SapiV1PortfolioRepayPost200Response from a dict +sapi_v1_portfolio_repay_post200_response_from_dict = SapiV1PortfolioRepayPost200Response.from_dict(sapi_v1_portfolio_repay_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1RebateTaxQueryGet200Response.md b/target/python/binance_openapi/docs/SapiV1RebateTaxQueryGet200Response.md new file mode 100644 index 0000000..3d9b11a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1RebateTaxQueryGet200Response.md @@ -0,0 +1,32 @@ +# SapiV1RebateTaxQueryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | | +**type** | **str** | | +**code** | **str** | | +**data** | [**SapiV1RebateTaxQueryGet200ResponseData**](SapiV1RebateTaxQueryGet200ResponseData.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response import SapiV1RebateTaxQueryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1RebateTaxQueryGet200Response from a JSON string +sapi_v1_rebate_tax_query_get200_response_instance = SapiV1RebateTaxQueryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1RebateTaxQueryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_rebate_tax_query_get200_response_dict = sapi_v1_rebate_tax_query_get200_response_instance.to_dict() +# create an instance of SapiV1RebateTaxQueryGet200Response from a dict +sapi_v1_rebate_tax_query_get200_response_from_dict = SapiV1RebateTaxQueryGet200Response.from_dict(sapi_v1_rebate_tax_query_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1RebateTaxQueryGet200ResponseData.md b/target/python/binance_openapi/docs/SapiV1RebateTaxQueryGet200ResponseData.md new file mode 100644 index 0000000..c1c07dc --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1RebateTaxQueryGet200ResponseData.md @@ -0,0 +1,32 @@ +# SapiV1RebateTaxQueryGet200ResponseData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | **int** | | +**total_records** | **int** | | +**total_page_num** | **int** | | +**data** | [**List[SapiV1RebateTaxQueryGet200ResponseDataDataInner]**](SapiV1RebateTaxQueryGet200ResponseDataDataInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response_data import SapiV1RebateTaxQueryGet200ResponseData + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1RebateTaxQueryGet200ResponseData from a JSON string +sapi_v1_rebate_tax_query_get200_response_data_instance = SapiV1RebateTaxQueryGet200ResponseData.from_json(json) +# print the JSON string representation of the object +print(SapiV1RebateTaxQueryGet200ResponseData.to_json()) + +# convert the object into a dict +sapi_v1_rebate_tax_query_get200_response_data_dict = sapi_v1_rebate_tax_query_get200_response_data_instance.to_dict() +# create an instance of SapiV1RebateTaxQueryGet200ResponseData from a dict +sapi_v1_rebate_tax_query_get200_response_data_from_dict = SapiV1RebateTaxQueryGet200ResponseData.from_dict(sapi_v1_rebate_tax_query_get200_response_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1RebateTaxQueryGet200ResponseDataDataInner.md b/target/python/binance_openapi/docs/SapiV1RebateTaxQueryGet200ResponseDataDataInner.md new file mode 100644 index 0000000..a39313d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1RebateTaxQueryGet200ResponseDataDataInner.md @@ -0,0 +1,32 @@ +# SapiV1RebateTaxQueryGet200ResponseDataDataInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**type** | **int** | rebate type:1 is commission rebate,2 is referral kickback | +**amount** | **str** | | +**update_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response_data_data_inner import SapiV1RebateTaxQueryGet200ResponseDataDataInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1RebateTaxQueryGet200ResponseDataDataInner from a JSON string +sapi_v1_rebate_tax_query_get200_response_data_data_inner_instance = SapiV1RebateTaxQueryGet200ResponseDataDataInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1RebateTaxQueryGet200ResponseDataDataInner.to_json()) + +# convert the object into a dict +sapi_v1_rebate_tax_query_get200_response_data_data_inner_dict = sapi_v1_rebate_tax_query_get200_response_data_data_inner_instance.to_dict() +# create an instance of SapiV1RebateTaxQueryGet200ResponseDataDataInner from a dict +sapi_v1_rebate_tax_query_get200_response_data_data_inner_from_dict = SapiV1RebateTaxQueryGet200ResponseDataDataInner.from_dict(sapi_v1_rebate_tax_query_get200_response_data_data_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnAccountGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnAccountGet200Response.md new file mode 100644 index 0000000..bc2ff38 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnAccountGet200Response.md @@ -0,0 +1,34 @@ +# SapiV1SimpleEarnAccountGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_amount_in_btc** | **str** | | +**total_amount_in_usdt** | **str** | | +**total_flexible_amount_in_btc** | **str** | | +**total_flexible_amount_in_usdt** | **str** | | +**total_locked_in_btc** | **str** | | +**total_locked_in_usdt** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_account_get200_response import SapiV1SimpleEarnAccountGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnAccountGet200Response from a JSON string +sapi_v1_simple_earn_account_get200_response_instance = SapiV1SimpleEarnAccountGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnAccountGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_account_get200_response_dict = sapi_v1_simple_earn_account_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnAccountGet200Response from a dict +sapi_v1_simple_earn_account_get200_response_from_dict = SapiV1SimpleEarnAccountGet200Response.from_dict(sapi_v1_simple_earn_account_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response.md new file mode 100644 index 0000000..5ff5fef --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner]**](SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_history_collateral_record_get200_response import SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response from a JSON string +sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_instance = SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_dict = sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response from a dict +sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_from_dict = SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response.from_dict(sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner.md new file mode 100644 index 0000000..12deefa --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner.md @@ -0,0 +1,35 @@ +# SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **str** | | +**product_id** | **str** | | +**asset** | **str** | | +**create_time** | **int** | | +**type** | **str** | | +**product_name** | **str** | | +**order_id** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner from a JSON string +sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner_instance = SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner_dict = sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner from a dict +sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner_from_dict = SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner.from_dict(sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response.md new file mode 100644 index 0000000..04f2ec2 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner]**](SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rate_history_get200_response import SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response from a JSON string +sapi_v1_simple_earn_flexible_history_rate_history_get200_response_instance = SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_history_rate_history_get200_response_dict = sapi_v1_simple_earn_flexible_history_rate_history_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response from a dict +sapi_v1_simple_earn_flexible_history_rate_history_get200_response_from_dict = SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response.from_dict(sapi_v1_simple_earn_flexible_history_rate_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..5954e0c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner.md @@ -0,0 +1,32 @@ +# SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_id** | **str** | | +**asset** | **str** | | +**annual_percentage_rate** | **str** | | +**time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner from a JSON string +sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner_instance = SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner_dict = sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner from a dict +sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner_from_dict = SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner.from_dict(sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response.md new file mode 100644 index 0000000..5f41265 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner]**](SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_history_redemption_record_get200_response import SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response from a JSON string +sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_instance = SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_dict = sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response from a dict +sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_from_dict = SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response.from_dict(sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner.md new file mode 100644 index 0000000..d4f6284 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner.md @@ -0,0 +1,35 @@ +# SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **str** | | +**asset** | **str** | | +**time** | **int** | | +**project_id** | **str** | | +**redeem_id** | **int** | | +**dest_account** | **str** | SPOT, FUNDING | +**status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner from a JSON string +sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner_instance = SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner_dict = sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner from a dict +sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner_from_dict = SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner.from_dict(sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response.md new file mode 100644 index 0000000..971c432 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner]**](SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rewards_record_get200_response import SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response from a JSON string +sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_instance = SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_dict = sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response from a dict +sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_from_dict = SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response.from_dict(sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner.md new file mode 100644 index 0000000..d1d4a68 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner.md @@ -0,0 +1,33 @@ +# SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**rewards** | **str** | | +**project_id** | **str** | | +**type** | **str** | | +**time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner from a JSON string +sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner_instance = SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner_dict = sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner from a dict +sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner_from_dict = SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner.from_dict(sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response.md new file mode 100644 index 0000000..8d4149c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner]**](SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_history_subscription_record_get200_response import SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response from a JSON string +sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_instance = SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_dict = sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response from a dict +sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_from_dict = SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response.from_dict(sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner.md new file mode 100644 index 0000000..17a5ecd --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner.md @@ -0,0 +1,37 @@ +# SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **str** | | +**asset** | **str** | | +**time** | **int** | | +**purchase_id** | **int** | | +**type** | **str** | 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 | +**source_account** | **str** | SPOT, FUNDING, SPOTANDFUNDING | +**amt_from_spot** | **str** | Display if sourceAccount is SPOTANDFUNDING | +**amt_from_funding** | **str** | Display if sourceAccount is SPOTANDFUNDING | +**status** | **str** | PURCHASING/SUCCESS/FAILED | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner from a JSON string +sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner_instance = SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner_dict = sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner from a dict +sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner_from_dict = SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner.from_dict(sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleListGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleListGet200Response.md new file mode 100644 index 0000000..242e797 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleListGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnFlexibleListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner]**](SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response import SapiV1SimpleEarnFlexibleListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleListGet200Response from a JSON string +sapi_v1_simple_earn_flexible_list_get200_response_instance = SapiV1SimpleEarnFlexibleListGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleListGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_list_get200_response_dict = sapi_v1_simple_earn_flexible_list_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleListGet200Response from a dict +sapi_v1_simple_earn_flexible_list_get200_response_from_dict = SapiV1SimpleEarnFlexibleListGet200Response.from_dict(sapi_v1_simple_earn_flexible_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner.md new file mode 100644 index 0000000..b6db0ca --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner.md @@ -0,0 +1,40 @@ +# SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**latest_annual_percentage_rate** | **str** | | +**tier_annual_percentage_rate** | [**SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate**](SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate.md) | | +**air_drop_percentage_rate** | **str** | | +**can_purchase** | **bool** | | +**can_redeem** | **bool** | | +**is_sold_out** | **bool** | | +**hot** | **bool** | | +**min_purchase_amount** | **str** | | +**product_id** | **str** | | +**subscription_start_time** | **str** | | +**status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response_rows_inner import SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner from a JSON string +sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_instance = SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_dict = sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner from a dict +sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_from_dict = SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner.from_dict(sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate.md new file mode 100644 index 0000000..cb6c201 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_0_5_btc** | **float** | | +**var_5_10_btc** | **float** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate import SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate from a JSON string +sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate_instance = SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate_dict = sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate from a dict +sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate_from_dict = SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate.from_dict(sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response.md new file mode 100644 index 0000000..fc0382c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response.md @@ -0,0 +1,29 @@ +# SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**left_personal_quota** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_personal_left_quota_get200_response import SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response from a JSON string +sapi_v1_simple_earn_flexible_personal_left_quota_get200_response_instance = SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_personal_left_quota_get200_response_dict = sapi_v1_simple_earn_flexible_personal_left_quota_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response from a dict +sapi_v1_simple_earn_flexible_personal_left_quota_get200_response_from_dict = SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response.from_dict(sapi_v1_simple_earn_flexible_personal_left_quota_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexiblePositionGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexiblePositionGet200Response.md new file mode 100644 index 0000000..0a17337 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexiblePositionGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnFlexiblePositionGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner]**](SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_position_get200_response import SapiV1SimpleEarnFlexiblePositionGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexiblePositionGet200Response from a JSON string +sapi_v1_simple_earn_flexible_position_get200_response_instance = SapiV1SimpleEarnFlexiblePositionGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexiblePositionGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_position_get200_response_dict = sapi_v1_simple_earn_flexible_position_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexiblePositionGet200Response from a dict +sapi_v1_simple_earn_flexible_position_get200_response_from_dict = SapiV1SimpleEarnFlexiblePositionGet200Response.from_dict(sapi_v1_simple_earn_flexible_position_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner.md new file mode 100644 index 0000000..4c9ae93 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner.md @@ -0,0 +1,42 @@ +# SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_amount** | **str** | | +**tier_annual_percentage_rate** | [**SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate**](SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate.md) | | +**latest_annual_percentage_rate** | **str** | | +**yesterday_airdrop_percentage_rate** | **str** | | +**asset** | **str** | | +**air_drop_asset** | **str** | | +**can_redeem** | **bool** | | +**collateral_amount** | **str** | | +**product_id** | **str** | | +**yesterday_real_time_rewards** | **str** | | +**cumulative_bonus_rewards** | **str** | | +**cumulative_real_time_rewards** | **str** | | +**cumulative_total_rewards** | **str** | | +**auto_subscribe** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_position_get200_response_rows_inner import SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner from a JSON string +sapi_v1_simple_earn_flexible_position_get200_response_rows_inner_instance = SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_position_get200_response_rows_inner_dict = sapi_v1_simple_earn_flexible_position_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner from a dict +sapi_v1_simple_earn_flexible_position_get200_response_rows_inner_from_dict = SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner.from_dict(sapi_v1_simple_earn_flexible_position_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleRedeemPost200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleRedeemPost200Response.md new file mode 100644 index 0000000..225e437 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleRedeemPost200Response.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnFlexibleRedeemPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**redeem_id** | **int** | | +**success** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_redeem_post200_response import SapiV1SimpleEarnFlexibleRedeemPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleRedeemPost200Response from a JSON string +sapi_v1_simple_earn_flexible_redeem_post200_response_instance = SapiV1SimpleEarnFlexibleRedeemPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleRedeemPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_redeem_post200_response_dict = sapi_v1_simple_earn_flexible_redeem_post200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleRedeemPost200Response from a dict +sapi_v1_simple_earn_flexible_redeem_post200_response_from_dict = SapiV1SimpleEarnFlexibleRedeemPost200Response.from_dict(sapi_v1_simple_earn_flexible_redeem_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleSubscribePost200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleSubscribePost200Response.md new file mode 100644 index 0000000..ca227b4 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleSubscribePost200Response.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnFlexibleSubscribePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purchase_id** | **int** | | +**success** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_subscribe_post200_response import SapiV1SimpleEarnFlexibleSubscribePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleSubscribePost200Response from a JSON string +sapi_v1_simple_earn_flexible_subscribe_post200_response_instance = SapiV1SimpleEarnFlexibleSubscribePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleSubscribePost200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_subscribe_post200_response_dict = sapi_v1_simple_earn_flexible_subscribe_post200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleSubscribePost200Response from a dict +sapi_v1_simple_earn_flexible_subscribe_post200_response_from_dict = SapiV1SimpleEarnFlexibleSubscribePost200Response.from_dict(sapi_v1_simple_earn_flexible_subscribe_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response.md new file mode 100644 index 0000000..19281ef --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response.md @@ -0,0 +1,34 @@ +# SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_amount** | **str** | | +**reward_asset** | **str** | | +**air_drop_asset** | **str** | | +**est_daily_bonus_rewards** | **str** | | +**est_daily_real_time_rewards** | **str** | | +**est_daily_airdrop_rewards** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_flexible_subscription_preview_get200_response import SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response from a JSON string +sapi_v1_simple_earn_flexible_subscription_preview_get200_response_instance = SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_flexible_subscription_preview_get200_response_dict = sapi_v1_simple_earn_flexible_subscription_preview_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response from a dict +sapi_v1_simple_earn_flexible_subscription_preview_get200_response_from_dict = SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response.from_dict(sapi_v1_simple_earn_flexible_subscription_preview_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response.md new file mode 100644 index 0000000..b079c6a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner]**](SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_locked_history_redemption_record_get200_response import SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response from a JSON string +sapi_v1_simple_earn_locked_history_redemption_record_get200_response_instance = SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_locked_history_redemption_record_get200_response_dict = sapi_v1_simple_earn_locked_history_redemption_record_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response from a dict +sapi_v1_simple_earn_locked_history_redemption_record_get200_response_from_dict = SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response.from_dict(sapi_v1_simple_earn_locked_history_redemption_record_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner.md new file mode 100644 index 0000000..ef1fddd --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner.md @@ -0,0 +1,37 @@ +# SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**position_id** | **str** | | +**redeem_id** | **int** | | +**time** | **int** | | +**asset** | **str** | | +**lock_period** | **str** | | +**amount** | **str** | | +**type** | **str** | MATURE for redeem to Spot Wallet, NEW_TRANSFERRED for redeem to Flexible product, AHEAD for early redemption | +**deliver_date** | **str** | | +**status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner from a JSON string +sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner_instance = SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner_dict = sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner from a dict +sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner_from_dict = SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner.from_dict(sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response.md new file mode 100644 index 0000000..5839b00 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner]**](SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_locked_history_rewards_record_get200_response import SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response from a JSON string +sapi_v1_simple_earn_locked_history_rewards_record_get200_response_instance = SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_locked_history_rewards_record_get200_response_dict = sapi_v1_simple_earn_locked_history_rewards_record_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response from a dict +sapi_v1_simple_earn_locked_history_rewards_record_get200_response_from_dict = SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response.from_dict(sapi_v1_simple_earn_locked_history_rewards_record_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner.md new file mode 100644 index 0000000..65f2b08 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner.md @@ -0,0 +1,33 @@ +# SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**position_id** | **str** | | +**time** | **int** | | +**asset** | **str** | | +**lock_period** | **str** | | +**amount** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner from a JSON string +sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner_instance = SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner_dict = sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner from a dict +sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner_from_dict = SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner.from_dict(sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response.md new file mode 100644 index 0000000..6570a85 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner]**](SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_locked_history_subscription_record_get200_response import SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response from a JSON string +sapi_v1_simple_earn_locked_history_subscription_record_get200_response_instance = SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_locked_history_subscription_record_get200_response_dict = sapi_v1_simple_earn_locked_history_subscription_record_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response from a dict +sapi_v1_simple_earn_locked_history_subscription_record_get200_response_from_dict = SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response.from_dict(sapi_v1_simple_earn_locked_history_subscription_record_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner.md new file mode 100644 index 0000000..2c299b9 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner.md @@ -0,0 +1,39 @@ +# SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**position_id** | **str** | | +**purchase_id** | **int** | | +**time** | **int** | | +**asset** | **str** | | +**amount** | **str** | | +**lock_period** | **str** | | +**type** | **str** | NORMAL for normal subscription, AUTO for auto-subscription order, ACTIVITY for activity order, TRIAL for trial fund order, RESTAKE for restake order | +**source_account** | **str** | SPOT, FUNDING, SPOTANDFUNDING | +**amt_from_spot** | **str** | Display if sourceAccount is SPOTANDFUNDING | +**amt_from_funding** | **str** | Display if sourceAccount is SPOTANDFUNDING | +**status** | **str** | PURCHASING/SUCCESS/FAILED | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner from a JSON string +sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner_instance = SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner_dict = sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner from a dict +sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner_from_dict = SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner.from_dict(sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200Response.md new file mode 100644 index 0000000..c23ffb8 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnLockedListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1SimpleEarnLockedListGet200ResponseRowsInner]**](SapiV1SimpleEarnLockedListGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response import SapiV1SimpleEarnLockedListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnLockedListGet200Response from a JSON string +sapi_v1_simple_earn_locked_list_get200_response_instance = SapiV1SimpleEarnLockedListGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnLockedListGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_locked_list_get200_response_dict = sapi_v1_simple_earn_locked_list_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnLockedListGet200Response from a dict +sapi_v1_simple_earn_locked_list_get200_response_from_dict = SapiV1SimpleEarnLockedListGet200Response.from_dict(sapi_v1_simple_earn_locked_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInner.md new file mode 100644 index 0000000..31ba734 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInner.md @@ -0,0 +1,31 @@ +# SapiV1SimpleEarnLockedListGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | | +**detail** | [**SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail**](SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail.md) | | +**quota** | [**SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota**](SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner import SapiV1SimpleEarnLockedListGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnLockedListGet200ResponseRowsInner from a JSON string +sapi_v1_simple_earn_locked_list_get200_response_rows_inner_instance = SapiV1SimpleEarnLockedListGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnLockedListGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_locked_list_get200_response_rows_inner_dict = sapi_v1_simple_earn_locked_list_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1SimpleEarnLockedListGet200ResponseRowsInner from a dict +sapi_v1_simple_earn_locked_list_get200_response_rows_inner_from_dict = SapiV1SimpleEarnLockedListGet200ResponseRowsInner.from_dict(sapi_v1_simple_earn_locked_list_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail.md new file mode 100644 index 0000000..9e49ce8 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail.md @@ -0,0 +1,38 @@ +# SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**reward_asset** | **str** | | +**duration** | **int** | | +**renewable** | **bool** | | +**is_sold_out** | **bool** | | +**apr** | **str** | | +**status** | **str** | | +**subscription_start_time** | **str** | | +**extra_reward_asset** | **str** | | +**extra_reward_apr** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail import SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail from a JSON string +sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail_instance = SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail_dict = sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail_instance.to_dict() +# create an instance of SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail from a dict +sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail_from_dict = SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail.from_dict(sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota.md new file mode 100644 index 0000000..3331976 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_personal_quota** | **str** | | +**minimum** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota import SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota from a JSON string +sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota_instance = SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota_dict = sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota_instance.to_dict() +# create an instance of SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota from a dict +sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota_from_dict = SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota.from_dict(sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedPositionGet200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedPositionGet200Response.md new file mode 100644 index 0000000..8d767f6 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedPositionGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1SimpleEarnLockedPositionGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner]**](SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_locked_position_get200_response import SapiV1SimpleEarnLockedPositionGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnLockedPositionGet200Response from a JSON string +sapi_v1_simple_earn_locked_position_get200_response_instance = SapiV1SimpleEarnLockedPositionGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnLockedPositionGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_locked_position_get200_response_dict = sapi_v1_simple_earn_locked_position_get200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnLockedPositionGet200Response from a dict +sapi_v1_simple_earn_locked_position_get200_response_from_dict = SapiV1SimpleEarnLockedPositionGet200Response.from_dict(sapi_v1_simple_earn_locked_position_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner.md new file mode 100644 index 0000000..018b39c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner.md @@ -0,0 +1,40 @@ +# SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**position_id** | **str** | | +**project_id** | **str** | | +**asset** | **str** | | +**amount** | **str** | | +**purchase_time** | **str** | | +**duration** | **str** | | +**accrual_days** | **str** | | +**reward_asset** | **str** | | +**apy** | **str** | | +**is_renewable** | **bool** | | +**is_auto_renew** | **bool** | | +**redeem_date** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_locked_position_get200_response_rows_inner import SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner from a JSON string +sapi_v1_simple_earn_locked_position_get200_response_rows_inner_instance = SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_locked_position_get200_response_rows_inner_dict = sapi_v1_simple_earn_locked_position_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner from a dict +sapi_v1_simple_earn_locked_position_get200_response_rows_inner_from_dict = SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner.from_dict(sapi_v1_simple_earn_locked_position_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedSubscribePost200Response.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedSubscribePost200Response.md new file mode 100644 index 0000000..254e7e3 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedSubscribePost200Response.md @@ -0,0 +1,31 @@ +# SapiV1SimpleEarnLockedSubscribePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**purchase_id** | **int** | | +**position_id** | **str** | | +**success** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_locked_subscribe_post200_response import SapiV1SimpleEarnLockedSubscribePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnLockedSubscribePost200Response from a JSON string +sapi_v1_simple_earn_locked_subscribe_post200_response_instance = SapiV1SimpleEarnLockedSubscribePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnLockedSubscribePost200Response.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_locked_subscribe_post200_response_dict = sapi_v1_simple_earn_locked_subscribe_post200_response_instance.to_dict() +# create an instance of SapiV1SimpleEarnLockedSubscribePost200Response from a dict +sapi_v1_simple_earn_locked_subscribe_post200_response_from_dict = SapiV1SimpleEarnLockedSubscribePost200Response.from_dict(sapi_v1_simple_earn_locked_subscribe_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner.md new file mode 100644 index 0000000..0027858 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner.md @@ -0,0 +1,38 @@ +# SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reward_asset** | **str** | | +**total_reward_amt** | **str** | | +**extra_reward_asset** | **str** | | +**est_total_extra_reward_amt** | **str** | | +**next_pay** | **str** | | +**next_pay_date** | **str** | | +**value_date** | **str** | | +**rewards_end_date** | **str** | | +**deliver_date** | **str** | | +**next_subscription_date** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner import SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner from a JSON string +sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner_instance = SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner_dict = sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner_instance.to_dict() +# create an instance of SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner from a dict +sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner_from_dict = SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner.from_dict(sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SpotDelistScheduleGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1SpotDelistScheduleGet200ResponseInner.md new file mode 100644 index 0000000..efe967c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SpotDelistScheduleGet200ResponseInner.md @@ -0,0 +1,30 @@ +# SapiV1SpotDelistScheduleGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**delist_time** | **int** | | +**symbol** | **List[str]** | | + +## Example + +```python +from openapi_client.models.sapi_v1_spot_delist_schedule_get200_response_inner import SapiV1SpotDelistScheduleGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SpotDelistScheduleGet200ResponseInner from a JSON string +sapi_v1_spot_delist_schedule_get200_response_inner_instance = SapiV1SpotDelistScheduleGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SpotDelistScheduleGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_spot_delist_schedule_get200_response_inner_dict = sapi_v1_spot_delist_schedule_get200_response_inner_instance.to_dict() +# create an instance of SapiV1SpotDelistScheduleGet200ResponseInner from a dict +sapi_v1_spot_delist_schedule_get200_response_inner_from_dict = SapiV1SpotDelistScheduleGet200ResponseInner.from_dict(sapi_v1_spot_delist_schedule_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountBlvtEnablePost200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountBlvtEnablePost200Response.md new file mode 100644 index 0000000..6e2bc28 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountBlvtEnablePost200Response.md @@ -0,0 +1,30 @@ +# SapiV1SubAccountBlvtEnablePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**enable_blvt** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_blvt_enable_post200_response import SapiV1SubAccountBlvtEnablePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountBlvtEnablePost200Response from a JSON string +sapi_v1_sub_account_blvt_enable_post200_response_instance = SapiV1SubAccountBlvtEnablePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountBlvtEnablePost200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_blvt_enable_post200_response_dict = sapi_v1_sub_account_blvt_enable_post200_response_instance.to_dict() +# create an instance of SapiV1SubAccountBlvtEnablePost200Response from a dict +sapi_v1_sub_account_blvt_enable_post200_response_from_dict = SapiV1SubAccountBlvtEnablePost200Response.from_dict(sapi_v1_sub_account_blvt_enable_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountEoptionsEnablePost200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountEoptionsEnablePost200Response.md new file mode 100644 index 0000000..9498517 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountEoptionsEnablePost200Response.md @@ -0,0 +1,30 @@ +# SapiV1SubAccountEoptionsEnablePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**is_e_options_enabled** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_eoptions_enable_post200_response import SapiV1SubAccountEoptionsEnablePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountEoptionsEnablePost200Response from a JSON string +sapi_v1_sub_account_eoptions_enable_post200_response_instance = SapiV1SubAccountEoptionsEnablePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountEoptionsEnablePost200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_eoptions_enable_post200_response_dict = sapi_v1_sub_account_eoptions_enable_post200_response_instance.to_dict() +# create an instance of SapiV1SubAccountEoptionsEnablePost200Response from a dict +sapi_v1_sub_account_eoptions_enable_post200_response_from_dict = SapiV1SubAccountEoptionsEnablePost200Response.from_dict(sapi_v1_sub_account_eoptions_enable_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountGet200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountGet200Response.md new file mode 100644 index 0000000..c0f5e12 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountGet200Response.md @@ -0,0 +1,44 @@ +# SapiV1SubAccountFuturesAccountGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**asset** | **str** | | +**assets** | [**List[SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner]**](SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner.md) | | +**can_deposit** | **bool** | | +**can_trade** | **bool** | | +**can_withdraw** | **bool** | | +**fee_tier** | **int** | | +**max_withdraw_amount** | **str** | | +**total_initial_margin** | **str** | | +**total_maintenance_margin** | **str** | | +**total_margin_balance** | **str** | | +**total_open_order_initial_margin** | **str** | | +**total_position_initial_margin** | **str** | | +**total_unrealized_profit** | **str** | | +**total_wallet_balance** | **str** | | +**update_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_futures_account_get200_response import SapiV1SubAccountFuturesAccountGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountFuturesAccountGet200Response from a JSON string +sapi_v1_sub_account_futures_account_get200_response_instance = SapiV1SubAccountFuturesAccountGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountFuturesAccountGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_futures_account_get200_response_dict = sapi_v1_sub_account_futures_account_get200_response_instance.to_dict() +# create an instance of SapiV1SubAccountFuturesAccountGet200Response from a dict +sapi_v1_sub_account_futures_account_get200_response_from_dict = SapiV1SubAccountFuturesAccountGet200Response.from_dict(sapi_v1_sub_account_futures_account_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner.md b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner.md new file mode 100644 index 0000000..30a84eb --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner.md @@ -0,0 +1,37 @@ +# SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**initial_margin** | **str** | | +**maintenance_margin** | **str** | | +**margin_balance** | **str** | | +**max_withdraw_amount** | **str** | | +**open_order_initial_margin** | **str** | | +**position_initial_margin** | **str** | | +**unrealized_profit** | **str** | | +**wallet_balance** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_futures_account_get200_response_assets_inner import SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner from a JSON string +sapi_v1_sub_account_futures_account_get200_response_assets_inner_instance = SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_futures_account_get200_response_assets_inner_dict = sapi_v1_sub_account_futures_account_get200_response_assets_inner_instance.to_dict() +# create an instance of SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner from a dict +sapi_v1_sub_account_futures_account_get200_response_assets_inner_from_dict = SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner.from_dict(sapi_v1_sub_account_futures_account_get200_response_assets_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountSummaryGet200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountSummaryGet200Response.md new file mode 100644 index 0000000..cda742d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountSummaryGet200Response.md @@ -0,0 +1,37 @@ +# SapiV1SubAccountFuturesAccountSummaryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_initial_margin** | **str** | | +**total_maintenance_margin** | **str** | | +**total_margin_balance** | **str** | | +**total_open_order_initial_margin** | **str** | | +**total_position_initial_margin** | **str** | | +**total_unrealized_profit** | **str** | | +**total_wallet_balance** | **str** | | +**asset** | **str** | | +**sub_account_list** | [**List[SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner]**](SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_futures_account_summary_get200_response import SapiV1SubAccountFuturesAccountSummaryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountFuturesAccountSummaryGet200Response from a JSON string +sapi_v1_sub_account_futures_account_summary_get200_response_instance = SapiV1SubAccountFuturesAccountSummaryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountFuturesAccountSummaryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_futures_account_summary_get200_response_dict = sapi_v1_sub_account_futures_account_summary_get200_response_instance.to_dict() +# create an instance of SapiV1SubAccountFuturesAccountSummaryGet200Response from a dict +sapi_v1_sub_account_futures_account_summary_get200_response_from_dict = SapiV1SubAccountFuturesAccountSummaryGet200Response.from_dict(sapi_v1_sub_account_futures_account_summary_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner.md b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner.md new file mode 100644 index 0000000..dbbf79d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner.md @@ -0,0 +1,37 @@ +# SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**total_initial_margin** | **str** | | +**total_maintenance_margin** | **str** | | +**total_margin_balance** | **str** | | +**total_open_order_initial_margin** | **str** | | +**total_position_initial_margin** | **str** | | +**total_unrealized_profit** | **str** | | +**total_wallet_balance** | **str** | | +**asset** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner import SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner from a JSON string +sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner_instance = SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner_dict = sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner_instance.to_dict() +# create an instance of SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner from a dict +sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner_from_dict = SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner.from_dict(sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountFuturesEnablePost200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesEnablePost200Response.md new file mode 100644 index 0000000..4d83985 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesEnablePost200Response.md @@ -0,0 +1,30 @@ +# SapiV1SubAccountFuturesEnablePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**is_futures_enabled** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_futures_enable_post200_response import SapiV1SubAccountFuturesEnablePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountFuturesEnablePost200Response from a JSON string +sapi_v1_sub_account_futures_enable_post200_response_instance = SapiV1SubAccountFuturesEnablePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountFuturesEnablePost200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_futures_enable_post200_response_dict = sapi_v1_sub_account_futures_enable_post200_response_instance.to_dict() +# create an instance of SapiV1SubAccountFuturesEnablePost200Response from a dict +sapi_v1_sub_account_futures_enable_post200_response_from_dict = SapiV1SubAccountFuturesEnablePost200Response.from_dict(sapi_v1_sub_account_futures_enable_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountFuturesInternalTransferGet200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesInternalTransferGet200Response.md new file mode 100644 index 0000000..1aaf1a4 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesInternalTransferGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1SubAccountFuturesInternalTransferGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | +**futures_type** | **int** | | +**transfers** | [**List[SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner]**](SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_get200_response import SapiV1SubAccountFuturesInternalTransferGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountFuturesInternalTransferGet200Response from a JSON string +sapi_v1_sub_account_futures_internal_transfer_get200_response_instance = SapiV1SubAccountFuturesInternalTransferGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountFuturesInternalTransferGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_futures_internal_transfer_get200_response_dict = sapi_v1_sub_account_futures_internal_transfer_get200_response_instance.to_dict() +# create an instance of SapiV1SubAccountFuturesInternalTransferGet200Response from a dict +sapi_v1_sub_account_futures_internal_transfer_get200_response_from_dict = SapiV1SubAccountFuturesInternalTransferGet200Response.from_dict(sapi_v1_sub_account_futures_internal_transfer_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner.md b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner.md new file mode 100644 index 0000000..148eae8 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner.md @@ -0,0 +1,34 @@ +# SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_from** | **str** | | +**to** | **str** | | +**asset** | **str** | | +**qty** | **str** | | +**tran_id** | **int** | | +**time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner import SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner from a JSON string +sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner_instance = SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner_dict = sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner_instance.to_dict() +# create an instance of SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner from a dict +sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner_from_dict = SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner.from_dict(sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountFuturesInternalTransferPost200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesInternalTransferPost200Response.md new file mode 100644 index 0000000..dcef0da --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesInternalTransferPost200Response.md @@ -0,0 +1,30 @@ +# SapiV1SubAccountFuturesInternalTransferPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | +**txn_id** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_post200_response import SapiV1SubAccountFuturesInternalTransferPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountFuturesInternalTransferPost200Response from a JSON string +sapi_v1_sub_account_futures_internal_transfer_post200_response_instance = SapiV1SubAccountFuturesInternalTransferPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountFuturesInternalTransferPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_futures_internal_transfer_post200_response_dict = sapi_v1_sub_account_futures_internal_transfer_post200_response_instance.to_dict() +# create an instance of SapiV1SubAccountFuturesInternalTransferPost200Response from a dict +sapi_v1_sub_account_futures_internal_transfer_post200_response_from_dict = SapiV1SubAccountFuturesInternalTransferPost200Response.from_dict(sapi_v1_sub_account_futures_internal_transfer_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountFuturesPositionRiskGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesPositionRiskGet200ResponseInner.md new file mode 100644 index 0000000..fa051e3 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesPositionRiskGet200ResponseInner.md @@ -0,0 +1,36 @@ +# SapiV1SubAccountFuturesPositionRiskGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**entry_price** | **str** | | +**leverage** | **str** | current initial leverage | +**max_notional** | **str** | notional value limit of current initial leverage | +**liquidation_price** | **str** | | +**mark_price** | **str** | | +**position_amount** | **str** | | +**symbol** | **str** | | +**unrealized_profit** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_futures_position_risk_get200_response_inner import SapiV1SubAccountFuturesPositionRiskGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountFuturesPositionRiskGet200ResponseInner from a JSON string +sapi_v1_sub_account_futures_position_risk_get200_response_inner_instance = SapiV1SubAccountFuturesPositionRiskGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountFuturesPositionRiskGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_futures_position_risk_get200_response_inner_dict = sapi_v1_sub_account_futures_position_risk_get200_response_inner_instance.to_dict() +# create an instance of SapiV1SubAccountFuturesPositionRiskGet200ResponseInner from a dict +sapi_v1_sub_account_futures_position_risk_get200_response_inner_from_dict = SapiV1SubAccountFuturesPositionRiskGet200ResponseInner.from_dict(sapi_v1_sub_account_futures_position_risk_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountFuturesTransferPost200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesTransferPost200Response.md new file mode 100644 index 0000000..b215751 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountFuturesTransferPost200Response.md @@ -0,0 +1,29 @@ +# SapiV1SubAccountFuturesTransferPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**txn_id** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_futures_transfer_post200_response import SapiV1SubAccountFuturesTransferPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountFuturesTransferPost200Response from a JSON string +sapi_v1_sub_account_futures_transfer_post200_response_instance = SapiV1SubAccountFuturesTransferPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountFuturesTransferPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_futures_transfer_post200_response_dict = sapi_v1_sub_account_futures_transfer_post200_response_instance.to_dict() +# create an instance of SapiV1SubAccountFuturesTransferPost200Response from a dict +sapi_v1_sub_account_futures_transfer_post200_response_from_dict = SapiV1SubAccountFuturesTransferPost200Response.from_dict(sapi_v1_sub_account_futures_transfer_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountListGet200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountListGet200Response.md new file mode 100644 index 0000000..ea17b34 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountListGet200Response.md @@ -0,0 +1,29 @@ +# SapiV1SubAccountListGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sub_accounts** | [**List[SapiV1SubAccountListGet200ResponseSubAccountsInner]**](SapiV1SubAccountListGet200ResponseSubAccountsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_list_get200_response import SapiV1SubAccountListGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountListGet200Response from a JSON string +sapi_v1_sub_account_list_get200_response_instance = SapiV1SubAccountListGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountListGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_list_get200_response_dict = sapi_v1_sub_account_list_get200_response_instance.to_dict() +# create an instance of SapiV1SubAccountListGet200Response from a dict +sapi_v1_sub_account_list_get200_response_from_dict = SapiV1SubAccountListGet200Response.from_dict(sapi_v1_sub_account_list_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountListGet200ResponseSubAccountsInner.md b/target/python/binance_openapi/docs/SapiV1SubAccountListGet200ResponseSubAccountsInner.md new file mode 100644 index 0000000..cc32fb3 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountListGet200ResponseSubAccountsInner.md @@ -0,0 +1,33 @@ +# SapiV1SubAccountListGet200ResponseSubAccountsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**is_freeze** | **bool** | | +**create_time** | **int** | | +**is_managed_sub_account** | **bool** | | +**is_asset_management_sub_account** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_list_get200_response_sub_accounts_inner import SapiV1SubAccountListGet200ResponseSubAccountsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountListGet200ResponseSubAccountsInner from a JSON string +sapi_v1_sub_account_list_get200_response_sub_accounts_inner_instance = SapiV1SubAccountListGet200ResponseSubAccountsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountListGet200ResponseSubAccountsInner.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_list_get200_response_sub_accounts_inner_dict = sapi_v1_sub_account_list_get200_response_sub_accounts_inner_instance.to_dict() +# create an instance of SapiV1SubAccountListGet200ResponseSubAccountsInner from a dict +sapi_v1_sub_account_list_get200_response_sub_accounts_inner_from_dict = SapiV1SubAccountListGet200ResponseSubAccountsInner.from_dict(sapi_v1_sub_account_list_get200_response_sub_accounts_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountGet200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountGet200Response.md new file mode 100644 index 0000000..3baa2a8 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountGet200Response.md @@ -0,0 +1,35 @@ +# SapiV1SubAccountMarginAccountGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**margin_level** | **str** | | +**total_asset_of_btc** | **str** | | +**total_liability_of_btc** | **str** | | +**total_net_asset_of_btc** | **str** | | +**margin_trade_coeff_vo** | [**SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo**](SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo.md) | | +**margin_user_asset_vo_list** | [**List[SapiV1MarginAccountGet200ResponseUserAssetsInner]**](SapiV1MarginAccountGet200ResponseUserAssetsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_margin_account_get200_response import SapiV1SubAccountMarginAccountGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountMarginAccountGet200Response from a JSON string +sapi_v1_sub_account_margin_account_get200_response_instance = SapiV1SubAccountMarginAccountGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountMarginAccountGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_margin_account_get200_response_dict = sapi_v1_sub_account_margin_account_get200_response_instance.to_dict() +# create an instance of SapiV1SubAccountMarginAccountGet200Response from a dict +sapi_v1_sub_account_margin_account_get200_response_from_dict = SapiV1SubAccountMarginAccountGet200Response.from_dict(sapi_v1_sub_account_margin_account_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo.md b/target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo.md new file mode 100644 index 0000000..f01424b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo.md @@ -0,0 +1,31 @@ +# SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**force_liquidation_bar** | **str** | Liquidation margin ratio | +**margin_call_bar** | **str** | Margin call margin ratio | +**normal_bar** | **str** | Initial margin ratio | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo import SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo from a JSON string +sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo_instance = SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo_dict = sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo_instance.to_dict() +# create an instance of SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo from a dict +sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo_from_dict = SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo.from_dict(sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountSummaryGet200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountSummaryGet200Response.md new file mode 100644 index 0000000..3bd4a5e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountSummaryGet200Response.md @@ -0,0 +1,32 @@ +# SapiV1SubAccountMarginAccountSummaryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_asset_of_btc** | **str** | | +**total_liability_of_btc** | **str** | | +**total_net_asset_of_btc** | **str** | | +**sub_account_list** | [**List[SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner]**](SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_margin_account_summary_get200_response import SapiV1SubAccountMarginAccountSummaryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountMarginAccountSummaryGet200Response from a JSON string +sapi_v1_sub_account_margin_account_summary_get200_response_instance = SapiV1SubAccountMarginAccountSummaryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountMarginAccountSummaryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_margin_account_summary_get200_response_dict = sapi_v1_sub_account_margin_account_summary_get200_response_instance.to_dict() +# create an instance of SapiV1SubAccountMarginAccountSummaryGet200Response from a dict +sapi_v1_sub_account_margin_account_summary_get200_response_from_dict = SapiV1SubAccountMarginAccountSummaryGet200Response.from_dict(sapi_v1_sub_account_margin_account_summary_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner.md b/target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner.md new file mode 100644 index 0000000..a7e16f3 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner.md @@ -0,0 +1,32 @@ +# SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**total_asset_of_btc** | **str** | | +**total_liability_of_btc** | **str** | | +**total_net_asset_of_btc** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner import SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner from a JSON string +sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner_instance = SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner_dict = sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner_instance.to_dict() +# create an instance of SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner from a dict +sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner_from_dict = SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner.from_dict(sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountMarginEnablePost200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountMarginEnablePost200Response.md new file mode 100644 index 0000000..797ffd4 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountMarginEnablePost200Response.md @@ -0,0 +1,30 @@ +# SapiV1SubAccountMarginEnablePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**is_margin_enabled** | **bool** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_margin_enable_post200_response import SapiV1SubAccountMarginEnablePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountMarginEnablePost200Response from a JSON string +sapi_v1_sub_account_margin_enable_post200_response_instance = SapiV1SubAccountMarginEnablePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountMarginEnablePost200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_margin_enable_post200_response_dict = sapi_v1_sub_account_margin_enable_post200_response_instance.to_dict() +# create an instance of SapiV1SubAccountMarginEnablePost200Response from a dict +sapi_v1_sub_account_margin_enable_post200_response_from_dict = SapiV1SubAccountMarginEnablePost200Response.from_dict(sapi_v1_sub_account_margin_enable_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountSpotSummaryGet200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountSpotSummaryGet200Response.md new file mode 100644 index 0000000..4f49032 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountSpotSummaryGet200Response.md @@ -0,0 +1,31 @@ +# SapiV1SubAccountSpotSummaryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_count** | **int** | | +**master_account_total_asset** | **str** | | +**spot_sub_user_asset_btc_vo_list** | [**List[SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner]**](SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_spot_summary_get200_response import SapiV1SubAccountSpotSummaryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountSpotSummaryGet200Response from a JSON string +sapi_v1_sub_account_spot_summary_get200_response_instance = SapiV1SubAccountSpotSummaryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountSpotSummaryGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_spot_summary_get200_response_dict = sapi_v1_sub_account_spot_summary_get200_response_instance.to_dict() +# create an instance of SapiV1SubAccountSpotSummaryGet200Response from a dict +sapi_v1_sub_account_spot_summary_get200_response_from_dict = SapiV1SubAccountSpotSummaryGet200Response.from_dict(sapi_v1_sub_account_spot_summary_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner.md b/target/python/binance_openapi/docs/SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner.md new file mode 100644 index 0000000..74aa5ea --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner.md @@ -0,0 +1,30 @@ +# SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**total_asset** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner import SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner from a JSON string +sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner_instance = SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner_dict = sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner_instance.to_dict() +# create an instance of SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner from a dict +sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner_from_dict = SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner.from_dict(sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountStatusGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1SubAccountStatusGet200ResponseInner.md new file mode 100644 index 0000000..6c94b0f --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountStatusGet200ResponseInner.md @@ -0,0 +1,35 @@ +# SapiV1SubAccountStatusGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**is_sub_user_enabled** | **bool** | | +**is_user_active** | **bool** | | +**insert_time** | **int** | sub account create time | +**is_margin_enabled** | **bool** | | +**is_future_enabled** | **bool** | | +**mobile** | **int** | user mobile number | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_status_get200_response_inner import SapiV1SubAccountStatusGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountStatusGet200ResponseInner from a JSON string +sapi_v1_sub_account_status_get200_response_inner_instance = SapiV1SubAccountStatusGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountStatusGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_status_get200_response_inner_dict = sapi_v1_sub_account_status_get200_response_inner_instance.to_dict() +# create an instance of SapiV1SubAccountStatusGet200ResponseInner from a dict +sapi_v1_sub_account_status_get200_response_inner_from_dict = SapiV1SubAccountStatusGet200ResponseInner.from_dict(sapi_v1_sub_account_status_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountSubAccountApiIpRestrictionGet200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountSubAccountApiIpRestrictionGet200Response.md new file mode 100644 index 0000000..22e828e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountSubAccountApiIpRestrictionGet200Response.md @@ -0,0 +1,32 @@ +# SapiV1SubAccountSubAccountApiIpRestrictionGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip_restrict** | **str** | | +**ip_list** | **List[str]** | | +**update_time** | **int** | | +**api_key** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response import SapiV1SubAccountSubAccountApiIpRestrictionGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountSubAccountApiIpRestrictionGet200Response from a JSON string +sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response_instance = SapiV1SubAccountSubAccountApiIpRestrictionGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountSubAccountApiIpRestrictionGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response_dict = sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response_instance.to_dict() +# create an instance of SapiV1SubAccountSubAccountApiIpRestrictionGet200Response from a dict +sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response_from_dict = SapiV1SubAccountSubAccountApiIpRestrictionGet200Response.from_dict(sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response.md new file mode 100644 index 0000000..9c30101 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response.md @@ -0,0 +1,32 @@ +# SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip_restrict** | **str** | | +**ip_list** | **List[str]** | | +**update_time** | **int** | | +**api_key** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response import SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response from a JSON string +sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response_instance = SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response_dict = sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response_instance.to_dict() +# create an instance of SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response from a dict +sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response_from_dict = SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response.from_dict(sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountSubTransferHistoryGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1SubAccountSubTransferHistoryGet200ResponseInner.md new file mode 100644 index 0000000..1c2880c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountSubTransferHistoryGet200ResponseInner.md @@ -0,0 +1,35 @@ +# SapiV1SubAccountSubTransferHistoryGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_from** | **str** | | +**to** | **str** | | +**asset** | **str** | | +**qty** | **str** | | +**status** | **str** | | +**tran_id** | **int** | | +**time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_sub_transfer_history_get200_response_inner import SapiV1SubAccountSubTransferHistoryGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountSubTransferHistoryGet200ResponseInner from a JSON string +sapi_v1_sub_account_sub_transfer_history_get200_response_inner_instance = SapiV1SubAccountSubTransferHistoryGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountSubTransferHistoryGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_sub_transfer_history_get200_response_inner_dict = sapi_v1_sub_account_sub_transfer_history_get200_response_inner_instance.to_dict() +# create an instance of SapiV1SubAccountSubTransferHistoryGet200ResponseInner from a dict +sapi_v1_sub_account_sub_transfer_history_get200_response_inner_from_dict = SapiV1SubAccountSubTransferHistoryGet200ResponseInner.from_dict(sapi_v1_sub_account_sub_transfer_history_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountTransactionStatisticsGet200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountTransactionStatisticsGet200Response.md new file mode 100644 index 0000000..d51c893 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountTransactionStatisticsGet200Response.md @@ -0,0 +1,35 @@ +# SapiV1SubAccountTransactionStatisticsGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**recent30_btc_total** | **str** | | +**recent30_btc_futures_total** | **str** | | +**recent30_btc_margin_total** | **str** | | +**recent30_busd_total** | **str** | | +**recent30_busd_futures_total** | **str** | | +**recent30_busd_margin_total** | **str** | | +**trade_info_vos** | [**List[SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner]**](SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_transaction_statistics_get200_response import SapiV1SubAccountTransactionStatisticsGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountTransactionStatisticsGet200Response from a JSON string +sapi_v1_sub_account_transaction_statistics_get200_response_instance = SapiV1SubAccountTransactionStatisticsGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountTransactionStatisticsGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_transaction_statistics_get200_response_dict = sapi_v1_sub_account_transaction_statistics_get200_response_instance.to_dict() +# create an instance of SapiV1SubAccountTransactionStatisticsGet200Response from a dict +sapi_v1_sub_account_transaction_statistics_get200_response_from_dict = SapiV1SubAccountTransactionStatisticsGet200Response.from_dict(sapi_v1_sub_account_transaction_statistics_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner.md b/target/python/binance_openapi/docs/SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner.md new file mode 100644 index 0000000..2f57c22 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner.md @@ -0,0 +1,36 @@ +# SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **int** | | [optional] +**btc** | **float** | | [optional] +**btc_futures** | **float** | | [optional] +**btc_margin** | **float** | | [optional] +**busd** | **float** | | [optional] +**busd_futures** | **float** | | [optional] +**busd_margin** | **float** | | [optional] +**var_date** | **int** | | [optional] + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner import SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner from a JSON string +sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner_instance = SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner_dict = sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner_instance.to_dict() +# create an instance of SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner from a dict +sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner_from_dict = SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner.from_dict(sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner.md new file mode 100644 index 0000000..a322fc7 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner.md @@ -0,0 +1,38 @@ +# SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**counter_party** | **str** | | +**email** | **str** | | +**type** | **int** | 1 for transfer in, 2 for transfer out | +**asset** | **str** | | +**qty** | **str** | | +**from_account_type** | **str** | | +**to_account_type** | **str** | | +**status** | **str** | | +**tran_id** | **int** | | +**time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner import SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner from a JSON string +sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner_instance = SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner_dict = sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner_instance.to_dict() +# create an instance of SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner from a dict +sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner_from_dict = SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner.from_dict(sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountUniversalTransferGet200ResponseInner.md b/target/python/binance_openapi/docs/SapiV1SubAccountUniversalTransferGet200ResponseInner.md new file mode 100644 index 0000000..e523c10 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountUniversalTransferGet200ResponseInner.md @@ -0,0 +1,38 @@ +# SapiV1SubAccountUniversalTransferGet200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tran_id** | **int** | | +**from_email** | **str** | | +**to_email** | **str** | | +**asset** | **str** | | +**amount** | **str** | | +**from_account_type** | **str** | | +**to_account_type** | **str** | | +**status** | **str** | | +**create_time_stamp** | **int** | | +**client_tran_id** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_universal_transfer_get200_response_inner import SapiV1SubAccountUniversalTransferGet200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountUniversalTransferGet200ResponseInner from a JSON string +sapi_v1_sub_account_universal_transfer_get200_response_inner_instance = SapiV1SubAccountUniversalTransferGet200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountUniversalTransferGet200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_universal_transfer_get200_response_inner_dict = sapi_v1_sub_account_universal_transfer_get200_response_inner_instance.to_dict() +# create an instance of SapiV1SubAccountUniversalTransferGet200ResponseInner from a dict +sapi_v1_sub_account_universal_transfer_get200_response_inner_from_dict = SapiV1SubAccountUniversalTransferGet200ResponseInner.from_dict(sapi_v1_sub_account_universal_transfer_get200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountUniversalTransferPost200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountUniversalTransferPost200Response.md new file mode 100644 index 0000000..982d70b --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountUniversalTransferPost200Response.md @@ -0,0 +1,30 @@ +# SapiV1SubAccountUniversalTransferPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tran_id** | **int** | | +**client_tran_id** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_universal_transfer_post200_response import SapiV1SubAccountUniversalTransferPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountUniversalTransferPost200Response from a JSON string +sapi_v1_sub_account_universal_transfer_post200_response_instance = SapiV1SubAccountUniversalTransferPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountUniversalTransferPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_universal_transfer_post200_response_dict = sapi_v1_sub_account_universal_transfer_post200_response_instance.to_dict() +# create an instance of SapiV1SubAccountUniversalTransferPost200Response from a dict +sapi_v1_sub_account_universal_transfer_post200_response_from_dict = SapiV1SubAccountUniversalTransferPost200Response.from_dict(sapi_v1_sub_account_universal_transfer_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SubAccountVirtualSubAccountPost200Response.md b/target/python/binance_openapi/docs/SapiV1SubAccountVirtualSubAccountPost200Response.md new file mode 100644 index 0000000..f3c8590 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SubAccountVirtualSubAccountPost200Response.md @@ -0,0 +1,29 @@ +# SapiV1SubAccountVirtualSubAccountPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_sub_account_virtual_sub_account_post200_response import SapiV1SubAccountVirtualSubAccountPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SubAccountVirtualSubAccountPost200Response from a JSON string +sapi_v1_sub_account_virtual_sub_account_post200_response_instance = SapiV1SubAccountVirtualSubAccountPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SubAccountVirtualSubAccountPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_sub_account_virtual_sub_account_post200_response_dict = sapi_v1_sub_account_virtual_sub_account_post200_response_instance.to_dict() +# create an instance of SapiV1SubAccountVirtualSubAccountPost200Response from a dict +sapi_v1_sub_account_virtual_sub_account_post200_response_from_dict = SapiV1SubAccountVirtualSubAccountPost200Response.from_dict(sapi_v1_sub_account_virtual_sub_account_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1SystemStatusGet200Response.md b/target/python/binance_openapi/docs/SapiV1SystemStatusGet200Response.md new file mode 100644 index 0000000..2518d9f --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1SystemStatusGet200Response.md @@ -0,0 +1,30 @@ +# SapiV1SystemStatusGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | 0: normal, 1:system maintenance | +**msg** | **str** | \"normal\", \"system_maintenance\" | + +## Example + +```python +from openapi_client.models.sapi_v1_system_status_get200_response import SapiV1SystemStatusGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1SystemStatusGet200Response from a JSON string +sapi_v1_system_status_get200_response_instance = SapiV1SystemStatusGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1SystemStatusGet200Response.to_json()) + +# convert the object into a dict +sapi_v1_system_status_get200_response_dict = sapi_v1_system_status_get200_response_instance.to_dict() +# create an instance of SapiV1SystemStatusGet200Response from a dict +sapi_v1_system_status_get200_response_from_dict = SapiV1SystemStatusGet200Response.from_dict(sapi_v1_system_status_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV1UserDataStreamIsolatedPost200Response.md b/target/python/binance_openapi/docs/SapiV1UserDataStreamIsolatedPost200Response.md new file mode 100644 index 0000000..5a274b6 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV1UserDataStreamIsolatedPost200Response.md @@ -0,0 +1,29 @@ +# SapiV1UserDataStreamIsolatedPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listen_key** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v1_user_data_stream_isolated_post200_response import SapiV1UserDataStreamIsolatedPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV1UserDataStreamIsolatedPost200Response from a JSON string +sapi_v1_user_data_stream_isolated_post200_response_instance = SapiV1UserDataStreamIsolatedPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV1UserDataStreamIsolatedPost200Response.to_json()) + +# convert the object into a dict +sapi_v1_user_data_stream_isolated_post200_response_dict = sapi_v1_user_data_stream_isolated_post200_response_instance.to_dict() +# create an instance of SapiV1UserDataStreamIsolatedPost200Response from a dict +sapi_v1_user_data_stream_isolated_post200_response_from_dict = SapiV1UserDataStreamIsolatedPost200Response.from_dict(sapi_v1_user_data_stream_isolated_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2EthStakingAccountGet200Response.md b/target/python/binance_openapi/docs/SapiV2EthStakingAccountGet200Response.md new file mode 100644 index 0000000..30acc38 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2EthStakingAccountGet200Response.md @@ -0,0 +1,32 @@ +# SapiV2EthStakingAccountGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**holding_in_eth** | **str** | | +**holdings** | [**SapiV2EthStakingAccountGet200ResponseHoldings**](SapiV2EthStakingAccountGet200ResponseHoldings.md) | | +**thirty_days_profit_in_eth** | **str** | | +**profit** | [**SapiV2EthStakingAccountGet200ResponseProfit**](SapiV2EthStakingAccountGet200ResponseProfit.md) | | + +## Example + +```python +from openapi_client.models.sapi_v2_eth_staking_account_get200_response import SapiV2EthStakingAccountGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2EthStakingAccountGet200Response from a JSON string +sapi_v2_eth_staking_account_get200_response_instance = SapiV2EthStakingAccountGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2EthStakingAccountGet200Response.to_json()) + +# convert the object into a dict +sapi_v2_eth_staking_account_get200_response_dict = sapi_v2_eth_staking_account_get200_response_instance.to_dict() +# create an instance of SapiV2EthStakingAccountGet200Response from a dict +sapi_v2_eth_staking_account_get200_response_from_dict = SapiV2EthStakingAccountGet200Response.from_dict(sapi_v2_eth_staking_account_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2EthStakingAccountGet200ResponseHoldings.md b/target/python/binance_openapi/docs/SapiV2EthStakingAccountGet200ResponseHoldings.md new file mode 100644 index 0000000..2739457 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2EthStakingAccountGet200ResponseHoldings.md @@ -0,0 +1,30 @@ +# SapiV2EthStakingAccountGet200ResponseHoldings + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**wbeth_amount** | **str** | | +**beth_amount** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v2_eth_staking_account_get200_response_holdings import SapiV2EthStakingAccountGet200ResponseHoldings + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2EthStakingAccountGet200ResponseHoldings from a JSON string +sapi_v2_eth_staking_account_get200_response_holdings_instance = SapiV2EthStakingAccountGet200ResponseHoldings.from_json(json) +# print the JSON string representation of the object +print(SapiV2EthStakingAccountGet200ResponseHoldings.to_json()) + +# convert the object into a dict +sapi_v2_eth_staking_account_get200_response_holdings_dict = sapi_v2_eth_staking_account_get200_response_holdings_instance.to_dict() +# create an instance of SapiV2EthStakingAccountGet200ResponseHoldings from a dict +sapi_v2_eth_staking_account_get200_response_holdings_from_dict = SapiV2EthStakingAccountGet200ResponseHoldings.from_dict(sapi_v2_eth_staking_account_get200_response_holdings_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2EthStakingAccountGet200ResponseProfit.md b/target/python/binance_openapi/docs/SapiV2EthStakingAccountGet200ResponseProfit.md new file mode 100644 index 0000000..b1b8ce6 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2EthStakingAccountGet200ResponseProfit.md @@ -0,0 +1,30 @@ +# SapiV2EthStakingAccountGet200ResponseProfit + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount_from_wbeth** | **str** | | +**amount_from_beth** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v2_eth_staking_account_get200_response_profit import SapiV2EthStakingAccountGet200ResponseProfit + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2EthStakingAccountGet200ResponseProfit from a JSON string +sapi_v2_eth_staking_account_get200_response_profit_instance = SapiV2EthStakingAccountGet200ResponseProfit.from_json(json) +# print the JSON string representation of the object +print(SapiV2EthStakingAccountGet200ResponseProfit.to_json()) + +# convert the object into a dict +sapi_v2_eth_staking_account_get200_response_profit_dict = sapi_v2_eth_staking_account_get200_response_profit_instance.to_dict() +# create an instance of SapiV2EthStakingAccountGet200ResponseProfit from a dict +sapi_v2_eth_staking_account_get200_response_profit_from_dict = SapiV2EthStakingAccountGet200ResponseProfit.from_dict(sapi_v2_eth_staking_account_get200_response_profit_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2EthStakingEthStakePost200Response.md b/target/python/binance_openapi/docs/SapiV2EthStakingEthStakePost200Response.md new file mode 100644 index 0000000..cfaa196 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2EthStakingEthStakePost200Response.md @@ -0,0 +1,31 @@ +# SapiV2EthStakingEthStakePost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | | +**wbeth_amount** | **str** | | +**conversion_ratio** | **str** | ETH amount per 1 WBETH | + +## Example + +```python +from openapi_client.models.sapi_v2_eth_staking_eth_stake_post200_response import SapiV2EthStakingEthStakePost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2EthStakingEthStakePost200Response from a JSON string +sapi_v2_eth_staking_eth_stake_post200_response_instance = SapiV2EthStakingEthStakePost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2EthStakingEthStakePost200Response.to_json()) + +# convert the object into a dict +sapi_v2_eth_staking_eth_stake_post200_response_dict = sapi_v2_eth_staking_eth_stake_post200_response_instance.to_dict() +# create an instance of SapiV2EthStakingEthStakePost200Response from a dict +sapi_v2_eth_staking_eth_stake_post200_response_from_dict = SapiV2EthStakingEthStakePost200Response.from_dict(sapi_v2_eth_staking_eth_stake_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleAdjustLtvPost200Response.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleAdjustLtvPost200Response.md new file mode 100644 index 0000000..28ecffa --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleAdjustLtvPost200Response.md @@ -0,0 +1,33 @@ +# SapiV2LoanFlexibleAdjustLtvPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**collateral_coin** | **str** | | +**direction** | **str** | | +**adjustment_amount** | **str** | | +**current_ltv** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_adjust_ltv_post200_response import SapiV2LoanFlexibleAdjustLtvPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleAdjustLtvPost200Response from a JSON string +sapi_v2_loan_flexible_adjust_ltv_post200_response_instance = SapiV2LoanFlexibleAdjustLtvPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleAdjustLtvPost200Response.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_adjust_ltv_post200_response_dict = sapi_v2_loan_flexible_adjust_ltv_post200_response_instance.to_dict() +# create an instance of SapiV2LoanFlexibleAdjustLtvPost200Response from a dict +sapi_v2_loan_flexible_adjust_ltv_post200_response_from_dict = SapiV2LoanFlexibleAdjustLtvPost200Response.from_dict(sapi_v2_loan_flexible_adjust_ltv_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleBorrowHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleBorrowHistoryGet200Response.md new file mode 100644 index 0000000..8d0cb5c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleBorrowHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV2LoanFlexibleBorrowHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**rows** | [**List[SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner]**](SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_borrow_history_get200_response import SapiV2LoanFlexibleBorrowHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleBorrowHistoryGet200Response from a JSON string +sapi_v2_loan_flexible_borrow_history_get200_response_instance = SapiV2LoanFlexibleBorrowHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleBorrowHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_borrow_history_get200_response_dict = sapi_v2_loan_flexible_borrow_history_get200_response_instance.to_dict() +# create an instance of SapiV2LoanFlexibleBorrowHistoryGet200Response from a dict +sapi_v2_loan_flexible_borrow_history_get200_response_from_dict = SapiV2LoanFlexibleBorrowHistoryGet200Response.from_dict(sapi_v2_loan_flexible_borrow_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..9db8f10 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner.md @@ -0,0 +1,34 @@ +# SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**initial_loan_amount** | **str** | | +**collateral_coin** | **str** | | +**initial_collateral_amount** | **str** | | +**borrow_time** | **int** | | +**status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner import SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner from a JSON string +sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner_instance = SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner_dict = sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner from a dict +sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner_from_dict = SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner.from_dict(sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleBorrowPost200Response.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleBorrowPost200Response.md new file mode 100644 index 0000000..f687ffb --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleBorrowPost200Response.md @@ -0,0 +1,33 @@ +# SapiV2LoanFlexibleBorrowPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**loan_amount** | **str** | | +**collateral_coin** | **str** | | [optional] +**collateral_amount** | **str** | | +**status** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_borrow_post200_response import SapiV2LoanFlexibleBorrowPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleBorrowPost200Response from a JSON string +sapi_v2_loan_flexible_borrow_post200_response_instance = SapiV2LoanFlexibleBorrowPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleBorrowPost200Response.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_borrow_post200_response_dict = sapi_v2_loan_flexible_borrow_post200_response_instance.to_dict() +# create an instance of SapiV2LoanFlexibleBorrowPost200Response from a dict +sapi_v2_loan_flexible_borrow_post200_response_from_dict = SapiV2LoanFlexibleBorrowPost200Response.from_dict(sapi_v2_loan_flexible_borrow_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleCollateralDataGet200Response.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleCollateralDataGet200Response.md new file mode 100644 index 0000000..d1f13c2 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleCollateralDataGet200Response.md @@ -0,0 +1,30 @@ +# SapiV2LoanFlexibleCollateralDataGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner]**](SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_collateral_data_get200_response import SapiV2LoanFlexibleCollateralDataGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleCollateralDataGet200Response from a JSON string +sapi_v2_loan_flexible_collateral_data_get200_response_instance = SapiV2LoanFlexibleCollateralDataGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleCollateralDataGet200Response.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_collateral_data_get200_response_dict = sapi_v2_loan_flexible_collateral_data_get200_response_instance.to_dict() +# create an instance of SapiV2LoanFlexibleCollateralDataGet200Response from a dict +sapi_v2_loan_flexible_collateral_data_get200_response_from_dict = SapiV2LoanFlexibleCollateralDataGet200Response.from_dict(sapi_v2_loan_flexible_collateral_data_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner.md new file mode 100644 index 0000000..de63800 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner.md @@ -0,0 +1,33 @@ +# SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collateral_coin** | **str** | | +**initial_ltv** | **str** | | +**margin_call_ltv** | **str** | | +**liquidation_ltv** | **str** | | +**max_limit** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner import SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner from a JSON string +sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner_instance = SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner_dict = sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner from a dict +sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner_from_dict = SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner.from_dict(sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleLoanableDataGet200Response.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleLoanableDataGet200Response.md new file mode 100644 index 0000000..b62531a --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleLoanableDataGet200Response.md @@ -0,0 +1,30 @@ +# SapiV2LoanFlexibleLoanableDataGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner]**](SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_loanable_data_get200_response import SapiV2LoanFlexibleLoanableDataGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleLoanableDataGet200Response from a JSON string +sapi_v2_loan_flexible_loanable_data_get200_response_instance = SapiV2LoanFlexibleLoanableDataGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleLoanableDataGet200Response.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_loanable_data_get200_response_dict = sapi_v2_loan_flexible_loanable_data_get200_response_instance.to_dict() +# create an instance of SapiV2LoanFlexibleLoanableDataGet200Response from a dict +sapi_v2_loan_flexible_loanable_data_get200_response_from_dict = SapiV2LoanFlexibleLoanableDataGet200Response.from_dict(sapi_v2_loan_flexible_loanable_data_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner.md new file mode 100644 index 0000000..675db45 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner.md @@ -0,0 +1,32 @@ +# SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**flexible_interest_rate** | **str** | | +**flexible_min_limit** | **str** | | +**flexible_max_limit** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner import SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner from a JSON string +sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner_instance = SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner_dict = sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner from a dict +sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner_from_dict = SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner.from_dict(sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response.md new file mode 100644 index 0000000..f60f33e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner]**](SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_ltv_adjustment_history_get200_response import SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response from a JSON string +sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_instance = SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_dict = sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_instance.to_dict() +# create an instance of SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response from a dict +sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_from_dict = SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response.from_dict(sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..f7b3ed6 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner.md @@ -0,0 +1,35 @@ +# SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**collateral_coin** | **str** | | +**direction** | **str** | | +**collateral_amount** | **str** | | +**pre_ltv** | **str** | | +**after_ltv** | **str** | | +**adjust_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner import SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner from a JSON string +sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner_instance = SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner_dict = sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner from a dict +sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner_from_dict = SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner.from_dict(sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleOngoingOrdersGet200Response.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleOngoingOrdersGet200Response.md new file mode 100644 index 0000000..f41a267 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleOngoingOrdersGet200Response.md @@ -0,0 +1,30 @@ +# SapiV2LoanFlexibleOngoingOrdersGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | | +**rows** | [**List[SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner]**](SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_ongoing_orders_get200_response import SapiV2LoanFlexibleOngoingOrdersGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleOngoingOrdersGet200Response from a JSON string +sapi_v2_loan_flexible_ongoing_orders_get200_response_instance = SapiV2LoanFlexibleOngoingOrdersGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleOngoingOrdersGet200Response.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_ongoing_orders_get200_response_dict = sapi_v2_loan_flexible_ongoing_orders_get200_response_instance.to_dict() +# create an instance of SapiV2LoanFlexibleOngoingOrdersGet200Response from a dict +sapi_v2_loan_flexible_ongoing_orders_get200_response_from_dict = SapiV2LoanFlexibleOngoingOrdersGet200Response.from_dict(sapi_v2_loan_flexible_ongoing_orders_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner.md new file mode 100644 index 0000000..cb1bc9e --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner.md @@ -0,0 +1,33 @@ +# SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**total_debt** | **str** | | +**collateral_coin** | **str** | | +**collateral_amount** | **str** | | +**current_ltv** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner import SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner from a JSON string +sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner_instance = SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner_dict = sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner from a dict +sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner_from_dict = SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner.from_dict(sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleRepayHistoryGet200Response.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleRepayHistoryGet200Response.md new file mode 100644 index 0000000..7b414f2 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleRepayHistoryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV2LoanFlexibleRepayHistoryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rows** | [**List[SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner]**](SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner.md) | | +**total** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_repay_history_get200_response import SapiV2LoanFlexibleRepayHistoryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleRepayHistoryGet200Response from a JSON string +sapi_v2_loan_flexible_repay_history_get200_response_instance = SapiV2LoanFlexibleRepayHistoryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleRepayHistoryGet200Response.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_repay_history_get200_response_dict = sapi_v2_loan_flexible_repay_history_get200_response_instance.to_dict() +# create an instance of SapiV2LoanFlexibleRepayHistoryGet200Response from a dict +sapi_v2_loan_flexible_repay_history_get200_response_from_dict = SapiV2LoanFlexibleRepayHistoryGet200Response.from_dict(sapi_v2_loan_flexible_repay_history_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner.md new file mode 100644 index 0000000..e7685df --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner.md @@ -0,0 +1,34 @@ +# SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**repay_amount** | **str** | | +**collateral_coin** | **str** | | +**collateral_return** | **str** | | +**repay_status** | **str** | | +**repay_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_repay_history_get200_response_rows_inner import SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner from a JSON string +sapi_v2_loan_flexible_repay_history_get200_response_rows_inner_instance = SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_repay_history_get200_response_rows_inner_dict = sapi_v2_loan_flexible_repay_history_get200_response_rows_inner_instance.to_dict() +# create an instance of SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner from a dict +sapi_v2_loan_flexible_repay_history_get200_response_rows_inner_from_dict = SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner.from_dict(sapi_v2_loan_flexible_repay_history_get200_response_rows_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2LoanFlexibleRepayPost200Response.md b/target/python/binance_openapi/docs/SapiV2LoanFlexibleRepayPost200Response.md new file mode 100644 index 0000000..db08400 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2LoanFlexibleRepayPost200Response.md @@ -0,0 +1,35 @@ +# SapiV2LoanFlexibleRepayPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loan_coin** | **str** | | +**collateral_coin** | **str** | | +**remaining_debt** | **str** | | +**remaining_collateral** | **str** | | +**full_repayment** | **bool** | | +**current_ltv** | **str** | | +**repay_status** | **str** | Repaid, Repaying, Failed | + +## Example + +```python +from openapi_client.models.sapi_v2_loan_flexible_repay_post200_response import SapiV2LoanFlexibleRepayPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2LoanFlexibleRepayPost200Response from a JSON string +sapi_v2_loan_flexible_repay_post200_response_instance = SapiV2LoanFlexibleRepayPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2LoanFlexibleRepayPost200Response.to_json()) + +# convert the object into a dict +sapi_v2_loan_flexible_repay_post200_response_dict = sapi_v2_loan_flexible_repay_post200_response_instance.to_dict() +# create an instance of SapiV2LoanFlexibleRepayPost200Response from a dict +sapi_v2_loan_flexible_repay_post200_response_from_dict = SapiV2LoanFlexibleRepayPost200Response.from_dict(sapi_v2_loan_flexible_repay_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2SubAccountFuturesAccountGet200Response.md b/target/python/binance_openapi/docs/SapiV2SubAccountFuturesAccountGet200Response.md new file mode 100644 index 0000000..45ccc09 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2SubAccountFuturesAccountGet200Response.md @@ -0,0 +1,36 @@ +# SapiV2SubAccountFuturesAccountGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**future_account_resp** | [**SubAccountUSDTFuturesDetailsFutureAccountResp**](SubAccountUSDTFuturesDetailsFutureAccountResp.md) | | +**email** | **str** | | +**assets** | [**List[SubAccountCOINFuturesDetailsAssetsInner]**](SubAccountCOINFuturesDetailsAssetsInner.md) | | +**can_deposit** | **bool** | | +**can_trade** | **bool** | | +**can_withdraw** | **bool** | | +**fee_tier** | **int** | | +**update_time** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v2_sub_account_futures_account_get200_response import SapiV2SubAccountFuturesAccountGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2SubAccountFuturesAccountGet200Response from a JSON string +sapi_v2_sub_account_futures_account_get200_response_instance = SapiV2SubAccountFuturesAccountGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2SubAccountFuturesAccountGet200Response.to_json()) + +# convert the object into a dict +sapi_v2_sub_account_futures_account_get200_response_dict = sapi_v2_sub_account_futures_account_get200_response_instance.to_dict() +# create an instance of SapiV2SubAccountFuturesAccountGet200Response from a dict +sapi_v2_sub_account_futures_account_get200_response_from_dict = SapiV2SubAccountFuturesAccountGet200Response.from_dict(sapi_v2_sub_account_futures_account_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2SubAccountFuturesAccountSummaryGet200Response.md b/target/python/binance_openapi/docs/SapiV2SubAccountFuturesAccountSummaryGet200Response.md new file mode 100644 index 0000000..5b64801 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2SubAccountFuturesAccountSummaryGet200Response.md @@ -0,0 +1,30 @@ +# SapiV2SubAccountFuturesAccountSummaryGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**future_account_summary_resp** | [**SubAccountUSDTFuturesSummaryFutureAccountSummaryResp**](SubAccountUSDTFuturesSummaryFutureAccountSummaryResp.md) | | +**delivery_account_summary_resp** | [**SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp**](SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp.md) | | + +## Example + +```python +from openapi_client.models.sapi_v2_sub_account_futures_account_summary_get200_response import SapiV2SubAccountFuturesAccountSummaryGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2SubAccountFuturesAccountSummaryGet200Response from a JSON string +sapi_v2_sub_account_futures_account_summary_get200_response_instance = SapiV2SubAccountFuturesAccountSummaryGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2SubAccountFuturesAccountSummaryGet200Response.to_json()) + +# convert the object into a dict +sapi_v2_sub_account_futures_account_summary_get200_response_dict = sapi_v2_sub_account_futures_account_summary_get200_response_instance.to_dict() +# create an instance of SapiV2SubAccountFuturesAccountSummaryGet200Response from a dict +sapi_v2_sub_account_futures_account_summary_get200_response_from_dict = SapiV2SubAccountFuturesAccountSummaryGet200Response.from_dict(sapi_v2_sub_account_futures_account_summary_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2SubAccountFuturesPositionRiskGet200Response.md b/target/python/binance_openapi/docs/SapiV2SubAccountFuturesPositionRiskGet200Response.md new file mode 100644 index 0000000..66ada64 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2SubAccountFuturesPositionRiskGet200Response.md @@ -0,0 +1,30 @@ +# SapiV2SubAccountFuturesPositionRiskGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**future_position_risk_vos** | [**List[SapiV1SubAccountFuturesPositionRiskGet200ResponseInner]**](SapiV1SubAccountFuturesPositionRiskGet200ResponseInner.md) | | +**delivery_position_risk_vos** | [**List[SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner]**](SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v2_sub_account_futures_position_risk_get200_response import SapiV2SubAccountFuturesPositionRiskGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2SubAccountFuturesPositionRiskGet200Response from a JSON string +sapi_v2_sub_account_futures_position_risk_get200_response_instance = SapiV2SubAccountFuturesPositionRiskGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2SubAccountFuturesPositionRiskGet200Response.to_json()) + +# convert the object into a dict +sapi_v2_sub_account_futures_position_risk_get200_response_dict = sapi_v2_sub_account_futures_position_risk_get200_response_instance.to_dict() +# create an instance of SapiV2SubAccountFuturesPositionRiskGet200Response from a dict +sapi_v2_sub_account_futures_position_risk_get200_response_from_dict = SapiV2SubAccountFuturesPositionRiskGet200Response.from_dict(sapi_v2_sub_account_futures_position_risk_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV2SubAccountSubAccountApiIpRestrictionPost200Response.md b/target/python/binance_openapi/docs/SapiV2SubAccountSubAccountApiIpRestrictionPost200Response.md new file mode 100644 index 0000000..e79ac1c --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV2SubAccountSubAccountApiIpRestrictionPost200Response.md @@ -0,0 +1,32 @@ +# SapiV2SubAccountSubAccountApiIpRestrictionPost200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | | +**ip_list** | **List[str]** | | +**update_time** | **int** | | +**api_key** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response import SapiV2SubAccountSubAccountApiIpRestrictionPost200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV2SubAccountSubAccountApiIpRestrictionPost200Response from a JSON string +sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response_instance = SapiV2SubAccountSubAccountApiIpRestrictionPost200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV2SubAccountSubAccountApiIpRestrictionPost200Response.to_json()) + +# convert the object into a dict +sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response_dict = sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response_instance.to_dict() +# create an instance of SapiV2SubAccountSubAccountApiIpRestrictionPost200Response from a dict +sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response_from_dict = SapiV2SubAccountSubAccountApiIpRestrictionPost200Response.from_dict(sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV3AssetGetUserAssetPost200ResponseInner.md b/target/python/binance_openapi/docs/SapiV3AssetGetUserAssetPost200ResponseInner.md new file mode 100644 index 0000000..707b5ae --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV3AssetGetUserAssetPost200ResponseInner.md @@ -0,0 +1,35 @@ +# SapiV3AssetGetUserAssetPost200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**free** | **str** | | +**locked** | **str** | | +**freeze** | **str** | | +**withdrawing** | **str** | | +**ipoable** | **str** | | +**btc_valuation** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v3_asset_get_user_asset_post200_response_inner import SapiV3AssetGetUserAssetPost200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV3AssetGetUserAssetPost200ResponseInner from a JSON string +sapi_v3_asset_get_user_asset_post200_response_inner_instance = SapiV3AssetGetUserAssetPost200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(SapiV3AssetGetUserAssetPost200ResponseInner.to_json()) + +# convert the object into a dict +sapi_v3_asset_get_user_asset_post200_response_inner_dict = sapi_v3_asset_get_user_asset_post200_response_inner_instance.to_dict() +# create an instance of SapiV3AssetGetUserAssetPost200ResponseInner from a dict +sapi_v3_asset_get_user_asset_post200_response_inner_from_dict = SapiV3AssetGetUserAssetPost200ResponseInner.from_dict(sapi_v3_asset_get_user_asset_post200_response_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV3SubAccountAssetsGet200Response.md b/target/python/binance_openapi/docs/SapiV3SubAccountAssetsGet200Response.md new file mode 100644 index 0000000..ebf3272 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV3SubAccountAssetsGet200Response.md @@ -0,0 +1,29 @@ +# SapiV3SubAccountAssetsGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**balances** | [**List[SapiV3SubAccountAssetsGet200ResponseBalancesInner]**](SapiV3SubAccountAssetsGet200ResponseBalancesInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v3_sub_account_assets_get200_response import SapiV3SubAccountAssetsGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV3SubAccountAssetsGet200Response from a JSON string +sapi_v3_sub_account_assets_get200_response_instance = SapiV3SubAccountAssetsGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV3SubAccountAssetsGet200Response.to_json()) + +# convert the object into a dict +sapi_v3_sub_account_assets_get200_response_dict = sapi_v3_sub_account_assets_get200_response_instance.to_dict() +# create an instance of SapiV3SubAccountAssetsGet200Response from a dict +sapi_v3_sub_account_assets_get200_response_from_dict = SapiV3SubAccountAssetsGet200Response.from_dict(sapi_v3_sub_account_assets_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV3SubAccountAssetsGet200ResponseBalancesInner.md b/target/python/binance_openapi/docs/SapiV3SubAccountAssetsGet200ResponseBalancesInner.md new file mode 100644 index 0000000..4ba1444 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV3SubAccountAssetsGet200ResponseBalancesInner.md @@ -0,0 +1,31 @@ +# SapiV3SubAccountAssetsGet200ResponseBalancesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**free** | **int** | | +**locked** | **int** | | + +## Example + +```python +from openapi_client.models.sapi_v3_sub_account_assets_get200_response_balances_inner import SapiV3SubAccountAssetsGet200ResponseBalancesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV3SubAccountAssetsGet200ResponseBalancesInner from a JSON string +sapi_v3_sub_account_assets_get200_response_balances_inner_instance = SapiV3SubAccountAssetsGet200ResponseBalancesInner.from_json(json) +# print the JSON string representation of the object +print(SapiV3SubAccountAssetsGet200ResponseBalancesInner.to_json()) + +# convert the object into a dict +sapi_v3_sub_account_assets_get200_response_balances_inner_dict = sapi_v3_sub_account_assets_get200_response_balances_inner_instance.to_dict() +# create an instance of SapiV3SubAccountAssetsGet200ResponseBalancesInner from a dict +sapi_v3_sub_account_assets_get200_response_balances_inner_from_dict = SapiV3SubAccountAssetsGet200ResponseBalancesInner.from_dict(sapi_v3_sub_account_assets_get200_response_balances_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV4SubAccountAssetsGet200Response.md b/target/python/binance_openapi/docs/SapiV4SubAccountAssetsGet200Response.md new file mode 100644 index 0000000..8c8541d --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV4SubAccountAssetsGet200Response.md @@ -0,0 +1,29 @@ +# SapiV4SubAccountAssetsGet200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**balances** | [**List[SapiV4SubAccountAssetsGet200ResponseBalancesInner]**](SapiV4SubAccountAssetsGet200ResponseBalancesInner.md) | | + +## Example + +```python +from openapi_client.models.sapi_v4_sub_account_assets_get200_response import SapiV4SubAccountAssetsGet200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV4SubAccountAssetsGet200Response from a JSON string +sapi_v4_sub_account_assets_get200_response_instance = SapiV4SubAccountAssetsGet200Response.from_json(json) +# print the JSON string representation of the object +print(SapiV4SubAccountAssetsGet200Response.to_json()) + +# convert the object into a dict +sapi_v4_sub_account_assets_get200_response_dict = sapi_v4_sub_account_assets_get200_response_instance.to_dict() +# create an instance of SapiV4SubAccountAssetsGet200Response from a dict +sapi_v4_sub_account_assets_get200_response_from_dict = SapiV4SubAccountAssetsGet200Response.from_dict(sapi_v4_sub_account_assets_get200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SapiV4SubAccountAssetsGet200ResponseBalancesInner.md b/target/python/binance_openapi/docs/SapiV4SubAccountAssetsGet200ResponseBalancesInner.md new file mode 100644 index 0000000..f043465 --- /dev/null +++ b/target/python/binance_openapi/docs/SapiV4SubAccountAssetsGet200ResponseBalancesInner.md @@ -0,0 +1,31 @@ +# SapiV4SubAccountAssetsGet200ResponseBalancesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**free** | **str** | | +**locked** | **str** | | + +## Example + +```python +from openapi_client.models.sapi_v4_sub_account_assets_get200_response_balances_inner import SapiV4SubAccountAssetsGet200ResponseBalancesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SapiV4SubAccountAssetsGet200ResponseBalancesInner from a JSON string +sapi_v4_sub_account_assets_get200_response_balances_inner_instance = SapiV4SubAccountAssetsGet200ResponseBalancesInner.from_json(json) +# print the JSON string representation of the object +print(SapiV4SubAccountAssetsGet200ResponseBalancesInner.to_json()) + +# convert the object into a dict +sapi_v4_sub_account_assets_get200_response_balances_inner_dict = sapi_v4_sub_account_assets_get200_response_balances_inner_instance.to_dict() +# create an instance of SapiV4SubAccountAssetsGet200ResponseBalancesInner from a dict +sapi_v4_sub_account_assets_get200_response_balances_inner_from_dict = SapiV4SubAccountAssetsGet200ResponseBalancesInner.from_dict(sapi_v4_sub_account_assets_get200_response_balances_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SavingsApi.md b/target/python/binance_openapi/docs/SavingsApi.md new file mode 100644 index 0000000..5c96f71 --- /dev/null +++ b/target/python/binance_openapi/docs/SavingsApi.md @@ -0,0 +1,382 @@ +# openapi_client.SavingsApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_lending_customized_fixed_purchase_post**](SavingsApi.md#sapi_v1_lending_customized_fixed_purchase_post) | **POST** /sapi/v1/lending/customizedFixed/purchase | Purchase Fixed/Activity Project (USER_DATA) +[**sapi_v1_lending_position_changed_post**](SavingsApi.md#sapi_v1_lending_position_changed_post) | **POST** /sapi/v1/lending/positionChanged | Change Fixed/Activity Position to Daily Position (USER_DATA) +[**sapi_v1_lending_project_list_get**](SavingsApi.md#sapi_v1_lending_project_list_get) | **GET** /sapi/v1/lending/project/list | Get Fixed/Activity Project List(USER_DATA) +[**sapi_v1_lending_project_position_list_get**](SavingsApi.md#sapi_v1_lending_project_position_list_get) | **GET** /sapi/v1/lending/project/position/list | Get Fixed/Activity Project Position (USER_DATA) + + +# **sapi_v1_lending_customized_fixed_purchase_post** +> SapiV1LendingCustomizedFixedPurchasePost200Response sapi_v1_lending_customized_fixed_purchase_post(project_id, lot, timestamp, signature, recv_window=recv_window) + +Purchase Fixed/Activity Project (USER_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_customized_fixed_purchase_post200_response import SapiV1LendingCustomizedFixedPurchasePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SavingsApi(api_client) + project_id = 'project_id_example' # str | + lot = 'lot_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Purchase Fixed/Activity Project (USER_DATA) + api_response = api_instance.sapi_v1_lending_customized_fixed_purchase_post(project_id, lot, timestamp, signature, recv_window=recv_window) + print("The response of SavingsApi->sapi_v1_lending_customized_fixed_purchase_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SavingsApi->sapi_v1_lending_customized_fixed_purchase_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **lot** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingCustomizedFixedPurchasePost200Response**](SapiV1LendingCustomizedFixedPurchasePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Generated Purchase Id | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_position_changed_post** +> SapiV1LendingPositionChangedPost200Response sapi_v1_lending_position_changed_post(project_id, lot, timestamp, signature, position_id=position_id, recv_window=recv_window) + +Change Fixed/Activity Position to Daily Position (USER_DATA) + +- PositionId is mandatory parameter for fixed position. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_position_changed_post200_response import SapiV1LendingPositionChangedPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SavingsApi(api_client) + project_id = 'project_id_example' # str | + lot = 'lot_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + position_id = 'position_id_example' # str | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Change Fixed/Activity Position to Daily Position (USER_DATA) + api_response = api_instance.sapi_v1_lending_position_changed_post(project_id, lot, timestamp, signature, position_id=position_id, recv_window=recv_window) + print("The response of SavingsApi->sapi_v1_lending_position_changed_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SavingsApi->sapi_v1_lending_position_changed_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **lot** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **position_id** | **str**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LendingPositionChangedPost200Response**](SapiV1LendingPositionChangedPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Purchase information | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_project_list_get** +> List[SapiV1LendingProjectListGet200ResponseInner] sapi_v1_lending_project_list_get(type, timestamp, signature, asset=asset, status=status, is_sort_asc=is_sort_asc, sort_by=sort_by, current=current, size=size, recv_window=recv_window) + +Get Fixed/Activity Project List(USER_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_project_list_get200_response_inner import SapiV1LendingProjectListGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SavingsApi(api_client) + type = 'type_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'BNB' # str | (optional) + status = 'status_example' # str | Default `ALL` (optional) + is_sort_asc = True # bool | default \"true\" (optional) + sort_by = 'sort_by_example' # str | Default `START_TIME` (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Fixed/Activity Project List(USER_DATA) + api_response = api_instance.sapi_v1_lending_project_list_get(type, timestamp, signature, asset=asset, status=status, is_sort_asc=is_sort_asc, sort_by=sort_by, current=current, size=size, recv_window=recv_window) + print("The response of SavingsApi->sapi_v1_lending_project_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SavingsApi->sapi_v1_lending_project_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| | [optional] + **status** | **str**| Default `ALL` | [optional] + **is_sort_asc** | **bool**| default \"true\" | [optional] + **sort_by** | **str**| Default `START_TIME` | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1LendingProjectListGet200ResponseInner]**](SapiV1LendingProjectListGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of fixed projects | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_lending_project_position_list_get** +> List[SapiV1LendingProjectPositionListGet200ResponseInner] sapi_v1_lending_project_position_list_get(asset, timestamp, signature, project_id=project_id, status=status, recv_window=recv_window) + +Get Fixed/Activity Project Position (USER_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_lending_project_position_list_get200_response_inner import SapiV1LendingProjectPositionListGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SavingsApi(api_client) + asset = 'BTC' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + project_id = 'project_id_example' # str | (optional) + status = 'status_example' # str | Default `ALL` (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Fixed/Activity Project Position (USER_DATA) + api_response = api_instance.sapi_v1_lending_project_position_list_get(asset, timestamp, signature, project_id=project_id, status=status, recv_window=recv_window) + print("The response of SavingsApi->sapi_v1_lending_project_position_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SavingsApi->sapi_v1_lending_project_position_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **project_id** | **str**| | [optional] + **status** | **str**| Default `ALL` | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1LendingProjectPositionListGet200ResponseInner]**](SapiV1LendingProjectPositionListGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of fixed project positions | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/SimpleEarnApi.md b/target/python/binance_openapi/docs/SimpleEarnApi.md new file mode 100644 index 0000000..c2432e6 --- /dev/null +++ b/target/python/binance_openapi/docs/SimpleEarnApi.md @@ -0,0 +1,2146 @@ +# openapi_client.SimpleEarnApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_simple_earn_account_get**](SimpleEarnApi.md#sapi_v1_simple_earn_account_get) | **GET** /sapi/v1/simple-earn/account | Simple Account (USER_DATA) +[**sapi_v1_simple_earn_flexible_history_collateral_record_get**](SimpleEarnApi.md#sapi_v1_simple_earn_flexible_history_collateral_record_get) | **GET** /sapi/v1/simple-earn/flexible/history/collateralRecord | Get Collateral Record (USER_DATA) +[**sapi_v1_simple_earn_flexible_history_rate_history_get**](SimpleEarnApi.md#sapi_v1_simple_earn_flexible_history_rate_history_get) | **GET** /sapi/v1/simple-earn/flexible/history/rateHistory | Get Rate History (USER_DATA) +[**sapi_v1_simple_earn_flexible_history_redemption_record_get**](SimpleEarnApi.md#sapi_v1_simple_earn_flexible_history_redemption_record_get) | **GET** /sapi/v1/simple-earn/flexible/history/redemptionRecord | Get Flexible Redemption Record (USER_DATA) +[**sapi_v1_simple_earn_flexible_history_rewards_record_get**](SimpleEarnApi.md#sapi_v1_simple_earn_flexible_history_rewards_record_get) | **GET** /sapi/v1/simple-earn/flexible/history/rewardsRecord | Get Flexible Rewards History (USER_DATA) +[**sapi_v1_simple_earn_flexible_history_subscription_record_get**](SimpleEarnApi.md#sapi_v1_simple_earn_flexible_history_subscription_record_get) | **GET** /sapi/v1/simple-earn/flexible/history/subscriptionRecord | Get Flexible Subscription Record (USER_DATA) +[**sapi_v1_simple_earn_flexible_list_get**](SimpleEarnApi.md#sapi_v1_simple_earn_flexible_list_get) | **GET** /sapi/v1/simple-earn/flexible/list | Get Simple Earn Flexible Product List (USER_DATA) +[**sapi_v1_simple_earn_flexible_personal_left_quota_get**](SimpleEarnApi.md#sapi_v1_simple_earn_flexible_personal_left_quota_get) | **GET** /sapi/v1/simple-earn/flexible/personalLeftQuota | Get Flexible Personal Left Quota (USER_DATA) +[**sapi_v1_simple_earn_flexible_position_get**](SimpleEarnApi.md#sapi_v1_simple_earn_flexible_position_get) | **GET** /sapi/v1/simple-earn/flexible/position | Get Flexible Product Position (USER_DATA) +[**sapi_v1_simple_earn_flexible_redeem_post**](SimpleEarnApi.md#sapi_v1_simple_earn_flexible_redeem_post) | **POST** /sapi/v1/simple-earn/flexible/redeem | Redeem Flexible Product (TRADE) +[**sapi_v1_simple_earn_flexible_set_auto_subscribe_post**](SimpleEarnApi.md#sapi_v1_simple_earn_flexible_set_auto_subscribe_post) | **POST** /sapi/v1/simple-earn/flexible/setAutoSubscribe | Set Flexible Auto Subscribe (USER_DATA) +[**sapi_v1_simple_earn_flexible_subscribe_post**](SimpleEarnApi.md#sapi_v1_simple_earn_flexible_subscribe_post) | **POST** /sapi/v1/simple-earn/flexible/subscribe | Subscribe Flexible Product (TRADE) +[**sapi_v1_simple_earn_flexible_subscription_preview_get**](SimpleEarnApi.md#sapi_v1_simple_earn_flexible_subscription_preview_get) | **GET** /sapi/v1/simple-earn/flexible/subscriptionPreview | Get Flexible Subscription Preview (USER_DATA) +[**sapi_v1_simple_earn_locked_history_redemption_record_get**](SimpleEarnApi.md#sapi_v1_simple_earn_locked_history_redemption_record_get) | **GET** /sapi/v1/simple-earn/locked/history/redemptionRecord | Get Locked Redemption Record (USER_DATA) +[**sapi_v1_simple_earn_locked_history_rewards_record_get**](SimpleEarnApi.md#sapi_v1_simple_earn_locked_history_rewards_record_get) | **GET** /sapi/v1/simple-earn/locked/history/rewardsRecord | Get Locked Rewards History (USER_DATA) +[**sapi_v1_simple_earn_locked_history_subscription_record_get**](SimpleEarnApi.md#sapi_v1_simple_earn_locked_history_subscription_record_get) | **GET** /sapi/v1/simple-earn/locked/history/subscriptionRecord | Get Locked Subscription Record (USER_DATA) +[**sapi_v1_simple_earn_locked_list_get**](SimpleEarnApi.md#sapi_v1_simple_earn_locked_list_get) | **GET** /sapi/v1/simple-earn/locked/list | Get Simple Earn Locked Product List (USER_DATA) +[**sapi_v1_simple_earn_locked_personal_left_quota_get**](SimpleEarnApi.md#sapi_v1_simple_earn_locked_personal_left_quota_get) | **GET** /sapi/v1/simple-earn/locked/personalLeftQuota | Get Locked Personal Left Quota (USER_DATA) +[**sapi_v1_simple_earn_locked_position_get**](SimpleEarnApi.md#sapi_v1_simple_earn_locked_position_get) | **GET** /sapi/v1/simple-earn/locked/position | Get Locked Product Position (USER_DATA) +[**sapi_v1_simple_earn_locked_redeem_post**](SimpleEarnApi.md#sapi_v1_simple_earn_locked_redeem_post) | **POST** /sapi/v1/simple-earn/locked/redeem | Redeem Locked Product (TRADE) +[**sapi_v1_simple_earn_locked_set_auto_subscribe_post**](SimpleEarnApi.md#sapi_v1_simple_earn_locked_set_auto_subscribe_post) | **POST** /sapi/v1/simple-earn/locked/setAutoSubscribe | Set Locked Auto Subscribe (USER_DATA) +[**sapi_v1_simple_earn_locked_subscribe_post**](SimpleEarnApi.md#sapi_v1_simple_earn_locked_subscribe_post) | **POST** /sapi/v1/simple-earn/locked/subscribe | Subscribe Locked Product (TRADE) +[**sapi_v1_simple_earn_locked_subscription_preview_get**](SimpleEarnApi.md#sapi_v1_simple_earn_locked_subscription_preview_get) | **GET** /sapi/v1/simple-earn/locked/subscriptionPreview | Get Locked Subscription Preview (USER_DATA) + + +# **sapi_v1_simple_earn_account_get** +> SapiV1SimpleEarnAccountGet200Response sapi_v1_simple_earn_account_get(timestamp, signature, recv_window=recv_window) + +Simple Account (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_account_get200_response import SapiV1SimpleEarnAccountGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Simple Account (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_account_get(timestamp, signature, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_account_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_account_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnAccountGet200Response**](SapiV1SimpleEarnAccountGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Account Information | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_flexible_history_collateral_record_get** +> SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response sapi_v1_simple_earn_flexible_history_collateral_record_get(timestamp, signature, product_id=product_id, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Get Collateral Record (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_flexible_history_collateral_record_get200_response import SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + product_id = 'product_id_example' # str | (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Collateral Record (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_flexible_history_collateral_record_get(timestamp, signature, product_id=product_id, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_flexible_history_collateral_record_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_flexible_history_collateral_record_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **product_id** | **str**| | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response**](SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collateral Record | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_flexible_history_rate_history_get** +> SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response sapi_v1_simple_earn_flexible_history_rate_history_get(product_id, timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Get Rate History (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rate_history_get200_response import SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + product_id = 'product_id_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Rate History (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_flexible_history_rate_history_get(product_id, timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_flexible_history_rate_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_flexible_history_rate_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **product_id** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response**](SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Rate History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_flexible_history_redemption_record_get** +> SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response sapi_v1_simple_earn_flexible_history_redemption_record_get(product_id=product_id, redeem_id=redeem_id, asset=asset, start_time=start_time, end_time=end_time, current=current, size=size) + +Get Flexible Redemption Record (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_flexible_history_redemption_record_get200_response import SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + product_id = 'product_id_example' # str | (optional) + redeem_id = 'redeem_id_example' # str | (optional) + asset = 'asset_example' # str | (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + + try: + # Get Flexible Redemption Record (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_flexible_history_redemption_record_get(product_id=product_id, redeem_id=redeem_id, asset=asset, start_time=start_time, end_time=end_time, current=current, size=size) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_flexible_history_redemption_record_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_flexible_history_redemption_record_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **product_id** | **str**| | [optional] + **redeem_id** | **str**| | [optional] + **asset** | **str**| | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + +### Return type + +[**SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response**](SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Flexible Redemption Record | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_flexible_history_rewards_record_get** +> SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response sapi_v1_simple_earn_flexible_history_rewards_record_get(type, product_id=product_id, asset=asset, start_time=start_time, end_time=end_time) + +Get Flexible Rewards History (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rewards_record_get200_response import SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + type = 'type_example' # str | \"BONUS\", \"REALTIME\", \"REWARDS\" + product_id = 'product_id_example' # str | (optional) + asset = 'asset_example' # str | (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + + try: + # Get Flexible Rewards History (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_flexible_history_rewards_record_get(type, product_id=product_id, asset=asset, start_time=start_time, end_time=end_time) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_flexible_history_rewards_record_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_flexible_history_rewards_record_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| \"BONUS\", \"REALTIME\", \"REWARDS\" | + **product_id** | **str**| | [optional] + **asset** | **str**| | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + +### Return type + +[**SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response**](SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Flexible Rewards History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_flexible_history_subscription_record_get** +> SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response sapi_v1_simple_earn_flexible_history_subscription_record_get(timestamp, signature, product_id=product_id, purchase_id=purchase_id, asset=asset, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Get Flexible Subscription Record (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_flexible_history_subscription_record_get200_response import SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + product_id = 'product_id_example' # str | (optional) + purchase_id = 'purchase_id_example' # str | (optional) + asset = 'asset_example' # str | (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Flexible Subscription Record (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_flexible_history_subscription_record_get(timestamp, signature, product_id=product_id, purchase_id=purchase_id, asset=asset, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_flexible_history_subscription_record_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_flexible_history_subscription_record_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **product_id** | **str**| | [optional] + **purchase_id** | **str**| | [optional] + **asset** | **str**| | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response**](SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Flexible Product Position | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_flexible_list_get** +> SapiV1SimpleEarnFlexibleListGet200Response sapi_v1_simple_earn_flexible_list_get(timestamp, signature, asset=asset, current=current, size=size, recv_window=recv_window) + +Get Simple Earn Flexible Product List (USER_DATA) + +Get available Simple Earn flexible product list Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response import SapiV1SimpleEarnFlexibleListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'BTC' # str | (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Simple Earn Flexible Product List (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_flexible_list_get(timestamp, signature, asset=asset, current=current, size=size, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_flexible_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_flexible_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnFlexibleListGet200Response**](SapiV1SimpleEarnFlexibleListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Simple Earn Flexible Product List | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_flexible_personal_left_quota_get** +> SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response sapi_v1_simple_earn_flexible_personal_left_quota_get(product_id, timestamp, signature, recv_window=recv_window) + +Get Flexible Personal Left Quota (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_flexible_personal_left_quota_get200_response import SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + product_id = 'product_id_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Flexible Personal Left Quota (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_flexible_personal_left_quota_get(product_id, timestamp, signature, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_flexible_personal_left_quota_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_flexible_personal_left_quota_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **product_id** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response**](SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Flexible Personal Left Quota | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_flexible_position_get** +> SapiV1SimpleEarnFlexiblePositionGet200Response sapi_v1_simple_earn_flexible_position_get(timestamp, signature, asset=asset, product_id=product_id, current=current, size=size, recv_window=recv_window) + +Get Flexible Product Position (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_flexible_position_get200_response import SapiV1SimpleEarnFlexiblePositionGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'asset_example' # str | (optional) + product_id = 'product_id_example' # str | (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Flexible Product Position (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_flexible_position_get(timestamp, signature, asset=asset, product_id=product_id, current=current, size=size, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_flexible_position_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_flexible_position_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| | [optional] + **product_id** | **str**| | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnFlexiblePositionGet200Response**](SapiV1SimpleEarnFlexiblePositionGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Flexible Product Position | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_flexible_redeem_post** +> SapiV1SimpleEarnFlexibleRedeemPost200Response sapi_v1_simple_earn_flexible_redeem_post(product_id, timestamp, signature, redeem_all=redeem_all, amount=amount, dest_account=dest_account, recv_window=recv_window) + +Redeem Flexible Product (TRADE) + +Weight(IP): 1 Rate Limit: 1/3s per account + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_flexible_redeem_post200_response import SapiV1SimpleEarnFlexibleRedeemPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + product_id = 'product_id_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + redeem_all = True # bool | true or false, default to false (optional) + amount = 3.4 # float | if redeemAll is false, amount is mandatory (optional) + dest_account = 'dest_account_example' # str | SPOT,FUND,ALL, default SPOT (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Redeem Flexible Product (TRADE) + api_response = api_instance.sapi_v1_simple_earn_flexible_redeem_post(product_id, timestamp, signature, redeem_all=redeem_all, amount=amount, dest_account=dest_account, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_flexible_redeem_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_flexible_redeem_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **product_id** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **redeem_all** | **bool**| true or false, default to false | [optional] + **amount** | **float**| if redeemAll is false, amount is mandatory | [optional] + **dest_account** | **str**| SPOT,FUND,ALL, default SPOT | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnFlexibleRedeemPost200Response**](SapiV1SimpleEarnFlexibleRedeemPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Redeem Flexible Product | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_flexible_set_auto_subscribe_post** +> SapiV1MarginMaxLeveragePost200Response sapi_v1_simple_earn_flexible_set_auto_subscribe_post(product_id, auto_subscribe, timestamp, signature, recv_window=recv_window) + +Set Flexible Auto Subscribe (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_max_leverage_post200_response import SapiV1MarginMaxLeveragePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + product_id = 'product_id_example' # str | + auto_subscribe = True # bool | true or false + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Set Flexible Auto Subscribe (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_flexible_set_auto_subscribe_post(product_id, auto_subscribe, timestamp, signature, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_flexible_set_auto_subscribe_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_flexible_set_auto_subscribe_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **product_id** | **str**| | + **auto_subscribe** | **bool**| true or false | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginMaxLeveragePost200Response**](SapiV1MarginMaxLeveragePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Flexible Product Subscription Response | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_flexible_subscribe_post** +> SapiV1SimpleEarnFlexibleSubscribePost200Response sapi_v1_simple_earn_flexible_subscribe_post(product_id, amount, timestamp, signature, auto_subscribe=auto_subscribe, source_account=source_account, recv_window=recv_window) + +Subscribe Flexible Product (TRADE) + +Weight(IP): 1 Rate Limit: 1/3s per account + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_flexible_subscribe_post200_response import SapiV1SimpleEarnFlexibleSubscribePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + product_id = 'product_id_example' # str | + amount = 3.4 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + auto_subscribe = True # bool | true or false, default true. (optional) + source_account = 'source_account_example' # str | SPOT,FUND,ALL, default SPOT (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Subscribe Flexible Product (TRADE) + api_response = api_instance.sapi_v1_simple_earn_flexible_subscribe_post(product_id, amount, timestamp, signature, auto_subscribe=auto_subscribe, source_account=source_account, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_flexible_subscribe_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_flexible_subscribe_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **product_id** | **str**| | + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **auto_subscribe** | **bool**| true or false, default true. | [optional] + **source_account** | **str**| SPOT,FUND,ALL, default SPOT | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnFlexibleSubscribePost200Response**](SapiV1SimpleEarnFlexibleSubscribePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Flexible Product Subscription Response | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_flexible_subscription_preview_get** +> SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response sapi_v1_simple_earn_flexible_subscription_preview_get(product_id, amount, timestamp, signature, recv_window=recv_window) + +Get Flexible Subscription Preview (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_flexible_subscription_preview_get200_response import SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + product_id = 'product_id_example' # str | + amount = 3.4 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Flexible Subscription Preview (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_flexible_subscription_preview_get(product_id, amount, timestamp, signature, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_flexible_subscription_preview_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_flexible_subscription_preview_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **product_id** | **str**| | + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response**](SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Flexible Subscription Preview | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_locked_history_redemption_record_get** +> SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response sapi_v1_simple_earn_locked_history_redemption_record_get(timestamp, signature, position_id=position_id, redeem_id=redeem_id, asset=asset, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Get Locked Redemption Record (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_locked_history_redemption_record_get200_response import SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + position_id = 'position_id_example' # str | (optional) + redeem_id = 'redeem_id_example' # str | (optional) + asset = 'asset_example' # str | (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Locked Redemption Record (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_locked_history_redemption_record_get(timestamp, signature, position_id=position_id, redeem_id=redeem_id, asset=asset, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_locked_history_redemption_record_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_locked_history_redemption_record_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **position_id** | **str**| | [optional] + **redeem_id** | **str**| | [optional] + **asset** | **str**| | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response**](SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Locked Redemption Record | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_locked_history_rewards_record_get** +> SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response sapi_v1_simple_earn_locked_history_rewards_record_get(timestamp, signature, position_id=position_id, asset=asset, start_time=start_time, end_time=end_time, size=size, recv_window=recv_window) + +Get Locked Rewards History (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_locked_history_rewards_record_get200_response import SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + position_id = 'position_id_example' # str | (optional) + asset = 'asset_example' # str | (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Locked Rewards History (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_locked_history_rewards_record_get(timestamp, signature, position_id=position_id, asset=asset, start_time=start_time, end_time=end_time, size=size, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_locked_history_rewards_record_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_locked_history_rewards_record_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **position_id** | **str**| | [optional] + **asset** | **str**| | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response**](SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Locked Rewards History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_locked_history_subscription_record_get** +> SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response sapi_v1_simple_earn_locked_history_subscription_record_get(timestamp, signature, purchase_id=purchase_id, asset=asset, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Get Locked Subscription Record (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_locked_history_subscription_record_get200_response import SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + purchase_id = 'purchase_id_example' # str | (optional) + asset = 'asset_example' # str | (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Locked Subscription Record (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_locked_history_subscription_record_get(timestamp, signature, purchase_id=purchase_id, asset=asset, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_locked_history_subscription_record_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_locked_history_subscription_record_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **purchase_id** | **str**| | [optional] + **asset** | **str**| | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response**](SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Locked Subscription Record | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_locked_list_get** +> SapiV1SimpleEarnLockedListGet200Response sapi_v1_simple_earn_locked_list_get(timestamp, signature, asset=asset, current=current, size=size, recv_window=recv_window) + +Get Simple Earn Locked Product List (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response import SapiV1SimpleEarnLockedListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'BNB' # str | (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Simple Earn Locked Product List (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_locked_list_get(timestamp, signature, asset=asset, current=current, size=size, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_locked_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_locked_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnLockedListGet200Response**](SapiV1SimpleEarnLockedListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Simple Earn Locked Product List | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_locked_personal_left_quota_get** +> SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response sapi_v1_simple_earn_locked_personal_left_quota_get(project_id, timestamp, signature, recv_window=recv_window) + +Get Locked Personal Left Quota (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_flexible_personal_left_quota_get200_response import SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + project_id = 'project_id_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Locked Personal Left Quota (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_locked_personal_left_quota_get(project_id, timestamp, signature, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_locked_personal_left_quota_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_locked_personal_left_quota_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response**](SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Locked Personal Left Quota | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_locked_position_get** +> SapiV1SimpleEarnLockedPositionGet200Response sapi_v1_simple_earn_locked_position_get(timestamp, signature, asset=asset, position_id=position_id, project_id=project_id, current=current, size=size, recv_window=recv_window) + +Get Locked Product Position (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_locked_position_get200_response import SapiV1SimpleEarnLockedPositionGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'asset_example' # str | (optional) + position_id = 'position_id_example' # str | (optional) + project_id = 'project_id_example' # str | (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Locked Product Position (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_locked_position_get(timestamp, signature, asset=asset, position_id=position_id, project_id=project_id, current=current, size=size, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_locked_position_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_locked_position_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| | [optional] + **position_id** | **str**| | [optional] + **project_id** | **str**| | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnLockedPositionGet200Response**](SapiV1SimpleEarnLockedPositionGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Locked Product Position | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_locked_redeem_post** +> SapiV1SimpleEarnFlexibleRedeemPost200Response sapi_v1_simple_earn_locked_redeem_post(position_id, timestamp, signature, recv_window=recv_window) + +Redeem Locked Product (TRADE) + +Weight(IP): 1 Rate Limit: 1/3s per account + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_flexible_redeem_post200_response import SapiV1SimpleEarnFlexibleRedeemPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + position_id = 'position_id_example' # str | 1234 + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Redeem Locked Product (TRADE) + api_response = api_instance.sapi_v1_simple_earn_locked_redeem_post(position_id, timestamp, signature, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_locked_redeem_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_locked_redeem_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **position_id** | **str**| 1234 | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnFlexibleRedeemPost200Response**](SapiV1SimpleEarnFlexibleRedeemPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Redeem Locked Product | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_locked_set_auto_subscribe_post** +> SapiV1MarginMaxLeveragePost200Response sapi_v1_simple_earn_locked_set_auto_subscribe_post(position_id, auto_subscribe, timestamp, signature, recv_window=recv_window) + +Set Locked Auto Subscribe (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_margin_max_leverage_post200_response import SapiV1MarginMaxLeveragePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + position_id = 'position_id_example' # str | + auto_subscribe = True # bool | true or false + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Set Locked Auto Subscribe (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_locked_set_auto_subscribe_post(position_id, auto_subscribe, timestamp, signature, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_locked_set_auto_subscribe_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_locked_set_auto_subscribe_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **position_id** | **str**| | + **auto_subscribe** | **bool**| true or false | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1MarginMaxLeveragePost200Response**](SapiV1MarginMaxLeveragePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Locked Auto Subscribe | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_locked_subscribe_post** +> SapiV1SimpleEarnLockedSubscribePost200Response sapi_v1_simple_earn_locked_subscribe_post(project_id, amount, timestamp, signature, auto_subscribe=auto_subscribe, source_account=source_account, recv_window=recv_window) + +Subscribe Locked Product (TRADE) + +Weight(IP): 1 Rate Limit: 1/3s per account + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_locked_subscribe_post200_response import SapiV1SimpleEarnLockedSubscribePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + project_id = 'project_id_example' # str | + amount = 3.4 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + auto_subscribe = True # bool | true or false, default true. (optional) + source_account = 'source_account_example' # str | SPOT,FUND,ALL, default SPOT (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Subscribe Locked Product (TRADE) + api_response = api_instance.sapi_v1_simple_earn_locked_subscribe_post(project_id, amount, timestamp, signature, auto_subscribe=auto_subscribe, source_account=source_account, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_locked_subscribe_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_locked_subscribe_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **auto_subscribe** | **bool**| true or false, default true. | [optional] + **source_account** | **str**| SPOT,FUND,ALL, default SPOT | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SimpleEarnLockedSubscribePost200Response**](SapiV1SimpleEarnLockedSubscribePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Locked Product Subscription Response | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_simple_earn_locked_subscription_preview_get** +> List[SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner] sapi_v1_simple_earn_locked_subscription_preview_get(project_id, amount, timestamp, signature, auto_subscribe=auto_subscribe, recv_window=recv_window) + +Get Locked Subscription Preview (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner import SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SimpleEarnApi(api_client) + project_id = 'project_id_example' # str | + amount = 3.4 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + auto_subscribe = True # bool | true or false, default true. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Locked Subscription Preview (USER_DATA) + api_response = api_instance.sapi_v1_simple_earn_locked_subscription_preview_get(project_id, amount, timestamp, signature, auto_subscribe=auto_subscribe, recv_window=recv_window) + print("The response of SimpleEarnApi->sapi_v1_simple_earn_locked_subscription_preview_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SimpleEarnApi->sapi_v1_simple_earn_locked_subscription_preview_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **auto_subscribe** | **bool**| true or false, default true. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner]**](SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Locked Product Subscription Response | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/SnapshotFutures.md b/target/python/binance_openapi/docs/SnapshotFutures.md new file mode 100644 index 0000000..4b01e85 --- /dev/null +++ b/target/python/binance_openapi/docs/SnapshotFutures.md @@ -0,0 +1,31 @@ +# SnapshotFutures + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**snapshot_vos** | [**List[SnapshotFuturesSnapshotVosInner]**](SnapshotFuturesSnapshotVosInner.md) | | + +## Example + +```python +from openapi_client.models.snapshot_futures import SnapshotFutures + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotFutures from a JSON string +snapshot_futures_instance = SnapshotFutures.from_json(json) +# print the JSON string representation of the object +print(SnapshotFutures.to_json()) + +# convert the object into a dict +snapshot_futures_dict = snapshot_futures_instance.to_dict() +# create an instance of SnapshotFutures from a dict +snapshot_futures_from_dict = SnapshotFutures.from_dict(snapshot_futures_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInner.md b/target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInner.md new file mode 100644 index 0000000..996756f --- /dev/null +++ b/target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInner.md @@ -0,0 +1,31 @@ +# SnapshotFuturesSnapshotVosInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SnapshotFuturesSnapshotVosInnerData**](SnapshotFuturesSnapshotVosInnerData.md) | | +**type** | **str** | | +**update_time** | **int** | | + +## Example + +```python +from openapi_client.models.snapshot_futures_snapshot_vos_inner import SnapshotFuturesSnapshotVosInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotFuturesSnapshotVosInner from a JSON string +snapshot_futures_snapshot_vos_inner_instance = SnapshotFuturesSnapshotVosInner.from_json(json) +# print the JSON string representation of the object +print(SnapshotFuturesSnapshotVosInner.to_json()) + +# convert the object into a dict +snapshot_futures_snapshot_vos_inner_dict = snapshot_futures_snapshot_vos_inner_instance.to_dict() +# create an instance of SnapshotFuturesSnapshotVosInner from a dict +snapshot_futures_snapshot_vos_inner_from_dict = SnapshotFuturesSnapshotVosInner.from_dict(snapshot_futures_snapshot_vos_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInnerData.md b/target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInnerData.md new file mode 100644 index 0000000..61a20db --- /dev/null +++ b/target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInnerData.md @@ -0,0 +1,30 @@ +# SnapshotFuturesSnapshotVosInnerData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assets** | [**List[SnapshotFuturesSnapshotVosInnerDataAssetsInner]**](SnapshotFuturesSnapshotVosInnerDataAssetsInner.md) | | +**position** | [**List[SnapshotFuturesSnapshotVosInnerDataPositionInner]**](SnapshotFuturesSnapshotVosInnerDataPositionInner.md) | | + +## Example + +```python +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data import SnapshotFuturesSnapshotVosInnerData + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotFuturesSnapshotVosInnerData from a JSON string +snapshot_futures_snapshot_vos_inner_data_instance = SnapshotFuturesSnapshotVosInnerData.from_json(json) +# print the JSON string representation of the object +print(SnapshotFuturesSnapshotVosInnerData.to_json()) + +# convert the object into a dict +snapshot_futures_snapshot_vos_inner_data_dict = snapshot_futures_snapshot_vos_inner_data_instance.to_dict() +# create an instance of SnapshotFuturesSnapshotVosInnerData from a dict +snapshot_futures_snapshot_vos_inner_data_from_dict = SnapshotFuturesSnapshotVosInnerData.from_dict(snapshot_futures_snapshot_vos_inner_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInnerDataAssetsInner.md b/target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInnerDataAssetsInner.md new file mode 100644 index 0000000..51b8245 --- /dev/null +++ b/target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInnerDataAssetsInner.md @@ -0,0 +1,31 @@ +# SnapshotFuturesSnapshotVosInnerDataAssetsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**margin_balance** | **str** | | +**wallet_balance** | **str** | | + +## Example + +```python +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data_assets_inner import SnapshotFuturesSnapshotVosInnerDataAssetsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotFuturesSnapshotVosInnerDataAssetsInner from a JSON string +snapshot_futures_snapshot_vos_inner_data_assets_inner_instance = SnapshotFuturesSnapshotVosInnerDataAssetsInner.from_json(json) +# print the JSON string representation of the object +print(SnapshotFuturesSnapshotVosInnerDataAssetsInner.to_json()) + +# convert the object into a dict +snapshot_futures_snapshot_vos_inner_data_assets_inner_dict = snapshot_futures_snapshot_vos_inner_data_assets_inner_instance.to_dict() +# create an instance of SnapshotFuturesSnapshotVosInnerDataAssetsInner from a dict +snapshot_futures_snapshot_vos_inner_data_assets_inner_from_dict = SnapshotFuturesSnapshotVosInnerDataAssetsInner.from_dict(snapshot_futures_snapshot_vos_inner_data_assets_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInnerDataPositionInner.md b/target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInnerDataPositionInner.md new file mode 100644 index 0000000..088761e --- /dev/null +++ b/target/python/binance_openapi/docs/SnapshotFuturesSnapshotVosInnerDataPositionInner.md @@ -0,0 +1,33 @@ +# SnapshotFuturesSnapshotVosInnerDataPositionInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**entry_price** | **str** | | +**mark_price** | **str** | | +**position_amt** | **str** | | +**symbol** | **str** | | +**un_realized_profit** | **str** | | + +## Example + +```python +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data_position_inner import SnapshotFuturesSnapshotVosInnerDataPositionInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotFuturesSnapshotVosInnerDataPositionInner from a JSON string +snapshot_futures_snapshot_vos_inner_data_position_inner_instance = SnapshotFuturesSnapshotVosInnerDataPositionInner.from_json(json) +# print the JSON string representation of the object +print(SnapshotFuturesSnapshotVosInnerDataPositionInner.to_json()) + +# convert the object into a dict +snapshot_futures_snapshot_vos_inner_data_position_inner_dict = snapshot_futures_snapshot_vos_inner_data_position_inner_instance.to_dict() +# create an instance of SnapshotFuturesSnapshotVosInnerDataPositionInner from a dict +snapshot_futures_snapshot_vos_inner_data_position_inner_from_dict = SnapshotFuturesSnapshotVosInnerDataPositionInner.from_dict(snapshot_futures_snapshot_vos_inner_data_position_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SnapshotMargin.md b/target/python/binance_openapi/docs/SnapshotMargin.md new file mode 100644 index 0000000..6936e56 --- /dev/null +++ b/target/python/binance_openapi/docs/SnapshotMargin.md @@ -0,0 +1,31 @@ +# SnapshotMargin + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**snapshot_vos** | [**List[SnapshotMarginSnapshotVosInner]**](SnapshotMarginSnapshotVosInner.md) | | + +## Example + +```python +from openapi_client.models.snapshot_margin import SnapshotMargin + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotMargin from a JSON string +snapshot_margin_instance = SnapshotMargin.from_json(json) +# print the JSON string representation of the object +print(SnapshotMargin.to_json()) + +# convert the object into a dict +snapshot_margin_dict = snapshot_margin_instance.to_dict() +# create an instance of SnapshotMargin from a dict +snapshot_margin_from_dict = SnapshotMargin.from_dict(snapshot_margin_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SnapshotMarginSnapshotVosInner.md b/target/python/binance_openapi/docs/SnapshotMarginSnapshotVosInner.md new file mode 100644 index 0000000..095aa2a --- /dev/null +++ b/target/python/binance_openapi/docs/SnapshotMarginSnapshotVosInner.md @@ -0,0 +1,31 @@ +# SnapshotMarginSnapshotVosInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SnapshotMarginSnapshotVosInnerData**](SnapshotMarginSnapshotVosInnerData.md) | | +**type** | **str** | | +**update_time** | **int** | | + +## Example + +```python +from openapi_client.models.snapshot_margin_snapshot_vos_inner import SnapshotMarginSnapshotVosInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotMarginSnapshotVosInner from a JSON string +snapshot_margin_snapshot_vos_inner_instance = SnapshotMarginSnapshotVosInner.from_json(json) +# print the JSON string representation of the object +print(SnapshotMarginSnapshotVosInner.to_json()) + +# convert the object into a dict +snapshot_margin_snapshot_vos_inner_dict = snapshot_margin_snapshot_vos_inner_instance.to_dict() +# create an instance of SnapshotMarginSnapshotVosInner from a dict +snapshot_margin_snapshot_vos_inner_from_dict = SnapshotMarginSnapshotVosInner.from_dict(snapshot_margin_snapshot_vos_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SnapshotMarginSnapshotVosInnerData.md b/target/python/binance_openapi/docs/SnapshotMarginSnapshotVosInnerData.md new file mode 100644 index 0000000..bca0ca0 --- /dev/null +++ b/target/python/binance_openapi/docs/SnapshotMarginSnapshotVosInnerData.md @@ -0,0 +1,33 @@ +# SnapshotMarginSnapshotVosInnerData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**margin_level** | **str** | | +**total_asset_of_btc** | **str** | | +**total_liability_of_btc** | **str** | | +**total_net_asset_of_btc** | **str** | | +**user_assets** | [**List[SnapshotMarginSnapshotVosInnerDataUserAssetsInner]**](SnapshotMarginSnapshotVosInnerDataUserAssetsInner.md) | | + +## Example + +```python +from openapi_client.models.snapshot_margin_snapshot_vos_inner_data import SnapshotMarginSnapshotVosInnerData + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotMarginSnapshotVosInnerData from a JSON string +snapshot_margin_snapshot_vos_inner_data_instance = SnapshotMarginSnapshotVosInnerData.from_json(json) +# print the JSON string representation of the object +print(SnapshotMarginSnapshotVosInnerData.to_json()) + +# convert the object into a dict +snapshot_margin_snapshot_vos_inner_data_dict = snapshot_margin_snapshot_vos_inner_data_instance.to_dict() +# create an instance of SnapshotMarginSnapshotVosInnerData from a dict +snapshot_margin_snapshot_vos_inner_data_from_dict = SnapshotMarginSnapshotVosInnerData.from_dict(snapshot_margin_snapshot_vos_inner_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SnapshotMarginSnapshotVosInnerDataUserAssetsInner.md b/target/python/binance_openapi/docs/SnapshotMarginSnapshotVosInnerDataUserAssetsInner.md new file mode 100644 index 0000000..a6b526f --- /dev/null +++ b/target/python/binance_openapi/docs/SnapshotMarginSnapshotVosInnerDataUserAssetsInner.md @@ -0,0 +1,34 @@ +# SnapshotMarginSnapshotVosInnerDataUserAssetsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**borrowed** | **str** | | +**free** | **str** | | +**interest** | **str** | | +**locked** | **str** | | +**net_asset** | **str** | | + +## Example + +```python +from openapi_client.models.snapshot_margin_snapshot_vos_inner_data_user_assets_inner import SnapshotMarginSnapshotVosInnerDataUserAssetsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotMarginSnapshotVosInnerDataUserAssetsInner from a JSON string +snapshot_margin_snapshot_vos_inner_data_user_assets_inner_instance = SnapshotMarginSnapshotVosInnerDataUserAssetsInner.from_json(json) +# print the JSON string representation of the object +print(SnapshotMarginSnapshotVosInnerDataUserAssetsInner.to_json()) + +# convert the object into a dict +snapshot_margin_snapshot_vos_inner_data_user_assets_inner_dict = snapshot_margin_snapshot_vos_inner_data_user_assets_inner_instance.to_dict() +# create an instance of SnapshotMarginSnapshotVosInnerDataUserAssetsInner from a dict +snapshot_margin_snapshot_vos_inner_data_user_assets_inner_from_dict = SnapshotMarginSnapshotVosInnerDataUserAssetsInner.from_dict(snapshot_margin_snapshot_vos_inner_data_user_assets_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SnapshotSpot.md b/target/python/binance_openapi/docs/SnapshotSpot.md new file mode 100644 index 0000000..c949d19 --- /dev/null +++ b/target/python/binance_openapi/docs/SnapshotSpot.md @@ -0,0 +1,31 @@ +# SnapshotSpot + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | +**msg** | **str** | | +**snapshot_vos** | [**List[SnapshotSpotSnapshotVosInner]**](SnapshotSpotSnapshotVosInner.md) | | + +## Example + +```python +from openapi_client.models.snapshot_spot import SnapshotSpot + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotSpot from a JSON string +snapshot_spot_instance = SnapshotSpot.from_json(json) +# print the JSON string representation of the object +print(SnapshotSpot.to_json()) + +# convert the object into a dict +snapshot_spot_dict = snapshot_spot_instance.to_dict() +# create an instance of SnapshotSpot from a dict +snapshot_spot_from_dict = SnapshotSpot.from_dict(snapshot_spot_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SnapshotSpotSnapshotVosInner.md b/target/python/binance_openapi/docs/SnapshotSpotSnapshotVosInner.md new file mode 100644 index 0000000..4314dea --- /dev/null +++ b/target/python/binance_openapi/docs/SnapshotSpotSnapshotVosInner.md @@ -0,0 +1,31 @@ +# SnapshotSpotSnapshotVosInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**SnapshotSpotSnapshotVosInnerData**](SnapshotSpotSnapshotVosInnerData.md) | | +**type** | **str** | | +**update_time** | **int** | | + +## Example + +```python +from openapi_client.models.snapshot_spot_snapshot_vos_inner import SnapshotSpotSnapshotVosInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotSpotSnapshotVosInner from a JSON string +snapshot_spot_snapshot_vos_inner_instance = SnapshotSpotSnapshotVosInner.from_json(json) +# print the JSON string representation of the object +print(SnapshotSpotSnapshotVosInner.to_json()) + +# convert the object into a dict +snapshot_spot_snapshot_vos_inner_dict = snapshot_spot_snapshot_vos_inner_instance.to_dict() +# create an instance of SnapshotSpotSnapshotVosInner from a dict +snapshot_spot_snapshot_vos_inner_from_dict = SnapshotSpotSnapshotVosInner.from_dict(snapshot_spot_snapshot_vos_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SnapshotSpotSnapshotVosInnerData.md b/target/python/binance_openapi/docs/SnapshotSpotSnapshotVosInnerData.md new file mode 100644 index 0000000..100eb27 --- /dev/null +++ b/target/python/binance_openapi/docs/SnapshotSpotSnapshotVosInnerData.md @@ -0,0 +1,30 @@ +# SnapshotSpotSnapshotVosInnerData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**balances** | [**List[SnapshotSpotSnapshotVosInnerDataBalancesInner]**](SnapshotSpotSnapshotVosInnerDataBalancesInner.md) | | +**total_asset_of_btc** | **str** | | + +## Example + +```python +from openapi_client.models.snapshot_spot_snapshot_vos_inner_data import SnapshotSpotSnapshotVosInnerData + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotSpotSnapshotVosInnerData from a JSON string +snapshot_spot_snapshot_vos_inner_data_instance = SnapshotSpotSnapshotVosInnerData.from_json(json) +# print the JSON string representation of the object +print(SnapshotSpotSnapshotVosInnerData.to_json()) + +# convert the object into a dict +snapshot_spot_snapshot_vos_inner_data_dict = snapshot_spot_snapshot_vos_inner_data_instance.to_dict() +# create an instance of SnapshotSpotSnapshotVosInnerData from a dict +snapshot_spot_snapshot_vos_inner_data_from_dict = SnapshotSpotSnapshotVosInnerData.from_dict(snapshot_spot_snapshot_vos_inner_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SnapshotSpotSnapshotVosInnerDataBalancesInner.md b/target/python/binance_openapi/docs/SnapshotSpotSnapshotVosInnerDataBalancesInner.md new file mode 100644 index 0000000..91d0b47 --- /dev/null +++ b/target/python/binance_openapi/docs/SnapshotSpotSnapshotVosInnerDataBalancesInner.md @@ -0,0 +1,31 @@ +# SnapshotSpotSnapshotVosInnerDataBalancesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**free** | **str** | | +**locked** | **str** | | + +## Example + +```python +from openapi_client.models.snapshot_spot_snapshot_vos_inner_data_balances_inner import SnapshotSpotSnapshotVosInnerDataBalancesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotSpotSnapshotVosInnerDataBalancesInner from a JSON string +snapshot_spot_snapshot_vos_inner_data_balances_inner_instance = SnapshotSpotSnapshotVosInnerDataBalancesInner.from_json(json) +# print the JSON string representation of the object +print(SnapshotSpotSnapshotVosInnerDataBalancesInner.to_json()) + +# convert the object into a dict +snapshot_spot_snapshot_vos_inner_data_balances_inner_dict = snapshot_spot_snapshot_vos_inner_data_balances_inner_instance.to_dict() +# create an instance of SnapshotSpotSnapshotVosInnerDataBalancesInner from a dict +snapshot_spot_snapshot_vos_inner_data_balances_inner_from_dict = SnapshotSpotSnapshotVosInnerDataBalancesInner.from_dict(snapshot_spot_snapshot_vos_inner_data_balances_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SpotAlgoApi.md b/target/python/binance_openapi/docs/SpotAlgoApi.md new file mode 100644 index 0000000..8fb4e0f --- /dev/null +++ b/target/python/binance_openapi/docs/SpotAlgoApi.md @@ -0,0 +1,470 @@ +# openapi_client.SpotAlgoApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_algo_spot_historical_orders_get**](SpotAlgoApi.md#sapi_v1_algo_spot_historical_orders_get) | **GET** /sapi/v1/algo/spot/historicalOrders | Query Historical Algo Orders +[**sapi_v1_algo_spot_new_order_twap_post**](SpotAlgoApi.md#sapi_v1_algo_spot_new_order_twap_post) | **POST** /sapi/v1/algo/spot/newOrderTwap | Time-Weighted Average Price (Twap) New Order +[**sapi_v1_algo_spot_open_orders_get**](SpotAlgoApi.md#sapi_v1_algo_spot_open_orders_get) | **GET** /sapi/v1/algo/spot/openOrders | Query Current Algo Open Orders +[**sapi_v1_algo_spot_order_delete**](SpotAlgoApi.md#sapi_v1_algo_spot_order_delete) | **DELETE** /sapi/v1/algo/spot/order | Cancel Algo Order +[**sapi_v1_algo_spot_sub_orders_get**](SpotAlgoApi.md#sapi_v1_algo_spot_sub_orders_get) | **GET** /sapi/v1/algo/spot/subOrders | Query Sub Orders + + +# **sapi_v1_algo_spot_historical_orders_get** +> SapiV1AlgoSpotHistoricalOrdersGet200Response sapi_v1_algo_spot_historical_orders_get(symbol, side, timestamp, signature, start_time=start_time, end_time=end_time, page=page, page_size=page_size, recv_window=recv_window) + +Query Historical Algo Orders + +Get all historical SPOT TWAP orders Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_algo_spot_historical_orders_get200_response import SapiV1AlgoSpotHistoricalOrdersGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SpotAlgoApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + side = 'SELL' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + page = 1 # int | Default 1 (optional) + page_size = 'page_size_example' # str | MIN 1, MAX 100; Default 100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Historical Algo Orders + api_response = api_instance.sapi_v1_algo_spot_historical_orders_get(symbol, side, timestamp, signature, start_time=start_time, end_time=end_time, page=page, page_size=page_size, recv_window=recv_window) + print("The response of SpotAlgoApi->sapi_v1_algo_spot_historical_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SpotAlgoApi->sapi_v1_algo_spot_historical_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **side** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **page** | **int**| Default 1 | [optional] + **page_size** | **str**| MIN 1, MAX 100; Default 100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AlgoSpotHistoricalOrdersGet200Response**](SapiV1AlgoSpotHistoricalOrdersGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | twap historical orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_algo_spot_new_order_twap_post** +> SapiV1AlgoSpotNewOrderTwapPost200Response sapi_v1_algo_spot_new_order_twap_post(symbol, side, quantity, duration, timestamp, signature, client_algo_id=client_algo_id, limit_price=limit_price, recv_window=recv_window) + +Time-Weighted Average Price (Twap) New Order + +Place a new spot TWAP order with Algo service. Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_algo_spot_new_order_twap_post200_response import SapiV1AlgoSpotNewOrderTwapPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SpotAlgoApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + side = 'SELL' # str | + quantity = 1.0 # float | + duration = 300 # int | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + client_algo_id = 'client_algo_id_example' # str | (optional) + limit_price = 3.4 # float | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Time-Weighted Average Price (Twap) New Order + api_response = api_instance.sapi_v1_algo_spot_new_order_twap_post(symbol, side, quantity, duration, timestamp, signature, client_algo_id=client_algo_id, limit_price=limit_price, recv_window=recv_window) + print("The response of SpotAlgoApi->sapi_v1_algo_spot_new_order_twap_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SpotAlgoApi->sapi_v1_algo_spot_new_order_twap_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **side** | **str**| | + **quantity** | **float**| | + **duration** | **int**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **client_algo_id** | **str**| | [optional] + **limit_price** | **float**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AlgoSpotNewOrderTwapPost200Response**](SapiV1AlgoSpotNewOrderTwapPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | twap order response | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_algo_spot_open_orders_get** +> SapiV1AlgoSpotOpenOrdersGet200Response sapi_v1_algo_spot_open_orders_get(timestamp, signature, recv_window=recv_window) + +Query Current Algo Open Orders + +Get all open SPOT TWAP orders Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_algo_spot_open_orders_get200_response import SapiV1AlgoSpotOpenOrdersGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SpotAlgoApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Current Algo Open Orders + api_response = api_instance.sapi_v1_algo_spot_open_orders_get(timestamp, signature, recv_window=recv_window) + print("The response of SpotAlgoApi->sapi_v1_algo_spot_open_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SpotAlgoApi->sapi_v1_algo_spot_open_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AlgoSpotOpenOrdersGet200Response**](SapiV1AlgoSpotOpenOrdersGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | twap open orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_algo_spot_order_delete** +> SapiV1AlgoSpotOrderDelete200Response sapi_v1_algo_spot_order_delete(algo_id, timestamp, signature, recv_window=recv_window) + +Cancel Algo Order + +Cancel an open TWAP order Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_algo_spot_order_delete200_response import SapiV1AlgoSpotOrderDelete200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SpotAlgoApi(api_client) + algo_id = 1 # int | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Cancel Algo Order + api_response = api_instance.sapi_v1_algo_spot_order_delete(algo_id, timestamp, signature, recv_window=recv_window) + print("The response of SpotAlgoApi->sapi_v1_algo_spot_order_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SpotAlgoApi->sapi_v1_algo_spot_order_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **algo_id** | **int**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AlgoSpotOrderDelete200Response**](SapiV1AlgoSpotOrderDelete200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cancelled twap order response | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_algo_spot_sub_orders_get** +> SapiV1AlgoSpotSubOrdersGet200Response sapi_v1_algo_spot_sub_orders_get(algo_id, timestamp, signature, page=page, page_size=page_size, recv_window=recv_window) + +Query Sub Orders + +Get respective sub orders for a specified algoId Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_algo_spot_sub_orders_get200_response import SapiV1AlgoSpotSubOrdersGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SpotAlgoApi(api_client) + algo_id = 56 # int | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + page = 1 # int | Default 1 (optional) + page_size = 'page_size_example' # str | MIN 1, MAX 100; Default 100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Sub Orders + api_response = api_instance.sapi_v1_algo_spot_sub_orders_get(algo_id, timestamp, signature, page=page, page_size=page_size, recv_window=recv_window) + print("The response of SpotAlgoApi->sapi_v1_algo_spot_sub_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SpotAlgoApi->sapi_v1_algo_spot_sub_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **algo_id** | **int**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **page** | **int**| Default 1 | [optional] + **page_size** | **str**| MIN 1, MAX 100; Default 100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AlgoSpotSubOrdersGet200Response**](SapiV1AlgoSpotSubOrdersGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | twap sub orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/StakingApi.md b/target/python/binance_openapi/docs/StakingApi.md new file mode 100644 index 0000000..29dbd12 --- /dev/null +++ b/target/python/binance_openapi/docs/StakingApi.md @@ -0,0 +1,1104 @@ +# openapi_client.StakingApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_eth_staking_eth_history_rate_history_get**](StakingApi.md#sapi_v1_eth_staking_eth_history_rate_history_get) | **GET** /sapi/v1/eth-staking/eth/history/rateHistory | Get WBETH Rate History (USER_DATA) +[**sapi_v1_eth_staking_eth_history_redemption_history_get**](StakingApi.md#sapi_v1_eth_staking_eth_history_redemption_history_get) | **GET** /sapi/v1/eth-staking/eth/history/redemptionHistory | Get ETH redemption history (USER_DATA) +[**sapi_v1_eth_staking_eth_history_rewards_history_get**](StakingApi.md#sapi_v1_eth_staking_eth_history_rewards_history_get) | **GET** /sapi/v1/eth-staking/eth/history/rewardsHistory | Get BETH rewards distribution history(USER_DATA) +[**sapi_v1_eth_staking_eth_history_staking_history_get**](StakingApi.md#sapi_v1_eth_staking_eth_history_staking_history_get) | **GET** /sapi/v1/eth-staking/eth/history/stakingHistory | Get ETH staking history (USER_DATA) +[**sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get**](StakingApi.md#sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get) | **GET** /sapi/v1/eth-staking/eth/history/wbethRewardsHistory | Get WBETH rewards history(USER_DATA) +[**sapi_v1_eth_staking_eth_quota_get**](StakingApi.md#sapi_v1_eth_staking_eth_quota_get) | **GET** /sapi/v1/eth-staking/eth/quota | Get current ETH staking quota (USER_DATA) +[**sapi_v1_eth_staking_eth_redeem_post**](StakingApi.md#sapi_v1_eth_staking_eth_redeem_post) | **POST** /sapi/v1/eth-staking/eth/redeem | Redeem ETH (TRADE) +[**sapi_v1_eth_staking_wbeth_history_unwrap_history_get**](StakingApi.md#sapi_v1_eth_staking_wbeth_history_unwrap_history_get) | **GET** /sapi/v1/eth-staking/wbeth/history/unwrapHistory | Get WBETH unwrap history (USER_DATA) +[**sapi_v1_eth_staking_wbeth_history_wrap_history_get**](StakingApi.md#sapi_v1_eth_staking_wbeth_history_wrap_history_get) | **GET** /sapi/v1/eth-staking/wbeth/history/wrapHistory | Get WBETH wrap history (USER_DATA) +[**sapi_v1_eth_staking_wbeth_wrap_post**](StakingApi.md#sapi_v1_eth_staking_wbeth_wrap_post) | **POST** /sapi/v1/eth-staking/wbeth/wrap | Wrap BETH(TRADE) +[**sapi_v2_eth_staking_account_get**](StakingApi.md#sapi_v2_eth_staking_account_get) | **GET** /sapi/v2/eth-staking/account | ETH Staking account V2(USER_DATA) +[**sapi_v2_eth_staking_eth_stake_post**](StakingApi.md#sapi_v2_eth_staking_eth_stake_post) | **POST** /sapi/v2/eth-staking/eth/stake | Subscribe ETH Staking V2(TRADE) + + +# **sapi_v1_eth_staking_eth_history_rate_history_get** +> SapiV1EthStakingEthHistoryRateHistoryGet200Response sapi_v1_eth_staking_eth_history_rate_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Get WBETH Rate History (USER_DATA) + +- The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_eth_staking_eth_history_rate_history_get200_response import SapiV1EthStakingEthHistoryRateHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StakingApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get WBETH Rate History (USER_DATA) + api_response = api_instance.sapi_v1_eth_staking_eth_history_rate_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of StakingApi->sapi_v1_eth_staking_eth_history_rate_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->sapi_v1_eth_staking_eth_history_rate_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1EthStakingEthHistoryRateHistoryGet200Response**](SapiV1EthStakingEthHistoryRateHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | WBETH Rate History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_eth_staking_eth_history_redemption_history_get** +> SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response sapi_v1_eth_staking_eth_history_redemption_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Get ETH redemption history (USER_DATA) + +- The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_eth_staking_eth_history_redemption_history_get200_response import SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StakingApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get ETH redemption history (USER_DATA) + api_response = api_instance.sapi_v1_eth_staking_eth_history_redemption_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of StakingApi->sapi_v1_eth_staking_eth_history_redemption_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->sapi_v1_eth_staking_eth_history_redemption_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response**](SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ETH redemption history | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_eth_staking_eth_history_rewards_history_get** +> SapiV1EthStakingEthHistoryRewardsHistoryGet200Response sapi_v1_eth_staking_eth_history_rewards_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Get BETH rewards distribution history(USER_DATA) + +- The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_eth_staking_eth_history_rewards_history_get200_response import SapiV1EthStakingEthHistoryRewardsHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StakingApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get BETH rewards distribution history(USER_DATA) + api_response = api_instance.sapi_v1_eth_staking_eth_history_rewards_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of StakingApi->sapi_v1_eth_staking_eth_history_rewards_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->sapi_v1_eth_staking_eth_history_rewards_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1EthStakingEthHistoryRewardsHistoryGet200Response**](SapiV1EthStakingEthHistoryRewardsHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | BETH rewards distribution history | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_eth_staking_eth_history_staking_history_get** +> SapiV1EthStakingEthHistoryStakingHistoryGet200Response sapi_v1_eth_staking_eth_history_staking_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Get ETH staking history (USER_DATA) + +- The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_eth_staking_eth_history_staking_history_get200_response import SapiV1EthStakingEthHistoryStakingHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StakingApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get ETH staking history (USER_DATA) + api_response = api_instance.sapi_v1_eth_staking_eth_history_staking_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of StakingApi->sapi_v1_eth_staking_eth_history_staking_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->sapi_v1_eth_staking_eth_history_staking_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1EthStakingEthHistoryStakingHistoryGet200Response**](SapiV1EthStakingEthHistoryStakingHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ETH staking history | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get** +> SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Get WBETH rewards history(USER_DATA) + +- The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response import SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StakingApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get WBETH rewards history(USER_DATA) + api_response = api_instance.sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of StakingApi->sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response**](SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | WBETH rewards history | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_eth_staking_eth_quota_get** +> SapiV1EthStakingEthQuotaGet200Response sapi_v1_eth_staking_eth_quota_get(timestamp, signature, recv_window=recv_window) + +Get current ETH staking quota (USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_eth_staking_eth_quota_get200_response import SapiV1EthStakingEthQuotaGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StakingApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get current ETH staking quota (USER_DATA) + api_response = api_instance.sapi_v1_eth_staking_eth_quota_get(timestamp, signature, recv_window=recv_window) + print("The response of StakingApi->sapi_v1_eth_staking_eth_quota_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->sapi_v1_eth_staking_eth_quota_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1EthStakingEthQuotaGet200Response**](SapiV1EthStakingEthQuotaGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Eth staking quota | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_eth_staking_eth_redeem_post** +> SapiV1EthStakingEthRedeemPost200Response sapi_v1_eth_staking_eth_redeem_post(amount, timestamp, signature, asset=asset, recv_window=recv_window) + +Redeem ETH (TRADE) + +Redeem WBETH or BETH and get ETH - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_eth_staking_eth_redeem_post200_response import SapiV1EthStakingEthRedeemPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StakingApi(api_client) + amount = 3.4 # float | Amount in BETH, limit 8 decimals + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'asset_example' # str | WBETH or BETH, default to BETH (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Redeem ETH (TRADE) + api_response = api_instance.sapi_v1_eth_staking_eth_redeem_post(amount, timestamp, signature, asset=asset, recv_window=recv_window) + print("The response of StakingApi->sapi_v1_eth_staking_eth_redeem_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->sapi_v1_eth_staking_eth_redeem_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **amount** | **float**| Amount in BETH, limit 8 decimals | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| WBETH or BETH, default to BETH | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1EthStakingEthRedeemPost200Response**](SapiV1EthStakingEthRedeemPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returned ETH | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_eth_staking_wbeth_history_unwrap_history_get** +> SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response sapi_v1_eth_staking_wbeth_history_unwrap_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Get WBETH unwrap history (USER_DATA) + +- The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response import SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StakingApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get WBETH unwrap history (USER_DATA) + api_response = api_instance.sapi_v1_eth_staking_wbeth_history_unwrap_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of StakingApi->sapi_v1_eth_staking_wbeth_history_unwrap_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->sapi_v1_eth_staking_wbeth_history_unwrap_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response**](SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | WBETH unwrap history | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_eth_staking_wbeth_history_wrap_history_get** +> SapiV1EthStakingWbethHistoryWrapHistoryGet200Response sapi_v1_eth_staking_wbeth_history_wrap_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + +Get WBETH wrap history (USER_DATA) + +- The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response import SapiV1EthStakingWbethHistoryWrapHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StakingApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get WBETH wrap history (USER_DATA) + api_response = api_instance.sapi_v1_eth_staking_wbeth_history_wrap_history_get(timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, recv_window=recv_window) + print("The response of StakingApi->sapi_v1_eth_staking_wbeth_history_wrap_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->sapi_v1_eth_staking_wbeth_history_wrap_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1EthStakingWbethHistoryWrapHistoryGet200Response**](SapiV1EthStakingWbethHistoryWrapHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | WBETH wrap history | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_eth_staking_wbeth_wrap_post** +> SapiV1EthStakingWbethWrapPost200Response sapi_v1_eth_staking_wbeth_wrap_post(amount, timestamp, signature, recv_window=recv_window) + +Wrap BETH(TRADE) + +- You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_eth_staking_wbeth_wrap_post200_response import SapiV1EthStakingWbethWrapPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StakingApi(api_client) + amount = 3.4 # float | Amount in BETH, limit 4 decimals + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Wrap BETH(TRADE) + api_response = api_instance.sapi_v1_eth_staking_wbeth_wrap_post(amount, timestamp, signature, recv_window=recv_window) + print("The response of StakingApi->sapi_v1_eth_staking_wbeth_wrap_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->sapi_v1_eth_staking_wbeth_wrap_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **amount** | **float**| Amount in BETH, limit 4 decimals | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1EthStakingWbethWrapPost200Response**](SapiV1EthStakingWbethWrapPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Wrap BETH | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_eth_staking_account_get** +> SapiV2EthStakingAccountGet200Response sapi_v2_eth_staking_account_get(timestamp, signature, recv_window=recv_window) + +ETH Staking account V2(USER_DATA) + +Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_eth_staking_account_get200_response import SapiV2EthStakingAccountGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StakingApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # ETH Staking account V2(USER_DATA) + api_response = api_instance.sapi_v2_eth_staking_account_get(timestamp, signature, recv_window=recv_window) + print("The response of StakingApi->sapi_v2_eth_staking_account_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->sapi_v2_eth_staking_account_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2EthStakingAccountGet200Response**](SapiV2EthStakingAccountGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ETH Staking account | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_eth_staking_eth_stake_post** +> SapiV2EthStakingEthStakePost200Response sapi_v2_eth_staking_eth_stake_post(amount, timestamp, signature, recv_window=recv_window) + +Subscribe ETH Staking V2(TRADE) + +Stake ETH to get WBETH - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_eth_staking_eth_stake_post200_response import SapiV2EthStakingEthStakePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StakingApi(api_client) + amount = 3.4 # float | Amount in ETH, limit 4 decimals + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Subscribe ETH Staking V2(TRADE) + api_response = api_instance.sapi_v2_eth_staking_eth_stake_post(amount, timestamp, signature, recv_window=recv_window) + print("The response of StakingApi->sapi_v2_eth_staking_eth_stake_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->sapi_v2_eth_staking_eth_stake_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **amount** | **float**| Amount in ETH, limit 4 decimals | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2EthStakingEthStakePost200Response**](SapiV2EthStakingEthStakePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Subscribed WBETH | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/StreamApi.md b/target/python/binance_openapi/docs/StreamApi.md new file mode 100644 index 0000000..18490c3 --- /dev/null +++ b/target/python/binance_openapi/docs/StreamApi.md @@ -0,0 +1,244 @@ +# openapi_client.StreamApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**api_v3_user_data_stream_delete**](StreamApi.md#api_v3_user_data_stream_delete) | **DELETE** /api/v3/userDataStream | Close a ListenKey (USER_STREAM) +[**api_v3_user_data_stream_post**](StreamApi.md#api_v3_user_data_stream_post) | **POST** /api/v3/userDataStream | Create a ListenKey (USER_STREAM) +[**api_v3_user_data_stream_put**](StreamApi.md#api_v3_user_data_stream_put) | **PUT** /api/v3/userDataStream | Ping/Keep-alive a ListenKey (USER_STREAM) + + +# **api_v3_user_data_stream_delete** +> object api_v3_user_data_stream_delete(listen_key=listen_key) + +Close a ListenKey (USER_STREAM) + +Close out a user data stream. Weight: 2 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StreamApi(api_client) + listen_key = 'pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1' # str | User websocket listen key (optional) + + try: + # Close a ListenKey (USER_STREAM) + api_response = api_instance.api_v3_user_data_stream_delete(listen_key=listen_key) + print("The response of StreamApi->api_v3_user_data_stream_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StreamApi->api_v3_user_data_stream_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listen_key** | **str**| User websocket listen key | [optional] + +### Return type + +**object** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_user_data_stream_post** +> ApiV3UserDataStreamPost200Response api_v3_user_data_stream_post() + +Create a ListenKey (USER_STREAM) + +Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 2 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_user_data_stream_post200_response import ApiV3UserDataStreamPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StreamApi(api_client) + + try: + # Create a ListenKey (USER_STREAM) + api_response = api_instance.api_v3_user_data_stream_post() + print("The response of StreamApi->api_v3_user_data_stream_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StreamApi->api_v3_user_data_stream_post: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ApiV3UserDataStreamPost200Response**](ApiV3UserDataStreamPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Listen key | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_user_data_stream_put** +> object api_v3_user_data_stream_put(listen_key=listen_key) + +Ping/Keep-alive a ListenKey (USER_STREAM) + +Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 2 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.StreamApi(api_client) + listen_key = 'pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1' # str | User websocket listen key (optional) + + try: + # Ping/Keep-alive a ListenKey (USER_STREAM) + api_response = api_instance.api_v3_user_data_stream_put(listen_key=listen_key) + print("The response of StreamApi->api_v3_user_data_stream_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StreamApi->api_v3_user_data_stream_put: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listen_key** | **str**| User websocket listen key | [optional] + +### Return type + +**object** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/SubAccountApi.md b/target/python/binance_openapi/docs/SubAccountApi.md new file mode 100644 index 0000000..9f5c6f2 --- /dev/null +++ b/target/python/binance_openapi/docs/SubAccountApi.md @@ -0,0 +1,4143 @@ +# openapi_client.SubAccountApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_capital_deposit_sub_address_get**](SubAccountApi.md#sapi_v1_capital_deposit_sub_address_get) | **GET** /sapi/v1/capital/deposit/subAddress | Sub-account Spot Assets Summary (For Master Account) +[**sapi_v1_capital_deposit_sub_hisrec_get**](SubAccountApi.md#sapi_v1_capital_deposit_sub_hisrec_get) | **GET** /sapi/v1/capital/deposit/subHisrec | Sub-account Deposit History (For Master Account) +[**sapi_v1_managed_subaccount_account_snapshot_get**](SubAccountApi.md#sapi_v1_managed_subaccount_account_snapshot_get) | **GET** /sapi/v1/managed-subaccount/accountSnapshot | Managed sub-account snapshot (For Investor Master Account) +[**sapi_v1_managed_subaccount_asset_get**](SubAccountApi.md#sapi_v1_managed_subaccount_asset_get) | **GET** /sapi/v1/managed-subaccount/asset | Managed sub-account asset details(For Investor Master Account) +[**sapi_v1_managed_subaccount_deposit_address_get**](SubAccountApi.md#sapi_v1_managed_subaccount_deposit_address_get) | **GET** /sapi/v1/managed-subaccount/deposit/address | Get Managed Sub-account Deposit Address (For Investor Master Account) +[**sapi_v1_managed_subaccount_deposit_post**](SubAccountApi.md#sapi_v1_managed_subaccount_deposit_post) | **POST** /sapi/v1/managed-subaccount/deposit | Deposit assets into the managed sub-account(For Investor Master Account) +[**sapi_v1_managed_subaccount_fetch_future_asset_get**](SubAccountApi.md#sapi_v1_managed_subaccount_fetch_future_asset_get) | **GET** /sapi/v1/managed-subaccount/fetch-future-asset | Query Managed Sub-account Futures Asset Details (For Investor Master Account) +[**sapi_v1_managed_subaccount_info_get**](SubAccountApi.md#sapi_v1_managed_subaccount_info_get) | **GET** /sapi/v1/managed-subaccount/info | Query Managed Sub-account List (For Investor) +[**sapi_v1_managed_subaccount_margin_asset_get**](SubAccountApi.md#sapi_v1_managed_subaccount_margin_asset_get) | **GET** /sapi/v1/managed-subaccount/marginAsset | Query Managed Sub-account Margin Asset Details (For Investor Master Account) +[**sapi_v1_managed_subaccount_query_trans_log_for_investor_get**](SubAccountApi.md#sapi_v1_managed_subaccount_query_trans_log_for_investor_get) | **GET** /sapi/v1/managed-subaccount/queryTransLogForInvestor | Query Managed Sub Account Transfer Log (For Investor Master Account) +[**sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get**](SubAccountApi.md#sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get) | **GET** /sapi/v1/managed-subaccount/queryTransLogForTradeParent | Query Managed Sub Account Transfer Log (For Trading Team Master Account) +[**sapi_v1_managed_subaccount_query_trans_log_get**](SubAccountApi.md#sapi_v1_managed_subaccount_query_trans_log_get) | **GET** /sapi/v1/managed-subaccount/query-trans-log | Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA) +[**sapi_v1_managed_subaccount_withdraw_post**](SubAccountApi.md#sapi_v1_managed_subaccount_withdraw_post) | **POST** /sapi/v1/managed-subaccount/withdraw | Withdrawl assets from the managed sub-account(For Investor Master Account) +[**sapi_v1_sub_account_blvt_enable_post**](SubAccountApi.md#sapi_v1_sub_account_blvt_enable_post) | **POST** /sapi/v1/sub-account/blvt/enable | Enable Leverage Token for Sub-account (For Master Account) +[**sapi_v1_sub_account_eoptions_enable_post**](SubAccountApi.md#sapi_v1_sub_account_eoptions_enable_post) | **POST** /sapi/v1/sub-account/eoptions/enable | Enable Options for Sub-account (For Master Account)(USER_DATA) +[**sapi_v1_sub_account_futures_account_get**](SubAccountApi.md#sapi_v1_sub_account_futures_account_get) | **GET** /sapi/v1/sub-account/futures/account | Detail on Sub-account's Futures Account (For Master Account) +[**sapi_v1_sub_account_futures_account_summary_get**](SubAccountApi.md#sapi_v1_sub_account_futures_account_summary_get) | **GET** /sapi/v1/sub-account/futures/accountSummary | Summary of Sub-account's Futures Account (For Master Account) +[**sapi_v1_sub_account_futures_enable_post**](SubAccountApi.md#sapi_v1_sub_account_futures_enable_post) | **POST** /sapi/v1/sub-account/futures/enable | Enable Futures for Sub-account (For Master Account) +[**sapi_v1_sub_account_futures_internal_transfer_get**](SubAccountApi.md#sapi_v1_sub_account_futures_internal_transfer_get) | **GET** /sapi/v1/sub-account/futures/internalTransfer | Sub-account Futures Asset Transfer History (For Master Account) +[**sapi_v1_sub_account_futures_internal_transfer_post**](SubAccountApi.md#sapi_v1_sub_account_futures_internal_transfer_post) | **POST** /sapi/v1/sub-account/futures/internalTransfer | Sub-account Futures Asset Transfer (For Master Account) +[**sapi_v1_sub_account_futures_position_risk_get**](SubAccountApi.md#sapi_v1_sub_account_futures_position_risk_get) | **GET** /sapi/v1/sub-account/futures/positionRisk | Futures Position-Risk of Sub-account (For Master Account) +[**sapi_v1_sub_account_futures_transfer_post**](SubAccountApi.md#sapi_v1_sub_account_futures_transfer_post) | **POST** /sapi/v1/sub-account/futures/transfer | Transfer for Sub-account (For Master Account) +[**sapi_v1_sub_account_list_get**](SubAccountApi.md#sapi_v1_sub_account_list_get) | **GET** /sapi/v1/sub-account/list | Query Sub-account List (For Master Account) +[**sapi_v1_sub_account_margin_account_get**](SubAccountApi.md#sapi_v1_sub_account_margin_account_get) | **GET** /sapi/v1/sub-account/margin/account | Detail on Sub-account's Margin Account (For Master Account) +[**sapi_v1_sub_account_margin_account_summary_get**](SubAccountApi.md#sapi_v1_sub_account_margin_account_summary_get) | **GET** /sapi/v1/sub-account/margin/accountSummary | Summary of Sub-account's Margin Account (For Master Account) +[**sapi_v1_sub_account_margin_enable_post**](SubAccountApi.md#sapi_v1_sub_account_margin_enable_post) | **POST** /sapi/v1/sub-account/margin/enable | Enable Margin for Sub-account (For Master Account) +[**sapi_v1_sub_account_margin_transfer_post**](SubAccountApi.md#sapi_v1_sub_account_margin_transfer_post) | **POST** /sapi/v1/sub-account/margin/transfer | Margin Transfer for Sub-account (For Master Account) +[**sapi_v1_sub_account_spot_summary_get**](SubAccountApi.md#sapi_v1_sub_account_spot_summary_get) | **GET** /sapi/v1/sub-account/spotSummary | Sub-account Spot Assets Summary (For Master Account) +[**sapi_v1_sub_account_status_get**](SubAccountApi.md#sapi_v1_sub_account_status_get) | **GET** /sapi/v1/sub-account/status | Sub-account's Status on Margin/Futures (For Master Account) +[**sapi_v1_sub_account_sub_account_api_ip_restriction_get**](SubAccountApi.md#sapi_v1_sub_account_sub_account_api_ip_restriction_get) | **GET** /sapi/v1/sub-account/subAccountApi/ipRestriction | Get IP Restriction for a Sub-account API Key (For Master Account) +[**sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete**](SubAccountApi.md#sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete) | **DELETE** /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList | Delete IP List for a Sub-account API Key (For Master Account) +[**sapi_v1_sub_account_sub_transfer_history_get**](SubAccountApi.md#sapi_v1_sub_account_sub_transfer_history_get) | **GET** /sapi/v1/sub-account/sub/transfer/history | Sub-account Spot Asset Transfer History (For Master Account) +[**sapi_v1_sub_account_transaction_statistics_get**](SubAccountApi.md#sapi_v1_sub_account_transaction_statistics_get) | **GET** /sapi/v1/sub-account/transaction-statistics | Query Sub-account Transaction Statistics (For Master Account) +[**sapi_v1_sub_account_transfer_sub_to_master_post**](SubAccountApi.md#sapi_v1_sub_account_transfer_sub_to_master_post) | **POST** /sapi/v1/sub-account/transfer/subToMaster | Transfer to Master (For Sub-account) +[**sapi_v1_sub_account_transfer_sub_to_sub_post**](SubAccountApi.md#sapi_v1_sub_account_transfer_sub_to_sub_post) | **POST** /sapi/v1/sub-account/transfer/subToSub | Transfer to Sub-account of Same Master (For Sub-account) +[**sapi_v1_sub_account_transfer_sub_user_history_get**](SubAccountApi.md#sapi_v1_sub_account_transfer_sub_user_history_get) | **GET** /sapi/v1/sub-account/transfer/subUserHistory | Sub-account Transfer History (For Sub-account) +[**sapi_v1_sub_account_universal_transfer_get**](SubAccountApi.md#sapi_v1_sub_account_universal_transfer_get) | **GET** /sapi/v1/sub-account/universalTransfer | Universal Transfer History (For Master Account) +[**sapi_v1_sub_account_universal_transfer_post**](SubAccountApi.md#sapi_v1_sub_account_universal_transfer_post) | **POST** /sapi/v1/sub-account/universalTransfer | Universal Transfer (For Master Account) +[**sapi_v1_sub_account_virtual_sub_account_post**](SubAccountApi.md#sapi_v1_sub_account_virtual_sub_account_post) | **POST** /sapi/v1/sub-account/virtualSubAccount | Create a Virtual Sub-account(For Master Account) +[**sapi_v2_sub_account_futures_account_get**](SubAccountApi.md#sapi_v2_sub_account_futures_account_get) | **GET** /sapi/v2/sub-account/futures/account | Detail on Sub-account's Futures Account V2 (For Master Account) +[**sapi_v2_sub_account_futures_account_summary_get**](SubAccountApi.md#sapi_v2_sub_account_futures_account_summary_get) | **GET** /sapi/v2/sub-account/futures/accountSummary | Summary of Sub-account's Futures Account V2 (For Master Account) +[**sapi_v2_sub_account_futures_position_risk_get**](SubAccountApi.md#sapi_v2_sub_account_futures_position_risk_get) | **GET** /sapi/v2/sub-account/futures/positionRisk | Futures Position-Risk of Sub-account V2 (For Master Account) +[**sapi_v2_sub_account_sub_account_api_ip_restriction_post**](SubAccountApi.md#sapi_v2_sub_account_sub_account_api_ip_restriction_post) | **POST** /sapi/v2/sub-account/subAccountApi/ipRestriction | Update IP Restriction for Sub-Account API key (For Master Account) +[**sapi_v3_sub_account_assets_get**](SubAccountApi.md#sapi_v3_sub_account_assets_get) | **GET** /sapi/v3/sub-account/assets | Sub-account Assets (For Master Account) +[**sapi_v4_sub_account_assets_get**](SubAccountApi.md#sapi_v4_sub_account_assets_get) | **GET** /sapi/v4/sub-account/assets | Query Sub-account Assets (For Master Account) + + +# **sapi_v1_capital_deposit_sub_address_get** +> SapiV1CapitalDepositSubAddressGet200Response sapi_v1_capital_deposit_sub_address_get(email, coin, timestamp, signature, network=network, recv_window=recv_window) + +Sub-account Spot Assets Summary (For Master Account) + +Fetch sub-account deposit address Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_capital_deposit_sub_address_get200_response import SapiV1CapitalDepositSubAddressGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + coin = 'BNB' # str | Coin name + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + network = 'BTC' # str | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Sub-account Spot Assets Summary (For Master Account) + api_response = api_instance.sapi_v1_capital_deposit_sub_address_get(email, coin, timestamp, signature, network=network, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_capital_deposit_sub_address_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_capital_deposit_sub_address_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **coin** | **str**| Coin name | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **network** | **str**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1CapitalDepositSubAddressGet200Response**](SapiV1CapitalDepositSubAddressGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Deposit address info | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_capital_deposit_sub_hisrec_get** +> List[SapiV1CapitalDepositSubHisrecGet200ResponseInner] sapi_v1_capital_deposit_sub_hisrec_get(email, timestamp, signature, coin=coin, status=status, start_time=start_time, end_time=end_time, limit=limit, offset=offset, recv_window=recv_window) + +Sub-account Deposit History (For Master Account) + +Fetch sub-account deposit history Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_capital_deposit_sub_hisrec_get200_response_inner import SapiV1CapitalDepositSubHisrecGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + coin = 'BNB' # str | Coin name (optional) + status = 56 # int | 0(0:pending,6: credited but cannot withdraw, 1:success) (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 56 # int | (optional) + offset = 56 # int | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Sub-account Deposit History (For Master Account) + api_response = api_instance.sapi_v1_capital_deposit_sub_hisrec_get(email, timestamp, signature, coin=coin, status=status, start_time=start_time, end_time=end_time, limit=limit, offset=offset, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_capital_deposit_sub_hisrec_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_capital_deposit_sub_hisrec_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **coin** | **str**| Coin name | [optional] + **status** | **int**| 0(0:pending,6: credited but cannot withdraw, 1:success) | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| | [optional] + **offset** | **int**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1CapitalDepositSubHisrecGet200ResponseInner]**](SapiV1CapitalDepositSubHisrecGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sub-account deposit history | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_managed_subaccount_account_snapshot_get** +> SapiV1ManagedSubaccountAccountSnapshotGet200Response sapi_v1_managed_subaccount_account_snapshot_get(email, type, timestamp, signature, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + +Managed sub-account snapshot (For Investor Master Account) + +- The query time period must be less then 30 days - Support query within the last one month only - If `startTime` and `endTime` not sent, return records of the last 7 days by default Weight(IP): 2400 + +### Example + + +```python +import openapi_client +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response import SapiV1ManagedSubaccountAccountSnapshotGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + type = 'SPOT' # str | \"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 56 # int | min 7, max 30, default 7 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Managed sub-account snapshot (For Investor Master Account) + api_response = api_instance.sapi_v1_managed_subaccount_account_snapshot_get(email, type, timestamp, signature, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_managed_subaccount_account_snapshot_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_managed_subaccount_account_snapshot_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **type** | **str**| \"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM) | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| min 7, max 30, default 7 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ManagedSubaccountAccountSnapshotGet200Response**](SapiV1ManagedSubaccountAccountSnapshotGet200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sub-account spot snapshot | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_managed_subaccount_asset_get** +> List[SapiV1ManagedSubaccountAssetGet200ResponseInner] sapi_v1_managed_subaccount_asset_get(email, timestamp, signature, recv_window=recv_window) + +Managed sub-account asset details(For Investor Master Account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_managed_subaccount_asset_get200_response_inner import SapiV1ManagedSubaccountAssetGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Managed sub-account asset details(For Investor Master Account) + api_response = api_instance.sapi_v1_managed_subaccount_asset_get(email, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_managed_subaccount_asset_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_managed_subaccount_asset_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1ManagedSubaccountAssetGet200ResponseInner]**](SapiV1ManagedSubaccountAssetGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of asset details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_managed_subaccount_deposit_address_get** +> SapiV1ManagedSubaccountDepositAddressGet200Response sapi_v1_managed_subaccount_deposit_address_get(email, coin, timestamp, signature, network=network, recv_window=recv_window) + +Get Managed Sub-account Deposit Address (For Investor Master Account) + +Get investor's managed sub-account deposit address Weight(UID): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_managed_subaccount_deposit_address_get200_response import SapiV1ManagedSubaccountDepositAddressGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | + coin = 'BNB' # str | Coin name + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + network = 'BTC' # str | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Managed Sub-account Deposit Address (For Investor Master Account) + api_response = api_instance.sapi_v1_managed_subaccount_deposit_address_get(email, coin, timestamp, signature, network=network, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_managed_subaccount_deposit_address_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_managed_subaccount_deposit_address_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| | + **coin** | **str**| Coin name | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **network** | **str**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ManagedSubaccountDepositAddressGet200Response**](SapiV1ManagedSubaccountDepositAddressGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Managed sub deposit address | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_managed_subaccount_deposit_post** +> SapiV1ManagedSubaccountDepositPost200Response sapi_v1_managed_subaccount_deposit_post(to_email, asset, amount, timestamp, signature, recv_window=recv_window) + +Deposit assets into the managed sub-account(For Investor Master Account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_managed_subaccount_deposit_post200_response import SapiV1ManagedSubaccountDepositPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + to_email = 'to_email_example' # str | Recipient email + asset = 'BTC' # str | + amount = 1.01 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Deposit assets into the managed sub-account(For Investor Master Account) + api_response = api_instance.sapi_v1_managed_subaccount_deposit_post(to_email, asset, amount, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_managed_subaccount_deposit_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_managed_subaccount_deposit_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **to_email** | **str**| Recipient email | + **asset** | **str**| | + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ManagedSubaccountDepositPost200Response**](SapiV1ManagedSubaccountDepositPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Transfer id | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_managed_subaccount_fetch_future_asset_get** +> SapiV1ManagedSubaccountFetchFutureAssetGet200Response sapi_v1_managed_subaccount_fetch_future_asset_get(email, timestamp, signature, recv_window=recv_window) + +Query Managed Sub-account Futures Asset Details (For Investor Master Account) + +Investor can use this api to query managed sub account futures asset details + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response import SapiV1ManagedSubaccountFetchFutureAssetGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Managed Sub-account Futures Asset Details (For Investor Master Account) + api_response = api_instance.sapi_v1_managed_subaccount_fetch_future_asset_get(email, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_managed_subaccount_fetch_future_asset_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_managed_subaccount_fetch_future_asset_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ManagedSubaccountFetchFutureAssetGet200Response**](SapiV1ManagedSubaccountFetchFutureAssetGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sub account futures assset details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_managed_subaccount_info_get** +> SapiV1ManagedSubaccountInfoGet200Response sapi_v1_managed_subaccount_info_get(email, timestamp, signature, page=page, limit=limit, recv_window=recv_window) + +Query Managed Sub-account List (For Investor) + +Get investor's managed sub-account list. Weight(UID): 60 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_managed_subaccount_info_get200_response import SapiV1ManagedSubaccountInfoGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + page = 1 # int | Default 1 (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Managed Sub-account List (For Investor) + api_response = api_instance.sapi_v1_managed_subaccount_info_get(email, timestamp, signature, page=page, limit=limit, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_managed_subaccount_info_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_managed_subaccount_info_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **page** | **int**| Default 1 | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ManagedSubaccountInfoGet200Response**](SapiV1ManagedSubaccountInfoGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Managed sub account list | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_managed_subaccount_margin_asset_get** +> SapiV1ManagedSubaccountMarginAssetGet200Response sapi_v1_managed_subaccount_margin_asset_get(email, timestamp, signature, recv_window=recv_window) + +Query Managed Sub-account Margin Asset Details (For Investor Master Account) + +Investor can use this api to query managed sub account margin asset details + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_managed_subaccount_margin_asset_get200_response import SapiV1ManagedSubaccountMarginAssetGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Managed Sub-account Margin Asset Details (For Investor Master Account) + api_response = api_instance.sapi_v1_managed_subaccount_margin_asset_get(email, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_managed_subaccount_margin_asset_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_managed_subaccount_margin_asset_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ManagedSubaccountMarginAssetGet200Response**](SapiV1ManagedSubaccountMarginAssetGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sub account margin assset details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_managed_subaccount_query_trans_log_for_investor_get** +> SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response sapi_v1_managed_subaccount_query_trans_log_for_investor_get(email, timestamp, signature, start_time=start_time, end_time=end_time, page=page, limit=limit, transfers=transfers, transfer_function_account_type=transfer_function_account_type, recv_window=recv_window) + +Query Managed Sub Account Transfer Log (For Investor Master Account) + +Investor can use this api to query managed sub account transfer log. This endpoint is available for investor of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response import SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + page = 1 # int | Default 1 (optional) + limit = 5 # int | Default 500; max 1000. (optional) + transfers = 'FROM' # str | Transfer Direction (FROM/TO) (optional) + transfer_function_account_type = 'SPOT' # str | Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Managed Sub Account Transfer Log (For Investor Master Account) + api_response = api_instance.sapi_v1_managed_subaccount_query_trans_log_for_investor_get(email, timestamp, signature, start_time=start_time, end_time=end_time, page=page, limit=limit, transfers=transfers, transfer_function_account_type=transfer_function_account_type, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_managed_subaccount_query_trans_log_for_investor_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_managed_subaccount_query_trans_log_for_investor_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **page** | **int**| Default 1 | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **transfers** | **str**| Transfer Direction (FROM/TO) | [optional] + **transfer_function_account_type** | **str**| Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response**](SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Managed sub account transfer logs (for invest account) | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get** +> SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get(email, timestamp, signature, start_time=start_time, end_time=end_time, page=page, limit=limit, transfers=transfers, transfer_function_account_type=transfer_function_account_type, recv_window=recv_window) + +Query Managed Sub Account Transfer Log (For Trading Team Master Account) + +Trading team can use this api to query managed sub account transfer log. This endpoint is available for trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team Weight(IP): 60 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response import SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + page = 1 # int | Default 1 (optional) + limit = 5 # int | Default 500; max 1000. (optional) + transfers = 'FROM' # str | Transfer Direction (FROM/TO) (optional) + transfer_function_account_type = 'SPOT' # str | Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Managed Sub Account Transfer Log (For Trading Team Master Account) + api_response = api_instance.sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get(email, timestamp, signature, start_time=start_time, end_time=end_time, page=page, limit=limit, transfers=transfers, transfer_function_account_type=transfer_function_account_type, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **page** | **int**| Default 1 | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **transfers** | **str**| Transfer Direction (FROM/TO) | [optional] + **transfer_function_account_type** | **str**| Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response**](SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Managed sub account transfer logs (for trading team) | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_managed_subaccount_query_trans_log_get** +> SapiV1ManagedSubaccountQueryTransLogGet200Response sapi_v1_managed_subaccount_query_trans_log_get(transfers, transfer_function_account_type, timestamp, signature, start_time=start_time, end_time=end_time, page=page, limit=limit, recv_window=recv_window) + +Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA) + +Query Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight(UID): 60 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_get200_response import SapiV1ManagedSubaccountQueryTransLogGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + transfers = 'transfers_example' # str | Transfer Direction + transfer_function_account_type = 'transfer_function_account_type_example' # str | Transfer function account type + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + page = 1 # int | Default 1 (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA) + api_response = api_instance.sapi_v1_managed_subaccount_query_trans_log_get(transfers, transfer_function_account_type, timestamp, signature, start_time=start_time, end_time=end_time, page=page, limit=limit, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_managed_subaccount_query_trans_log_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_managed_subaccount_query_trans_log_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **transfers** | **str**| Transfer Direction | + **transfer_function_account_type** | **str**| Transfer function account type | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **page** | **int**| Default 1 | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ManagedSubaccountQueryTransLogGet200Response**](SapiV1ManagedSubaccountQueryTransLogGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Managed sub deposit address | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_managed_subaccount_withdraw_post** +> SapiV1ManagedSubaccountDepositPost200Response sapi_v1_managed_subaccount_withdraw_post(from_email, asset, amount, timestamp, signature, transfer_date=transfer_date, recv_window=recv_window) + +Withdrawl assets from the managed sub-account(For Investor Master Account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_managed_subaccount_deposit_post200_response import SapiV1ManagedSubaccountDepositPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + from_email = 'from_email_example' # str | Sender email + asset = 'BTC' # str | + amount = 1.01 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + transfer_date = 56 # int | Withdrawals is automatically occur on the transfer date(UTC0). If a date is not selected, the withdrawal occurs right now (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Withdrawl assets from the managed sub-account(For Investor Master Account) + api_response = api_instance.sapi_v1_managed_subaccount_withdraw_post(from_email, asset, amount, timestamp, signature, transfer_date=transfer_date, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_managed_subaccount_withdraw_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_managed_subaccount_withdraw_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **from_email** | **str**| Sender email | + **asset** | **str**| | + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **transfer_date** | **int**| Withdrawals is automatically occur on the transfer date(UTC0). If a date is not selected, the withdrawal occurs right now | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1ManagedSubaccountDepositPost200Response**](SapiV1ManagedSubaccountDepositPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Transfer id | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_blvt_enable_post** +> SapiV1SubAccountBlvtEnablePost200Response sapi_v1_sub_account_blvt_enable_post(email, enable_blvt, timestamp, signature, recv_window=recv_window) + +Enable Leverage Token for Sub-account (For Master Account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_blvt_enable_post200_response import SapiV1SubAccountBlvtEnablePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + enable_blvt = True # bool | Only true for now + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Enable Leverage Token for Sub-account (For Master Account) + api_response = api_instance.sapi_v1_sub_account_blvt_enable_post(email, enable_blvt, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_blvt_enable_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_blvt_enable_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **enable_blvt** | **bool**| Only true for now | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountBlvtEnablePost200Response**](SapiV1SubAccountBlvtEnablePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | BLVT status | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_eoptions_enable_post** +> SapiV1SubAccountEoptionsEnablePost200Response sapi_v1_sub_account_eoptions_enable_post(email, timestamp, signature, recv_window=recv_window) + +Enable Options for Sub-account (For Master Account)(USER_DATA) + +Enable Options for Sub-account (For Master Account). Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_eoptions_enable_post200_response import SapiV1SubAccountEoptionsEnablePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Enable Options for Sub-account (For Master Account)(USER_DATA) + api_response = api_instance.sapi_v1_sub_account_eoptions_enable_post(email, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_eoptions_enable_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_eoptions_enable_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountEoptionsEnablePost200Response**](SapiV1SubAccountEoptionsEnablePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sub account EOptions status | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_futures_account_get** +> SapiV1SubAccountFuturesAccountGet200Response sapi_v1_sub_account_futures_account_get(email, timestamp, signature, recv_window=recv_window) + +Detail on Sub-account's Futures Account (For Master Account) + +Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_futures_account_get200_response import SapiV1SubAccountFuturesAccountGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'alice@test.com' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Detail on Sub-account's Futures Account (For Master Account) + api_response = api_instance.sapi_v1_sub_account_futures_account_get(email, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_futures_account_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_futures_account_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountFuturesAccountGet200Response**](SapiV1SubAccountFuturesAccountGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Futures account details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_futures_account_summary_get** +> SapiV1SubAccountFuturesAccountSummaryGet200Response sapi_v1_sub_account_futures_account_summary_get(timestamp, signature, recv_window=recv_window) + +Summary of Sub-account's Futures Account (For Master Account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_futures_account_summary_get200_response import SapiV1SubAccountFuturesAccountSummaryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Summary of Sub-account's Futures Account (For Master Account) + api_response = api_instance.sapi_v1_sub_account_futures_account_summary_get(timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_futures_account_summary_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_futures_account_summary_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountFuturesAccountSummaryGet200Response**](SapiV1SubAccountFuturesAccountSummaryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Futures account summary | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_futures_enable_post** +> SapiV1SubAccountFuturesEnablePost200Response sapi_v1_sub_account_futures_enable_post(email, timestamp, signature, recv_window=recv_window) + +Enable Futures for Sub-account (For Master Account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_futures_enable_post200_response import SapiV1SubAccountFuturesEnablePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Enable Futures for Sub-account (For Master Account) + api_response = api_instance.sapi_v1_sub_account_futures_enable_post(email, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_futures_enable_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_futures_enable_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountFuturesEnablePost200Response**](SapiV1SubAccountFuturesEnablePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Futures status | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_futures_internal_transfer_get** +> SapiV1SubAccountFuturesInternalTransferGet200Response sapi_v1_sub_account_futures_internal_transfer_get(email, futures_type, timestamp, signature, start_time=start_time, end_time=end_time, page=page, limit=limit, recv_window=recv_window) + +Sub-account Futures Asset Transfer History (For Master Account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_get200_response import SapiV1SubAccountFuturesInternalTransferGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + futures_type = 2 # int | 1:USDT-margined Futures, 2: Coin-margined Futures + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + page = 1 # int | Default 1 (optional) + limit = 56 # int | Default value: 50, Max value: 500 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Sub-account Futures Asset Transfer History (For Master Account) + api_response = api_instance.sapi_v1_sub_account_futures_internal_transfer_get(email, futures_type, timestamp, signature, start_time=start_time, end_time=end_time, page=page, limit=limit, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_futures_internal_transfer_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_futures_internal_transfer_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **futures_type** | **int**| 1:USDT-margined Futures, 2: Coin-margined Futures | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **page** | **int**| Default 1 | [optional] + **limit** | **int**| Default value: 50, Max value: 500 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountFuturesInternalTransferGet200Response**](SapiV1SubAccountFuturesInternalTransferGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sub-account Futures Asset Transfer History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_futures_internal_transfer_post** +> SapiV1SubAccountFuturesInternalTransferPost200Response sapi_v1_sub_account_futures_internal_transfer_post(from_email, to_email, futures_type, asset, amount, timestamp, signature, recv_window=recv_window) + +Sub-account Futures Asset Transfer (For Master Account) + +- Master account can transfer max 2000 times a minute Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_post200_response import SapiV1SubAccountFuturesInternalTransferPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + from_email = 'from_email_example' # str | Sender email + to_email = 'to_email_example' # str | Recipient email + futures_type = 2 # int | 1:USDT-margined Futures,2: Coin-margined Futures + asset = 'BTC' # str | + amount = 1.01 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Sub-account Futures Asset Transfer (For Master Account) + api_response = api_instance.sapi_v1_sub_account_futures_internal_transfer_post(from_email, to_email, futures_type, asset, amount, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_futures_internal_transfer_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_futures_internal_transfer_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **from_email** | **str**| Sender email | + **to_email** | **str**| Recipient email | + **futures_type** | **int**| 1:USDT-margined Futures,2: Coin-margined Futures | + **asset** | **str**| | + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountFuturesInternalTransferPost200Response**](SapiV1SubAccountFuturesInternalTransferPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Futures Asset Transfer Info | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_futures_position_risk_get** +> List[SapiV1SubAccountFuturesPositionRiskGet200ResponseInner] sapi_v1_sub_account_futures_position_risk_get(email, timestamp, signature, recv_window=recv_window) + +Futures Position-Risk of Sub-account (For Master Account) + +Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_futures_position_risk_get200_response_inner import SapiV1SubAccountFuturesPositionRiskGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Futures Position-Risk of Sub-account (For Master Account) + api_response = api_instance.sapi_v1_sub_account_futures_position_risk_get(email, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_futures_position_risk_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_futures_position_risk_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1SubAccountFuturesPositionRiskGet200ResponseInner]**](SapiV1SubAccountFuturesPositionRiskGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Futures account summary | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_futures_transfer_post** +> SapiV1SubAccountFuturesTransferPost200Response sapi_v1_sub_account_futures_transfer_post(email, asset, amount, type, timestamp, signature, recv_window=recv_window) + +Transfer for Sub-account (For Master Account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_futures_transfer_post200_response import SapiV1SubAccountFuturesTransferPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + asset = 'BTC' # str | + amount = 1.01 # float | + type = 56 # int | * `1` - transfer from subaccount's spot account to its USDT-margined futures account * `2` - transfer from subaccount's USDT-margined futures account to its spot account * `3` - transfer from subaccount's spot account to its COIN-margined futures account * `4` - transfer from subaccount's COIN-margined futures account to its spot account + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Transfer for Sub-account (For Master Account) + api_response = api_instance.sapi_v1_sub_account_futures_transfer_post(email, asset, amount, type, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_futures_transfer_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_futures_transfer_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **asset** | **str**| | + **amount** | **float**| | + **type** | **int**| * `1` - transfer from subaccount's spot account to its USDT-margined futures account * `2` - transfer from subaccount's USDT-margined futures account to its spot account * `3` - transfer from subaccount's spot account to its COIN-margined futures account * `4` - transfer from subaccount's COIN-margined futures account to its spot account | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountFuturesTransferPost200Response**](SapiV1SubAccountFuturesTransferPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Transfer id | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_list_get** +> SapiV1SubAccountListGet200Response sapi_v1_sub_account_list_get(timestamp, signature, email=email, is_freeze=is_freeze, page=page, limit=limit, recv_window=recv_window) + +Query Sub-account List (For Master Account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_list_get200_response import SapiV1SubAccountListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + email = 'email_example' # str | Sub-account email (optional) + is_freeze = 'is_freeze_example' # str | (optional) + page = 1 # int | Default 1 (optional) + limit = 1 # int | Default 1; max 200 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Sub-account List (For Master Account) + api_response = api_instance.sapi_v1_sub_account_list_get(timestamp, signature, email=email, is_freeze=is_freeze, page=page, limit=limit, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **email** | **str**| Sub-account email | [optional] + **is_freeze** | **str**| | [optional] + **page** | **int**| Default 1 | [optional] + **limit** | **int**| Default 1; max 200 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountListGet200Response**](SapiV1SubAccountListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of sub-accounts | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_margin_account_get** +> SapiV1SubAccountMarginAccountGet200Response sapi_v1_sub_account_margin_account_get(email, timestamp, signature, recv_window=recv_window) + +Detail on Sub-account's Margin Account (For Master Account) + +Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_margin_account_get200_response import SapiV1SubAccountMarginAccountGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Detail on Sub-account's Margin Account (For Master Account) + api_response = api_instance.sapi_v1_sub_account_margin_account_get(email, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_margin_account_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_margin_account_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountMarginAccountGet200Response**](SapiV1SubAccountMarginAccountGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin sub-account details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_margin_account_summary_get** +> SapiV1SubAccountMarginAccountSummaryGet200Response sapi_v1_sub_account_margin_account_summary_get(timestamp, signature, recv_window=recv_window) + +Summary of Sub-account's Margin Account (For Master Account) + +Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_margin_account_summary_get200_response import SapiV1SubAccountMarginAccountSummaryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Summary of Sub-account's Margin Account (For Master Account) + api_response = api_instance.sapi_v1_sub_account_margin_account_summary_get(timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_margin_account_summary_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_margin_account_summary_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountMarginAccountSummaryGet200Response**](SapiV1SubAccountMarginAccountSummaryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin sub-account details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_margin_enable_post** +> SapiV1SubAccountMarginEnablePost200Response sapi_v1_sub_account_margin_enable_post(email, timestamp, signature, recv_window=recv_window) + +Enable Margin for Sub-account (For Master Account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_margin_enable_post200_response import SapiV1SubAccountMarginEnablePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Enable Margin for Sub-account (For Master Account) + api_response = api_instance.sapi_v1_sub_account_margin_enable_post(email, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_margin_enable_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_margin_enable_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountMarginEnablePost200Response**](SapiV1SubAccountMarginEnablePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Margin status | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_margin_transfer_post** +> SapiV1SubAccountFuturesTransferPost200Response sapi_v1_sub_account_margin_transfer_post(email, asset, amount, type, timestamp, signature, recv_window=recv_window) + +Margin Transfer for Sub-account (For Master Account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_futures_transfer_post200_response import SapiV1SubAccountFuturesTransferPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + asset = 'BTC' # str | + amount = 1.01 # float | + type = 56 # int | * `1` - transfer from subaccount's spot account to margin account * `2` - transfer from subaccount's margin account to its spot account + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Margin Transfer for Sub-account (For Master Account) + api_response = api_instance.sapi_v1_sub_account_margin_transfer_post(email, asset, amount, type, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_margin_transfer_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_margin_transfer_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **asset** | **str**| | + **amount** | **float**| | + **type** | **int**| * `1` - transfer from subaccount's spot account to margin account * `2` - transfer from subaccount's margin account to its spot account | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountFuturesTransferPost200Response**](SapiV1SubAccountFuturesTransferPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Transfer id | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_spot_summary_get** +> SapiV1SubAccountSpotSummaryGet200Response sapi_v1_sub_account_spot_summary_get(timestamp, signature, email=email, page=page, size=size, recv_window=recv_window) + +Sub-account Spot Assets Summary (For Master Account) + +Get BTC valued asset summary of subaccounts. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_spot_summary_get200_response import SapiV1SubAccountSpotSummaryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + email = 'email_example' # str | Sub-account email (optional) + page = 1 # int | Default 1 (optional) + size = 56 # int | Default:10 Max:20 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Sub-account Spot Assets Summary (For Master Account) + api_response = api_instance.sapi_v1_sub_account_spot_summary_get(timestamp, signature, email=email, page=page, size=size, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_spot_summary_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_spot_summary_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **email** | **str**| Sub-account email | [optional] + **page** | **int**| Default 1 | [optional] + **size** | **int**| Default:10 Max:20 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountSpotSummaryGet200Response**](SapiV1SubAccountSpotSummaryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Summary of Sub-account Spot Assets | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_status_get** +> List[SapiV1SubAccountStatusGet200ResponseInner] sapi_v1_sub_account_status_get(timestamp, signature, email=email, recv_window=recv_window) + +Sub-account's Status on Margin/Futures (For Master Account) + +- If no `email` sent, all sub-accounts' information will be returned. Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_status_get200_response_inner import SapiV1SubAccountStatusGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + email = 'email_example' # str | Sub-account email (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Sub-account's Status on Margin/Futures (For Master Account) + api_response = api_instance.sapi_v1_sub_account_status_get(timestamp, signature, email=email, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_status_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_status_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **email** | **str**| Sub-account email | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1SubAccountStatusGet200ResponseInner]**](SapiV1SubAccountStatusGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Status on Margin/Futures | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_sub_account_api_ip_restriction_get** +> SapiV1SubAccountSubAccountApiIpRestrictionGet200Response sapi_v1_sub_account_sub_account_api_ip_restriction_get(email, sub_account_api_key, timestamp, signature, recv_window=recv_window) + +Get IP Restriction for a Sub-account API Key (For Master Account) + +Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response import SapiV1SubAccountSubAccountApiIpRestrictionGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + sub_account_api_key = 'sub_account_api_key_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get IP Restriction for a Sub-account API Key (For Master Account) + api_response = api_instance.sapi_v1_sub_account_sub_account_api_ip_restriction_get(email, sub_account_api_key, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_sub_account_api_ip_restriction_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_sub_account_api_ip_restriction_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **sub_account_api_key** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountSubAccountApiIpRestrictionGet200Response**](SapiV1SubAccountSubAccountApiIpRestrictionGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | IP Restriction information | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete** +> SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete(email, sub_account_api_key, timestamp, signature, ip_address=ip_address, third_party_name=third_party_name, recv_window=recv_window) + +Delete IP List for a Sub-account API Key (For Master Account) + +Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response import SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + sub_account_api_key = 'sub_account_api_key_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + ip_address = 'ip_address_example' # str | Can be added in batches, separated by commas (optional) + third_party_name = 'third_party_name_example' # str | third party IP list name (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Delete IP List for a Sub-account API Key (For Master Account) + api_response = api_instance.sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete(email, sub_account_api_key, timestamp, signature, ip_address=ip_address, third_party_name=third_party_name, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **sub_account_api_key** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **ip_address** | **str**| Can be added in batches, separated by commas | [optional] + **third_party_name** | **str**| third party IP list name | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response**](SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Delete IP information | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_sub_transfer_history_get** +> List[SapiV1SubAccountSubTransferHistoryGet200ResponseInner] sapi_v1_sub_account_sub_transfer_history_get(timestamp, signature, from_email=from_email, to_email=to_email, start_time=start_time, end_time=end_time, page=page, limit=limit, recv_window=recv_window) + +Sub-account Spot Asset Transfer History (For Master Account) + +- fromEmail and toEmail cannot be sent at the same time. - Return fromEmail equal master account email by default. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_sub_transfer_history_get200_response_inner import SapiV1SubAccountSubTransferHistoryGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + from_email = 'from_email_example' # str | Sub-account email (optional) + to_email = 'to_email_example' # str | Sub-account email (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + page = 1 # int | Default 1 (optional) + limit = 1 # int | Default 1 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Sub-account Spot Asset Transfer History (For Master Account) + api_response = api_instance.sapi_v1_sub_account_sub_transfer_history_get(timestamp, signature, from_email=from_email, to_email=to_email, start_time=start_time, end_time=end_time, page=page, limit=limit, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_sub_transfer_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_sub_transfer_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **from_email** | **str**| Sub-account email | [optional] + **to_email** | **str**| Sub-account email | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **page** | **int**| Default 1 | [optional] + **limit** | **int**| Default 1 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1SubAccountSubTransferHistoryGet200ResponseInner]**](SapiV1SubAccountSubTransferHistoryGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sub-account Spot Asset Transfer History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_transaction_statistics_get** +> SapiV1SubAccountTransactionStatisticsGet200Response sapi_v1_sub_account_transaction_statistics_get(email, timestamp, signature, recv_window=recv_window) + +Query Sub-account Transaction Statistics (For Master Account) + +Query Sub-account Transaction statistics (For Master Account). Weight(UID): 60 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_transaction_statistics_get200_response import SapiV1SubAccountTransactionStatisticsGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Sub-account Transaction Statistics (For Master Account) + api_response = api_instance.sapi_v1_sub_account_transaction_statistics_get(email, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_transaction_statistics_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_transaction_statistics_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountTransactionStatisticsGet200Response**](SapiV1SubAccountTransactionStatisticsGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sub account transaction statistics | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_transfer_sub_to_master_post** +> SapiV1SubAccountFuturesTransferPost200Response sapi_v1_sub_account_transfer_sub_to_master_post(asset, amount, timestamp, signature, recv_window=recv_window) + +Transfer to Master (For Sub-account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_futures_transfer_post200_response import SapiV1SubAccountFuturesTransferPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + asset = 'BTC' # str | + amount = 1.01 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Transfer to Master (For Sub-account) + api_response = api_instance.sapi_v1_sub_account_transfer_sub_to_master_post(asset, amount, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_transfer_sub_to_master_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_transfer_sub_to_master_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | **str**| | + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountFuturesTransferPost200Response**](SapiV1SubAccountFuturesTransferPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Transfer id | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_transfer_sub_to_sub_post** +> SapiV1SubAccountFuturesTransferPost200Response sapi_v1_sub_account_transfer_sub_to_sub_post(to_email, asset, amount, timestamp, signature, recv_window=recv_window) + +Transfer to Sub-account of Same Master (For Sub-account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_futures_transfer_post200_response import SapiV1SubAccountFuturesTransferPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + to_email = 'to_email_example' # str | Recipient email + asset = 'BTC' # str | + amount = 1.01 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Transfer to Sub-account of Same Master (For Sub-account) + api_response = api_instance.sapi_v1_sub_account_transfer_sub_to_sub_post(to_email, asset, amount, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_transfer_sub_to_sub_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_transfer_sub_to_sub_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **to_email** | **str**| Recipient email | + **asset** | **str**| | + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountFuturesTransferPost200Response**](SapiV1SubAccountFuturesTransferPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Transfer id | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_transfer_sub_user_history_get** +> List[SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner] sapi_v1_sub_account_transfer_sub_user_history_get(timestamp, signature, asset=asset, type=type, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + +Sub-account Transfer History (For Sub-account) + +- If `type` is not sent, the records of type 2: transfer out will be returned by default. - If `startTime` and `endTime` are not sent, the recent 30-day data will be returned. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner import SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'BNB' # str | (optional) + type = 56 # int | * `1` - transfer in * `2` - transfer out (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Sub-account Transfer History (For Sub-account) + api_response = api_instance.sapi_v1_sub_account_transfer_sub_user_history_get(timestamp, signature, asset=asset, type=type, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_transfer_sub_user_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_transfer_sub_user_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| | [optional] + **type** | **int**| * `1` - transfer in * `2` - transfer out | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner]**](SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Transfer id | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_universal_transfer_get** +> List[SapiV1SubAccountUniversalTransferGet200ResponseInner] sapi_v1_sub_account_universal_transfer_get(timestamp, signature, from_email=from_email, to_email=to_email, client_tran_id=client_tran_id, start_time=start_time, end_time=end_time, page=page, limit=limit, recv_window=recv_window) + +Universal Transfer History (For Master Account) + +- `fromEmail` and `toEmail` cannot be sent at the same time. - Return `fromEmail` equal master account email by default. - The query time period must be less then 30 days. - If startTime and endTime not sent, return records of the last 30 days by default. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_universal_transfer_get200_response_inner import SapiV1SubAccountUniversalTransferGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + from_email = 'from_email_example' # str | Sub-account email (optional) + to_email = 'to_email_example' # str | Sub-account email (optional) + client_tran_id = 'client_tran_id_example' # str | (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + page = 1 # int | Default 1 (optional) + limit = 56 # int | Default 500, Max 500 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Universal Transfer History (For Master Account) + api_response = api_instance.sapi_v1_sub_account_universal_transfer_get(timestamp, signature, from_email=from_email, to_email=to_email, client_tran_id=client_tran_id, start_time=start_time, end_time=end_time, page=page, limit=limit, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_universal_transfer_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_universal_transfer_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **from_email** | **str**| Sub-account email | [optional] + **to_email** | **str**| Sub-account email | [optional] + **client_tran_id** | **str**| | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **page** | **int**| Default 1 | [optional] + **limit** | **int**| Default 500, Max 500 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1SubAccountUniversalTransferGet200ResponseInner]**](SapiV1SubAccountUniversalTransferGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Transfer History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_universal_transfer_post** +> SapiV1SubAccountUniversalTransferPost200Response sapi_v1_sub_account_universal_transfer_post(from_account_type, to_account_type, asset, amount, timestamp, signature, from_email=from_email, to_email=to_email, client_tran_id=client_tran_id, symbol=symbol, recv_window=recv_window) + +Universal Transfer (For Master Account) + +- You need to enable \"internal transfer\" option for the api key which requests this endpoint. - Transfer from master account by default if fromEmail is not sent. - Transfer to master account by default if toEmail is not sent. - Supported transfer scenarios: - Master account SPOT transfer to sub-account SPOT,USDT_FUTURE,COIN_FUTURE,MARGIN(Cross),ISOLATED_MARGIN - Sub-account SPOT,USDT_FUTURE,COIN_FUTURE,MARGIN(Cross),ISOLATED_MARGIN transfer to master account SPOT - Transfer between two sub-account SPOT accounts Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_universal_transfer_post200_response import SapiV1SubAccountUniversalTransferPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + from_account_type = 'from_account_type_example' # str | + to_account_type = 'to_account_type_example' # str | + asset = 'BTC' # str | + amount = 1.01 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + from_email = 'from_email_example' # str | Sub-account email (optional) + to_email = 'to_email_example' # str | Sub-account email (optional) + client_tran_id = 'client_tran_id_example' # str | (optional) + symbol = 'BNBUSDT' # str | Only supported under ISOLATED_MARGIN type (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Universal Transfer (For Master Account) + api_response = api_instance.sapi_v1_sub_account_universal_transfer_post(from_account_type, to_account_type, asset, amount, timestamp, signature, from_email=from_email, to_email=to_email, client_tran_id=client_tran_id, symbol=symbol, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_universal_transfer_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_universal_transfer_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **from_account_type** | **str**| | + **to_account_type** | **str**| | + **asset** | **str**| | + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **from_email** | **str**| Sub-account email | [optional] + **to_email** | **str**| Sub-account email | [optional] + **client_tran_id** | **str**| | [optional] + **symbol** | **str**| Only supported under ISOLATED_MARGIN type | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountUniversalTransferPost200Response**](SapiV1SubAccountUniversalTransferPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Transfer id | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_sub_account_virtual_sub_account_post** +> SapiV1SubAccountVirtualSubAccountPost200Response sapi_v1_sub_account_virtual_sub_account_post(sub_account_string, timestamp, signature, recv_window=recv_window) + +Create a Virtual Sub-account(For Master Account) + +- This request will generate a virtual sub account under your master account. - You need to enable \"trade\" option for the api key which requests this endpoint. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_sub_account_virtual_sub_account_post200_response import SapiV1SubAccountVirtualSubAccountPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + sub_account_string = 'sub_account_string_example' # str | Please input a string. We will create a virtual email using that string for you to register + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Create a Virtual Sub-account(For Master Account) + api_response = api_instance.sapi_v1_sub_account_virtual_sub_account_post(sub_account_string, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v1_sub_account_virtual_sub_account_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v1_sub_account_virtual_sub_account_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sub_account_string** | **str**| Please input a string. We will create a virtual email using that string for you to register | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1SubAccountVirtualSubAccountPost200Response**](SapiV1SubAccountVirtualSubAccountPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Return the created virtual email | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_sub_account_futures_account_get** +> SapiV2SubAccountFuturesAccountGet200Response sapi_v2_sub_account_futures_account_get(email, futures_type, timestamp, signature, recv_window=recv_window) + +Detail on Sub-account's Futures Account V2 (For Master Account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_sub_account_futures_account_get200_response import SapiV2SubAccountFuturesAccountGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + futures_type = 1 # int | * `1` - USDT Margined Futures * `2` - COIN Margined Futures + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Detail on Sub-account's Futures Account V2 (For Master Account) + api_response = api_instance.sapi_v2_sub_account_futures_account_get(email, futures_type, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v2_sub_account_futures_account_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v2_sub_account_futures_account_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **futures_type** | **int**| * `1` - USDT Margined Futures * `2` - COIN Margined Futures | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2SubAccountFuturesAccountGet200Response**](SapiV2SubAccountFuturesAccountGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | USDT or COIN Margined Futures Details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_sub_account_futures_account_summary_get** +> SapiV2SubAccountFuturesAccountSummaryGet200Response sapi_v2_sub_account_futures_account_summary_get(futures_type, timestamp, signature, page=page, limit=limit, recv_window=recv_window) + +Summary of Sub-account's Futures Account V2 (For Master Account) + +Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_sub_account_futures_account_summary_get200_response import SapiV2SubAccountFuturesAccountSummaryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + futures_type = 1 # int | * `1` - USDT Margined Futures * `2` - COIN Margined Futures + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + page = 1 # int | Default 1 (optional) + limit = 56 # int | Default 10, Max 20 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Summary of Sub-account's Futures Account V2 (For Master Account) + api_response = api_instance.sapi_v2_sub_account_futures_account_summary_get(futures_type, timestamp, signature, page=page, limit=limit, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v2_sub_account_futures_account_summary_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v2_sub_account_futures_account_summary_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **futures_type** | **int**| * `1` - USDT Margined Futures * `2` - COIN Margined Futures | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **page** | **int**| Default 1 | [optional] + **limit** | **int**| Default 10, Max 20 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2SubAccountFuturesAccountSummaryGet200Response**](SapiV2SubAccountFuturesAccountSummaryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | USDT or COIN Margined Futures Summary | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_sub_account_futures_position_risk_get** +> SapiV2SubAccountFuturesPositionRiskGet200Response sapi_v2_sub_account_futures_position_risk_get(email, futures_type, timestamp, signature, recv_window=recv_window) + +Futures Position-Risk of Sub-account V2 (For Master Account) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_sub_account_futures_position_risk_get200_response import SapiV2SubAccountFuturesPositionRiskGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + futures_type = 1 # int | * `1` - USDT Margined Futures * `2` - COIN Margined Futures + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Futures Position-Risk of Sub-account V2 (For Master Account) + api_response = api_instance.sapi_v2_sub_account_futures_position_risk_get(email, futures_type, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v2_sub_account_futures_position_risk_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v2_sub_account_futures_position_risk_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **futures_type** | **int**| * `1` - USDT Margined Futures * `2` - COIN Margined Futures | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2SubAccountFuturesPositionRiskGet200Response**](SapiV2SubAccountFuturesPositionRiskGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | USDT or COIN Margined Futures Position Risk | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v2_sub_account_sub_account_api_ip_restriction_post** +> SapiV2SubAccountSubAccountApiIpRestrictionPost200Response sapi_v2_sub_account_sub_account_api_ip_restriction_post(email, sub_account_api_key, status, timestamp, signature, third_party_name=third_party_name, recv_window=recv_window) + +Update IP Restriction for Sub-Account API key (For Master Account) + +Update IP Restriction for Sub-Account API key Weight(UID): 3000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response import SapiV2SubAccountSubAccountApiIpRestrictionPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + sub_account_api_key = 'sub_account_api_key_example' # str | + status = '1' # str | IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. 3 = Restrict access to users' trusted third party IPs only + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + third_party_name = 'third_party_name_example' # str | third party IP list name (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Update IP Restriction for Sub-Account API key (For Master Account) + api_response = api_instance.sapi_v2_sub_account_sub_account_api_ip_restriction_post(email, sub_account_api_key, status, timestamp, signature, third_party_name=third_party_name, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v2_sub_account_sub_account_api_ip_restriction_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v2_sub_account_sub_account_api_ip_restriction_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **sub_account_api_key** | **str**| | + **status** | **str**| IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. 3 = Restrict access to users' trusted third party IPs only | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **third_party_name** | **str**| third party IP list name | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV2SubAccountSubAccountApiIpRestrictionPost200Response**](SapiV2SubAccountSubAccountApiIpRestrictionPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Update IP Restriction | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v3_sub_account_assets_get** +> SapiV3SubAccountAssetsGet200Response sapi_v3_sub_account_assets_get(email, timestamp, signature, recv_window=recv_window) + +Sub-account Assets (For Master Account) + +Fetch sub-account assets Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v3_sub_account_assets_get200_response import SapiV3SubAccountAssetsGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | Sub-account email + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Sub-account Assets (For Master Account) + api_response = api_instance.sapi_v3_sub_account_assets_get(email, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v3_sub_account_assets_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v3_sub_account_assets_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| Sub-account email | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV3SubAccountAssetsGet200Response**](SapiV3SubAccountAssetsGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of assets balances | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v4_sub_account_assets_get** +> SapiV4SubAccountAssetsGet200Response sapi_v4_sub_account_assets_get(email, timestamp, signature, recv_window=recv_window) + +Query Sub-account Assets (For Master Account) + +Fetch sub-account assets Weight(UID): 60 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v4_sub_account_assets_get200_response import SapiV4SubAccountAssetsGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.SubAccountApi(api_client) + email = 'email_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Sub-account Assets (For Master Account) + api_response = api_instance.sapi_v4_sub_account_assets_get(email, timestamp, signature, recv_window=recv_window) + print("The response of SubAccountApi->sapi_v4_sub_account_assets_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SubAccountApi->sapi_v4_sub_account_assets_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV4SubAccountAssetsGet200Response**](SapiV4SubAccountAssetsGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Sub account balances | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/SubAccountCOINFuturesDetails.md b/target/python/binance_openapi/docs/SubAccountCOINFuturesDetails.md new file mode 100644 index 0000000..b0f3c37 --- /dev/null +++ b/target/python/binance_openapi/docs/SubAccountCOINFuturesDetails.md @@ -0,0 +1,35 @@ +# SubAccountCOINFuturesDetails + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**assets** | [**List[SubAccountCOINFuturesDetailsAssetsInner]**](SubAccountCOINFuturesDetailsAssetsInner.md) | | +**can_deposit** | **bool** | | +**can_trade** | **bool** | | +**can_withdraw** | **bool** | | +**fee_tier** | **int** | | +**update_time** | **int** | | + +## Example + +```python +from openapi_client.models.sub_account_coin_futures_details import SubAccountCOINFuturesDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of SubAccountCOINFuturesDetails from a JSON string +sub_account_coin_futures_details_instance = SubAccountCOINFuturesDetails.from_json(json) +# print the JSON string representation of the object +print(SubAccountCOINFuturesDetails.to_json()) + +# convert the object into a dict +sub_account_coin_futures_details_dict = sub_account_coin_futures_details_instance.to_dict() +# create an instance of SubAccountCOINFuturesDetails from a dict +sub_account_coin_futures_details_from_dict = SubAccountCOINFuturesDetails.from_dict(sub_account_coin_futures_details_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SubAccountCOINFuturesDetailsAssetsInner.md b/target/python/binance_openapi/docs/SubAccountCOINFuturesDetailsAssetsInner.md new file mode 100644 index 0000000..c8da176 --- /dev/null +++ b/target/python/binance_openapi/docs/SubAccountCOINFuturesDetailsAssetsInner.md @@ -0,0 +1,37 @@ +# SubAccountCOINFuturesDetailsAssetsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | **str** | | +**initial_margin** | **str** | | +**maintenance_margin** | **str** | | +**margin_balance** | **str** | | +**max_withdraw_amount** | **str** | | +**open_order_initial_margin** | **str** | | +**position_initial_margin** | **str** | | +**unrealized_profit** | **str** | | +**wallet_balance** | **str** | | + +## Example + +```python +from openapi_client.models.sub_account_coin_futures_details_assets_inner import SubAccountCOINFuturesDetailsAssetsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SubAccountCOINFuturesDetailsAssetsInner from a JSON string +sub_account_coin_futures_details_assets_inner_instance = SubAccountCOINFuturesDetailsAssetsInner.from_json(json) +# print the JSON string representation of the object +print(SubAccountCOINFuturesDetailsAssetsInner.to_json()) + +# convert the object into a dict +sub_account_coin_futures_details_assets_inner_dict = sub_account_coin_futures_details_assets_inner_instance.to_dict() +# create an instance of SubAccountCOINFuturesDetailsAssetsInner from a dict +sub_account_coin_futures_details_assets_inner_from_dict = SubAccountCOINFuturesDetailsAssetsInner.from_dict(sub_account_coin_futures_details_assets_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SubAccountCOINFuturesPositionRisk.md b/target/python/binance_openapi/docs/SubAccountCOINFuturesPositionRisk.md new file mode 100644 index 0000000..79b710c --- /dev/null +++ b/target/python/binance_openapi/docs/SubAccountCOINFuturesPositionRisk.md @@ -0,0 +1,29 @@ +# SubAccountCOINFuturesPositionRisk + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**delivery_position_risk_vos** | [**List[SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner]**](SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner.md) | | + +## Example + +```python +from openapi_client.models.sub_account_coin_futures_position_risk import SubAccountCOINFuturesPositionRisk + +# TODO update the JSON string below +json = "{}" +# create an instance of SubAccountCOINFuturesPositionRisk from a JSON string +sub_account_coin_futures_position_risk_instance = SubAccountCOINFuturesPositionRisk.from_json(json) +# print the JSON string representation of the object +print(SubAccountCOINFuturesPositionRisk.to_json()) + +# convert the object into a dict +sub_account_coin_futures_position_risk_dict = sub_account_coin_futures_position_risk_instance.to_dict() +# create an instance of SubAccountCOINFuturesPositionRisk from a dict +sub_account_coin_futures_position_risk_from_dict = SubAccountCOINFuturesPositionRisk.from_dict(sub_account_coin_futures_position_risk_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner.md b/target/python/binance_openapi/docs/SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner.md new file mode 100644 index 0000000..aa6b071 --- /dev/null +++ b/target/python/binance_openapi/docs/SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner.md @@ -0,0 +1,39 @@ +# SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**entry_price** | **str** | | +**mark_price** | **str** | | +**leverage** | **str** | | +**isolated** | **str** | | +**isolated_wallet** | **str** | | +**isolated_margin** | **str** | | +**is_auto_add_margin** | **str** | | +**position_side** | **str** | | +**position_amount** | **str** | | +**symbol** | **str** | | +**unrealized_profit** | **str** | | + +## Example + +```python +from openapi_client.models.sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner import SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner from a JSON string +sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner_instance = SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner.from_json(json) +# print the JSON string representation of the object +print(SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner.to_json()) + +# convert the object into a dict +sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner_dict = sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner_instance.to_dict() +# create an instance of SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner from a dict +sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner_from_dict = SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner.from_dict(sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SubAccountCOINFuturesSummary.md b/target/python/binance_openapi/docs/SubAccountCOINFuturesSummary.md new file mode 100644 index 0000000..3d4023c --- /dev/null +++ b/target/python/binance_openapi/docs/SubAccountCOINFuturesSummary.md @@ -0,0 +1,29 @@ +# SubAccountCOINFuturesSummary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**delivery_account_summary_resp** | [**SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp**](SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp.md) | | + +## Example + +```python +from openapi_client.models.sub_account_coin_futures_summary import SubAccountCOINFuturesSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of SubAccountCOINFuturesSummary from a JSON string +sub_account_coin_futures_summary_instance = SubAccountCOINFuturesSummary.from_json(json) +# print the JSON string representation of the object +print(SubAccountCOINFuturesSummary.to_json()) + +# convert the object into a dict +sub_account_coin_futures_summary_dict = sub_account_coin_futures_summary_instance.to_dict() +# create an instance of SubAccountCOINFuturesSummary from a dict +sub_account_coin_futures_summary_from_dict = SubAccountCOINFuturesSummary.from_dict(sub_account_coin_futures_summary_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp.md b/target/python/binance_openapi/docs/SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp.md new file mode 100644 index 0000000..c128063 --- /dev/null +++ b/target/python/binance_openapi/docs/SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp.md @@ -0,0 +1,33 @@ +# SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_margin_balance_of_btc** | **str** | | +**total_unrealized_profit_of_btc** | **str** | | +**total_wallet_balance_of_btc** | **str** | | +**asset** | **str** | | +**sub_account_list** | [**List[SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner]**](SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner.md) | | + +## Example + +```python +from openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp import SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp + +# TODO update the JSON string below +json = "{}" +# create an instance of SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp from a JSON string +sub_account_coin_futures_summary_delivery_account_summary_resp_instance = SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp.from_json(json) +# print the JSON string representation of the object +print(SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp.to_json()) + +# convert the object into a dict +sub_account_coin_futures_summary_delivery_account_summary_resp_dict = sub_account_coin_futures_summary_delivery_account_summary_resp_instance.to_dict() +# create an instance of SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp from a dict +sub_account_coin_futures_summary_delivery_account_summary_resp_from_dict = SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp.from_dict(sub_account_coin_futures_summary_delivery_account_summary_resp_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner.md b/target/python/binance_openapi/docs/SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner.md new file mode 100644 index 0000000..c024985 --- /dev/null +++ b/target/python/binance_openapi/docs/SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner.md @@ -0,0 +1,33 @@ +# SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**total_margin_balance** | **str** | | +**total_unrealized_profit** | **str** | | +**total_wallet_balance** | **str** | | +**asset** | **str** | | + +## Example + +```python +from openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner import SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner from a JSON string +sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner_instance = SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner.from_json(json) +# print the JSON string representation of the object +print(SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner.to_json()) + +# convert the object into a dict +sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner_dict = sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner_instance.to_dict() +# create an instance of SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner from a dict +sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner_from_dict = SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner.from_dict(sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SubAccountUSDTFuturesDetails.md b/target/python/binance_openapi/docs/SubAccountUSDTFuturesDetails.md new file mode 100644 index 0000000..f1a107f --- /dev/null +++ b/target/python/binance_openapi/docs/SubAccountUSDTFuturesDetails.md @@ -0,0 +1,29 @@ +# SubAccountUSDTFuturesDetails + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**future_account_resp** | [**SubAccountUSDTFuturesDetailsFutureAccountResp**](SubAccountUSDTFuturesDetailsFutureAccountResp.md) | | + +## Example + +```python +from openapi_client.models.sub_account_usdt_futures_details import SubAccountUSDTFuturesDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of SubAccountUSDTFuturesDetails from a JSON string +sub_account_usdt_futures_details_instance = SubAccountUSDTFuturesDetails.from_json(json) +# print the JSON string representation of the object +print(SubAccountUSDTFuturesDetails.to_json()) + +# convert the object into a dict +sub_account_usdt_futures_details_dict = sub_account_usdt_futures_details_instance.to_dict() +# create an instance of SubAccountUSDTFuturesDetails from a dict +sub_account_usdt_futures_details_from_dict = SubAccountUSDTFuturesDetails.from_dict(sub_account_usdt_futures_details_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SubAccountUSDTFuturesDetailsFutureAccountResp.md b/target/python/binance_openapi/docs/SubAccountUSDTFuturesDetailsFutureAccountResp.md new file mode 100644 index 0000000..98cb675 --- /dev/null +++ b/target/python/binance_openapi/docs/SubAccountUSDTFuturesDetailsFutureAccountResp.md @@ -0,0 +1,43 @@ +# SubAccountUSDTFuturesDetailsFutureAccountResp + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**assets** | [**List[SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner]**](SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner.md) | | +**can_deposit** | **bool** | | +**can_trade** | **bool** | | +**can_withdraw** | **bool** | | +**fee_tier** | **int** | | +**max_withdraw_amount** | **str** | | +**total_initial_margin** | **str** | | +**total_maintenance_margin** | **str** | | +**total_margin_balance** | **str** | | +**total_open_order_initial_margin** | **str** | | +**total_position_initial_margin** | **str** | | +**total_unrealized_profit** | **str** | | +**total_wallet_balance** | **str** | | +**update_time** | **int** | | + +## Example + +```python +from openapi_client.models.sub_account_usdt_futures_details_future_account_resp import SubAccountUSDTFuturesDetailsFutureAccountResp + +# TODO update the JSON string below +json = "{}" +# create an instance of SubAccountUSDTFuturesDetailsFutureAccountResp from a JSON string +sub_account_usdt_futures_details_future_account_resp_instance = SubAccountUSDTFuturesDetailsFutureAccountResp.from_json(json) +# print the JSON string representation of the object +print(SubAccountUSDTFuturesDetailsFutureAccountResp.to_json()) + +# convert the object into a dict +sub_account_usdt_futures_details_future_account_resp_dict = sub_account_usdt_futures_details_future_account_resp_instance.to_dict() +# create an instance of SubAccountUSDTFuturesDetailsFutureAccountResp from a dict +sub_account_usdt_futures_details_future_account_resp_from_dict = SubAccountUSDTFuturesDetailsFutureAccountResp.from_dict(sub_account_usdt_futures_details_future_account_resp_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SubAccountUSDTFuturesPositionRisk.md b/target/python/binance_openapi/docs/SubAccountUSDTFuturesPositionRisk.md new file mode 100644 index 0000000..f8994fa --- /dev/null +++ b/target/python/binance_openapi/docs/SubAccountUSDTFuturesPositionRisk.md @@ -0,0 +1,29 @@ +# SubAccountUSDTFuturesPositionRisk + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**future_position_risk_vos** | [**List[SapiV1SubAccountFuturesPositionRiskGet200ResponseInner]**](SapiV1SubAccountFuturesPositionRiskGet200ResponseInner.md) | | + +## Example + +```python +from openapi_client.models.sub_account_usdt_futures_position_risk import SubAccountUSDTFuturesPositionRisk + +# TODO update the JSON string below +json = "{}" +# create an instance of SubAccountUSDTFuturesPositionRisk from a JSON string +sub_account_usdt_futures_position_risk_instance = SubAccountUSDTFuturesPositionRisk.from_json(json) +# print the JSON string representation of the object +print(SubAccountUSDTFuturesPositionRisk.to_json()) + +# convert the object into a dict +sub_account_usdt_futures_position_risk_dict = sub_account_usdt_futures_position_risk_instance.to_dict() +# create an instance of SubAccountUSDTFuturesPositionRisk from a dict +sub_account_usdt_futures_position_risk_from_dict = SubAccountUSDTFuturesPositionRisk.from_dict(sub_account_usdt_futures_position_risk_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SubAccountUSDTFuturesSummary.md b/target/python/binance_openapi/docs/SubAccountUSDTFuturesSummary.md new file mode 100644 index 0000000..96c95af --- /dev/null +++ b/target/python/binance_openapi/docs/SubAccountUSDTFuturesSummary.md @@ -0,0 +1,29 @@ +# SubAccountUSDTFuturesSummary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**future_account_summary_resp** | [**SubAccountUSDTFuturesSummaryFutureAccountSummaryResp**](SubAccountUSDTFuturesSummaryFutureAccountSummaryResp.md) | | + +## Example + +```python +from openapi_client.models.sub_account_usdt_futures_summary import SubAccountUSDTFuturesSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of SubAccountUSDTFuturesSummary from a JSON string +sub_account_usdt_futures_summary_instance = SubAccountUSDTFuturesSummary.from_json(json) +# print the JSON string representation of the object +print(SubAccountUSDTFuturesSummary.to_json()) + +# convert the object into a dict +sub_account_usdt_futures_summary_dict = sub_account_usdt_futures_summary_instance.to_dict() +# create an instance of SubAccountUSDTFuturesSummary from a dict +sub_account_usdt_futures_summary_from_dict = SubAccountUSDTFuturesSummary.from_dict(sub_account_usdt_futures_summary_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SubAccountUSDTFuturesSummaryFutureAccountSummaryResp.md b/target/python/binance_openapi/docs/SubAccountUSDTFuturesSummaryFutureAccountSummaryResp.md new file mode 100644 index 0000000..1ebb69e --- /dev/null +++ b/target/python/binance_openapi/docs/SubAccountUSDTFuturesSummaryFutureAccountSummaryResp.md @@ -0,0 +1,37 @@ +# SubAccountUSDTFuturesSummaryFutureAccountSummaryResp + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_initial_margin** | **str** | | +**total_maintenance_margin** | **str** | | +**total_margin_balance** | **str** | | +**total_open_order_initial_margin** | **str** | | +**total_position_initial_margin** | **str** | | +**total_unrealized_profit** | **str** | | +**total_wallet_balance** | **str** | | +**asset** | **str** | The sum of BUSD and USDT | +**sub_account_list** | [**List[SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner]**](SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner.md) | | + +## Example + +```python +from openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp import SubAccountUSDTFuturesSummaryFutureAccountSummaryResp + +# TODO update the JSON string below +json = "{}" +# create an instance of SubAccountUSDTFuturesSummaryFutureAccountSummaryResp from a JSON string +sub_account_usdt_futures_summary_future_account_summary_resp_instance = SubAccountUSDTFuturesSummaryFutureAccountSummaryResp.from_json(json) +# print the JSON string representation of the object +print(SubAccountUSDTFuturesSummaryFutureAccountSummaryResp.to_json()) + +# convert the object into a dict +sub_account_usdt_futures_summary_future_account_summary_resp_dict = sub_account_usdt_futures_summary_future_account_summary_resp_instance.to_dict() +# create an instance of SubAccountUSDTFuturesSummaryFutureAccountSummaryResp from a dict +sub_account_usdt_futures_summary_future_account_summary_resp_from_dict = SubAccountUSDTFuturesSummaryFutureAccountSummaryResp.from_dict(sub_account_usdt_futures_summary_future_account_summary_resp_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner.md b/target/python/binance_openapi/docs/SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner.md new file mode 100644 index 0000000..dfaba29 --- /dev/null +++ b/target/python/binance_openapi/docs/SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner.md @@ -0,0 +1,37 @@ +# SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**total_initial_margin** | **str** | | +**total_maintenance_margin** | **str** | | +**total_margin_balance** | **str** | | +**total_open_order_initial_margin** | **str** | | +**total_position_initial_margin** | **str** | | +**total_unrealized_profit** | **str** | | +**total_wallet_balance** | **str** | | +**asset** | **str** | The sum of BUSD and USDT | + +## Example + +```python +from openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner import SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner + +# TODO update the JSON string below +json = "{}" +# create an instance of SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner from a JSON string +sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner_instance = SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner.from_json(json) +# print the JSON string representation of the object +print(SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner.to_json()) + +# convert the object into a dict +sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner_dict = sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner_instance.to_dict() +# create an instance of SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner from a dict +sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner_from_dict = SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner.from_dict(sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/Ticker.md b/target/python/binance_openapi/docs/Ticker.md new file mode 100644 index 0000000..8cf40a9 --- /dev/null +++ b/target/python/binance_openapi/docs/Ticker.md @@ -0,0 +1,47 @@ +# Ticker + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | | +**price_change** | **str** | | +**price_change_percent** | **str** | | +**prev_close_price** | **str** | | +**last_price** | **str** | | +**bid_price** | **str** | | +**bid_qty** | **str** | | +**ask_price** | **str** | | +**ask_qty** | **str** | | +**open_price** | **str** | | +**high_price** | **str** | | +**low_price** | **str** | | +**volume** | **str** | | +**quote_volume** | **str** | | +**open_time** | **int** | | +**close_time** | **int** | | +**first_id** | **int** | | +**last_id** | **int** | | +**count** | **int** | | + +## Example + +```python +from openapi_client.models.ticker import Ticker + +# TODO update the JSON string below +json = "{}" +# create an instance of Ticker from a JSON string +ticker_instance = Ticker.from_json(json) +# print the JSON string representation of the object +print(Ticker.to_json()) + +# convert the object into a dict +ticker_dict = ticker_instance.to_dict() +# create an instance of Ticker from a dict +ticker_from_dict = Ticker.from_dict(ticker_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/Trade.md b/target/python/binance_openapi/docs/Trade.md new file mode 100644 index 0000000..1399252 --- /dev/null +++ b/target/python/binance_openapi/docs/Trade.md @@ -0,0 +1,35 @@ +# Trade + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | trade id | +**price** | **str** | price | +**qty** | **str** | amount of base asset | +**quote_qty** | **str** | amount of quote asset | +**time** | **int** | Trade executed timestamp, as same as `T` in the stream | +**is_buyer_maker** | **bool** | | +**is_best_match** | **bool** | | + +## Example + +```python +from openapi_client.models.trade import Trade + +# TODO update the JSON string below +json = "{}" +# create an instance of Trade from a JSON string +trade_instance = Trade.from_json(json) +# print the JSON string representation of the object +print(Trade.to_json()) + +# convert the object into a dict +trade_dict = trade_instance.to_dict() +# create an instance of Trade from a dict +trade_from_dict = Trade.from_dict(trade_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/TradeApi.md b/target/python/binance_openapi/docs/TradeApi.md new file mode 100644 index 0000000..0c9c884 --- /dev/null +++ b/target/python/binance_openapi/docs/TradeApi.md @@ -0,0 +1,2084 @@ +# openapi_client.TradeApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**api_v3_account_commission_get**](TradeApi.md#api_v3_account_commission_get) | **GET** /api/v3/account/commission | Query Commission Rates (USER_DATA) +[**api_v3_account_get**](TradeApi.md#api_v3_account_get) | **GET** /api/v3/account | Account Information (USER_DATA) +[**api_v3_all_order_list_get**](TradeApi.md#api_v3_all_order_list_get) | **GET** /api/v3/allOrderList | Query all OCO (USER_DATA) +[**api_v3_all_orders_get**](TradeApi.md#api_v3_all_orders_get) | **GET** /api/v3/allOrders | All Orders (USER_DATA) +[**api_v3_my_allocations_get**](TradeApi.md#api_v3_my_allocations_get) | **GET** /api/v3/myAllocations | Query Allocations (USER_DATA) +[**api_v3_my_prevented_matches_get**](TradeApi.md#api_v3_my_prevented_matches_get) | **GET** /api/v3/myPreventedMatches | Query Prevented Matches +[**api_v3_my_trades_get**](TradeApi.md#api_v3_my_trades_get) | **GET** /api/v3/myTrades | Account Trade List (USER_DATA) +[**api_v3_open_order_list_get**](TradeApi.md#api_v3_open_order_list_get) | **GET** /api/v3/openOrderList | Query Open OCO (USER_DATA) +[**api_v3_open_orders_delete**](TradeApi.md#api_v3_open_orders_delete) | **DELETE** /api/v3/openOrders | Cancel all Open Orders on a Symbol (TRADE) +[**api_v3_open_orders_get**](TradeApi.md#api_v3_open_orders_get) | **GET** /api/v3/openOrders | Current Open Orders (USER_DATA) +[**api_v3_order_cancel_replace_post**](TradeApi.md#api_v3_order_cancel_replace_post) | **POST** /api/v3/order/cancelReplace | Cancel an Existing Order and Send a New Order (Trade) +[**api_v3_order_delete**](TradeApi.md#api_v3_order_delete) | **DELETE** /api/v3/order | Cancel Order (TRADE) +[**api_v3_order_get**](TradeApi.md#api_v3_order_get) | **GET** /api/v3/order | Query Order (USER_DATA) +[**api_v3_order_list_delete**](TradeApi.md#api_v3_order_list_delete) | **DELETE** /api/v3/orderList | Cancel OCO (TRADE) +[**api_v3_order_list_get**](TradeApi.md#api_v3_order_list_get) | **GET** /api/v3/orderList | Query OCO (USER_DATA) +[**api_v3_order_oco_post**](TradeApi.md#api_v3_order_oco_post) | **POST** /api/v3/order/oco | New OCO (TRADE) +[**api_v3_order_post**](TradeApi.md#api_v3_order_post) | **POST** /api/v3/order | New Order (TRADE) +[**api_v3_order_test_post**](TradeApi.md#api_v3_order_test_post) | **POST** /api/v3/order/test | Test New Order (TRADE) +[**api_v3_rate_limit_order_get**](TradeApi.md#api_v3_rate_limit_order_get) | **GET** /api/v3/rateLimit/order | Query Current Order Count Usage (TRADE) +[**api_v3_sor_order_post**](TradeApi.md#api_v3_sor_order_post) | **POST** /api/v3/sor/order | New order using SOR (TRADE) +[**api_v3_sor_order_test_post**](TradeApi.md#api_v3_sor_order_test_post) | **POST** /api/v3/sor/order/test | Test new order using SOR (TRADE) + + +# **api_v3_account_commission_get** +> ApiV3AccountCommissionGet200Response api_v3_account_commission_get(symbol, timestamp, signature) + +Query Commission Rates (USER_DATA) + +Get current account commission rates. Weight: 20 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_account_commission_get200_response import ApiV3AccountCommissionGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + + try: + # Query Commission Rates (USER_DATA) + api_response = api_instance.api_v3_account_commission_get(symbol, timestamp, signature) + print("The response of TradeApi->api_v3_account_commission_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_account_commission_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + +### Return type + +[**ApiV3AccountCommissionGet200Response**](ApiV3AccountCommissionGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current account commission rates. | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_account_get** +> Account api_v3_account_get(timestamp, signature, recv_window=recv_window) + +Account Information (USER_DATA) + +Get current account information. Weight(IP): 20 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.account import Account +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Account Information (USER_DATA) + api_response = api_instance.api_v3_account_get(timestamp, signature, recv_window=recv_window) + print("The response of TradeApi->api_v3_account_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_account_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**Account**](Account.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Account details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_all_order_list_get** +> List[ApiV3AllOrderListGet200ResponseInner] api_v3_all_order_list_get(timestamp, signature, from_id=from_id, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + +Query all OCO (USER_DATA) + +Retrieves all OCO based on provided optional parameters Weight(IP): 20 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_all_order_list_get200_response_inner import ApiV3AllOrderListGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + from_id = 56 # int | Trade id to fetch from. Default gets most recent trades. (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query all OCO (USER_DATA) + api_response = api_instance.api_v3_all_order_list_get(timestamp, signature, from_id=from_id, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + print("The response of TradeApi->api_v3_all_order_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_all_order_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **from_id** | **int**| Trade id to fetch from. Default gets most recent trades. | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[ApiV3AllOrderListGet200ResponseInner]**](ApiV3AllOrderListGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of OCO orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_all_orders_get** +> List[OrderDetails] api_v3_all_orders_get(symbol, timestamp, signature, order_id=order_id, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + +All Orders (USER_DATA) + +Get all account orders; active, canceled, or filled.. - If `orderId` is set, it will get orders >= that `orderId`. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. - If `startTime` and/or `endTime` provided, `orderId` is not required Weight(IP): 20 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.order_details import OrderDetails +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = 56 # int | Order id (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # All Orders (USER_DATA) + api_response = api_instance.api_v3_all_orders_get(symbol, timestamp, signature, order_id=order_id, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + print("The response of TradeApi->api_v3_all_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_all_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **int**| Order id | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[OrderDetails]**](OrderDetails.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current open orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_my_allocations_get** +> List[ApiV3MyAllocationsGet200ResponseInner] api_v3_my_allocations_get(symbol, timestamp, signature, start_time=start_time, end_time=end_time, from_allocation_id=from_allocation_id, limit=limit, order_id=order_id, recv_window=recv_window) + +Query Allocations (USER_DATA) + +Retrieves allocations resulting from SOR order placement. Weight: 20 Supported parameter combinations: Parameters Response symbol allocations from oldest to newest symbol + startTime oldest allocations since startTime symbol + endTime newest allocations until endTime symbol + startTime + endTime allocations within the time range symbol + fromAllocationId allocations by allocation ID symbol + orderId allocations related to an order starting with oldest symbol + orderId + fromAllocationId allocations related to an order by allocation ID Note: The time between startTime and endTime can't be longer than 24 hours. + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_my_allocations_get200_response_inner import ApiV3MyAllocationsGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + from_allocation_id = 56 # int | (optional) + limit = 5 # int | Default 500; max 1000. (optional) + order_id = 56 # int | Order id (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Allocations (USER_DATA) + api_response = api_instance.api_v3_my_allocations_get(symbol, timestamp, signature, start_time=start_time, end_time=end_time, from_allocation_id=from_allocation_id, limit=limit, order_id=order_id, recv_window=recv_window) + print("The response of TradeApi->api_v3_my_allocations_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_my_allocations_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **from_allocation_id** | **int**| | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **order_id** | **int**| Order id | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[ApiV3MyAllocationsGet200ResponseInner]**](ApiV3MyAllocationsGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Allocations resulting from SOR order placement | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_my_prevented_matches_get** +> List[ApiV3MyPreventedMatchesGet200ResponseInner] api_v3_my_prevented_matches_get(symbol, timestamp, signature, prevented_match_id=prevented_match_id, order_id=order_id, from_prevented_match_id=from_prevented_match_id, limit=limit, recv_window=recv_window) + +Query Prevented Matches + +Displays the list of orders that were expired because of STP. For additional information on what a Prevented match is, as well as Self Trade Prevention (STP), please refer to our STP FAQ page. These are the combinations supported: * symbol + preventedMatchId * symbol + orderId * symbol + orderId + fromPreventedMatchId (limit will default to 500) * symbol + orderId + fromPreventedMatchId + limit Weight(IP): Case Weight If symbol is invalid: 2 Querying by preventedMatchId: 2 Querying by orderId: 20 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_my_prevented_matches_get200_response_inner import ApiV3MyPreventedMatchesGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + prevented_match_id = 1 # int | (optional) + order_id = 56 # int | Order id (optional) + from_prevented_match_id = 1 # int | (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Prevented Matches + api_response = api_instance.api_v3_my_prevented_matches_get(symbol, timestamp, signature, prevented_match_id=prevented_match_id, order_id=order_id, from_prevented_match_id=from_prevented_match_id, limit=limit, recv_window=recv_window) + print("The response of TradeApi->api_v3_my_prevented_matches_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_my_prevented_matches_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **prevented_match_id** | **int**| | [optional] + **order_id** | **int**| Order id | [optional] + **from_prevented_match_id** | **int**| | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[ApiV3MyPreventedMatchesGet200ResponseInner]**](ApiV3MyPreventedMatchesGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order list that were expired due to STP | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_my_trades_get** +> List[MyTrade] api_v3_my_trades_get(symbol, timestamp, signature, order_id=order_id, start_time=start_time, end_time=end_time, from_id=from_id, limit=limit, recv_window=recv_window) + +Account Trade List (USER_DATA) + +Get trades for a specific account and symbol. If `fromId` is set, it will get id >= that `fromId`. Otherwise most recent orders are returned. The time between startTime and endTime can't be longer than 24 hours. These are the supported combinations of all parameters: symbol symbol + orderId symbol + startTime symbol + endTime symbol + fromId symbol + startTime + endTime symbol+ orderId + fromId Weight(IP): 20 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.my_trade import MyTrade +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = 56 # int | This can only be used in combination with symbol. (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + from_id = 56 # int | Trade id to fetch from. Default gets most recent trades. (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Account Trade List (USER_DATA) + api_response = api_instance.api_v3_my_trades_get(symbol, timestamp, signature, order_id=order_id, start_time=start_time, end_time=end_time, from_id=from_id, limit=limit, recv_window=recv_window) + print("The response of TradeApi->api_v3_my_trades_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_my_trades_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **int**| This can only be used in combination with symbol. | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **from_id** | **int**| Trade id to fetch from. Default gets most recent trades. | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[MyTrade]**](MyTrade.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of trades | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_open_order_list_get** +> List[ApiV3OpenOrderListGet200ResponseInner] api_v3_open_order_list_get(timestamp, signature, recv_window=recv_window) + +Query Open OCO (USER_DATA) + +Weight(IP): 6 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_open_order_list_get200_response_inner import ApiV3OpenOrderListGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Open OCO (USER_DATA) + api_response = api_instance.api_v3_open_order_list_get(timestamp, signature, recv_window=recv_window) + print("The response of TradeApi->api_v3_open_order_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_open_order_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[ApiV3OpenOrderListGet200ResponseInner]**](ApiV3OpenOrderListGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of OCO orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_open_orders_delete** +> List[ApiV3OpenOrdersDelete200ResponseInner] api_v3_open_orders_delete(symbol, timestamp, signature, recv_window=recv_window) + +Cancel all Open Orders on a Symbol (TRADE) + +Cancels all active orders on a symbol. This includes OCO orders. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_open_orders_delete200_response_inner import ApiV3OpenOrdersDelete200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Cancel all Open Orders on a Symbol (TRADE) + api_response = api_instance.api_v3_open_orders_delete(symbol, timestamp, signature, recv_window=recv_window) + print("The response of TradeApi->api_v3_open_orders_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_open_orders_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[ApiV3OpenOrdersDelete200ResponseInner]**](ApiV3OpenOrdersDelete200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cancelled orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_open_orders_get** +> List[OrderDetails] api_v3_open_orders_get(timestamp, signature, symbol=symbol, recv_window=recv_window) + +Current Open Orders (USER_DATA) + +Get all open orders on a symbol. Careful when accessing this with no symbol. Weight(IP): - `6` for a single symbol; - `80` when the symbol parameter is omitted; + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.order_details import OrderDetails +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Current Open Orders (USER_DATA) + api_response = api_instance.api_v3_open_orders_get(timestamp, signature, symbol=symbol, recv_window=recv_window) + print("The response of TradeApi->api_v3_open_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_open_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[OrderDetails]**](OrderDetails.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current open orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_order_cancel_replace_post** +> ApiV3OrderCancelReplacePost200Response api_v3_order_cancel_replace_post(symbol, side, type, cancel_replace_mode, timestamp, signature, cancel_restrictions=cancel_restrictions, time_in_force=time_in_force, quantity=quantity, quote_order_qty=quote_order_qty, price=price, cancel_new_client_order_id=cancel_new_client_order_id, cancel_orig_client_order_id=cancel_orig_client_order_id, cancel_order_id=cancel_order_id, new_client_order_id=new_client_order_id, strategy_id=strategy_id, strategy_type=strategy_type, stop_price=stop_price, trailing_delta=trailing_delta, iceberg_qty=iceberg_qty, new_order_resp_type=new_order_resp_type, self_trade_prevention_mode=self_trade_prevention_mode, recv_window=recv_window) + +Cancel an Existing Order and Send a New Order (Trade) + +Cancels an existing order and places a new order on the same symbol. Filters and Order Count are evaluated before the processing of the cancellation and order placement occurs. A new order that was not attempted (i.e. when newOrderResult: NOT_ATTEMPTED), will still increase the order count by 1. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_order_cancel_replace_post200_response import ApiV3OrderCancelReplacePost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + side = 'SELL' # str | + type = 'LIMIT' # str | Order type + cancel_replace_mode = 'STOP_ON_FAILURE' # str | - `STOP_ON_FAILURE` If the cancel request fails, the new order placement will not be attempted. - `ALLOW_FAILURES` If new order placement will be attempted even if cancel request fails. + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + cancel_restrictions = 'ONLY_NEW' # str | (optional) + time_in_force = 'GTC' # str | Order time in force (optional) + quantity = 1 # float | Order quantity (optional) + quote_order_qty = 3.4 # float | Quote quantity (optional) + price = 219.0 # float | Order price (optional) + cancel_new_client_order_id = 'cancel_new_client_order_id_example' # str | Used to uniquely identify this cancel. Automatically generated by default (optional) + cancel_orig_client_order_id = 'cancel_orig_client_order_id_example' # str | Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. (optional) + cancel_order_id = 12 # int | Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. (optional) + new_client_order_id = 'new_client_order_id_example' # str | Used to uniquely identify this cancel. Automatically generated by default (optional) + strategy_id = 56 # int | (optional) + strategy_type = 56 # int | The value cannot be less than 1000000. (optional) + stop_price = 221.01 # float | Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. (optional) + trailing_delta = 3.4 # float | Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. (optional) + iceberg_qty = 3.4 # float | Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. (optional) + new_order_resp_type = 'new_order_resp_type_example' # str | Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. (optional) + self_trade_prevention_mode = 'EXPIRE_TAKER' # str | The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Cancel an Existing Order and Send a New Order (Trade) + api_response = api_instance.api_v3_order_cancel_replace_post(symbol, side, type, cancel_replace_mode, timestamp, signature, cancel_restrictions=cancel_restrictions, time_in_force=time_in_force, quantity=quantity, quote_order_qty=quote_order_qty, price=price, cancel_new_client_order_id=cancel_new_client_order_id, cancel_orig_client_order_id=cancel_orig_client_order_id, cancel_order_id=cancel_order_id, new_client_order_id=new_client_order_id, strategy_id=strategy_id, strategy_type=strategy_type, stop_price=stop_price, trailing_delta=trailing_delta, iceberg_qty=iceberg_qty, new_order_resp_type=new_order_resp_type, self_trade_prevention_mode=self_trade_prevention_mode, recv_window=recv_window) + print("The response of TradeApi->api_v3_order_cancel_replace_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_order_cancel_replace_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **side** | **str**| | + **type** | **str**| Order type | + **cancel_replace_mode** | **str**| - `STOP_ON_FAILURE` If the cancel request fails, the new order placement will not be attempted. - `ALLOW_FAILURES` If new order placement will be attempted even if cancel request fails. | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **cancel_restrictions** | **str**| | [optional] + **time_in_force** | **str**| Order time in force | [optional] + **quantity** | **float**| Order quantity | [optional] + **quote_order_qty** | **float**| Quote quantity | [optional] + **price** | **float**| Order price | [optional] + **cancel_new_client_order_id** | **str**| Used to uniquely identify this cancel. Automatically generated by default | [optional] + **cancel_orig_client_order_id** | **str**| Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. | [optional] + **cancel_order_id** | **int**| Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. | [optional] + **new_client_order_id** | **str**| Used to uniquely identify this cancel. Automatically generated by default | [optional] + **strategy_id** | **int**| | [optional] + **strategy_type** | **int**| The value cannot be less than 1000000. | [optional] + **stop_price** | **float**| Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. | [optional] + **trailing_delta** | **float**| Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. | [optional] + **iceberg_qty** | **float**| Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. | [optional] + **new_order_resp_type** | **str**| Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. | [optional] + **self_trade_prevention_mode** | **str**| The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**ApiV3OrderCancelReplacePost200Response**](ApiV3OrderCancelReplacePost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Operation details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_order_delete** +> Order api_v3_order_delete(symbol, timestamp, signature, order_id=order_id, orig_client_order_id=orig_client_order_id, new_client_order_id=new_client_order_id, cancel_restrictions=cancel_restrictions, recv_window=recv_window) + +Cancel Order (TRADE) + +Cancel an active order. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.order import Order +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = 56 # int | Order id (optional) + orig_client_order_id = 'orig_client_order_id_example' # str | Order id from client (optional) + new_client_order_id = 'new_client_order_id_example' # str | Used to uniquely identify this cancel. Automatically generated by default (optional) + cancel_restrictions = 'ONLY_NEW' # str | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Cancel Order (TRADE) + api_response = api_instance.api_v3_order_delete(symbol, timestamp, signature, order_id=order_id, orig_client_order_id=orig_client_order_id, new_client_order_id=new_client_order_id, cancel_restrictions=cancel_restrictions, recv_window=recv_window) + print("The response of TradeApi->api_v3_order_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_order_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **int**| Order id | [optional] + **orig_client_order_id** | **str**| Order id from client | [optional] + **new_client_order_id** | **str**| Used to uniquely identify this cancel. Automatically generated by default | [optional] + **cancel_restrictions** | **str**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**Order**](Order.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cancelled order | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_order_get** +> OrderDetails api_v3_order_get(symbol, timestamp, signature, order_id=order_id, orig_client_order_id=orig_client_order_id, recv_window=recv_window) + +Query Order (USER_DATA) + +Check an order's status. - Either `orderId` or `origClientOrderId` must be sent. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 4 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.order_details import OrderDetails +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = 56 # int | Order id (optional) + orig_client_order_id = 'orig_client_order_id_example' # str | Order id from client (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Order (USER_DATA) + api_response = api_instance.api_v3_order_get(symbol, timestamp, signature, order_id=order_id, orig_client_order_id=orig_client_order_id, recv_window=recv_window) + print("The response of TradeApi->api_v3_order_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_order_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **int**| Order id | [optional] + **orig_client_order_id** | **str**| Order id from client | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**OrderDetails**](OrderDetails.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_order_list_delete** +> OcoOrder api_v3_order_list_delete(symbol, timestamp, signature, order_list_id=order_list_id, list_client_order_id=list_client_order_id, new_client_order_id=new_client_order_id, recv_window=recv_window) + +Cancel OCO (TRADE) + +Cancel an entire Order List Canceling an individual leg will cancel the entire OCO Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.oco_order import OcoOrder +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_list_id = 56 # int | Order list id (optional) + list_client_order_id = 'list_client_order_id_example' # str | A unique Id for the entire orderList (optional) + new_client_order_id = 'new_client_order_id_example' # str | Used to uniquely identify this cancel. Automatically generated by default (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Cancel OCO (TRADE) + api_response = api_instance.api_v3_order_list_delete(symbol, timestamp, signature, order_list_id=order_list_id, list_client_order_id=list_client_order_id, new_client_order_id=new_client_order_id, recv_window=recv_window) + print("The response of TradeApi->api_v3_order_list_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_order_list_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_list_id** | **int**| Order list id | [optional] + **list_client_order_id** | **str**| A unique Id for the entire orderList | [optional] + **new_client_order_id** | **str**| Used to uniquely identify this cancel. Automatically generated by default | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**OcoOrder**](OcoOrder.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Report on deleted OCO | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_order_list_get** +> ApiV3OrderListGet200Response api_v3_order_list_get(timestamp, signature, order_list_id=order_list_id, orig_client_order_id=orig_client_order_id, recv_window=recv_window) + +Query OCO (USER_DATA) + +Retrieves a specific OCO based on provided optional parameters Weight(IP): 4 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_order_list_get200_response import ApiV3OrderListGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_list_id = 56 # int | Order list id (optional) + orig_client_order_id = 'orig_client_order_id_example' # str | Order id from client (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query OCO (USER_DATA) + api_response = api_instance.api_v3_order_list_get(timestamp, signature, order_list_id=order_list_id, orig_client_order_id=orig_client_order_id, recv_window=recv_window) + print("The response of TradeApi->api_v3_order_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_order_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_list_id** | **int**| Order list id | [optional] + **orig_client_order_id** | **str**| Order id from client | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**ApiV3OrderListGet200Response**](ApiV3OrderListGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OCO details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_order_oco_post** +> ApiV3OrderOcoPost200Response api_v3_order_oco_post(symbol, side, quantity, price, stop_price, timestamp, signature, list_client_order_id=list_client_order_id, limit_client_order_id=limit_client_order_id, limit_strategy_id=limit_strategy_id, limit_strategy_type=limit_strategy_type, limit_iceberg_qty=limit_iceberg_qty, trailing_delta=trailing_delta, stop_client_order_id=stop_client_order_id, stop_strategy_id=stop_strategy_id, stop_strategy_type=stop_strategy_type, stop_limit_price=stop_limit_price, stop_iceberg_qty=stop_iceberg_qty, stop_limit_time_in_force=stop_limit_time_in_force, new_order_resp_type=new_order_resp_type, self_trade_prevention_mode=self_trade_prevention_mode, recv_window=recv_window) + +New OCO (TRADE) + +Send in a new OCO - Price Restrictions: - `SELL`: Limit Price > Last Price > Stop Price - `BUY`: Limit Price < Last Price < Stop Price - Quantity Restrictions: - Both legs must have the same quantity - `ICEBERG` quantities however do not have to be the same - Order Rate Limit - `OCO` counts as 2 orders against the order rate limit. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_order_oco_post200_response import ApiV3OrderOcoPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + side = 'SELL' # str | + quantity = 1.0 # float | + price = 218.0 # float | Order price + stop_price = 220.0 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + list_client_order_id = 'list_client_order_id_example' # str | A unique Id for the entire orderList (optional) + limit_client_order_id = 'limit_client_order_id_example' # str | A unique Id for the limit order (optional) + limit_strategy_id = 56 # int | (optional) + limit_strategy_type = 56 # int | The value cannot be less than 1000000. (optional) + limit_iceberg_qty = 3.4 # float | (optional) + trailing_delta = 3.4 # float | (optional) + stop_client_order_id = 'stop_client_order_id_example' # str | A unique Id for the stop loss/stop loss limit leg (optional) + stop_strategy_id = 56 # int | (optional) + stop_strategy_type = 56 # int | (optional) + stop_limit_price = 3.4 # float | If provided, stopLimitTimeInForce is required. (optional) + stop_iceberg_qty = 3.4 # float | (optional) + stop_limit_time_in_force = 'stop_limit_time_in_force_example' # str | (optional) + new_order_resp_type = 'new_order_resp_type_example' # str | Set the response JSON. (optional) + self_trade_prevention_mode = 'EXPIRE_TAKER' # str | The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # New OCO (TRADE) + api_response = api_instance.api_v3_order_oco_post(symbol, side, quantity, price, stop_price, timestamp, signature, list_client_order_id=list_client_order_id, limit_client_order_id=limit_client_order_id, limit_strategy_id=limit_strategy_id, limit_strategy_type=limit_strategy_type, limit_iceberg_qty=limit_iceberg_qty, trailing_delta=trailing_delta, stop_client_order_id=stop_client_order_id, stop_strategy_id=stop_strategy_id, stop_strategy_type=stop_strategy_type, stop_limit_price=stop_limit_price, stop_iceberg_qty=stop_iceberg_qty, stop_limit_time_in_force=stop_limit_time_in_force, new_order_resp_type=new_order_resp_type, self_trade_prevention_mode=self_trade_prevention_mode, recv_window=recv_window) + print("The response of TradeApi->api_v3_order_oco_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_order_oco_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **side** | **str**| | + **quantity** | **float**| | + **price** | **float**| Order price | + **stop_price** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **list_client_order_id** | **str**| A unique Id for the entire orderList | [optional] + **limit_client_order_id** | **str**| A unique Id for the limit order | [optional] + **limit_strategy_id** | **int**| | [optional] + **limit_strategy_type** | **int**| The value cannot be less than 1000000. | [optional] + **limit_iceberg_qty** | **float**| | [optional] + **trailing_delta** | **float**| | [optional] + **stop_client_order_id** | **str**| A unique Id for the stop loss/stop loss limit leg | [optional] + **stop_strategy_id** | **int**| | [optional] + **stop_strategy_type** | **int**| | [optional] + **stop_limit_price** | **float**| If provided, stopLimitTimeInForce is required. | [optional] + **stop_iceberg_qty** | **float**| | [optional] + **stop_limit_time_in_force** | **str**| | [optional] + **new_order_resp_type** | **str**| Set the response JSON. | [optional] + **self_trade_prevention_mode** | **str**| The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**ApiV3OrderOcoPost200Response**](ApiV3OrderOcoPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | New OCO details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_order_post** +> ApiV3OrderPost200Response api_v3_order_post(symbol, side, type, timestamp, signature, time_in_force=time_in_force, quantity=quantity, quote_order_qty=quote_order_qty, price=price, new_client_order_id=new_client_order_id, strategy_id=strategy_id, strategy_type=strategy_type, stop_price=stop_price, trailing_delta=trailing_delta, iceberg_qty=iceberg_qty, new_order_resp_type=new_order_resp_type, self_trade_prevention_mode=self_trade_prevention_mode, recv_window=recv_window) + +New Order (TRADE) + +Send in a new order. - `LIMIT_MAKER` are `LIMIT` orders that will be rejected if they would immediately match and trade as a taker. - `STOP_LOSS` and `TAKE_PROFIT` will execute a `MARKET` order when the `stopPrice` is reached. - Any `LIMIT` or `LIMIT_MAKER` type order can be made an iceberg order by sending an `icebergQty`. - Any order with an `icebergQty` MUST have `timeInForce` set to `GTC`. - `MARKET` orders using `quantity` specifies how much a user wants to buy or sell based on the market price. - `MARKET` orders using `quoteOrderQty` specifies the amount the user wants to spend (when buying) or receive (when selling) of the quote asset; the correct quantity will be determined based on the market liquidity and `quoteOrderQty`. - `MARKET` orders using `quoteOrderQty` will not break `LOT_SIZE` filter rules; the order will execute a quantity that will have the notional value as close as possible to `quoteOrderQty`. - same `newClientOrderId` can be accepted only when the previous one is filled, otherwise the order will be rejected. Trigger order price rules against market price for both `MARKET` and `LIMIT` versions: - Price above market price: `STOP_LOSS` `BUY`, `TAKE_PROFIT` `SELL` - Price below market price: `STOP_LOSS` `SELL`, `TAKE_PROFIT` `BUY` Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_order_post200_response import ApiV3OrderPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + side = 'SELL' # str | + type = 'LIMIT' # str | Order type + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + time_in_force = 'GTC' # str | Order time in force (optional) + quantity = 1 # float | Order quantity (optional) + quote_order_qty = 3.4 # float | Quote quantity (optional) + price = 219.0 # float | Order price (optional) + new_client_order_id = 'new_client_order_id_example' # str | Used to uniquely identify this cancel. Automatically generated by default (optional) + strategy_id = 56 # int | (optional) + strategy_type = 56 # int | The value cannot be less than 1000000. (optional) + stop_price = 221.01 # float | Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. (optional) + trailing_delta = 3.4 # float | Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. (optional) + iceberg_qty = 3.4 # float | Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. (optional) + new_order_resp_type = 'new_order_resp_type_example' # str | Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. (optional) + self_trade_prevention_mode = 'EXPIRE_TAKER' # str | The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # New Order (TRADE) + api_response = api_instance.api_v3_order_post(symbol, side, type, timestamp, signature, time_in_force=time_in_force, quantity=quantity, quote_order_qty=quote_order_qty, price=price, new_client_order_id=new_client_order_id, strategy_id=strategy_id, strategy_type=strategy_type, stop_price=stop_price, trailing_delta=trailing_delta, iceberg_qty=iceberg_qty, new_order_resp_type=new_order_resp_type, self_trade_prevention_mode=self_trade_prevention_mode, recv_window=recv_window) + print("The response of TradeApi->api_v3_order_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_order_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **side** | **str**| | + **type** | **str**| Order type | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **time_in_force** | **str**| Order time in force | [optional] + **quantity** | **float**| Order quantity | [optional] + **quote_order_qty** | **float**| Quote quantity | [optional] + **price** | **float**| Order price | [optional] + **new_client_order_id** | **str**| Used to uniquely identify this cancel. Automatically generated by default | [optional] + **strategy_id** | **int**| | [optional] + **strategy_type** | **int**| The value cannot be less than 1000000. | [optional] + **stop_price** | **float**| Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. | [optional] + **trailing_delta** | **float**| Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. | [optional] + **iceberg_qty** | **float**| Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. | [optional] + **new_order_resp_type** | **str**| Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. | [optional] + **self_trade_prevention_mode** | **str**| The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**ApiV3OrderPost200Response**](ApiV3OrderPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_order_test_post** +> object api_v3_order_test_post(symbol, side, type, timestamp, signature, time_in_force=time_in_force, quantity=quantity, quote_order_qty=quote_order_qty, price=price, new_client_order_id=new_client_order_id, strategy_id=strategy_id, strategy_type=strategy_type, stop_price=stop_price, trailing_delta=trailing_delta, iceberg_qty=iceberg_qty, new_order_resp_type=new_order_resp_type, recv_window=recv_window, compute_commission_rates=compute_commission_rates) + +Test New Order (TRADE) + +Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine. Weight(IP): - Without computeCommissionRates: `1` - With computeCommissionRates: `20` + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + side = 'SELL' # str | + type = 'LIMIT' # str | Order type + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + time_in_force = 'GTC' # str | Order time in force (optional) + quantity = 1 # float | Order quantity (optional) + quote_order_qty = 3.4 # float | Quote quantity (optional) + price = 219.0 # float | Order price (optional) + new_client_order_id = 'new_client_order_id_example' # str | Used to uniquely identify this cancel. Automatically generated by default (optional) + strategy_id = 56 # int | (optional) + strategy_type = 56 # int | The value cannot be less than 1000000. (optional) + stop_price = 221.01 # float | Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. (optional) + trailing_delta = 3.4 # float | Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. (optional) + iceberg_qty = 3.4 # float | Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. (optional) + new_order_resp_type = 'new_order_resp_type_example' # str | Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + compute_commission_rates = false # bool | Default: false (optional) + + try: + # Test New Order (TRADE) + api_response = api_instance.api_v3_order_test_post(symbol, side, type, timestamp, signature, time_in_force=time_in_force, quantity=quantity, quote_order_qty=quote_order_qty, price=price, new_client_order_id=new_client_order_id, strategy_id=strategy_id, strategy_type=strategy_type, stop_price=stop_price, trailing_delta=trailing_delta, iceberg_qty=iceberg_qty, new_order_resp_type=new_order_resp_type, recv_window=recv_window, compute_commission_rates=compute_commission_rates) + print("The response of TradeApi->api_v3_order_test_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_order_test_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **side** | **str**| | + **type** | **str**| Order type | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **time_in_force** | **str**| Order time in force | [optional] + **quantity** | **float**| Order quantity | [optional] + **quote_order_qty** | **float**| Quote quantity | [optional] + **price** | **float**| Order price | [optional] + **new_client_order_id** | **str**| Used to uniquely identify this cancel. Automatically generated by default | [optional] + **strategy_id** | **int**| | [optional] + **strategy_type** | **int**| The value cannot be less than 1000000. | [optional] + **stop_price** | **float**| Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. | [optional] + **trailing_delta** | **float**| Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. | [optional] + **iceberg_qty** | **float**| Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. | [optional] + **new_order_resp_type** | **str**| Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + **compute_commission_rates** | **bool**| Default: false | [optional] + +### Return type + +**object** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_rate_limit_order_get** +> List[ApiV3RateLimitOrderGet200ResponseInner] api_v3_rate_limit_order_get(timestamp, signature, recv_window=recv_window) + +Query Current Order Count Usage (TRADE) + +Displays the user's current order count usage for all intervals. Weight(IP): 40 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_rate_limit_order_get200_response_inner import ApiV3RateLimitOrderGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Current Order Count Usage (TRADE) + api_response = api_instance.api_v3_rate_limit_order_get(timestamp, signature, recv_window=recv_window) + print("The response of TradeApi->api_v3_rate_limit_order_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_rate_limit_order_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[ApiV3RateLimitOrderGet200ResponseInner]**](ApiV3RateLimitOrderGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Order rate limits | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_sor_order_post** +> ApiV3SorOrderPost200Response api_v3_sor_order_post(symbol, side, type, quantity, timestamp, signature, time_in_force=time_in_force, price=price, new_client_order_id=new_client_order_id, strategy_id=strategy_id, strategy_type=strategy_type, iceberg_qty=iceberg_qty, new_order_resp_type=new_order_resp_type, self_trade_prevention_mode=self_trade_prevention_mode, recv_window=recv_window) + +New order using SOR (TRADE) + +Weight(IP): 6 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.api_v3_sor_order_post200_response import ApiV3SorOrderPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + side = 'SELL' # str | + type = 'LIMIT' # str | Order type + quantity = 1.0 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + time_in_force = 'GTC' # str | Order time in force (optional) + price = 3.4 # float | (optional) + new_client_order_id = 'new_client_order_id_example' # str | Used to uniquely identify this cancel. Automatically generated by default (optional) + strategy_id = 56 # int | (optional) + strategy_type = 56 # int | The value cannot be less than 1000000. (optional) + iceberg_qty = 3.4 # float | Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. (optional) + new_order_resp_type = 'new_order_resp_type_example' # str | Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. (optional) + self_trade_prevention_mode = 'EXPIRE_TAKER' # str | The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # New order using SOR (TRADE) + api_response = api_instance.api_v3_sor_order_post(symbol, side, type, quantity, timestamp, signature, time_in_force=time_in_force, price=price, new_client_order_id=new_client_order_id, strategy_id=strategy_id, strategy_type=strategy_type, iceberg_qty=iceberg_qty, new_order_resp_type=new_order_resp_type, self_trade_prevention_mode=self_trade_prevention_mode, recv_window=recv_window) + print("The response of TradeApi->api_v3_sor_order_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_sor_order_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **side** | **str**| | + **type** | **str**| Order type | + **quantity** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **time_in_force** | **str**| Order time in force | [optional] + **price** | **float**| | [optional] + **new_client_order_id** | **str**| Used to uniquely identify this cancel. Automatically generated by default | [optional] + **strategy_id** | **int**| | [optional] + **strategy_type** | **int**| The value cannot be less than 1000000. | [optional] + **iceberg_qty** | **float**| Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. | [optional] + **new_order_resp_type** | **str**| Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. | [optional] + **self_trade_prevention_mode** | **str**| The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**ApiV3SorOrderPost200Response**](ApiV3SorOrderPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | New order details | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **api_v3_sor_order_test_post** +> object api_v3_sor_order_test_post(symbol, side, type, quantity, timestamp, signature, time_in_force=time_in_force, price=price, new_client_order_id=new_client_order_id, strategy_id=strategy_id, strategy_type=strategy_type, iceberg_qty=iceberg_qty, new_order_resp_type=new_order_resp_type, self_trade_prevention_mode=self_trade_prevention_mode, compute_commission_rates=compute_commission_rates, recv_window=recv_window) + +Test new order using SOR (TRADE) + +Test new order creation and signature/recvWindow using smart order routing (SOR). Creates and validates a new order but does not send it into the matching engine. Weight(IP): - Without computeCommissionRates: `1` - With computeCommissionRates: `20` + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.TradeApi(api_client) + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT + side = 'SELL' # str | + type = 'LIMIT' # str | Order type + quantity = 1.0 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + time_in_force = 'GTC' # str | Order time in force (optional) + price = 3.4 # float | (optional) + new_client_order_id = 'new_client_order_id_example' # str | Used to uniquely identify this cancel. Automatically generated by default (optional) + strategy_id = 56 # int | (optional) + strategy_type = 56 # int | The value cannot be less than 1000000. (optional) + iceberg_qty = 3.4 # float | Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. (optional) + new_order_resp_type = 'new_order_resp_type_example' # str | Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. (optional) + self_trade_prevention_mode = 'EXPIRE_TAKER' # str | The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. (optional) + compute_commission_rates = false # bool | Default: false (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Test new order using SOR (TRADE) + api_response = api_instance.api_v3_sor_order_test_post(symbol, side, type, quantity, timestamp, signature, time_in_force=time_in_force, price=price, new_client_order_id=new_client_order_id, strategy_id=strategy_id, strategy_type=strategy_type, iceberg_qty=iceberg_qty, new_order_resp_type=new_order_resp_type, self_trade_prevention_mode=self_trade_prevention_mode, compute_commission_rates=compute_commission_rates, recv_window=recv_window) + print("The response of TradeApi->api_v3_sor_order_test_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TradeApi->api_v3_sor_order_test_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | + **side** | **str**| | + **type** | **str**| Order type | + **quantity** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **time_in_force** | **str**| Order time in force | [optional] + **price** | **float**| | [optional] + **new_client_order_id** | **str**| Used to uniquely identify this cancel. Automatically generated by default | [optional] + **strategy_id** | **int**| | [optional] + **strategy_type** | **int**| The value cannot be less than 1000000. | [optional] + **iceberg_qty** | **float**| Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. | [optional] + **new_order_resp_type** | **str**| Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. | [optional] + **self_trade_prevention_mode** | **str**| The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. | [optional] + **compute_commission_rates** | **bool**| Default: false | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +**object** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Test new order | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/Transaction.md b/target/python/binance_openapi/docs/Transaction.md new file mode 100644 index 0000000..9a96ab3 --- /dev/null +++ b/target/python/binance_openapi/docs/Transaction.md @@ -0,0 +1,29 @@ +# Transaction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tran_id** | **int** | transaction id | + +## Example + +```python +from openapi_client.models.transaction import Transaction + +# TODO update the JSON string below +json = "{}" +# create an instance of Transaction from a JSON string +transaction_instance = Transaction.from_json(json) +# print the JSON string representation of the object +print(Transaction.to_json()) + +# convert the object into a dict +transaction_dict = transaction_instance.to_dict() +# create an instance of Transaction from a dict +transaction_from_dict = Transaction.from_dict(transaction_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/target/python/binance_openapi/docs/VIPLoansApi.md b/target/python/binance_openapi/docs/VIPLoansApi.md new file mode 100644 index 0000000..eadc21b --- /dev/null +++ b/target/python/binance_openapi/docs/VIPLoansApi.md @@ -0,0 +1,930 @@ +# openapi_client.VIPLoansApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_loan_vip_borrow_post**](VIPLoansApi.md#sapi_v1_loan_vip_borrow_post) | **POST** /sapi/v1/loan/vip/borrow | VIP Loan Borrow +[**sapi_v1_loan_vip_collateral_account_get**](VIPLoansApi.md#sapi_v1_loan_vip_collateral_account_get) | **GET** /sapi/v1/loan/vip/collateral/account | Check Locked Value of VIP Collateral Account (USER_DATA) +[**sapi_v1_loan_vip_collateral_data_get**](VIPLoansApi.md#sapi_v1_loan_vip_collateral_data_get) | **GET** /sapi/v1/loan/vip/collateral/data | Get Collateral Asset Data (USER_DATA) +[**sapi_v1_loan_vip_loanable_data_get**](VIPLoansApi.md#sapi_v1_loan_vip_loanable_data_get) | **GET** /sapi/v1/loan/vip/loanable/data | Get Loanable Assets Data +[**sapi_v1_loan_vip_ongoing_orders_get**](VIPLoansApi.md#sapi_v1_loan_vip_ongoing_orders_get) | **GET** /sapi/v1/loan/vip/ongoing/orders | Get VIP Loan Ongoing Orders (USER_DATA) +[**sapi_v1_loan_vip_renew_post**](VIPLoansApi.md#sapi_v1_loan_vip_renew_post) | **POST** /sapi/v1/loan/vip/renew | VIP Loan Renew +[**sapi_v1_loan_vip_repay_history_get**](VIPLoansApi.md#sapi_v1_loan_vip_repay_history_get) | **GET** /sapi/v1/loan/vip/repay/history | Get VIP Loan Repayment History (USER_DATA) +[**sapi_v1_loan_vip_repay_post**](VIPLoansApi.md#sapi_v1_loan_vip_repay_post) | **POST** /sapi/v1/loan/vip/repay | VIP Loan Repay (TRADE) +[**sapi_v1_loan_vip_request_data_get**](VIPLoansApi.md#sapi_v1_loan_vip_request_data_get) | **GET** /sapi/v1/loan/vip/request/data | Query Application Status (USER_DATA) +[**sapi_v1_loan_vip_request_interest_rate_get**](VIPLoansApi.md#sapi_v1_loan_vip_request_interest_rate_get) | **GET** /sapi/v1/loan/vip/request/interestRate | Get Borrow Interest Rate (USER_DATA) + + +# **sapi_v1_loan_vip_borrow_post** +> SapiV1LoanVipBorrowPost200Response sapi_v1_loan_vip_borrow_post(loan_account_id, loan_amount, collateral_account_id, collateral_coin, is_flexible_rate, timestamp, signature, loan_coin=loan_coin, loan_term=loan_term, recv_window=recv_window) + +VIP Loan Borrow + +VIP loan is available for VIP users only. Weight(UID): 6000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_vip_borrow_post200_response import SapiV1LoanVipBorrowPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.VIPLoansApi(api_client) + loan_account_id = 56 # int | + loan_amount = 3.4 # float | + collateral_account_id = 'collateral_account_id_example' # str | + collateral_coin = 'collateral_coin_example' # str | + is_flexible_rate = 'TRUE' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + loan_coin = 'BUSD' # str | Coin loaned (optional) + loan_term = 56 # int | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # VIP Loan Borrow + api_response = api_instance.sapi_v1_loan_vip_borrow_post(loan_account_id, loan_amount, collateral_account_id, collateral_coin, is_flexible_rate, timestamp, signature, loan_coin=loan_coin, loan_term=loan_term, recv_window=recv_window) + print("The response of VIPLoansApi->sapi_v1_loan_vip_borrow_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VIPLoansApi->sapi_v1_loan_vip_borrow_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loan_account_id** | **int**| | + **loan_amount** | **float**| | + **collateral_account_id** | **str**| | + **collateral_coin** | **str**| | + **is_flexible_rate** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **loan_coin** | **str**| Coin loaned | [optional] + **loan_term** | **int**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanVipBorrowPost200Response**](SapiV1LoanVipBorrowPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collateral Assets Data | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_vip_collateral_account_get** +> SapiV1LoanVipCollateralAccountGet200Response sapi_v1_loan_vip_collateral_account_get(timestamp, signature, order_id=order_id, collateral_account_id=collateral_account_id, recv_window=recv_window) + +Check Locked Value of VIP Collateral Account (USER_DATA) + +VIP loan is available for VIP users only. Weight(IP): 6000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_vip_collateral_account_get200_response import SapiV1LoanVipCollateralAccountGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.VIPLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = 56 # int | Order id (optional) + collateral_account_id = 56 # int | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Check Locked Value of VIP Collateral Account (USER_DATA) + api_response = api_instance.sapi_v1_loan_vip_collateral_account_get(timestamp, signature, order_id=order_id, collateral_account_id=collateral_account_id, recv_window=recv_window) + print("The response of VIPLoansApi->sapi_v1_loan_vip_collateral_account_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VIPLoansApi->sapi_v1_loan_vip_collateral_account_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **int**| Order id | [optional] + **collateral_account_id** | **int**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanVipCollateralAccountGet200Response**](SapiV1LoanVipCollateralAccountGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | VIP Locked Value | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_vip_collateral_data_get** +> SapiV1LoanVipCollateralDataGet200Response sapi_v1_loan_vip_collateral_data_get(timestamp, signature, collateral_coin=collateral_coin, recv_window=recv_window) + +Get Collateral Asset Data (USER_DATA) + +Get collateral asset data. Weight(IP): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_vip_collateral_data_get200_response import SapiV1LoanVipCollateralDataGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.VIPLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Collateral Asset Data (USER_DATA) + api_response = api_instance.sapi_v1_loan_vip_collateral_data_get(timestamp, signature, collateral_coin=collateral_coin, recv_window=recv_window) + print("The response of VIPLoansApi->sapi_v1_loan_vip_collateral_data_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VIPLoansApi->sapi_v1_loan_vip_collateral_data_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **collateral_coin** | **str**| Coin used as collateral | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanVipCollateralDataGet200Response**](SapiV1LoanVipCollateralDataGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collateral Asset Data | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_vip_loanable_data_get** +> SapiV1LoanVipLoanableDataGet200Response sapi_v1_loan_vip_loanable_data_get(timestamp, signature, loan_coin=loan_coin, vip_level=vip_level, recv_window=recv_window) + +Get Loanable Assets Data + +Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_vip_loanable_data_get200_response import SapiV1LoanVipLoanableDataGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.VIPLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + loan_coin = 'BUSD' # str | Coin loaned (optional) + vip_level = 1 # int | Defaults to user's vip level (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Loanable Assets Data + api_response = api_instance.sapi_v1_loan_vip_loanable_data_get(timestamp, signature, loan_coin=loan_coin, vip_level=vip_level, recv_window=recv_window) + print("The response of VIPLoansApi->sapi_v1_loan_vip_loanable_data_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VIPLoansApi->sapi_v1_loan_vip_loanable_data_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **loan_coin** | **str**| Coin loaned | [optional] + **vip_level** | **int**| Defaults to user's vip level | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanVipLoanableDataGet200Response**](SapiV1LoanVipLoanableDataGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Loanable Assets Data | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_vip_ongoing_orders_get** +> SapiV1LoanVipOngoingOrdersGet200Response sapi_v1_loan_vip_ongoing_orders_get(timestamp, signature, order_id=order_id, collateral_account_id=collateral_account_id, loan_coin=loan_coin, collateral_coin=collateral_coin, current=current, limit=limit, recv_window=recv_window) + +Get VIP Loan Ongoing Orders (USER_DATA) + +VIP loan is available for VIP users only. Weight(IP): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_vip_ongoing_orders_get200_response import SapiV1LoanVipOngoingOrdersGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.VIPLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = 56 # int | Order id (optional) + collateral_account_id = 56 # int | (optional) + loan_coin = 'BUSD' # str | Coin loaned (optional) + collateral_coin = 'BNB' # str | Coin used as collateral (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + limit = 10 # int | Default 10; max 100. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get VIP Loan Ongoing Orders (USER_DATA) + api_response = api_instance.sapi_v1_loan_vip_ongoing_orders_get(timestamp, signature, order_id=order_id, collateral_account_id=collateral_account_id, loan_coin=loan_coin, collateral_coin=collateral_coin, current=current, limit=limit, recv_window=recv_window) + print("The response of VIPLoansApi->sapi_v1_loan_vip_ongoing_orders_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VIPLoansApi->sapi_v1_loan_vip_ongoing_orders_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **int**| Order id | [optional] + **collateral_account_id** | **int**| | [optional] + **loan_coin** | **str**| Coin loaned | [optional] + **collateral_coin** | **str**| Coin used as collateral | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **limit** | **int**| Default 10; max 100. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanVipOngoingOrdersGet200Response**](SapiV1LoanVipOngoingOrdersGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ongoing VIP Loan Orders | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_vip_renew_post** +> SapiV1LoanVipRenewPost200Response sapi_v1_loan_vip_renew_post(timestamp, signature, order_id=order_id, loan_term=loan_term, recv_window=recv_window) + +VIP Loan Renew + +VIP loan is available for VIP users only. Weight(UID): 6000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_vip_renew_post200_response import SapiV1LoanVipRenewPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.VIPLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = 56 # int | Order id (optional) + loan_term = 30 # int | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # VIP Loan Renew + api_response = api_instance.sapi_v1_loan_vip_renew_post(timestamp, signature, order_id=order_id, loan_term=loan_term, recv_window=recv_window) + print("The response of VIPLoansApi->sapi_v1_loan_vip_renew_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VIPLoansApi->sapi_v1_loan_vip_renew_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **int**| Order id | [optional] + **loan_term** | **int**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanVipRenewPost200Response**](SapiV1LoanVipRenewPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Loan renew result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_vip_repay_history_get** +> SapiV1LoanVipRepayHistoryGet200Response sapi_v1_loan_vip_repay_history_get(timestamp, signature, order_id=order_id, loan_coin=loan_coin, start_time=start_time, end_time=end_time, current=current, limit=limit, recv_window=recv_window) + +Get VIP Loan Repayment History (USER_DATA) + +VIP loan is available for VIP users only. Weight(IP): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_vip_repay_history_get200_response import SapiV1LoanVipRepayHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.VIPLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = 56 # int | Order id (optional) + loan_coin = 'BUSD' # str | Coin loaned (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + limit = 10 # int | Default 10; max 100. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get VIP Loan Repayment History (USER_DATA) + api_response = api_instance.sapi_v1_loan_vip_repay_history_get(timestamp, signature, order_id=order_id, loan_coin=loan_coin, start_time=start_time, end_time=end_time, current=current, limit=limit, recv_window=recv_window) + print("The response of VIPLoansApi->sapi_v1_loan_vip_repay_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VIPLoansApi->sapi_v1_loan_vip_repay_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **int**| Order id | [optional] + **loan_coin** | **str**| Coin loaned | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **limit** | **int**| Default 10; max 100. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanVipRepayHistoryGet200Response**](SapiV1LoanVipRepayHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | VIP Loan Repayment History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_vip_repay_post** +> SapiV1LoanVipRepayPost200Response sapi_v1_loan_vip_repay_post(amount, timestamp, signature, order_id=order_id, recv_window=recv_window) + +VIP Loan Repay (TRADE) + +VIP loan is available for VIP users only. Weight(UID): 6000 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_vip_repay_post200_response import SapiV1LoanVipRepayPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.VIPLoansApi(api_client) + amount = 1.01 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + order_id = 56 # int | Order id (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # VIP Loan Repay (TRADE) + api_response = api_instance.sapi_v1_loan_vip_repay_post(amount, timestamp, signature, order_id=order_id, recv_window=recv_window) + print("The response of VIPLoansApi->sapi_v1_loan_vip_repay_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VIPLoansApi->sapi_v1_loan_vip_repay_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **order_id** | **int**| Order id | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanVipRepayPost200Response**](SapiV1LoanVipRepayPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | VIP Loan Repayment | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_vip_request_data_get** +> SapiV1LoanVipRequestDataGet200Response sapi_v1_loan_vip_request_data_get(timestamp, signature, current=current, limit=limit, recv_window=recv_window) + +Query Application Status (USER_DATA) + +Get Application Status Weight(UID): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_vip_request_data_get200_response import SapiV1LoanVipRequestDataGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.VIPLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Application Status (USER_DATA) + api_response = api_instance.sapi_v1_loan_vip_request_data_get(timestamp, signature, current=current, limit=limit, recv_window=recv_window) + print("The response of VIPLoansApi->sapi_v1_loan_vip_request_data_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VIPLoansApi->sapi_v1_loan_vip_request_data_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1LoanVipRequestDataGet200Response**](SapiV1LoanVipRequestDataGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Application Status | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_loan_vip_request_interest_rate_get** +> List[SapiV1LoanVipRequestInterestRateGet200ResponseInner] sapi_v1_loan_vip_request_interest_rate_get(timestamp, signature, loan_coin=loan_coin, recv_window=recv_window) + +Get Borrow Interest Rate (USER_DATA) + +Get borrow interest rate. Weight(UID): 400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_loan_vip_request_interest_rate_get200_response_inner import SapiV1LoanVipRequestInterestRateGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.VIPLoansApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + loan_coin = 'BUSD' # str | Max 10 assets, Multiple split by \",\" (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Borrow Interest Rate (USER_DATA) + api_response = api_instance.sapi_v1_loan_vip_request_interest_rate_get(timestamp, signature, loan_coin=loan_coin, recv_window=recv_window) + print("The response of VIPLoansApi->sapi_v1_loan_vip_request_interest_rate_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VIPLoansApi->sapi_v1_loan_vip_request_interest_rate_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **loan_coin** | **str**| Max 10 assets, Multiple split by \",\" | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1LoanVipRequestInterestRateGet200ResponseInner]**](SapiV1LoanVipRequestInterestRateGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Borrow interest rate | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/docs/WalletApi.md b/target/python/binance_openapi/docs/WalletApi.md new file mode 100644 index 0000000..0a482ed --- /dev/null +++ b/target/python/binance_openapi/docs/WalletApi.md @@ -0,0 +1,3064 @@ +# openapi_client.WalletApi + +All URIs are relative to *https://api.binance.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**sapi_v1_account_api_restrictions_get**](WalletApi.md#sapi_v1_account_api_restrictions_get) | **GET** /sapi/v1/account/apiRestrictions | Get API Key Permission (USER_DATA) +[**sapi_v1_account_api_trading_status_get**](WalletApi.md#sapi_v1_account_api_trading_status_get) | **GET** /sapi/v1/account/apiTradingStatus | Account API Trading Status (USER_DATA) +[**sapi_v1_account_disable_fast_withdraw_switch_post**](WalletApi.md#sapi_v1_account_disable_fast_withdraw_switch_post) | **POST** /sapi/v1/account/disableFastWithdrawSwitch | Disable Fast Withdraw Switch (USER_DATA) +[**sapi_v1_account_enable_fast_withdraw_switch_post**](WalletApi.md#sapi_v1_account_enable_fast_withdraw_switch_post) | **POST** /sapi/v1/account/enableFastWithdrawSwitch | Enable Fast Withdraw Switch (USER_DATA) +[**sapi_v1_account_info_get**](WalletApi.md#sapi_v1_account_info_get) | **GET** /sapi/v1/account/info | Account info (USER_DATA) +[**sapi_v1_account_snapshot_get**](WalletApi.md#sapi_v1_account_snapshot_get) | **GET** /sapi/v1/accountSnapshot | Daily Account Snapshot (USER_DATA) +[**sapi_v1_account_status_get**](WalletApi.md#sapi_v1_account_status_get) | **GET** /sapi/v1/account/status | Account Status (USER_DATA) +[**sapi_v1_asset_asset_detail_get**](WalletApi.md#sapi_v1_asset_asset_detail_get) | **GET** /sapi/v1/asset/assetDetail | Asset Detail (USER_DATA) +[**sapi_v1_asset_asset_dividend_get**](WalletApi.md#sapi_v1_asset_asset_dividend_get) | **GET** /sapi/v1/asset/assetDividend | Asset Dividend Record (USER_DATA) +[**sapi_v1_asset_convert_transfer_post**](WalletApi.md#sapi_v1_asset_convert_transfer_post) | **POST** /sapi/v1/asset/convert-transfer | Convert Transfer (USER_DATA) +[**sapi_v1_asset_convert_transfer_query_by_page_get**](WalletApi.md#sapi_v1_asset_convert_transfer_query_by_page_get) | **GET** /sapi/v1/asset/convert-transfer/queryByPage | Query Convert Transfer (USER_DATA) +[**sapi_v1_asset_custody_transfer_history_get**](WalletApi.md#sapi_v1_asset_custody_transfer_history_get) | **GET** /sapi/v1/asset/custody/transfer-history | Query User Delegation History(For Master Account) (USER_DATA) +[**sapi_v1_asset_dribblet_get**](WalletApi.md#sapi_v1_asset_dribblet_get) | **GET** /sapi/v1/asset/dribblet | DustLog(USER_DATA) +[**sapi_v1_asset_dust_btc_post**](WalletApi.md#sapi_v1_asset_dust_btc_post) | **POST** /sapi/v1/asset/dust-btc | Get Assets That Can Be Converted Into BNB (USER_DATA) +[**sapi_v1_asset_dust_post**](WalletApi.md#sapi_v1_asset_dust_post) | **POST** /sapi/v1/asset/dust | Dust Transfer (USER_DATA) +[**sapi_v1_asset_get_funding_asset_post**](WalletApi.md#sapi_v1_asset_get_funding_asset_post) | **POST** /sapi/v1/asset/get-funding-asset | Funding Wallet (USER_DATA) +[**sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get**](WalletApi.md#sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get) | **GET** /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage | Get Cloud-Mining payment and refund history (USER_DATA) +[**sapi_v1_asset_trade_fee_get**](WalletApi.md#sapi_v1_asset_trade_fee_get) | **GET** /sapi/v1/asset/tradeFee | Trade Fee (USER_DATA) +[**sapi_v1_asset_transfer_get**](WalletApi.md#sapi_v1_asset_transfer_get) | **GET** /sapi/v1/asset/transfer | Query User Universal Transfer History (USER_DATA) +[**sapi_v1_asset_transfer_post**](WalletApi.md#sapi_v1_asset_transfer_post) | **POST** /sapi/v1/asset/transfer | User Universal Transfer (USER_DATA) +[**sapi_v1_asset_wallet_balance_get**](WalletApi.md#sapi_v1_asset_wallet_balance_get) | **GET** /sapi/v1/asset/wallet/balance | Query User Wallet Balance (USER_DATA) +[**sapi_v1_capital_config_getall_get**](WalletApi.md#sapi_v1_capital_config_getall_get) | **GET** /sapi/v1/capital/config/getall | All Coins' Information (USER_DATA) +[**sapi_v1_capital_contract_convertible_coins_get**](WalletApi.md#sapi_v1_capital_contract_convertible_coins_get) | **GET** /sapi/v1/capital/contract/convertible-coins | Query auto-converting stable coins (USER_DATA) +[**sapi_v1_capital_contract_convertible_coins_post**](WalletApi.md#sapi_v1_capital_contract_convertible_coins_post) | **POST** /sapi/v1/capital/contract/convertible-coins | Switch on/off BUSD and stable coins conversion (USER_DATA) (USER_DATA) +[**sapi_v1_capital_deposit_address_get**](WalletApi.md#sapi_v1_capital_deposit_address_get) | **GET** /sapi/v1/capital/deposit/address | Deposit Address (supporting network) (USER_DATA) +[**sapi_v1_capital_deposit_address_list_get**](WalletApi.md#sapi_v1_capital_deposit_address_list_get) | **GET** /sapi/v1/capital/deposit/address/list | Fetch deposit address list with network (USER_DATA) +[**sapi_v1_capital_deposit_credit_apply_post**](WalletApi.md#sapi_v1_capital_deposit_credit_apply_post) | **POST** /sapi/v1/capital/deposit/credit-apply | One click arrival deposit apply (USER_DATA) +[**sapi_v1_capital_deposit_hisrec_get**](WalletApi.md#sapi_v1_capital_deposit_hisrec_get) | **GET** /sapi/v1/capital/deposit/hisrec | Deposit History(supporting network) (USER_DATA) +[**sapi_v1_capital_withdraw_address_list_get**](WalletApi.md#sapi_v1_capital_withdraw_address_list_get) | **GET** /sapi/v1/capital/withdraw/address/list | Fetch withdraw address list (USER_DATA) +[**sapi_v1_capital_withdraw_apply_post**](WalletApi.md#sapi_v1_capital_withdraw_apply_post) | **POST** /sapi/v1/capital/withdraw/apply | Withdraw (USER_DATA) +[**sapi_v1_capital_withdraw_history_get**](WalletApi.md#sapi_v1_capital_withdraw_history_get) | **GET** /sapi/v1/capital/withdraw/history | Withdraw History (supporting network) (USER_DATA) +[**sapi_v1_spot_delist_schedule_get**](WalletApi.md#sapi_v1_spot_delist_schedule_get) | **GET** /sapi/v1/spot/delist-schedule | Get symbols delist schedule for spot (MARKET_DATA) +[**sapi_v1_system_status_get**](WalletApi.md#sapi_v1_system_status_get) | **GET** /sapi/v1/system/status | System Status (System) +[**sapi_v3_asset_get_user_asset_post**](WalletApi.md#sapi_v3_asset_get_user_asset_post) | **POST** /sapi/v3/asset/getUserAsset | User Asset (USER_DATA) + + +# **sapi_v1_account_api_restrictions_get** +> SapiV1AccountApiRestrictionsGet200Response sapi_v1_account_api_restrictions_get(timestamp, signature, recv_window=recv_window) + +Get API Key Permission (USER_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_account_api_restrictions_get200_response import SapiV1AccountApiRestrictionsGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get API Key Permission (USER_DATA) + api_response = api_instance.sapi_v1_account_api_restrictions_get(timestamp, signature, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_account_api_restrictions_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_account_api_restrictions_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AccountApiRestrictionsGet200Response**](SapiV1AccountApiRestrictionsGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | API Key permissions | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_account_api_trading_status_get** +> SapiV1AccountApiTradingStatusGet200Response sapi_v1_account_api_trading_status_get(timestamp, signature, recv_window=recv_window) + +Account API Trading Status (USER_DATA) + +Fetch account API trading status with details. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response import SapiV1AccountApiTradingStatusGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Account API Trading Status (USER_DATA) + api_response = api_instance.sapi_v1_account_api_trading_status_get(timestamp, signature, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_account_api_trading_status_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_account_api_trading_status_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AccountApiTradingStatusGet200Response**](SapiV1AccountApiTradingStatusGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Account API trading status | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_account_disable_fast_withdraw_switch_post** +> object sapi_v1_account_disable_fast_withdraw_switch_post(timestamp, signature, recv_window=recv_window) + +Disable Fast Withdraw Switch (USER_DATA) + +- This request will disable fastwithdraw switch under your account. - You need to enable \"trade\" option for the api key which requests this endpoint. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Disable Fast Withdraw Switch (USER_DATA) + api_response = api_instance.sapi_v1_account_disable_fast_withdraw_switch_post(timestamp, signature, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_account_disable_fast_withdraw_switch_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_account_disable_fast_withdraw_switch_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +**object** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_account_enable_fast_withdraw_switch_post** +> object sapi_v1_account_enable_fast_withdraw_switch_post(timestamp, signature, recv_window=recv_window) + +Enable Fast Withdraw Switch (USER_DATA) + +- This request will enable fastwithdraw switch under your account. You need to enable \"trade\" option for the api key which requests this endpoint. - When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Enable Fast Withdraw Switch (USER_DATA) + api_response = api_instance.sapi_v1_account_enable_fast_withdraw_switch_post(timestamp, signature, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_account_enable_fast_withdraw_switch_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_account_enable_fast_withdraw_switch_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +**object** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_account_info_get** +> SapiV1AccountInfoGet200Response sapi_v1_account_info_get(timestamp, signature, recv_window=recv_window) + +Account info (USER_DATA) + +Fetch account info detail. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_account_info_get200_response import SapiV1AccountInfoGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Account info (USER_DATA) + api_response = api_instance.sapi_v1_account_info_get(timestamp, signature, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_account_info_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_account_info_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AccountInfoGet200Response**](SapiV1AccountInfoGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Account info detail | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_account_snapshot_get** +> SapiV1AccountSnapshotGet200Response sapi_v1_account_snapshot_get(type, timestamp, signature, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + +Daily Account Snapshot (USER_DATA) + +- The query time period must be less than 30 days - Support query within the last one month only - If startTimeand endTime not sent, return records of the last 7 days by default Weight(IP): 2400 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_account_snapshot_get200_response import SapiV1AccountSnapshotGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + type = 'type_example' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 7 # int | (optional) (default to 7) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Daily Account Snapshot (USER_DATA) + api_response = api_instance.sapi_v1_account_snapshot_get(type, timestamp, signature, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_account_snapshot_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_account_snapshot_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| | [optional] [default to 7] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AccountSnapshotGet200Response**](SapiV1AccountSnapshotGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Account Snapshot | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_account_status_get** +> SapiV1AccountStatusGet200Response sapi_v1_account_status_get(timestamp, signature, recv_window=recv_window) + +Account Status (USER_DATA) + +Fetch account status detail. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_account_status_get200_response import SapiV1AccountStatusGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Account Status (USER_DATA) + api_response = api_instance.sapi_v1_account_status_get(timestamp, signature, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_account_status_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_account_status_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AccountStatusGet200Response**](SapiV1AccountStatusGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_asset_asset_detail_get** +> SapiV1AssetAssetDetailGet200Response sapi_v1_asset_asset_detail_get(timestamp, signature, asset=asset, recv_window=recv_window) + +Asset Detail (USER_DATA) + +Fetch details of assets supported on Binance. - Please get network and other deposit or withdraw details from `GET /sapi/v1/capital/config/getall`. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_asset_asset_detail_get200_response import SapiV1AssetAssetDetailGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'BNB' # str | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Asset Detail (USER_DATA) + api_response = api_instance.sapi_v1_asset_asset_detail_get(timestamp, signature, asset=asset, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_asset_asset_detail_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_asset_asset_detail_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AssetAssetDetailGet200Response**](SapiV1AssetAssetDetailGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Asset detail | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_asset_asset_dividend_get** +> SapiV1AssetAssetDividendGet200Response sapi_v1_asset_asset_dividend_get(timestamp, signature, asset=asset, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + +Asset Dividend Record (USER_DATA) + +Query asset Dividend Record Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_asset_asset_dividend_get200_response import SapiV1AssetAssetDividendGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'BNB' # str | (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + limit = 20 # int | (optional) (default to 20) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Asset Dividend Record (USER_DATA) + api_response = api_instance.sapi_v1_asset_asset_dividend_get(timestamp, signature, asset=asset, start_time=start_time, end_time=end_time, limit=limit, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_asset_asset_dividend_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_asset_asset_dividend_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **limit** | **int**| | [optional] [default to 20] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AssetAssetDividendGet200Response**](SapiV1AssetAssetDividendGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Records of asset devidend | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_asset_convert_transfer_post** +> SapiV1AssetConvertTransferPost200Response sapi_v1_asset_convert_transfer_post(client_tran_id, asset, amount, target_asset, timestamp, signature, recv_window=recv_window) + +Convert Transfer (USER_DATA) + +Convert transfer, convert between BUSD and stablecoins. If the clientId has been used before, will not do the convert transfer, the original transfer will be returned. Weight(UID): 5 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_asset_convert_transfer_post200_response import SapiV1AssetConvertTransferPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + client_tran_id = 'client_tran_id_example' # str | The unique flag, the min length is 20 + asset = 'BTC' # str | + amount = 1.01 # float | + target_asset = 'BNB' # str | Target asset you want to convert + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Convert Transfer (USER_DATA) + api_response = api_instance.sapi_v1_asset_convert_transfer_post(client_tran_id, asset, amount, target_asset, timestamp, signature, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_asset_convert_transfer_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_asset_convert_transfer_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **client_tran_id** | **str**| The unique flag, the min length is 20 | + **asset** | **str**| | + **amount** | **float**| | + **target_asset** | **str**| Target asset you want to convert | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AssetConvertTransferPost200Response**](SapiV1AssetConvertTransferPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Conversion Information | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_asset_convert_transfer_query_by_page_get** +> SapiV1AssetConvertTransferQueryByPageGet200Response sapi_v1_asset_convert_transfer_query_by_page_get(start_time, end_time, timestamp, signature, tran_id=tran_id, asset=asset, account_type=account_type, current=current, size=size, recv_window=recv_window) + +Query Convert Transfer (USER_DATA) + +Weight(UID): 5 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_asset_convert_transfer_query_by_page_get200_response import SapiV1AssetConvertTransferQueryByPageGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + start_time = 56 # int | UTC timestamp in ms + end_time = 56 # int | UTC timestamp in ms + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + tran_id = 118263615991 # int | The transaction id (optional) + asset = 'BTC' # str | If it is blank, we will match deducted asset and target asset. (optional) + account_type = 'account_type_example' # str | MAIN: main account. CARD: funding account. If it is blank, we will query spot and card wallet, otherwise, we just query the corresponding wallet (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query Convert Transfer (USER_DATA) + api_response = api_instance.sapi_v1_asset_convert_transfer_query_by_page_get(start_time, end_time, timestamp, signature, tran_id=tran_id, asset=asset, account_type=account_type, current=current, size=size, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_asset_convert_transfer_query_by_page_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_asset_convert_transfer_query_by_page_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start_time** | **int**| UTC timestamp in ms | + **end_time** | **int**| UTC timestamp in ms | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **tran_id** | **int**| The transaction id | [optional] + **asset** | **str**| If it is blank, we will match deducted asset and target asset. | [optional] + **account_type** | **str**| MAIN: main account. CARD: funding account. If it is blank, we will query spot and card wallet, otherwise, we just query the corresponding wallet | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AssetConvertTransferQueryByPageGet200Response**](SapiV1AssetConvertTransferQueryByPageGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Query Convert Transfer | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_asset_custody_transfer_history_get** +> SapiV1AssetCustodyTransferHistoryGet200Response sapi_v1_asset_custody_transfer_history_get(email, start_time, end_time, asset, timestamp, signature, type=type, current=current, size=size, recv_window=recv_window) + +Query User Delegation History(For Master Account) (USER_DATA) + +Query User Delegation History Weight(IP): 60 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_asset_custody_transfer_history_get200_response import SapiV1AssetCustodyTransferHistoryGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + email = 'alice@test.com' # str | + start_time = 1695205406000 # int | + end_time = 1695205396000 # int | + asset = 'BTC' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + type = 'Delegate' # str | (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query User Delegation History(For Master Account) (USER_DATA) + api_response = api_instance.sapi_v1_asset_custody_transfer_history_get(email, start_time, end_time, asset, timestamp, signature, type=type, current=current, size=size, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_asset_custody_transfer_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_asset_custody_transfer_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **str**| | + **start_time** | **int**| | + **end_time** | **int**| | + **asset** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **type** | **str**| | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AssetCustodyTransferHistoryGet200Response**](SapiV1AssetCustodyTransferHistoryGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Delegation History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_asset_dribblet_get** +> SapiV1AssetDribbletGet200Response sapi_v1_asset_dribblet_get(timestamp, signature, account_type=account_type, start_time=start_time, end_time=end_time, recv_window=recv_window) + +DustLog(USER_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_asset_dribblet_get200_response import SapiV1AssetDribbletGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + account_type = 'account_type_example' # str | SPOT or MARGIN, default SPOT (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # DustLog(USER_DATA) + api_response = api_instance.sapi_v1_asset_dribblet_get(timestamp, signature, account_type=account_type, start_time=start_time, end_time=end_time, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_asset_dribblet_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_asset_dribblet_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **account_type** | **str**| SPOT or MARGIN, default SPOT | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AssetDribbletGet200Response**](SapiV1AssetDribbletGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Dust log records | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_asset_dust_btc_post** +> SapiV1AssetDustBtcPost200Response sapi_v1_asset_dust_btc_post(timestamp, signature, account_type=account_type, recv_window=recv_window) + +Get Assets That Can Be Converted Into BNB (USER_DATA) + +Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_asset_dust_btc_post200_response import SapiV1AssetDustBtcPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + account_type = 'account_type_example' # str | SPOT or MARGIN, default SPOT (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Assets That Can Be Converted Into BNB (USER_DATA) + api_response = api_instance.sapi_v1_asset_dust_btc_post(timestamp, signature, account_type=account_type, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_asset_dust_btc_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_asset_dust_btc_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **account_type** | **str**| SPOT or MARGIN, default SPOT | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AssetDustBtcPost200Response**](SapiV1AssetDustBtcPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Account assets available to be converted to BNB | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_asset_dust_post** +> SapiV1AssetDustPost200Response sapi_v1_asset_dust_post(asset, timestamp, signature, account_type=account_type, recv_window=recv_window) + +Dust Transfer (USER_DATA) + +Convert dust assets to BNB. Weight(UID): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_asset_dust_post200_response import SapiV1AssetDustPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + asset = ['asset_example'] # List[str] | The asset being converted. For example, asset=BTC&asset=USDT + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + account_type = 'account_type_example' # str | SPOT or MARGIN, default SPOT (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Dust Transfer (USER_DATA) + api_response = api_instance.sapi_v1_asset_dust_post(asset, timestamp, signature, account_type=account_type, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_asset_dust_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_asset_dust_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset** | [**List[str]**](str.md)| The asset being converted. For example, asset=BTC&asset=USDT | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **account_type** | **str**| SPOT or MARGIN, default SPOT | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AssetDustPost200Response**](SapiV1AssetDustPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Dust log records | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_asset_get_funding_asset_post** +> List[SapiV1AssetGetFundingAssetPost200ResponseInner] sapi_v1_asset_get_funding_asset_post(timestamp, signature, asset=asset, need_btc_valuation=need_btc_valuation, recv_window=recv_window) + +Funding Wallet (USER_DATA) + +- Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_asset_get_funding_asset_post200_response_inner import SapiV1AssetGetFundingAssetPost200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'BNB' # str | (optional) + need_btc_valuation = 'need_btc_valuation_example' # str | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Funding Wallet (USER_DATA) + api_response = api_instance.sapi_v1_asset_get_funding_asset_post(timestamp, signature, asset=asset, need_btc_valuation=need_btc_valuation, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_asset_get_funding_asset_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_asset_get_funding_asset_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| | [optional] + **need_btc_valuation** | **str**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1AssetGetFundingAssetPost200ResponseInner]**](SapiV1AssetGetFundingAssetPost200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Funding asset detail | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get** +> SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get(start_time, end_time, timestamp, signature, tran_id=tran_id, client_tran_id=client_tran_id, asset=asset, current=current, size=size, recv_window=recv_window) + +Get Cloud-Mining payment and refund history (USER_DATA) + +The query of Cloud-Mining payment and refund history Weight(UID): 600 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response import SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + start_time = 56 # int | UTC timestamp in ms + end_time = 56 # int | UTC timestamp in ms + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + tran_id = 118263615991 # int | The transaction id (optional) + client_tran_id = 'client_tran_id_example' # str | The unique flag (optional) + asset = 'BTC' # str | If it is blank, we will query all assets (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get Cloud-Mining payment and refund history (USER_DATA) + api_response = api_instance.sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get(start_time, end_time, timestamp, signature, tran_id=tran_id, client_tran_id=client_tran_id, asset=asset, current=current, size=size, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start_time** | **int**| UTC timestamp in ms | + **end_time** | **int**| UTC timestamp in ms | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **tran_id** | **int**| The transaction id | [optional] + **client_tran_id** | **str**| The unique flag | [optional] + **asset** | **str**| If it is blank, we will query all assets | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response**](SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cloud Mining Payment and Refund History | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_asset_trade_fee_get** +> List[SapiV1AssetTradeFeeGet200ResponseInner] sapi_v1_asset_trade_fee_get(timestamp, signature, symbol=symbol, recv_window=recv_window) + +Trade Fee (USER_DATA) + +Fetch trade fee Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_asset_trade_fee_get200_response_inner import SapiV1AssetTradeFeeGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + symbol = 'BNBUSDT' # str | Trading symbol, e.g. BNBUSDT (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Trade Fee (USER_DATA) + api_response = api_instance.sapi_v1_asset_trade_fee_get(timestamp, signature, symbol=symbol, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_asset_trade_fee_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_asset_trade_fee_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **symbol** | **str**| Trading symbol, e.g. BNBUSDT | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1AssetTradeFeeGet200ResponseInner]**](SapiV1AssetTradeFeeGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Trade fee info per symbol | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_asset_transfer_get** +> SapiV1AssetTransferGet200Response sapi_v1_asset_transfer_get(type, timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, from_symbol=from_symbol, to_symbol=to_symbol, recv_window=recv_window) + +Query User Universal Transfer History (USER_DATA) + +- `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - Support query within the last 6 months only - If `startTime` and `endTime` not sent, return records of the last 7 days by default Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_asset_transfer_get200_response import SapiV1AssetTransferGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + type = 'MAIN_C2C' # str | Universal transfer type + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + current = 1 # int | Current querying page. Start from 1. Default:1 (optional) + size = 100 # int | Default:10 Max:100 (optional) + from_symbol = 'BNBUSDT' # str | Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN (optional) + to_symbol = 'BNBUSDT' # str | Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query User Universal Transfer History (USER_DATA) + api_response = api_instance.sapi_v1_asset_transfer_get(type, timestamp, signature, start_time=start_time, end_time=end_time, current=current, size=size, from_symbol=from_symbol, to_symbol=to_symbol, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_asset_transfer_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_asset_transfer_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| Universal transfer type | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **current** | **int**| Current querying page. Start from 1. Default:1 | [optional] + **size** | **int**| Default:10 Max:100 | [optional] + **from_symbol** | **str**| Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN | [optional] + **to_symbol** | **str**| Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AssetTransferGet200Response**](SapiV1AssetTransferGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Universal transfer history | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_asset_transfer_post** +> SapiV1AssetTransferPost200Response sapi_v1_asset_transfer_post(type, asset, amount, timestamp, signature, from_symbol=from_symbol, to_symbol=to_symbol, recv_window=recv_window) + +User Universal Transfer (USER_DATA) + +You need to enable `Permits Universal Transfer` option for the api key which requests this endpoint. - `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN ENUM of transfer types: - MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account - MAIN_CMFUTURE Spot account transfer to COIN-M Futures account - MAIN_MARGIN Spot account transfer to Margin(cross)account - UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account - UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account - CMFUTURE_MAIN COIN-M Futures account transfer to Spot account - CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account - MARGIN_MAIN Margin(cross)account transfer to Spot account - MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures - MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures - ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account - MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account - ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account - MAIN_FUNDING Spot account transfer to Funding account - FUNDING_MAIN Funding account transfer to Spot account - FUNDING_UMFUTURE Funding account transfer to UMFUTURE account - UMFUTURE_FUNDING UMFUTURE account transfer to Funding account - MARGIN_FUNDING MARGIN account transfer to Funding account - FUNDING_MARGIN Funding account transfer to Margin account - FUNDING_CMFUTURE Funding account transfer to CMFUTURE account - CMFUTURE_FUNDING CMFUTURE account transfer to Funding account - MAIN_OPTION Spot account transfer to Options account - OPTION_MAIN Options account transfer to Spot account - UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account - OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures account - MARGIN_OPTION Margin(cross)account transfer to Options account - OPTION_MARGIN Options account transfer to Margin(cross)account - FUNDING_OPTION Funding account transfer to Options account - OPTION_FUNDING Options account transfer to Funding account - MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin account - PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account - MAIN_ISOLATED_MARGIN Spot account transfer to Isolated margin account - ISOLATED_MARGIN_MAIN Isolated margin account transfer to Spot account Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_asset_transfer_post200_response import SapiV1AssetTransferPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + type = 'MAIN_C2C' # str | Universal transfer type + asset = 'BTC' # str | + amount = 1.01 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + from_symbol = 'BNBUSDT' # str | Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN (optional) + to_symbol = 'BNBUSDT' # str | Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # User Universal Transfer (USER_DATA) + api_response = api_instance.sapi_v1_asset_transfer_post(type, asset, amount, timestamp, signature, from_symbol=from_symbol, to_symbol=to_symbol, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_asset_transfer_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_asset_transfer_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| Universal transfer type | + **asset** | **str**| | + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **from_symbol** | **str**| Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN | [optional] + **to_symbol** | **str**| Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1AssetTransferPost200Response**](SapiV1AssetTransferPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Transfer id | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_asset_wallet_balance_get** +> List[SapiV1AssetWalletBalanceGet200ResponseInner] sapi_v1_asset_wallet_balance_get(timestamp, signature, recv_window=recv_window) + +Query User Wallet Balance (USER_DATA) + +Query User Wallet Balance Weight(IP): 60 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_asset_wallet_balance_get200_response_inner import SapiV1AssetWalletBalanceGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Query User Wallet Balance (USER_DATA) + api_response = api_instance.sapi_v1_asset_wallet_balance_get(timestamp, signature, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_asset_wallet_balance_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_asset_wallet_balance_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1AssetWalletBalanceGet200ResponseInner]**](SapiV1AssetWalletBalanceGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | wallet balance | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_capital_config_getall_get** +> List[SapiV1CapitalConfigGetallGet200ResponseInner] sapi_v1_capital_config_getall_get(timestamp, signature, recv_window=recv_window) + +All Coins' Information (USER_DATA) + +Get information of coins (available for deposit and withdraw) for user. Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_capital_config_getall_get200_response_inner import SapiV1CapitalConfigGetallGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # All Coins' Information (USER_DATA) + api_response = api_instance.sapi_v1_capital_config_getall_get(timestamp, signature, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_capital_config_getall_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_capital_config_getall_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1CapitalConfigGetallGet200ResponseInner]**](SapiV1CapitalConfigGetallGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | All coins details information | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_capital_contract_convertible_coins_get** +> SapiV1CapitalContractConvertibleCoinsGet200Response sapi_v1_capital_contract_convertible_coins_get() + +Query auto-converting stable coins (USER_DATA) + +Get a user's auto-conversion settings in deposit/withdrawal Weight(UID): 600' + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_capital_contract_convertible_coins_get200_response import SapiV1CapitalContractConvertibleCoinsGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + + try: + # Query auto-converting stable coins (USER_DATA) + api_response = api_instance.sapi_v1_capital_contract_convertible_coins_get() + print("The response of WalletApi->sapi_v1_capital_contract_convertible_coins_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_capital_contract_convertible_coins_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**SapiV1CapitalContractConvertibleCoinsGet200Response**](SapiV1CapitalContractConvertibleCoinsGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User's auto-conversion settings i | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_capital_contract_convertible_coins_post** +> object sapi_v1_capital_contract_convertible_coins_post(coin, enable) + +Switch on/off BUSD and stable coins conversion (USER_DATA) (USER_DATA) + +User can use it to turn on or turn off the BUSD auto-conversion from/to a specific stable coin. Weight(UID): 600' + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + coin = 'coin_example' # str | Must be USDC, USDP or TUSD + enable = True # bool | true: turn on the auto-conversion. false: turn off the auto-conversion + + try: + # Switch on/off BUSD and stable coins conversion (USER_DATA) (USER_DATA) + api_response = api_instance.sapi_v1_capital_contract_convertible_coins_post(coin, enable) + print("The response of WalletApi->sapi_v1_capital_contract_convertible_coins_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_capital_contract_convertible_coins_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **coin** | **str**| Must be USDC, USDP or TUSD | + **enable** | **bool**| true: turn on the auto-conversion. false: turn off the auto-conversion | + +### Return type + +**object** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_capital_deposit_address_get** +> SapiV1CapitalDepositAddressGet200Response sapi_v1_capital_deposit_address_get(coin, timestamp, signature, network=network, recv_window=recv_window) + +Deposit Address (supporting network) (USER_DATA) + +Fetch deposit address with network. - If network is not send, return with default network of the coin. - You can get network and isDefault in networkList in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256). Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_capital_deposit_address_get200_response import SapiV1CapitalDepositAddressGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + coin = 'BNB' # str | Coin name + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + network = 'BTC' # str | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Deposit Address (supporting network) (USER_DATA) + api_response = api_instance.sapi_v1_capital_deposit_address_get(coin, timestamp, signature, network=network, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_capital_deposit_address_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_capital_deposit_address_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **coin** | **str**| Coin name | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **network** | **str**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1CapitalDepositAddressGet200Response**](SapiV1CapitalDepositAddressGet200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Deposit address info | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_capital_deposit_address_list_get** +> List[SapiV1CapitalDepositAddressListGet200ResponseInner] sapi_v1_capital_deposit_address_list_get(coin, timestamp, signature, network=network, recv_window=recv_window) + +Fetch deposit address list with network (USER_DATA) + +Fetch deposit address list with network. Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_capital_deposit_address_list_get200_response_inner import SapiV1CapitalDepositAddressListGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + coin = 'BTC' # str | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + network = 'BTC' # str | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Fetch deposit address list with network (USER_DATA) + api_response = api_instance.sapi_v1_capital_deposit_address_list_get(coin, timestamp, signature, network=network, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_capital_deposit_address_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_capital_deposit_address_list_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **coin** | **str**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **network** | **str**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1CapitalDepositAddressListGet200ResponseInner]**](SapiV1CapitalDepositAddressListGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Coin address | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_capital_deposit_credit_apply_post** +> SapiV1CapitalDepositCreditApplyPost200Response sapi_v1_capital_deposit_credit_apply_post(timestamp, signature, deposit_id=deposit_id, tx_id=tx_id, sub_account_id=sub_account_id, sub_user_id=sub_user_id, recv_window=recv_window) + +One click arrival deposit apply (USER_DATA) + +Apply deposit credit for expired address (One click arrival) Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_capital_deposit_credit_apply_post200_response import SapiV1CapitalDepositCreditApplyPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + deposit_id = 56 # int | Deposit record Id, priority use (optional) + tx_id = 'tx_id_example' # str | Deposit txId, used when depositId is not specified (optional) + sub_account_id = 56 # int | (optional) + sub_user_id = 56 # int | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # One click arrival deposit apply (USER_DATA) + api_response = api_instance.sapi_v1_capital_deposit_credit_apply_post(timestamp, signature, deposit_id=deposit_id, tx_id=tx_id, sub_account_id=sub_account_id, sub_user_id=sub_user_id, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_capital_deposit_credit_apply_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_capital_deposit_credit_apply_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **deposit_id** | **int**| Deposit record Id, priority use | [optional] + **tx_id** | **str**| Deposit txId, used when depositId is not specified | [optional] + **sub_account_id** | **int**| | [optional] + **sub_user_id** | **int**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1CapitalDepositCreditApplyPost200Response**](SapiV1CapitalDepositCreditApplyPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | deposit result | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_capital_deposit_hisrec_get** +> List[SapiV1CapitalDepositHisrecGet200ResponseInner] sapi_v1_capital_deposit_hisrec_get(timestamp, signature, coin=coin, status=status, start_time=start_time, end_time=end_time, offset=offset, limit=limit, recv_window=recv_window) + +Deposit History(supporting network) (USER_DATA) + +Fetch deposit history. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_capital_deposit_hisrec_get200_response_inner import SapiV1CapitalDepositHisrecGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + coin = 'BNB' # str | Coin name (optional) + status = 56 # int | * `0` - pending * `6` - credited but cannot withdraw * `1` - success (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + offset = 56 # int | (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Deposit History(supporting network) (USER_DATA) + api_response = api_instance.sapi_v1_capital_deposit_hisrec_get(timestamp, signature, coin=coin, status=status, start_time=start_time, end_time=end_time, offset=offset, limit=limit, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_capital_deposit_hisrec_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_capital_deposit_hisrec_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **coin** | **str**| Coin name | [optional] + **status** | **int**| * `0` - pending * `6` - credited but cannot withdraw * `1` - success | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **offset** | **int**| | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1CapitalDepositHisrecGet200ResponseInner]**](SapiV1CapitalDepositHisrecGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of deposits | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_capital_withdraw_address_list_get** +> List[SapiV1CapitalWithdrawAddressListGet200ResponseInner] sapi_v1_capital_withdraw_address_list_get() + +Fetch withdraw address list (USER_DATA) + +Fetch withdraw address list Weight(IP): 10 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_capital_withdraw_address_list_get200_response_inner import SapiV1CapitalWithdrawAddressListGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + + try: + # Fetch withdraw address list (USER_DATA) + api_response = api_instance.sapi_v1_capital_withdraw_address_list_get() + print("The response of WalletApi->sapi_v1_capital_withdraw_address_list_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_capital_withdraw_address_list_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[SapiV1CapitalWithdrawAddressListGet200ResponseInner]**](SapiV1CapitalWithdrawAddressListGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Withdraw address list | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_capital_withdraw_apply_post** +> SapiV1CapitalWithdrawApplyPost200Response sapi_v1_capital_withdraw_apply_post(coin, address, amount, timestamp, signature, withdraw_order_id=withdraw_order_id, network=network, address_tag=address_tag, transaction_fee_flag=transaction_fee_flag, name=name, wallet_type=wallet_type, recv_window=recv_window) + +Withdraw (USER_DATA) + +Submit a withdraw request. - If `network` not send, return with default network of the coin. - You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. Weight(IP): 1 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_capital_withdraw_apply_post200_response import SapiV1CapitalWithdrawApplyPost200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + coin = 'BNB' # str | Coin name + address = 'address_example' # str | + amount = 1.01 # float | + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + withdraw_order_id = 'withdraw_order_id_example' # str | Client id for withdraw (optional) + network = 'BTC' # str | (optional) + address_tag = 'address_tag_example' # str | Secondary address identifier for coins like XRP,XMR etc. (optional) + transaction_fee_flag = False # bool | When making internal transfer - `true` -> returning the fee to the destination account; - `false` -> returning the fee back to the departure account. (optional) (default to False) + name = 'name_example' # str | (optional) + wallet_type = 56 # int | The wallet type for withdraw,0-Spot wallet, 1- Funding wallet. Default is Spot wallet (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Withdraw (USER_DATA) + api_response = api_instance.sapi_v1_capital_withdraw_apply_post(coin, address, amount, timestamp, signature, withdraw_order_id=withdraw_order_id, network=network, address_tag=address_tag, transaction_fee_flag=transaction_fee_flag, name=name, wallet_type=wallet_type, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_capital_withdraw_apply_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_capital_withdraw_apply_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **coin** | **str**| Coin name | + **address** | **str**| | + **amount** | **float**| | + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **withdraw_order_id** | **str**| Client id for withdraw | [optional] + **network** | **str**| | [optional] + **address_tag** | **str**| Secondary address identifier for coins like XRP,XMR etc. | [optional] + **transaction_fee_flag** | **bool**| When making internal transfer - `true` -> returning the fee to the destination account; - `false` -> returning the fee back to the departure account. | [optional] [default to False] + **name** | **str**| | [optional] + **wallet_type** | **int**| The wallet type for withdraw,0-Spot wallet, 1- Funding wallet. Default is Spot wallet | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**SapiV1CapitalWithdrawApplyPost200Response**](SapiV1CapitalWithdrawApplyPost200Response.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Transafer Id | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_capital_withdraw_history_get** +> List[SapiV1CapitalWithdrawHistoryGet200ResponseInner] sapi_v1_capital_withdraw_history_get(timestamp, signature, coin=coin, withdraw_order_id=withdraw_order_id, status=status, start_time=start_time, end_time=end_time, offset=offset, limit=limit, recv_window=recv_window) + +Withdraw History (supporting network) (USER_DATA) + +Fetch withdraw history. This endpoint specifically uses per second UID rate limit, user's total second level IP rate limit is 180000/second. Response from the endpoint contains header key X-SAPI-USED-UID-WEIGHT-1S, which defines weight used by the current IP. - `network` may not be in the response for old withdraw. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days - If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days. - If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default. Weight(UID): 18000 Request Limit: 10 requests per second + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_capital_withdraw_history_get200_response_inner import SapiV1CapitalWithdrawHistoryGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + coin = 'BNB' # str | Coin name (optional) + withdraw_order_id = 'withdraw_order_id_example' # str | (optional) + status = 56 # int | * `0` - Email Sent * `1` - Cancelled * `2` - Awaiting Approval * `3` - Rejected * `4` - Processing * `5` - Failure * `6` - Completed (optional) + start_time = 56 # int | UTC timestamp in ms (optional) + end_time = 56 # int | UTC timestamp in ms (optional) + offset = 56 # int | (optional) + limit = 5 # int | Default 500; max 1000. (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Withdraw History (supporting network) (USER_DATA) + api_response = api_instance.sapi_v1_capital_withdraw_history_get(timestamp, signature, coin=coin, withdraw_order_id=withdraw_order_id, status=status, start_time=start_time, end_time=end_time, offset=offset, limit=limit, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_capital_withdraw_history_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_capital_withdraw_history_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **coin** | **str**| Coin name | [optional] + **withdraw_order_id** | **str**| | [optional] + **status** | **int**| * `0` - Email Sent * `1` - Cancelled * `2` - Awaiting Approval * `3` - Rejected * `4` - Processing * `5` - Failure * `6` - Completed | [optional] + **start_time** | **int**| UTC timestamp in ms | [optional] + **end_time** | **int**| UTC timestamp in ms | [optional] + **offset** | **int**| | [optional] + **limit** | **int**| Default 500; max 1000. | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1CapitalWithdrawHistoryGet200ResponseInner]**](SapiV1CapitalWithdrawHistoryGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of withdraw history | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_spot_delist_schedule_get** +> List[SapiV1SpotDelistScheduleGet200ResponseInner] sapi_v1_spot_delist_schedule_get(timestamp, signature, recv_window=recv_window) + +Get symbols delist schedule for spot (MARKET_DATA) + +Get symbols delist schedule for spot Weight(IP): 100 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v1_spot_delist_schedule_get200_response_inner import SapiV1SpotDelistScheduleGet200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # Get symbols delist schedule for spot (MARKET_DATA) + api_response = api_instance.sapi_v1_spot_delist_schedule_get(timestamp, signature, recv_window=recv_window) + print("The response of WalletApi->sapi_v1_spot_delist_schedule_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_spot_delist_schedule_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV1SpotDelistScheduleGet200ResponseInner]**](SapiV1SpotDelistScheduleGet200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Symbols delist schedule | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v1_system_status_get** +> SapiV1SystemStatusGet200Response sapi_v1_system_status_get() + +System Status (System) + +Fetch system status. Weight(IP): 1 + +### Example + + +```python +import openapi_client +from openapi_client.models.sapi_v1_system_status_get200_response import SapiV1SystemStatusGet200Response +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + + try: + # System Status (System) + api_response = api_instance.sapi_v1_system_status_get() + print("The response of WalletApi->sapi_v1_system_status_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v1_system_status_get: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**SapiV1SystemStatusGet200Response**](SapiV1SystemStatusGet200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **sapi_v3_asset_get_user_asset_post** +> List[SapiV3AssetGetUserAssetPost200ResponseInner] sapi_v3_asset_get_user_asset_post(timestamp, signature, asset=asset, need_btc_valuation=need_btc_valuation, recv_window=recv_window) + +User Asset (USER_DATA) + +Get user assets, just for positive data. Weight(IP): 5 + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import openapi_client +from openapi_client.models.sapi_v3_asset_get_user_asset_post200_response_inner import SapiV3AssetGetUserAssetPost200ResponseInner +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.binance.com +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "https://api.binance.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.WalletApi(api_client) + timestamp = 56 # int | UTC timestamp in ms + signature = 'signature_example' # str | Signature + asset = 'BNB' # str | (optional) + need_btc_valuation = 'need_btc_valuation_example' # str | (optional) + recv_window = 5000 # int | The value cannot be greater than 60000 (optional) + + try: + # User Asset (USER_DATA) + api_response = api_instance.sapi_v3_asset_get_user_asset_post(timestamp, signature, asset=asset, need_btc_valuation=need_btc_valuation, recv_window=recv_window) + print("The response of WalletApi->sapi_v3_asset_get_user_asset_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletApi->sapi_v3_asset_get_user_asset_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timestamp** | **int**| UTC timestamp in ms | + **signature** | **str**| Signature | + **asset** | **str**| | [optional] + **need_btc_valuation** | **str**| | [optional] + **recv_window** | **int**| The value cannot be greater than 60000 | [optional] + +### Return type + +[**List[SapiV3AssetGetUserAssetPost200ResponseInner]**](SapiV3AssetGetUserAssetPost200ResponseInner.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User assets | - | +**400** | Bad Request | - | +**401** | Unauthorized Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/target/python/binance_openapi/git_push.sh b/target/python/binance_openapi/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/target/python/binance_openapi/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/target/python/binance_openapi/openapi_client/__init__.py b/target/python/binance_openapi/openapi_client/__init__.py new file mode 100644 index 0000000..c2263eb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/__init__.py @@ -0,0 +1,574 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from openapi_client.api.auto_invest_api import AutoInvestApi +from openapi_client.api.blvt_api import BLVTApi +from openapi_client.api.c2_c_api import C2CApi +from openapi_client.api.convert_api import ConvertApi +from openapi_client.api.crypto_loans_api import CryptoLoansApi +from openapi_client.api.dual_investment_api import DualInvestmentApi +from openapi_client.api.fiat_api import FiatApi +from openapi_client.api.futures_api import FuturesApi +from openapi_client.api.futures_algo_api import FuturesAlgoApi +from openapi_client.api.gift_card_api import GiftCardApi +from openapi_client.api.isolated_margin_stream_api import IsolatedMarginStreamApi +from openapi_client.api.margin_api import MarginApi +from openapi_client.api.margin_stream_api import MarginStreamApi +from openapi_client.api.market_api import MarketApi +from openapi_client.api.mining_api import MiningApi +from openapi_client.api.nft_api import NFTApi +from openapi_client.api.pay_api import PayApi +from openapi_client.api.portfolio_margin_api import PortfolioMarginApi +from openapi_client.api.rebate_api import RebateApi +from openapi_client.api.savings_api import SavingsApi +from openapi_client.api.simple_earn_api import SimpleEarnApi +from openapi_client.api.spot_algo_api import SpotAlgoApi +from openapi_client.api.staking_api import StakingApi +from openapi_client.api.stream_api import StreamApi +from openapi_client.api.sub_account_api import SubAccountApi +from openapi_client.api.trade_api import TradeApi +from openapi_client.api.vip_loans_api import VIPLoansApi +from openapi_client.api.wallet_api import WalletApi + +# import ApiClient +from openapi_client.api_response import ApiResponse +from openapi_client.api_client import ApiClient +from openapi_client.configuration import Configuration +from openapi_client.exceptions import OpenApiException +from openapi_client.exceptions import ApiTypeError +from openapi_client.exceptions import ApiValueError +from openapi_client.exceptions import ApiKeyError +from openapi_client.exceptions import ApiAttributeError +from openapi_client.exceptions import ApiException + +# import models into sdk package +from openapi_client.models.account import Account +from openapi_client.models.account_balances_inner import AccountBalancesInner +from openapi_client.models.account_commission_rates import AccountCommissionRates +from openapi_client.models.agg_trade import AggTrade +from openapi_client.models.api_v3_account_commission_get200_response import ApiV3AccountCommissionGet200Response +from openapi_client.models.api_v3_account_commission_get200_response_discount import ApiV3AccountCommissionGet200ResponseDiscount +from openapi_client.models.api_v3_account_commission_get200_response_standard_commission import ApiV3AccountCommissionGet200ResponseStandardCommission +from openapi_client.models.api_v3_account_commission_get200_response_tax_commission import ApiV3AccountCommissionGet200ResponseTaxCommission +from openapi_client.models.api_v3_all_order_list_get200_response_inner import ApiV3AllOrderListGet200ResponseInner +from openapi_client.models.api_v3_all_order_list_get200_response_inner_orders_inner import ApiV3AllOrderListGet200ResponseInnerOrdersInner +from openapi_client.models.api_v3_avg_price_get200_response import ApiV3AvgPriceGet200Response +from openapi_client.models.api_v3_depth_get200_response import ApiV3DepthGet200Response +from openapi_client.models.api_v3_exchange_info_get200_response import ApiV3ExchangeInfoGet200Response +from openapi_client.models.api_v3_exchange_info_get200_response_rate_limits_inner import ApiV3ExchangeInfoGet200ResponseRateLimitsInner +from openapi_client.models.api_v3_exchange_info_get200_response_symbols_inner import ApiV3ExchangeInfoGet200ResponseSymbolsInner +from openapi_client.models.api_v3_exchange_info_get200_response_symbols_inner_filters_inner import ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner +from openapi_client.models.api_v3_klines_get200_response_inner_inner import ApiV3KlinesGet200ResponseInnerInner +from openapi_client.models.api_v3_my_allocations_get200_response_inner import ApiV3MyAllocationsGet200ResponseInner +from openapi_client.models.api_v3_my_prevented_matches_get200_response_inner import ApiV3MyPreventedMatchesGet200ResponseInner +from openapi_client.models.api_v3_open_order_list_get200_response_inner import ApiV3OpenOrderListGet200ResponseInner +from openapi_client.models.api_v3_open_order_list_get200_response_inner_orders_inner import ApiV3OpenOrderListGet200ResponseInnerOrdersInner +from openapi_client.models.api_v3_open_orders_delete200_response_inner import ApiV3OpenOrdersDelete200ResponseInner +from openapi_client.models.api_v3_order_cancel_replace_post200_response import ApiV3OrderCancelReplacePost200Response +from openapi_client.models.api_v3_order_cancel_replace_post200_response_cancel_response import ApiV3OrderCancelReplacePost200ResponseCancelResponse +from openapi_client.models.api_v3_order_cancel_replace_post200_response_new_order_response import ApiV3OrderCancelReplacePost200ResponseNewOrderResponse +from openapi_client.models.api_v3_order_list_get200_response import ApiV3OrderListGet200Response +from openapi_client.models.api_v3_order_list_get200_response_orders_inner import ApiV3OrderListGet200ResponseOrdersInner +from openapi_client.models.api_v3_order_oco_post200_response import ApiV3OrderOcoPost200Response +from openapi_client.models.api_v3_order_oco_post200_response_order_reports_inner import ApiV3OrderOcoPost200ResponseOrderReportsInner +from openapi_client.models.api_v3_order_oco_post200_response_orders_inner import ApiV3OrderOcoPost200ResponseOrdersInner +from openapi_client.models.api_v3_order_post200_response import ApiV3OrderPost200Response +from openapi_client.models.api_v3_rate_limit_order_get200_response_inner import ApiV3RateLimitOrderGet200ResponseInner +from openapi_client.models.api_v3_sor_order_post200_response import ApiV3SorOrderPost200Response +from openapi_client.models.api_v3_sor_order_post200_response_fills_inner import ApiV3SorOrderPost200ResponseFillsInner +from openapi_client.models.api_v3_ticker24hr_get200_response import ApiV3Ticker24hrGet200Response +from openapi_client.models.api_v3_ticker_book_ticker_get200_response import ApiV3TickerBookTickerGet200Response +from openapi_client.models.api_v3_ticker_get200_response import ApiV3TickerGet200Response +from openapi_client.models.api_v3_ticker_price_get200_response import ApiV3TickerPriceGet200Response +from openapi_client.models.api_v3_ticker_trading_day_get200_response import ApiV3TickerTradingDayGet200Response +from openapi_client.models.api_v3_time_get200_response import ApiV3TimeGet200Response +from openapi_client.models.api_v3_user_data_stream_post200_response import ApiV3UserDataStreamPost200Response +from openapi_client.models.bnb_burn_status import BnbBurnStatus +from openapi_client.models.book_ticker import BookTicker +from openapi_client.models.canceled_margin_order_detail import CanceledMarginOrderDetail +from openapi_client.models.day_ticker import DayTicker +from openapi_client.models.error import Error +from openapi_client.models.isolated_margin_account_info import IsolatedMarginAccountInfo +from openapi_client.models.isolated_margin_account_info_assets_inner import IsolatedMarginAccountInfoAssetsInner +from openapi_client.models.isolated_margin_account_info_assets_inner_base_asset import IsolatedMarginAccountInfoAssetsInnerBaseAsset +from openapi_client.models.isolated_margin_account_info_assets_inner_quote_asset import IsolatedMarginAccountInfoAssetsInnerQuoteAsset +from openapi_client.models.margin_oco_order import MarginOcoOrder +from openapi_client.models.margin_oco_order_order_reports_inner import MarginOcoOrderOrderReportsInner +from openapi_client.models.margin_oco_order_orders_inner import MarginOcoOrderOrdersInner +from openapi_client.models.margin_order import MarginOrder +from openapi_client.models.margin_order_detail import MarginOrderDetail +from openapi_client.models.margin_order_response_ack import MarginOrderResponseAck +from openapi_client.models.margin_order_response_full import MarginOrderResponseFull +from openapi_client.models.margin_order_response_result import MarginOrderResponseResult +from openapi_client.models.margin_trade import MarginTrade +from openapi_client.models.margin_transfer_details import MarginTransferDetails +from openapi_client.models.margin_transfer_details_rows_inner import MarginTransferDetailsRowsInner +from openapi_client.models.my_trade import MyTrade +from openapi_client.models.oco_order import OcoOrder +from openapi_client.models.oco_order_order_reports_inner import OcoOrderOrderReportsInner +from openapi_client.models.order import Order +from openapi_client.models.order_details import OrderDetails +from openapi_client.models.order_response_ack import OrderResponseAck +from openapi_client.models.order_response_full import OrderResponseFull +from openapi_client.models.order_response_full_fills_inner import OrderResponseFullFillsInner +from openapi_client.models.order_response_result import OrderResponseResult +from openapi_client.models.price_ticker import PriceTicker +from openapi_client.models.repayment_info import RepaymentInfo +from openapi_client.models.repayment_info2 import RepaymentInfo2 +from openapi_client.models.sapi_v1_account_api_restrictions_get200_response import SapiV1AccountApiRestrictionsGet200Response +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response import SapiV1AccountApiTradingStatusGet200Response +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data import SapiV1AccountApiTradingStatusGet200ResponseData +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_indicators import SapiV1AccountApiTradingStatusGet200ResponseDataIndicators +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner import SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_trigger_condition import SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition +from openapi_client.models.sapi_v1_account_info_get200_response import SapiV1AccountInfoGet200Response +from openapi_client.models.sapi_v1_account_snapshot_get200_response import SapiV1AccountSnapshotGet200Response +from openapi_client.models.sapi_v1_account_status_get200_response import SapiV1AccountStatusGet200Response +from openapi_client.models.sapi_v1_algo_futures_historical_orders_get200_response import SapiV1AlgoFuturesHistoricalOrdersGet200Response +from openapi_client.models.sapi_v1_algo_futures_historical_orders_get200_response_orders_inner import SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner +from openapi_client.models.sapi_v1_algo_futures_new_order_vp_post200_response import SapiV1AlgoFuturesNewOrderVpPost200Response +from openapi_client.models.sapi_v1_algo_futures_open_orders_get200_response import SapiV1AlgoFuturesOpenOrdersGet200Response +from openapi_client.models.sapi_v1_algo_futures_open_orders_get200_response_orders_inner import SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner +from openapi_client.models.sapi_v1_algo_futures_order_delete200_response import SapiV1AlgoFuturesOrderDelete200Response +from openapi_client.models.sapi_v1_algo_futures_sub_orders_get200_response import SapiV1AlgoFuturesSubOrdersGet200Response +from openapi_client.models.sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner import SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner +from openapi_client.models.sapi_v1_algo_spot_historical_orders_get200_response import SapiV1AlgoSpotHistoricalOrdersGet200Response +from openapi_client.models.sapi_v1_algo_spot_historical_orders_get200_response_orders_inner import SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner +from openapi_client.models.sapi_v1_algo_spot_new_order_twap_post200_response import SapiV1AlgoSpotNewOrderTwapPost200Response +from openapi_client.models.sapi_v1_algo_spot_open_orders_get200_response import SapiV1AlgoSpotOpenOrdersGet200Response +from openapi_client.models.sapi_v1_algo_spot_open_orders_get200_response_orders_inner import SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner +from openapi_client.models.sapi_v1_algo_spot_order_delete200_response import SapiV1AlgoSpotOrderDelete200Response +from openapi_client.models.sapi_v1_algo_spot_sub_orders_get200_response import SapiV1AlgoSpotSubOrdersGet200Response +from openapi_client.models.sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner import SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner +from openapi_client.models.sapi_v1_asset_asset_detail_get200_response import SapiV1AssetAssetDetailGet200Response +from openapi_client.models.sapi_v1_asset_asset_detail_get200_response_ctr import SapiV1AssetAssetDetailGet200ResponseCTR +from openapi_client.models.sapi_v1_asset_asset_dividend_get200_response import SapiV1AssetAssetDividendGet200Response +from openapi_client.models.sapi_v1_asset_asset_dividend_get200_response_rows_inner import SapiV1AssetAssetDividendGet200ResponseRowsInner +from openapi_client.models.sapi_v1_asset_convert_transfer_post200_response import SapiV1AssetConvertTransferPost200Response +from openapi_client.models.sapi_v1_asset_convert_transfer_query_by_page_get200_response import SapiV1AssetConvertTransferQueryByPageGet200Response +from openapi_client.models.sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner import SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner +from openapi_client.models.sapi_v1_asset_custody_transfer_history_get200_response import SapiV1AssetCustodyTransferHistoryGet200Response +from openapi_client.models.sapi_v1_asset_custody_transfer_history_get200_response_rows_inner import SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_asset_dribblet_get200_response import SapiV1AssetDribbletGet200Response +from openapi_client.models.sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner import SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner +from openapi_client.models.sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner import SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner +from openapi_client.models.sapi_v1_asset_dust_btc_post200_response import SapiV1AssetDustBtcPost200Response +from openapi_client.models.sapi_v1_asset_dust_btc_post200_response_details_inner import SapiV1AssetDustBtcPost200ResponseDetailsInner +from openapi_client.models.sapi_v1_asset_dust_post200_response import SapiV1AssetDustPost200Response +from openapi_client.models.sapi_v1_asset_dust_post200_response_transfer_result_inner import SapiV1AssetDustPost200ResponseTransferResultInner +from openapi_client.models.sapi_v1_asset_get_funding_asset_post200_response_inner import SapiV1AssetGetFundingAssetPost200ResponseInner +from openapi_client.models.sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response import SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response +from openapi_client.models.sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner import SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner +from openapi_client.models.sapi_v1_asset_trade_fee_get200_response_inner import SapiV1AssetTradeFeeGet200ResponseInner +from openapi_client.models.sapi_v1_asset_transfer_get200_response import SapiV1AssetTransferGet200Response +from openapi_client.models.sapi_v1_asset_transfer_get200_response_rows_inner import SapiV1AssetTransferGet200ResponseRowsInner +from openapi_client.models.sapi_v1_asset_transfer_post200_response import SapiV1AssetTransferPost200Response +from openapi_client.models.sapi_v1_asset_wallet_balance_get200_response_inner import SapiV1AssetWalletBalanceGet200ResponseInner +from openapi_client.models.sapi_v1_blvt_redeem_post200_response import SapiV1BlvtRedeemPost200Response +from openapi_client.models.sapi_v1_blvt_redeem_record_get200_response_inner import SapiV1BlvtRedeemRecordGet200ResponseInner +from openapi_client.models.sapi_v1_blvt_subscribe_post200_response import SapiV1BlvtSubscribePost200Response +from openapi_client.models.sapi_v1_blvt_subscribe_record_get200_response import SapiV1BlvtSubscribeRecordGet200Response +from openapi_client.models.sapi_v1_blvt_token_info_get200_response_inner import SapiV1BlvtTokenInfoGet200ResponseInner +from openapi_client.models.sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner import SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner +from openapi_client.models.sapi_v1_blvt_user_limit_get200_response_inner import SapiV1BlvtUserLimitGet200ResponseInner +from openapi_client.models.sapi_v1_c2c_order_match_list_user_order_history_get200_response import SapiV1C2cOrderMatchListUserOrderHistoryGet200Response +from openapi_client.models.sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner import SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner +from openapi_client.models.sapi_v1_capital_config_getall_get200_response_inner import SapiV1CapitalConfigGetallGet200ResponseInner +from openapi_client.models.sapi_v1_capital_config_getall_get200_response_inner_network_list_inner import SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner +from openapi_client.models.sapi_v1_capital_contract_convertible_coins_get200_response import SapiV1CapitalContractConvertibleCoinsGet200Response +from openapi_client.models.sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates import SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates +from openapi_client.models.sapi_v1_capital_deposit_address_get200_response import SapiV1CapitalDepositAddressGet200Response +from openapi_client.models.sapi_v1_capital_deposit_address_list_get200_response_inner import SapiV1CapitalDepositAddressListGet200ResponseInner +from openapi_client.models.sapi_v1_capital_deposit_credit_apply_post200_response import SapiV1CapitalDepositCreditApplyPost200Response +from openapi_client.models.sapi_v1_capital_deposit_hisrec_get200_response_inner import SapiV1CapitalDepositHisrecGet200ResponseInner +from openapi_client.models.sapi_v1_capital_deposit_sub_address_get200_response import SapiV1CapitalDepositSubAddressGet200Response +from openapi_client.models.sapi_v1_capital_deposit_sub_hisrec_get200_response_inner import SapiV1CapitalDepositSubHisrecGet200ResponseInner +from openapi_client.models.sapi_v1_capital_withdraw_address_list_get200_response_inner import SapiV1CapitalWithdrawAddressListGet200ResponseInner +from openapi_client.models.sapi_v1_capital_withdraw_apply_post200_response import SapiV1CapitalWithdrawApplyPost200Response +from openapi_client.models.sapi_v1_capital_withdraw_history_get200_response_inner import SapiV1CapitalWithdrawHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_convert_accept_quote_post200_response import SapiV1ConvertAcceptQuotePost200Response +from openapi_client.models.sapi_v1_convert_asset_info_get200_response_inner import SapiV1ConvertAssetInfoGet200ResponseInner +from openapi_client.models.sapi_v1_convert_exchange_info_get200_response_inner import SapiV1ConvertExchangeInfoGet200ResponseInner +from openapi_client.models.sapi_v1_convert_get_quote_post200_response import SapiV1ConvertGetQuotePost200Response +from openapi_client.models.sapi_v1_convert_limit_cancel_order_post200_response import SapiV1ConvertLimitCancelOrderPost200Response +from openapi_client.models.sapi_v1_convert_limit_place_order_post200_response import SapiV1ConvertLimitPlaceOrderPost200Response +from openapi_client.models.sapi_v1_convert_limit_query_open_orders_get200_response import SapiV1ConvertLimitQueryOpenOrdersGet200Response +from openapi_client.models.sapi_v1_convert_limit_query_open_orders_get200_response_list_inner import SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner +from openapi_client.models.sapi_v1_convert_order_status_get200_response import SapiV1ConvertOrderStatusGet200Response +from openapi_client.models.sapi_v1_convert_trade_flow_get200_response import SapiV1ConvertTradeFlowGet200Response +from openapi_client.models.sapi_v1_convert_trade_flow_get200_response_list_inner import SapiV1ConvertTradeFlowGet200ResponseListInner +from openapi_client.models.sapi_v1_dci_product_accounts_get200_response import SapiV1DciProductAccountsGet200Response +from openapi_client.models.sapi_v1_dci_product_auto_compound_edit_status_post200_response import SapiV1DciProductAutoCompoundEditStatusPost200Response +from openapi_client.models.sapi_v1_dci_product_list_get200_response import SapiV1DciProductListGet200Response +from openapi_client.models.sapi_v1_dci_product_list_get200_response_list_inner import SapiV1DciProductListGet200ResponseListInner +from openapi_client.models.sapi_v1_dci_product_positions_get200_response import SapiV1DciProductPositionsGet200Response +from openapi_client.models.sapi_v1_dci_product_positions_get200_response_list_inner import SapiV1DciProductPositionsGet200ResponseListInner +from openapi_client.models.sapi_v1_dci_product_subscribe_post200_response import SapiV1DciProductSubscribePost200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_rate_history_get200_response import SapiV1EthStakingEthHistoryRateHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_eth_staking_eth_history_redemption_history_get200_response import SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_eth_staking_eth_history_rewards_history_get200_response import SapiV1EthStakingEthHistoryRewardsHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_eth_staking_eth_history_staking_history_get200_response import SapiV1EthStakingEthHistoryStakingHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response import SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_eth_staking_eth_quota_get200_response import SapiV1EthStakingEthQuotaGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_redeem_post200_response import SapiV1EthStakingEthRedeemPost200Response +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response import SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner import SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response import SapiV1EthStakingWbethHistoryWrapHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner import SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_eth_staking_wbeth_wrap_post200_response import SapiV1EthStakingWbethWrapPost200Response +from openapi_client.models.sapi_v1_fiat_orders_get200_response import SapiV1FiatOrdersGet200Response +from openapi_client.models.sapi_v1_fiat_orders_get200_response_data_inner import SapiV1FiatOrdersGet200ResponseDataInner +from openapi_client.models.sapi_v1_fiat_payments_get200_response import SapiV1FiatPaymentsGet200Response +from openapi_client.models.sapi_v1_fiat_payments_get200_response_data_inner import SapiV1FiatPaymentsGet200ResponseDataInner +from openapi_client.models.sapi_v1_futures_hist_data_link_get200_response import SapiV1FuturesHistDataLinkGet200Response +from openapi_client.models.sapi_v1_futures_hist_data_link_get200_response_data_inner import SapiV1FuturesHistDataLinkGet200ResponseDataInner +from openapi_client.models.sapi_v1_futures_transfer_get200_response import SapiV1FuturesTransferGet200Response +from openapi_client.models.sapi_v1_futures_transfer_get200_response_rows_inner import SapiV1FuturesTransferGet200ResponseRowsInner +from openapi_client.models.sapi_v1_giftcard_buy_code_token_limit_get200_response import SapiV1GiftcardBuyCodeTokenLimitGet200Response +from openapi_client.models.sapi_v1_giftcard_buy_code_token_limit_get200_response_data import SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData +from openapi_client.models.sapi_v1_giftcard_create_code_post200_response import SapiV1GiftcardCreateCodePost200Response +from openapi_client.models.sapi_v1_giftcard_create_code_post200_response_data import SapiV1GiftcardCreateCodePost200ResponseData +from openapi_client.models.sapi_v1_giftcard_cryptography_rsa_public_key_get200_response import SapiV1GiftcardCryptographyRsaPublicKeyGet200Response +from openapi_client.models.sapi_v1_giftcard_redeem_code_post200_response import SapiV1GiftcardRedeemCodePost200Response +from openapi_client.models.sapi_v1_giftcard_redeem_code_post200_response_data import SapiV1GiftcardRedeemCodePost200ResponseData +from openapi_client.models.sapi_v1_giftcard_verify_get200_response import SapiV1GiftcardVerifyGet200Response +from openapi_client.models.sapi_v1_giftcard_verify_get200_response_data import SapiV1GiftcardVerifyGet200ResponseData +from openapi_client.models.sapi_v1_lending_auto_invest_all_asset_get200_response import SapiV1LendingAutoInvestAllAssetGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_history_list_get200_response_inner import SapiV1LendingAutoInvestHistoryListGet200ResponseInner +from openapi_client.models.sapi_v1_lending_auto_invest_index_info_get200_response import SapiV1LendingAutoInvestIndexInfoGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner import SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response import SapiV1LendingAutoInvestIndexUserSummaryGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner import SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner import SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_post200_response import SapiV1LendingAutoInvestOneOffPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner import SapiV1LendingAutoInvestOneOffPostDetailsParameterInner +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_status_get200_response import SapiV1LendingAutoInvestOneOffStatusGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_add_post200_response import SapiV1LendingAutoInvestPlanAddPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner import SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner +from openapi_client.models.sapi_v1_lending_auto_invest_plan_edit_status_post200_response import SapiV1LendingAutoInvestPlanEditStatusPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response import SapiV1LendingAutoInvestPlanIdGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner import SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner import SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner +from openapi_client.models.sapi_v1_lending_auto_invest_plan_list_get200_response import SapiV1LendingAutoInvestPlanListGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner import SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner +from openapi_client.models.sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner import SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner import SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner +from openapi_client.models.sapi_v1_lending_auto_invest_redeem_history_get200_response_inner import SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_lending_auto_invest_redeem_post200_response import SapiV1LendingAutoInvestRedeemPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_source_asset_list_get200_response import SapiV1LendingAutoInvestSourceAssetListGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner import SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response import SapiV1LendingAutoInvestTargetAssetListGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner import SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner import SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner import SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner +from openapi_client.models.sapi_v1_lending_customized_fixed_purchase_post200_response import SapiV1LendingCustomizedFixedPurchasePost200Response +from openapi_client.models.sapi_v1_lending_position_changed_post200_response import SapiV1LendingPositionChangedPost200Response +from openapi_client.models.sapi_v1_lending_project_list_get200_response_inner import SapiV1LendingProjectListGet200ResponseInner +from openapi_client.models.sapi_v1_lending_project_position_list_get200_response_inner import SapiV1LendingProjectPositionListGet200ResponseInner +from openapi_client.models.sapi_v1_loan_adjust_ltv_post200_response import SapiV1LoanAdjustLtvPost200Response +from openapi_client.models.sapi_v1_loan_borrow_history_get200_response import SapiV1LoanBorrowHistoryGet200Response +from openapi_client.models.sapi_v1_loan_borrow_history_get200_response_rows_inner import SapiV1LoanBorrowHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_borrow_post200_response import SapiV1LoanBorrowPost200Response +from openapi_client.models.sapi_v1_loan_collateral_data_get200_response import SapiV1LoanCollateralDataGet200Response +from openapi_client.models.sapi_v1_loan_collateral_data_get200_response_rows_inner import SapiV1LoanCollateralDataGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_customize_margin_call_post200_response import SapiV1LoanCustomizeMarginCallPost200Response +from openapi_client.models.sapi_v1_loan_customize_margin_call_post200_response_rows_inner import SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_income_get200_response_inner import SapiV1LoanIncomeGet200ResponseInner +from openapi_client.models.sapi_v1_loan_loanable_data_get200_response import SapiV1LoanLoanableDataGet200Response +from openapi_client.models.sapi_v1_loan_loanable_data_get200_response_rows_inner import SapiV1LoanLoanableDataGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_ltv_adjustment_history_get200_response import SapiV1LoanLtvAdjustmentHistoryGet200Response +from openapi_client.models.sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner import SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_ongoing_orders_get200_response import SapiV1LoanOngoingOrdersGet200Response +from openapi_client.models.sapi_v1_loan_ongoing_orders_get200_response_rows_inner import SapiV1LoanOngoingOrdersGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_repay_collateral_rate_get200_response import SapiV1LoanRepayCollateralRateGet200Response +from openapi_client.models.sapi_v1_loan_repay_history_get200_response import SapiV1LoanRepayHistoryGet200Response +from openapi_client.models.sapi_v1_loan_repay_history_get200_response_rows_inner import SapiV1LoanRepayHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_repay_post200_response import SapiV1LoanRepayPost200Response +from openapi_client.models.sapi_v1_loan_vip_borrow_post200_response import SapiV1LoanVipBorrowPost200Response +from openapi_client.models.sapi_v1_loan_vip_collateral_account_get200_response import SapiV1LoanVipCollateralAccountGet200Response +from openapi_client.models.sapi_v1_loan_vip_collateral_account_get200_response_rows_inner import SapiV1LoanVipCollateralAccountGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_vip_collateral_data_get200_response import SapiV1LoanVipCollateralDataGet200Response +from openapi_client.models.sapi_v1_loan_vip_collateral_data_get200_response_rows_inner import SapiV1LoanVipCollateralDataGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_vip_loanable_data_get200_response import SapiV1LoanVipLoanableDataGet200Response +from openapi_client.models.sapi_v1_loan_vip_loanable_data_get200_response_rows_inner import SapiV1LoanVipLoanableDataGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_vip_ongoing_orders_get200_response import SapiV1LoanVipOngoingOrdersGet200Response +from openapi_client.models.sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner import SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_vip_renew_post200_response import SapiV1LoanVipRenewPost200Response +from openapi_client.models.sapi_v1_loan_vip_repay_history_get200_response import SapiV1LoanVipRepayHistoryGet200Response +from openapi_client.models.sapi_v1_loan_vip_repay_history_get200_response_rows_inner import SapiV1LoanVipRepayHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_vip_repay_post200_response import SapiV1LoanVipRepayPost200Response +from openapi_client.models.sapi_v1_loan_vip_request_data_get200_response import SapiV1LoanVipRequestDataGet200Response +from openapi_client.models.sapi_v1_loan_vip_request_data_get200_response_rows_inner import SapiV1LoanVipRequestDataGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_vip_request_interest_rate_get200_response_inner import SapiV1LoanVipRequestInterestRateGet200ResponseInner +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response import SapiV1ManagedSubaccountAccountSnapshotGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner +from openapi_client.models.sapi_v1_managed_subaccount_asset_get200_response_inner import SapiV1ManagedSubaccountAssetGet200ResponseInner +from openapi_client.models.sapi_v1_managed_subaccount_deposit_address_get200_response import SapiV1ManagedSubaccountDepositAddressGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_deposit_post200_response import SapiV1ManagedSubaccountDepositPost200Response +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response import SapiV1ManagedSubaccountFetchFutureAssetGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner +from openapi_client.models.sapi_v1_managed_subaccount_info_get200_response import SapiV1ManagedSubaccountInfoGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner import SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner +from openapi_client.models.sapi_v1_managed_subaccount_margin_asset_get200_response import SapiV1ManagedSubaccountMarginAssetGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner import SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response import SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner import SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_get200_response import SapiV1ManagedSubaccountQueryTransLogGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner import SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner +from openapi_client.models.sapi_v1_margin_account_get200_response import SapiV1MarginAccountGet200Response +from openapi_client.models.sapi_v1_margin_account_get200_response_user_assets_inner import SapiV1MarginAccountGet200ResponseUserAssetsInner +from openapi_client.models.sapi_v1_margin_all_assets_get200_response_inner import SapiV1MarginAllAssetsGet200ResponseInner +from openapi_client.models.sapi_v1_margin_all_pairs_get200_response_inner import SapiV1MarginAllPairsGet200ResponseInner +from openapi_client.models.sapi_v1_margin_available_inventory_get200_response import SapiV1MarginAvailableInventoryGet200Response +from openapi_client.models.sapi_v1_margin_available_inventory_get200_response_assets import SapiV1MarginAvailableInventoryGet200ResponseAssets +from openapi_client.models.sapi_v1_margin_borrow_repay_get200_response import SapiV1MarginBorrowRepayGet200Response +from openapi_client.models.sapi_v1_margin_borrow_repay_get200_response_rows_inner import SapiV1MarginBorrowRepayGet200ResponseRowsInner +from openapi_client.models.sapi_v1_margin_borrow_repay_post200_response import SapiV1MarginBorrowRepayPost200Response +from openapi_client.models.sapi_v1_margin_capital_flow_get200_response_inner import SapiV1MarginCapitalFlowGet200ResponseInner +from openapi_client.models.sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner import SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner +from openapi_client.models.sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner import SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner +from openapi_client.models.sapi_v1_margin_cross_margin_data_get200_response_inner import SapiV1MarginCrossMarginDataGet200ResponseInner +from openapi_client.models.sapi_v1_margin_delist_schedule_get200_response_inner import SapiV1MarginDelistScheduleGet200ResponseInner +from openapi_client.models.sapi_v1_margin_exchange_small_liability_get200_response_inner import SapiV1MarginExchangeSmallLiabilityGet200ResponseInner +from openapi_client.models.sapi_v1_margin_exchange_small_liability_history_get200_response import SapiV1MarginExchangeSmallLiabilityHistoryGet200Response +from openapi_client.models.sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner import SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_margin_force_liquidation_rec_get200_response import SapiV1MarginForceLiquidationRecGet200Response +from openapi_client.models.sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner import SapiV1MarginForceLiquidationRecGet200ResponseRowsInner +from openapi_client.models.sapi_v1_margin_interest_history_get200_response import SapiV1MarginInterestHistoryGet200Response +from openapi_client.models.sapi_v1_margin_interest_history_get200_response_rows_inner import SapiV1MarginInterestHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_margin_interest_rate_history_get200_response_inner import SapiV1MarginInterestRateHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_margin_isolated_account_limit_get200_response import SapiV1MarginIsolatedAccountLimitGet200Response +from openapi_client.models.sapi_v1_margin_isolated_account_post200_response import SapiV1MarginIsolatedAccountPost200Response +from openapi_client.models.sapi_v1_margin_isolated_all_pairs_get200_response_inner import SapiV1MarginIsolatedAllPairsGet200ResponseInner +from openapi_client.models.sapi_v1_margin_isolated_margin_data_get200_response_inner import SapiV1MarginIsolatedMarginDataGet200ResponseInner +from openapi_client.models.sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner import SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner +from openapi_client.models.sapi_v1_margin_isolated_margin_tier_get200_response_inner import SapiV1MarginIsolatedMarginTierGet200ResponseInner +from openapi_client.models.sapi_v1_margin_leverage_bracket_get200_response_inner import SapiV1MarginLeverageBracketGet200ResponseInner +from openapi_client.models.sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner import SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner +from openapi_client.models.sapi_v1_margin_max_borrowable_get200_response import SapiV1MarginMaxBorrowableGet200Response +from openapi_client.models.sapi_v1_margin_max_leverage_post200_response import SapiV1MarginMaxLeveragePost200Response +from openapi_client.models.sapi_v1_margin_max_transferable_get200_response import SapiV1MarginMaxTransferableGet200Response +from openapi_client.models.sapi_v1_margin_next_hourly_interest_rate_get200_response_inner import SapiV1MarginNextHourlyInterestRateGet200ResponseInner +from openapi_client.models.sapi_v1_margin_open_order_list_get200_response_inner import SapiV1MarginOpenOrderListGet200ResponseInner +from openapi_client.models.sapi_v1_margin_open_orders_delete200_response_inner import SapiV1MarginOpenOrdersDelete200ResponseInner +from openapi_client.models.sapi_v1_margin_order_list_get200_response import SapiV1MarginOrderListGet200Response +from openapi_client.models.sapi_v1_margin_order_oco_post200_response import SapiV1MarginOrderOcoPost200Response +from openapi_client.models.sapi_v1_margin_order_oco_post200_response_order_reports_inner import SapiV1MarginOrderOcoPost200ResponseOrderReportsInner +from openapi_client.models.sapi_v1_margin_order_oco_post200_response_orders_inner import SapiV1MarginOrderOcoPost200ResponseOrdersInner +from openapi_client.models.sapi_v1_margin_order_post200_response import SapiV1MarginOrderPost200Response +from openapi_client.models.sapi_v1_margin_price_index_get200_response import SapiV1MarginPriceIndexGet200Response +from openapi_client.models.sapi_v1_margin_rate_limit_order_get200_response_inner import SapiV1MarginRateLimitOrderGet200ResponseInner +from openapi_client.models.sapi_v1_margin_trade_coeff_get200_response import SapiV1MarginTradeCoeffGet200Response +from openapi_client.models.sapi_v1_margin_transfer_get200_response import SapiV1MarginTransferGet200Response +from openapi_client.models.sapi_v1_margin_transfer_get200_response_rows_inner import SapiV1MarginTransferGet200ResponseRowsInner +from openapi_client.models.sapi_v1_mining_hash_transfer_config_cancel_post200_response import SapiV1MiningHashTransferConfigCancelPost200Response +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response import SapiV1MiningHashTransferConfigDetailsListGet200Response +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response_data import SapiV1MiningHashTransferConfigDetailsListGet200ResponseData +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner import SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner +from openapi_client.models.sapi_v1_mining_hash_transfer_config_post200_response import SapiV1MiningHashTransferConfigPost200Response +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response import SapiV1MiningHashTransferProfitDetailsGet200Response +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response_data import SapiV1MiningHashTransferProfitDetailsGet200ResponseData +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner import SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner +from openapi_client.models.sapi_v1_mining_payment_list_get200_response import SapiV1MiningPaymentListGet200Response +from openapi_client.models.sapi_v1_mining_payment_list_get200_response_data import SapiV1MiningPaymentListGet200ResponseData +from openapi_client.models.sapi_v1_mining_payment_list_get200_response_data_account_profits_inner import SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner +from openapi_client.models.sapi_v1_mining_payment_other_get200_response import SapiV1MiningPaymentOtherGet200Response +from openapi_client.models.sapi_v1_mining_payment_other_get200_response_data import SapiV1MiningPaymentOtherGet200ResponseData +from openapi_client.models.sapi_v1_mining_payment_other_get200_response_data_other_profits_inner import SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response import SapiV1MiningPaymentUidGet200Response +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response_data import SapiV1MiningPaymentUidGet200ResponseData +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner import SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner +from openapi_client.models.sapi_v1_mining_pub_algo_list_get200_response import SapiV1MiningPubAlgoListGet200Response +from openapi_client.models.sapi_v1_mining_pub_algo_list_get200_response_data_inner import SapiV1MiningPubAlgoListGet200ResponseDataInner +from openapi_client.models.sapi_v1_mining_pub_coin_list_get200_response import SapiV1MiningPubCoinListGet200Response +from openapi_client.models.sapi_v1_mining_pub_coin_list_get200_response_data_inner import SapiV1MiningPubCoinListGet200ResponseDataInner +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response import SapiV1MiningStatisticsUserListGet200Response +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response_data_inner import SapiV1MiningStatisticsUserListGet200ResponseDataInner +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner import SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response import SapiV1MiningStatisticsUserStatusGet200Response +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response_data import SapiV1MiningStatisticsUserStatusGet200ResponseData +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response_data_profit_today import SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response import SapiV1MiningWorkerDetailGet200Response +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response_data_inner import SapiV1MiningWorkerDetailGet200ResponseDataInner +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner import SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner +from openapi_client.models.sapi_v1_mining_worker_list_get200_response import SapiV1MiningWorkerListGet200Response +from openapi_client.models.sapi_v1_mining_worker_list_get200_response_data import SapiV1MiningWorkerListGet200ResponseData +from openapi_client.models.sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner import SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner +from openapi_client.models.sapi_v1_nft_history_deposit_get200_response import SapiV1NftHistoryDepositGet200Response +from openapi_client.models.sapi_v1_nft_history_deposit_get200_response_list_inner import SapiV1NftHistoryDepositGet200ResponseListInner +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response import SapiV1NftHistoryTransactionsGet200Response +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response_list_inner import SapiV1NftHistoryTransactionsGet200ResponseListInner +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner import SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner +from openapi_client.models.sapi_v1_nft_history_withdraw_get200_response import SapiV1NftHistoryWithdrawGet200Response +from openapi_client.models.sapi_v1_nft_history_withdraw_get200_response_list_inner import SapiV1NftHistoryWithdrawGet200ResponseListInner +from openapi_client.models.sapi_v1_nft_user_get_asset_get200_response import SapiV1NftUserGetAssetGet200Response +from openapi_client.models.sapi_v1_nft_user_get_asset_get200_response_list_inner import SapiV1NftUserGetAssetGet200ResponseListInner +from openapi_client.models.sapi_v1_pay_transactions_get200_response import SapiV1PayTransactionsGet200Response +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner import SapiV1PayTransactionsGet200ResponseDataInner +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner import SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_payer_info import SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_receiver_info import SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner import SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner +from openapi_client.models.sapi_v1_portfolio_account_get200_response import SapiV1PortfolioAccountGet200Response +from openapi_client.models.sapi_v1_portfolio_asset_index_price_get200_response_inner import SapiV1PortfolioAssetIndexPriceGet200ResponseInner +from openapi_client.models.sapi_v1_portfolio_auto_collection_post200_response import SapiV1PortfolioAutoCollectionPost200Response +from openapi_client.models.sapi_v1_portfolio_collateral_rate_get200_response_inner import SapiV1PortfolioCollateralRateGet200ResponseInner +from openapi_client.models.sapi_v1_portfolio_interest_history_get200_response_inner import SapiV1PortfolioInterestHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_portfolio_margin_asset_leverage_get200_response_inner import SapiV1PortfolioMarginAssetLeverageGet200ResponseInner +from openapi_client.models.sapi_v1_portfolio_pm_loan_get200_response import SapiV1PortfolioPmLoanGet200Response +from openapi_client.models.sapi_v1_portfolio_repay_futures_switch_get200_response import SapiV1PortfolioRepayFuturesSwitchGet200Response +from openapi_client.models.sapi_v1_portfolio_repay_post200_response import SapiV1PortfolioRepayPost200Response +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response import SapiV1RebateTaxQueryGet200Response +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response_data import SapiV1RebateTaxQueryGet200ResponseData +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response_data_data_inner import SapiV1RebateTaxQueryGet200ResponseDataDataInner +from openapi_client.models.sapi_v1_simple_earn_account_get200_response import SapiV1SimpleEarnAccountGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_collateral_record_get200_response import SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rate_history_get200_response import SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_flexible_history_redemption_record_get200_response import SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rewards_record_get200_response import SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_flexible_history_subscription_record_get200_response import SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response import SapiV1SimpleEarnFlexibleListGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response_rows_inner import SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate import SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate +from openapi_client.models.sapi_v1_simple_earn_flexible_personal_left_quota_get200_response import SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_position_get200_response import SapiV1SimpleEarnFlexiblePositionGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_position_get200_response_rows_inner import SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_flexible_redeem_post200_response import SapiV1SimpleEarnFlexibleRedeemPost200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_subscribe_post200_response import SapiV1SimpleEarnFlexibleSubscribePost200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_subscription_preview_get200_response import SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_history_redemption_record_get200_response import SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_locked_history_rewards_record_get200_response import SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_locked_history_subscription_record_get200_response import SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response import SapiV1SimpleEarnLockedListGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner import SapiV1SimpleEarnLockedListGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail import SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota import SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota +from openapi_client.models.sapi_v1_simple_earn_locked_position_get200_response import SapiV1SimpleEarnLockedPositionGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_position_get200_response_rows_inner import SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_locked_subscribe_post200_response import SapiV1SimpleEarnLockedSubscribePost200Response +from openapi_client.models.sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner import SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner +from openapi_client.models.sapi_v1_spot_delist_schedule_get200_response_inner import SapiV1SpotDelistScheduleGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_blvt_enable_post200_response import SapiV1SubAccountBlvtEnablePost200Response +from openapi_client.models.sapi_v1_sub_account_eoptions_enable_post200_response import SapiV1SubAccountEoptionsEnablePost200Response +from openapi_client.models.sapi_v1_sub_account_futures_account_get200_response import SapiV1SubAccountFuturesAccountGet200Response +from openapi_client.models.sapi_v1_sub_account_futures_account_get200_response_assets_inner import SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner +from openapi_client.models.sapi_v1_sub_account_futures_account_summary_get200_response import SapiV1SubAccountFuturesAccountSummaryGet200Response +from openapi_client.models.sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner import SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner +from openapi_client.models.sapi_v1_sub_account_futures_enable_post200_response import SapiV1SubAccountFuturesEnablePost200Response +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_get200_response import SapiV1SubAccountFuturesInternalTransferGet200Response +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner import SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_post200_response import SapiV1SubAccountFuturesInternalTransferPost200Response +from openapi_client.models.sapi_v1_sub_account_futures_position_risk_get200_response_inner import SapiV1SubAccountFuturesPositionRiskGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_futures_transfer_post200_response import SapiV1SubAccountFuturesTransferPost200Response +from openapi_client.models.sapi_v1_sub_account_list_get200_response import SapiV1SubAccountListGet200Response +from openapi_client.models.sapi_v1_sub_account_list_get200_response_sub_accounts_inner import SapiV1SubAccountListGet200ResponseSubAccountsInner +from openapi_client.models.sapi_v1_sub_account_margin_account_get200_response import SapiV1SubAccountMarginAccountGet200Response +from openapi_client.models.sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo import SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo +from openapi_client.models.sapi_v1_sub_account_margin_account_summary_get200_response import SapiV1SubAccountMarginAccountSummaryGet200Response +from openapi_client.models.sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner import SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner +from openapi_client.models.sapi_v1_sub_account_margin_enable_post200_response import SapiV1SubAccountMarginEnablePost200Response +from openapi_client.models.sapi_v1_sub_account_spot_summary_get200_response import SapiV1SubAccountSpotSummaryGet200Response +from openapi_client.models.sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner import SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner +from openapi_client.models.sapi_v1_sub_account_status_get200_response_inner import SapiV1SubAccountStatusGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response import SapiV1SubAccountSubAccountApiIpRestrictionGet200Response +from openapi_client.models.sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response import SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response +from openapi_client.models.sapi_v1_sub_account_sub_transfer_history_get200_response_inner import SapiV1SubAccountSubTransferHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_transaction_statistics_get200_response import SapiV1SubAccountTransactionStatisticsGet200Response +from openapi_client.models.sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner import SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner +from openapi_client.models.sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner import SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_universal_transfer_get200_response_inner import SapiV1SubAccountUniversalTransferGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_universal_transfer_post200_response import SapiV1SubAccountUniversalTransferPost200Response +from openapi_client.models.sapi_v1_sub_account_virtual_sub_account_post200_response import SapiV1SubAccountVirtualSubAccountPost200Response +from openapi_client.models.sapi_v1_system_status_get200_response import SapiV1SystemStatusGet200Response +from openapi_client.models.sapi_v1_user_data_stream_isolated_post200_response import SapiV1UserDataStreamIsolatedPost200Response +from openapi_client.models.sapi_v2_eth_staking_account_get200_response import SapiV2EthStakingAccountGet200Response +from openapi_client.models.sapi_v2_eth_staking_account_get200_response_holdings import SapiV2EthStakingAccountGet200ResponseHoldings +from openapi_client.models.sapi_v2_eth_staking_account_get200_response_profit import SapiV2EthStakingAccountGet200ResponseProfit +from openapi_client.models.sapi_v2_eth_staking_eth_stake_post200_response import SapiV2EthStakingEthStakePost200Response +from openapi_client.models.sapi_v2_loan_flexible_adjust_ltv_post200_response import SapiV2LoanFlexibleAdjustLtvPost200Response +from openapi_client.models.sapi_v2_loan_flexible_borrow_history_get200_response import SapiV2LoanFlexibleBorrowHistoryGet200Response +from openapi_client.models.sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner import SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v2_loan_flexible_borrow_post200_response import SapiV2LoanFlexibleBorrowPost200Response +from openapi_client.models.sapi_v2_loan_flexible_collateral_data_get200_response import SapiV2LoanFlexibleCollateralDataGet200Response +from openapi_client.models.sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner import SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner +from openapi_client.models.sapi_v2_loan_flexible_loanable_data_get200_response import SapiV2LoanFlexibleLoanableDataGet200Response +from openapi_client.models.sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner import SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner +from openapi_client.models.sapi_v2_loan_flexible_ltv_adjustment_history_get200_response import SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response +from openapi_client.models.sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner import SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v2_loan_flexible_ongoing_orders_get200_response import SapiV2LoanFlexibleOngoingOrdersGet200Response +from openapi_client.models.sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner import SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner +from openapi_client.models.sapi_v2_loan_flexible_repay_history_get200_response import SapiV2LoanFlexibleRepayHistoryGet200Response +from openapi_client.models.sapi_v2_loan_flexible_repay_history_get200_response_rows_inner import SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v2_loan_flexible_repay_post200_response import SapiV2LoanFlexibleRepayPost200Response +from openapi_client.models.sapi_v2_sub_account_futures_account_get200_response import SapiV2SubAccountFuturesAccountGet200Response +from openapi_client.models.sapi_v2_sub_account_futures_account_summary_get200_response import SapiV2SubAccountFuturesAccountSummaryGet200Response +from openapi_client.models.sapi_v2_sub_account_futures_position_risk_get200_response import SapiV2SubAccountFuturesPositionRiskGet200Response +from openapi_client.models.sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response import SapiV2SubAccountSubAccountApiIpRestrictionPost200Response +from openapi_client.models.sapi_v3_asset_get_user_asset_post200_response_inner import SapiV3AssetGetUserAssetPost200ResponseInner +from openapi_client.models.sapi_v3_sub_account_assets_get200_response import SapiV3SubAccountAssetsGet200Response +from openapi_client.models.sapi_v3_sub_account_assets_get200_response_balances_inner import SapiV3SubAccountAssetsGet200ResponseBalancesInner +from openapi_client.models.sapi_v4_sub_account_assets_get200_response import SapiV4SubAccountAssetsGet200Response +from openapi_client.models.sapi_v4_sub_account_assets_get200_response_balances_inner import SapiV4SubAccountAssetsGet200ResponseBalancesInner +from openapi_client.models.snapshot_futures import SnapshotFutures +from openapi_client.models.snapshot_futures_snapshot_vos_inner import SnapshotFuturesSnapshotVosInner +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data import SnapshotFuturesSnapshotVosInnerData +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data_assets_inner import SnapshotFuturesSnapshotVosInnerDataAssetsInner +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data_position_inner import SnapshotFuturesSnapshotVosInnerDataPositionInner +from openapi_client.models.snapshot_margin import SnapshotMargin +from openapi_client.models.snapshot_margin_snapshot_vos_inner import SnapshotMarginSnapshotVosInner +from openapi_client.models.snapshot_margin_snapshot_vos_inner_data import SnapshotMarginSnapshotVosInnerData +from openapi_client.models.snapshot_margin_snapshot_vos_inner_data_user_assets_inner import SnapshotMarginSnapshotVosInnerDataUserAssetsInner +from openapi_client.models.snapshot_spot import SnapshotSpot +from openapi_client.models.snapshot_spot_snapshot_vos_inner import SnapshotSpotSnapshotVosInner +from openapi_client.models.snapshot_spot_snapshot_vos_inner_data import SnapshotSpotSnapshotVosInnerData +from openapi_client.models.snapshot_spot_snapshot_vos_inner_data_balances_inner import SnapshotSpotSnapshotVosInnerDataBalancesInner +from openapi_client.models.sub_account_coin_futures_details import SubAccountCOINFuturesDetails +from openapi_client.models.sub_account_coin_futures_details_assets_inner import SubAccountCOINFuturesDetailsAssetsInner +from openapi_client.models.sub_account_coin_futures_position_risk import SubAccountCOINFuturesPositionRisk +from openapi_client.models.sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner import SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner +from openapi_client.models.sub_account_coin_futures_summary import SubAccountCOINFuturesSummary +from openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp import SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp +from openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner import SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner +from openapi_client.models.sub_account_usdt_futures_details import SubAccountUSDTFuturesDetails +from openapi_client.models.sub_account_usdt_futures_details_future_account_resp import SubAccountUSDTFuturesDetailsFutureAccountResp +from openapi_client.models.sub_account_usdt_futures_position_risk import SubAccountUSDTFuturesPositionRisk +from openapi_client.models.sub_account_usdt_futures_summary import SubAccountUSDTFuturesSummary +from openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp import SubAccountUSDTFuturesSummaryFutureAccountSummaryResp +from openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner import SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner +from openapi_client.models.ticker import Ticker +from openapi_client.models.trade import Trade +from openapi_client.models.transaction import Transaction diff --git a/target/python/binance_openapi/openapi_client/api/__init__.py b/target/python/binance_openapi/openapi_client/api/__init__.py new file mode 100644 index 0000000..d3157f9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/__init__.py @@ -0,0 +1,32 @@ +# flake8: noqa + +# import apis into api package +from openapi_client.api.auto_invest_api import AutoInvestApi +from openapi_client.api.blvt_api import BLVTApi +from openapi_client.api.c2_c_api import C2CApi +from openapi_client.api.convert_api import ConvertApi +from openapi_client.api.crypto_loans_api import CryptoLoansApi +from openapi_client.api.dual_investment_api import DualInvestmentApi +from openapi_client.api.fiat_api import FiatApi +from openapi_client.api.futures_api import FuturesApi +from openapi_client.api.futures_algo_api import FuturesAlgoApi +from openapi_client.api.gift_card_api import GiftCardApi +from openapi_client.api.isolated_margin_stream_api import IsolatedMarginStreamApi +from openapi_client.api.margin_api import MarginApi +from openapi_client.api.margin_stream_api import MarginStreamApi +from openapi_client.api.market_api import MarketApi +from openapi_client.api.mining_api import MiningApi +from openapi_client.api.nft_api import NFTApi +from openapi_client.api.pay_api import PayApi +from openapi_client.api.portfolio_margin_api import PortfolioMarginApi +from openapi_client.api.rebate_api import RebateApi +from openapi_client.api.savings_api import SavingsApi +from openapi_client.api.simple_earn_api import SimpleEarnApi +from openapi_client.api.spot_algo_api import SpotAlgoApi +from openapi_client.api.staking_api import StakingApi +from openapi_client.api.stream_api import StreamApi +from openapi_client.api.sub_account_api import SubAccountApi +from openapi_client.api.trade_api import TradeApi +from openapi_client.api.vip_loans_api import VIPLoansApi +from openapi_client.api.wallet_api import WalletApi + diff --git a/target/python/binance_openapi/openapi_client/api/auto_invest_api.py b/target/python/binance_openapi/openapi_client/api/auto_invest_api.py new file mode 100644 index 0000000..24cecd8 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/auto_invest_api.py @@ -0,0 +1,6315 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_lending_auto_invest_all_asset_get200_response import SapiV1LendingAutoInvestAllAssetGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_history_list_get200_response_inner import SapiV1LendingAutoInvestHistoryListGet200ResponseInner +from openapi_client.models.sapi_v1_lending_auto_invest_index_info_get200_response import SapiV1LendingAutoInvestIndexInfoGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response import SapiV1LendingAutoInvestIndexUserSummaryGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_post200_response import SapiV1LendingAutoInvestOneOffPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner import SapiV1LendingAutoInvestOneOffPostDetailsParameterInner +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_status_get200_response import SapiV1LendingAutoInvestOneOffStatusGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_add_post200_response import SapiV1LendingAutoInvestPlanAddPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner import SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner +from openapi_client.models.sapi_v1_lending_auto_invest_plan_edit_status_post200_response import SapiV1LendingAutoInvestPlanEditStatusPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response import SapiV1LendingAutoInvestPlanIdGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_list_get200_response import SapiV1LendingAutoInvestPlanListGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner import SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_lending_auto_invest_redeem_history_get200_response_inner import SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_lending_auto_invest_redeem_post200_response import SapiV1LendingAutoInvestRedeemPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_source_asset_list_get200_response import SapiV1LendingAutoInvestSourceAssetListGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response import SapiV1LendingAutoInvestTargetAssetListGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner import SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class AutoInvestApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_lending_auto_invest_all_asset_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingAutoInvestAllAssetGet200Response: + """Query all source asset and target asset (USER_DATA) + + Query all source assets and target assets Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_all_asset_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestAllAssetGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_all_asset_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingAutoInvestAllAssetGet200Response]: + """Query all source asset and target asset (USER_DATA) + + Query all source assets and target assets Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_all_asset_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestAllAssetGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_all_asset_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query all source asset and target asset (USER_DATA) + + Query all source assets and target assets Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_all_asset_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestAllAssetGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_all_asset_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/lending/auto-invest/all/asset', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_history_list_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + plan_id: Optional[StrictInt] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + target_asset: Optional[Union[StrictFloat, StrictInt]] = None, + plan_type: Optional[StrictStr] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1LendingAutoInvestHistoryListGet200ResponseInner]: + """Query subscription transaction history + + Query subscription transaction history of a plan Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param plan_id: + :type plan_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param target_asset: + :type target_asset: float + :param plan_type: + :type plan_type: str + :param size: Default:10 Max:100 + :type size: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_history_list_get_serialize( + timestamp=timestamp, + signature=signature, + plan_id=plan_id, + start_time=start_time, + end_time=end_time, + target_asset=target_asset, + plan_type=plan_type, + size=size, + current=current, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingAutoInvestHistoryListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_history_list_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + plan_id: Optional[StrictInt] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + target_asset: Optional[Union[StrictFloat, StrictInt]] = None, + plan_type: Optional[StrictStr] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1LendingAutoInvestHistoryListGet200ResponseInner]]: + """Query subscription transaction history + + Query subscription transaction history of a plan Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param plan_id: + :type plan_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param target_asset: + :type target_asset: float + :param plan_type: + :type plan_type: str + :param size: Default:10 Max:100 + :type size: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_history_list_get_serialize( + timestamp=timestamp, + signature=signature, + plan_id=plan_id, + start_time=start_time, + end_time=end_time, + target_asset=target_asset, + plan_type=plan_type, + size=size, + current=current, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingAutoInvestHistoryListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_history_list_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + plan_id: Optional[StrictInt] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + target_asset: Optional[Union[StrictFloat, StrictInt]] = None, + plan_type: Optional[StrictStr] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query subscription transaction history + + Query subscription transaction history of a plan Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param plan_id: + :type plan_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param target_asset: + :type target_asset: float + :param plan_type: + :type plan_type: str + :param size: Default:10 Max:100 + :type size: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_history_list_get_serialize( + timestamp=timestamp, + signature=signature, + plan_id=plan_id, + start_time=start_time, + end_time=end_time, + target_asset=target_asset, + plan_type=plan_type, + size=size, + current=current, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingAutoInvestHistoryListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_history_list_get_serialize( + self, + timestamp, + signature, + plan_id, + start_time, + end_time, + target_asset, + plan_type, + size, + current, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if plan_id is not None: + + _query_params.append(('planId', plan_id)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if target_asset is not None: + + _query_params.append(('targetAsset', target_asset)) + + if plan_type is not None: + + _query_params.append(('planType', plan_type)) + + if size is not None: + + _query_params.append(('size', size)) + + if current is not None: + + _query_params.append(('current', current)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/lending/auto-invest/history/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_index_info_get( + self, + index_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingAutoInvestIndexInfoGet200Response: + """Query Index Details(USER_DATA) + + Query index details Weight(IP): 1 + + :param index_id: (required) + :type index_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_index_info_get_serialize( + index_id=index_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestIndexInfoGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_index_info_get_with_http_info( + self, + index_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingAutoInvestIndexInfoGet200Response]: + """Query Index Details(USER_DATA) + + Query index details Weight(IP): 1 + + :param index_id: (required) + :type index_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_index_info_get_serialize( + index_id=index_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestIndexInfoGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_index_info_get_without_preload_content( + self, + index_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Index Details(USER_DATA) + + Query index details Weight(IP): 1 + + :param index_id: (required) + :type index_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_index_info_get_serialize( + index_id=index_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestIndexInfoGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_index_info_get_serialize( + self, + index_id, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if index_id is not None: + + _query_params.append(('indexId', index_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/lending/auto-invest/index/info', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_index_user_summary_get( + self, + index_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingAutoInvestIndexUserSummaryGet200Response: + """Query Index Linked Plan Position Details(USER_DATA) + + Details on users Index-Linked plan position details Weight(IP): 1 + + :param index_id: (required) + :type index_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_index_user_summary_get_serialize( + index_id=index_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestIndexUserSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_index_user_summary_get_with_http_info( + self, + index_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingAutoInvestIndexUserSummaryGet200Response]: + """Query Index Linked Plan Position Details(USER_DATA) + + Details on users Index-Linked plan position details Weight(IP): 1 + + :param index_id: (required) + :type index_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_index_user_summary_get_serialize( + index_id=index_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestIndexUserSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_index_user_summary_get_without_preload_content( + self, + index_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Index Linked Plan Position Details(USER_DATA) + + Details on users Index-Linked plan position details Weight(IP): 1 + + :param index_id: (required) + :type index_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_index_user_summary_get_serialize( + index_id=index_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestIndexUserSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_index_user_summary_get_serialize( + self, + index_id, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if index_id is not None: + + _query_params.append(('indexId', index_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/lending/auto-invest/index/user-summary', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_one_off_post( + self, + source_type: StrictStr, + subscription_amount: Union[StrictFloat, StrictInt], + source_asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + request_id: Optional[StrictStr] = None, + flexible_allowed_to_use: Optional[StrictBool] = None, + plan_id: Optional[StrictInt] = None, + index_id: Optional[StrictInt] = None, + details: Optional[List[SapiV1LendingAutoInvestOneOffPostDetailsParameterInner]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingAutoInvestOneOffPost200Response: + """One Time Transaction(TRADE) + + One time transaction Weight(IP): 1 + + :param source_type: (required) + :type source_type: str + :param subscription_amount: (required) + :type subscription_amount: float + :param source_asset: (required) + :type source_asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param request_id: + :type request_id: str + :param flexible_allowed_to_use: + :type flexible_allowed_to_use: bool + :param plan_id: + :type plan_id: int + :param index_id: + :type index_id: int + :param details: + :type details: List[SapiV1LendingAutoInvestOneOffPostDetailsParameterInner] + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_one_off_post_serialize( + source_type=source_type, + subscription_amount=subscription_amount, + source_asset=source_asset, + timestamp=timestamp, + signature=signature, + request_id=request_id, + flexible_allowed_to_use=flexible_allowed_to_use, + plan_id=plan_id, + index_id=index_id, + details=details, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestOneOffPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_one_off_post_with_http_info( + self, + source_type: StrictStr, + subscription_amount: Union[StrictFloat, StrictInt], + source_asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + request_id: Optional[StrictStr] = None, + flexible_allowed_to_use: Optional[StrictBool] = None, + plan_id: Optional[StrictInt] = None, + index_id: Optional[StrictInt] = None, + details: Optional[List[SapiV1LendingAutoInvestOneOffPostDetailsParameterInner]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingAutoInvestOneOffPost200Response]: + """One Time Transaction(TRADE) + + One time transaction Weight(IP): 1 + + :param source_type: (required) + :type source_type: str + :param subscription_amount: (required) + :type subscription_amount: float + :param source_asset: (required) + :type source_asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param request_id: + :type request_id: str + :param flexible_allowed_to_use: + :type flexible_allowed_to_use: bool + :param plan_id: + :type plan_id: int + :param index_id: + :type index_id: int + :param details: + :type details: List[SapiV1LendingAutoInvestOneOffPostDetailsParameterInner] + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_one_off_post_serialize( + source_type=source_type, + subscription_amount=subscription_amount, + source_asset=source_asset, + timestamp=timestamp, + signature=signature, + request_id=request_id, + flexible_allowed_to_use=flexible_allowed_to_use, + plan_id=plan_id, + index_id=index_id, + details=details, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestOneOffPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_one_off_post_without_preload_content( + self, + source_type: StrictStr, + subscription_amount: Union[StrictFloat, StrictInt], + source_asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + request_id: Optional[StrictStr] = None, + flexible_allowed_to_use: Optional[StrictBool] = None, + plan_id: Optional[StrictInt] = None, + index_id: Optional[StrictInt] = None, + details: Optional[List[SapiV1LendingAutoInvestOneOffPostDetailsParameterInner]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """One Time Transaction(TRADE) + + One time transaction Weight(IP): 1 + + :param source_type: (required) + :type source_type: str + :param subscription_amount: (required) + :type subscription_amount: float + :param source_asset: (required) + :type source_asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param request_id: + :type request_id: str + :param flexible_allowed_to_use: + :type flexible_allowed_to_use: bool + :param plan_id: + :type plan_id: int + :param index_id: + :type index_id: int + :param details: + :type details: List[SapiV1LendingAutoInvestOneOffPostDetailsParameterInner] + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_one_off_post_serialize( + source_type=source_type, + subscription_amount=subscription_amount, + source_asset=source_asset, + timestamp=timestamp, + signature=signature, + request_id=request_id, + flexible_allowed_to_use=flexible_allowed_to_use, + plan_id=plan_id, + index_id=index_id, + details=details, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestOneOffPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_one_off_post_serialize( + self, + source_type, + subscription_amount, + source_asset, + timestamp, + signature, + request_id, + flexible_allowed_to_use, + plan_id, + index_id, + details, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'details': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if source_type is not None: + + _query_params.append(('sourceType', source_type)) + + if request_id is not None: + + _query_params.append(('requestId', request_id)) + + if subscription_amount is not None: + + _query_params.append(('subscriptionAmount', subscription_amount)) + + if source_asset is not None: + + _query_params.append(('sourceAsset', source_asset)) + + if flexible_allowed_to_use is not None: + + _query_params.append(('flexibleAllowedToUse', flexible_allowed_to_use)) + + if plan_id is not None: + + _query_params.append(('planId', plan_id)) + + if index_id is not None: + + _query_params.append(('indexId', index_id)) + + if details is not None: + + _query_params.append(('details', details)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/lending/auto-invest/one-off', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_one_off_status_get( + self, + transaction_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + request_id: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingAutoInvestOneOffStatusGet200Response: + """Query One-Time Transaction Status (USER_DATA) + + Transaction status for one-time transaction Weight(IP): 1 + + :param transaction_id: (required) + :type transaction_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param request_id: + :type request_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_one_off_status_get_serialize( + transaction_id=transaction_id, + timestamp=timestamp, + signature=signature, + request_id=request_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestOneOffStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_one_off_status_get_with_http_info( + self, + transaction_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + request_id: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingAutoInvestOneOffStatusGet200Response]: + """Query One-Time Transaction Status (USER_DATA) + + Transaction status for one-time transaction Weight(IP): 1 + + :param transaction_id: (required) + :type transaction_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param request_id: + :type request_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_one_off_status_get_serialize( + transaction_id=transaction_id, + timestamp=timestamp, + signature=signature, + request_id=request_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestOneOffStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_one_off_status_get_without_preload_content( + self, + transaction_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + request_id: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query One-Time Transaction Status (USER_DATA) + + Transaction status for one-time transaction Weight(IP): 1 + + :param transaction_id: (required) + :type transaction_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param request_id: + :type request_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_one_off_status_get_serialize( + transaction_id=transaction_id, + timestamp=timestamp, + signature=signature, + request_id=request_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestOneOffStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_one_off_status_get_serialize( + self, + transaction_id, + timestamp, + signature, + request_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if transaction_id is not None: + + _query_params.append(('transactionId', transaction_id)) + + if request_id is not None: + + _query_params.append(('requestId', request_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/lending/auto-invest/one-off/status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_plan_add_post( + self, + source_type: StrictStr, + plan_type: StrictStr, + subscription_amount: Union[StrictFloat, StrictInt], + subscription_cycle: StrictStr, + subscription_start_time: StrictInt, + source_asset: StrictStr, + details: List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + request_id: Optional[StrictStr] = None, + index_id: Optional[StrictInt] = None, + subscription_start_day: Optional[StrictInt] = None, + subscription_start_weekday: Optional[StrictStr] = None, + flexible_allowed_to_use: Optional[StrictBool] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingAutoInvestPlanAddPost200Response: + """Investment plan creation (USER_DATA) + + Post an investment plan creation Weight(IP): 1 + + :param source_type: (required) + :type source_type: str + :param plan_type: (required) + :type plan_type: str + :param subscription_amount: (required) + :type subscription_amount: float + :param subscription_cycle: (required) + :type subscription_cycle: str + :param subscription_start_time: (required) + :type subscription_start_time: int + :param source_asset: (required) + :type source_asset: str + :param details: (required) + :type details: List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner] + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param request_id: + :type request_id: str + :param index_id: + :type index_id: int + :param subscription_start_day: + :type subscription_start_day: int + :param subscription_start_weekday: + :type subscription_start_weekday: str + :param flexible_allowed_to_use: + :type flexible_allowed_to_use: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_add_post_serialize( + source_type=source_type, + plan_type=plan_type, + subscription_amount=subscription_amount, + subscription_cycle=subscription_cycle, + subscription_start_time=subscription_start_time, + source_asset=source_asset, + details=details, + timestamp=timestamp, + signature=signature, + request_id=request_id, + index_id=index_id, + subscription_start_day=subscription_start_day, + subscription_start_weekday=subscription_start_weekday, + flexible_allowed_to_use=flexible_allowed_to_use, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanAddPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_plan_add_post_with_http_info( + self, + source_type: StrictStr, + plan_type: StrictStr, + subscription_amount: Union[StrictFloat, StrictInt], + subscription_cycle: StrictStr, + subscription_start_time: StrictInt, + source_asset: StrictStr, + details: List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + request_id: Optional[StrictStr] = None, + index_id: Optional[StrictInt] = None, + subscription_start_day: Optional[StrictInt] = None, + subscription_start_weekday: Optional[StrictStr] = None, + flexible_allowed_to_use: Optional[StrictBool] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingAutoInvestPlanAddPost200Response]: + """Investment plan creation (USER_DATA) + + Post an investment plan creation Weight(IP): 1 + + :param source_type: (required) + :type source_type: str + :param plan_type: (required) + :type plan_type: str + :param subscription_amount: (required) + :type subscription_amount: float + :param subscription_cycle: (required) + :type subscription_cycle: str + :param subscription_start_time: (required) + :type subscription_start_time: int + :param source_asset: (required) + :type source_asset: str + :param details: (required) + :type details: List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner] + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param request_id: + :type request_id: str + :param index_id: + :type index_id: int + :param subscription_start_day: + :type subscription_start_day: int + :param subscription_start_weekday: + :type subscription_start_weekday: str + :param flexible_allowed_to_use: + :type flexible_allowed_to_use: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_add_post_serialize( + source_type=source_type, + plan_type=plan_type, + subscription_amount=subscription_amount, + subscription_cycle=subscription_cycle, + subscription_start_time=subscription_start_time, + source_asset=source_asset, + details=details, + timestamp=timestamp, + signature=signature, + request_id=request_id, + index_id=index_id, + subscription_start_day=subscription_start_day, + subscription_start_weekday=subscription_start_weekday, + flexible_allowed_to_use=flexible_allowed_to_use, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanAddPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_plan_add_post_without_preload_content( + self, + source_type: StrictStr, + plan_type: StrictStr, + subscription_amount: Union[StrictFloat, StrictInt], + subscription_cycle: StrictStr, + subscription_start_time: StrictInt, + source_asset: StrictStr, + details: List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + request_id: Optional[StrictStr] = None, + index_id: Optional[StrictInt] = None, + subscription_start_day: Optional[StrictInt] = None, + subscription_start_weekday: Optional[StrictStr] = None, + flexible_allowed_to_use: Optional[StrictBool] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Investment plan creation (USER_DATA) + + Post an investment plan creation Weight(IP): 1 + + :param source_type: (required) + :type source_type: str + :param plan_type: (required) + :type plan_type: str + :param subscription_amount: (required) + :type subscription_amount: float + :param subscription_cycle: (required) + :type subscription_cycle: str + :param subscription_start_time: (required) + :type subscription_start_time: int + :param source_asset: (required) + :type source_asset: str + :param details: (required) + :type details: List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner] + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param request_id: + :type request_id: str + :param index_id: + :type index_id: int + :param subscription_start_day: + :type subscription_start_day: int + :param subscription_start_weekday: + :type subscription_start_weekday: str + :param flexible_allowed_to_use: + :type flexible_allowed_to_use: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_add_post_serialize( + source_type=source_type, + plan_type=plan_type, + subscription_amount=subscription_amount, + subscription_cycle=subscription_cycle, + subscription_start_time=subscription_start_time, + source_asset=source_asset, + details=details, + timestamp=timestamp, + signature=signature, + request_id=request_id, + index_id=index_id, + subscription_start_day=subscription_start_day, + subscription_start_weekday=subscription_start_weekday, + flexible_allowed_to_use=flexible_allowed_to_use, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanAddPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_plan_add_post_serialize( + self, + source_type, + plan_type, + subscription_amount, + subscription_cycle, + subscription_start_time, + source_asset, + details, + timestamp, + signature, + request_id, + index_id, + subscription_start_day, + subscription_start_weekday, + flexible_allowed_to_use, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'details': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if source_type is not None: + + _query_params.append(('sourceType', source_type)) + + if request_id is not None: + + _query_params.append(('requestId', request_id)) + + if plan_type is not None: + + _query_params.append(('planType', plan_type)) + + if index_id is not None: + + _query_params.append(('IndexId', index_id)) + + if subscription_amount is not None: + + _query_params.append(('subscriptionAmount', subscription_amount)) + + if subscription_cycle is not None: + + _query_params.append(('subscriptionCycle', subscription_cycle)) + + if subscription_start_day is not None: + + _query_params.append(('subscriptionStartDay', subscription_start_day)) + + if subscription_start_weekday is not None: + + _query_params.append(('subscriptionStartWeekday', subscription_start_weekday)) + + if subscription_start_time is not None: + + _query_params.append(('subscriptionStartTime', subscription_start_time)) + + if source_asset is not None: + + _query_params.append(('sourceAsset', source_asset)) + + if flexible_allowed_to_use is not None: + + _query_params.append(('flexibleAllowedToUse', flexible_allowed_to_use)) + + if details is not None: + + _query_params.append(('details', details)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/lending/auto-invest/plan/add', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_plan_edit_post( + self, + plan_id: StrictInt, + subscription_amount: Union[StrictFloat, StrictInt], + subscription_cycle: StrictStr, + subscription_start_time: StrictInt, + source_asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + subscription_start_day: Optional[StrictInt] = None, + subscription_start_weekday: Optional[StrictStr] = None, + flexible_allowed_to_use: Optional[StrictBool] = None, + details: Optional[List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingAutoInvestPlanAddPost200Response: + """Investment plan adjustment + + Query Source Asset to be used for investment Weight(IP): 1 + + :param plan_id: (required) + :type plan_id: int + :param subscription_amount: (required) + :type subscription_amount: float + :param subscription_cycle: (required) + :type subscription_cycle: str + :param subscription_start_time: (required) + :type subscription_start_time: int + :param source_asset: (required) + :type source_asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param subscription_start_day: + :type subscription_start_day: int + :param subscription_start_weekday: + :type subscription_start_weekday: str + :param flexible_allowed_to_use: + :type flexible_allowed_to_use: bool + :param details: + :type details: List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner] + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_edit_post_serialize( + plan_id=plan_id, + subscription_amount=subscription_amount, + subscription_cycle=subscription_cycle, + subscription_start_time=subscription_start_time, + source_asset=source_asset, + timestamp=timestamp, + signature=signature, + subscription_start_day=subscription_start_day, + subscription_start_weekday=subscription_start_weekday, + flexible_allowed_to_use=flexible_allowed_to_use, + details=details, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanAddPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_plan_edit_post_with_http_info( + self, + plan_id: StrictInt, + subscription_amount: Union[StrictFloat, StrictInt], + subscription_cycle: StrictStr, + subscription_start_time: StrictInt, + source_asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + subscription_start_day: Optional[StrictInt] = None, + subscription_start_weekday: Optional[StrictStr] = None, + flexible_allowed_to_use: Optional[StrictBool] = None, + details: Optional[List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingAutoInvestPlanAddPost200Response]: + """Investment plan adjustment + + Query Source Asset to be used for investment Weight(IP): 1 + + :param plan_id: (required) + :type plan_id: int + :param subscription_amount: (required) + :type subscription_amount: float + :param subscription_cycle: (required) + :type subscription_cycle: str + :param subscription_start_time: (required) + :type subscription_start_time: int + :param source_asset: (required) + :type source_asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param subscription_start_day: + :type subscription_start_day: int + :param subscription_start_weekday: + :type subscription_start_weekday: str + :param flexible_allowed_to_use: + :type flexible_allowed_to_use: bool + :param details: + :type details: List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner] + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_edit_post_serialize( + plan_id=plan_id, + subscription_amount=subscription_amount, + subscription_cycle=subscription_cycle, + subscription_start_time=subscription_start_time, + source_asset=source_asset, + timestamp=timestamp, + signature=signature, + subscription_start_day=subscription_start_day, + subscription_start_weekday=subscription_start_weekday, + flexible_allowed_to_use=flexible_allowed_to_use, + details=details, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanAddPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_plan_edit_post_without_preload_content( + self, + plan_id: StrictInt, + subscription_amount: Union[StrictFloat, StrictInt], + subscription_cycle: StrictStr, + subscription_start_time: StrictInt, + source_asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + subscription_start_day: Optional[StrictInt] = None, + subscription_start_weekday: Optional[StrictStr] = None, + flexible_allowed_to_use: Optional[StrictBool] = None, + details: Optional[List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Investment plan adjustment + + Query Source Asset to be used for investment Weight(IP): 1 + + :param plan_id: (required) + :type plan_id: int + :param subscription_amount: (required) + :type subscription_amount: float + :param subscription_cycle: (required) + :type subscription_cycle: str + :param subscription_start_time: (required) + :type subscription_start_time: int + :param source_asset: (required) + :type source_asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param subscription_start_day: + :type subscription_start_day: int + :param subscription_start_weekday: + :type subscription_start_weekday: str + :param flexible_allowed_to_use: + :type flexible_allowed_to_use: bool + :param details: + :type details: List[SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner] + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_edit_post_serialize( + plan_id=plan_id, + subscription_amount=subscription_amount, + subscription_cycle=subscription_cycle, + subscription_start_time=subscription_start_time, + source_asset=source_asset, + timestamp=timestamp, + signature=signature, + subscription_start_day=subscription_start_day, + subscription_start_weekday=subscription_start_weekday, + flexible_allowed_to_use=flexible_allowed_to_use, + details=details, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanAddPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_plan_edit_post_serialize( + self, + plan_id, + subscription_amount, + subscription_cycle, + subscription_start_time, + source_asset, + timestamp, + signature, + subscription_start_day, + subscription_start_weekday, + flexible_allowed_to_use, + details, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'details': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if plan_id is not None: + + _query_params.append(('planId', plan_id)) + + if subscription_amount is not None: + + _query_params.append(('subscriptionAmount', subscription_amount)) + + if subscription_cycle is not None: + + _query_params.append(('subscriptionCycle', subscription_cycle)) + + if subscription_start_day is not None: + + _query_params.append(('subscriptionStartDay', subscription_start_day)) + + if subscription_start_weekday is not None: + + _query_params.append(('subscriptionStartWeekday', subscription_start_weekday)) + + if subscription_start_time is not None: + + _query_params.append(('subscriptionStartTime', subscription_start_time)) + + if source_asset is not None: + + _query_params.append(('sourceAsset', source_asset)) + + if flexible_allowed_to_use is not None: + + _query_params.append(('flexibleAllowedToUse', flexible_allowed_to_use)) + + if details is not None: + + _query_params.append(('details', details)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/lending/auto-invest/plan/edit', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_plan_edit_status_post( + self, + plan_id: StrictInt, + status: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingAutoInvestPlanEditStatusPost200Response: + """Change Plan Status + + Change Plan Status Weight(IP): 1 + + :param plan_id: (required) + :type plan_id: int + :param status: (required) + :type status: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_edit_status_post_serialize( + plan_id=plan_id, + status=status, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanEditStatusPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_plan_edit_status_post_with_http_info( + self, + plan_id: StrictInt, + status: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingAutoInvestPlanEditStatusPost200Response]: + """Change Plan Status + + Change Plan Status Weight(IP): 1 + + :param plan_id: (required) + :type plan_id: int + :param status: (required) + :type status: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_edit_status_post_serialize( + plan_id=plan_id, + status=status, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanEditStatusPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_plan_edit_status_post_without_preload_content( + self, + plan_id: StrictInt, + status: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Change Plan Status + + Change Plan Status Weight(IP): 1 + + :param plan_id: (required) + :type plan_id: int + :param status: (required) + :type status: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_edit_status_post_serialize( + plan_id=plan_id, + status=status, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanEditStatusPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_plan_edit_status_post_serialize( + self, + plan_id, + status, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if plan_id is not None: + + _query_params.append(('planId', plan_id)) + + if status is not None: + + _query_params.append(('status', status)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/lending/auto-invest/plan/edit-status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_plan_id_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + plan_id: Optional[StrictInt] = None, + request_id: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingAutoInvestPlanIdGet200Response: + """Query holding details of the plan + + Query holding details of the plan Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param plan_id: + :type plan_id: int + :param request_id: + :type request_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_id_get_serialize( + timestamp=timestamp, + signature=signature, + plan_id=plan_id, + request_id=request_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanIdGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_plan_id_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + plan_id: Optional[StrictInt] = None, + request_id: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingAutoInvestPlanIdGet200Response]: + """Query holding details of the plan + + Query holding details of the plan Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param plan_id: + :type plan_id: int + :param request_id: + :type request_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_id_get_serialize( + timestamp=timestamp, + signature=signature, + plan_id=plan_id, + request_id=request_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanIdGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_plan_id_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + plan_id: Optional[StrictInt] = None, + request_id: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query holding details of the plan + + Query holding details of the plan Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param plan_id: + :type plan_id: int + :param request_id: + :type request_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_id_get_serialize( + timestamp=timestamp, + signature=signature, + plan_id=plan_id, + request_id=request_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanIdGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_plan_id_get_serialize( + self, + timestamp, + signature, + plan_id, + request_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if plan_id is not None: + + _query_params.append(('planId', plan_id)) + + if request_id is not None: + + _query_params.append(('requestId', request_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/lending/auto-invest/plan/id', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_plan_list_get( + self, + plan_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingAutoInvestPlanListGet200Response: + """Get list of plans + + Query plan lists Weight(IP): 1 + + :param plan_type: (required) + :type plan_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_list_get_serialize( + plan_type=plan_type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_plan_list_get_with_http_info( + self, + plan_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingAutoInvestPlanListGet200Response]: + """Get list of plans + + Query plan lists Weight(IP): 1 + + :param plan_type: (required) + :type plan_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_list_get_serialize( + plan_type=plan_type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_plan_list_get_without_preload_content( + self, + plan_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get list of plans + + Query plan lists Weight(IP): 1 + + :param plan_type: (required) + :type plan_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_plan_list_get_serialize( + plan_type=plan_type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestPlanListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_plan_list_get_serialize( + self, + plan_type, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if plan_type is not None: + + _query_params.append(('planType', plan_type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/lending/auto-invest/plan/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_rebalance_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner]: + """Index Linked Plan Rebalance Details (USER_DATA) + + Get the history of Index Linked Plan Redemption transactions Max 30 day difference between startTime and endTime If no startTime and endTime, default to show past 30 day records Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_rebalance_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_rebalance_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner]]: + """Index Linked Plan Rebalance Details (USER_DATA) + + Get the history of Index Linked Plan Redemption transactions Max 30 day difference between startTime and endTime If no startTime and endTime, default to show past 30 day records Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_rebalance_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_rebalance_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Index Linked Plan Rebalance Details (USER_DATA) + + Get the history of Index Linked Plan Redemption transactions Max 30 day difference between startTime and endTime If no startTime and endTime, default to show past 30 day records Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_rebalance_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_rebalance_history_get_serialize( + self, + timestamp, + signature, + start_time, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/lending/auto-invest/rebalance/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_redeem_history_get( + self, + request_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + asset: Optional[StrictStr] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner]: + """Index Linked Plan Redemption History (USER_DATA) + + Get the history of Index Linked Plan Redemption transactions Max 30 day difference between startTime and endTime If no startTime and endTime, default to show past 30 day records Weight(IP): 1 + + :param request_id: (required) + :type request_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param asset: + :type asset: str + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_redeem_history_get_serialize( + request_id=request_id, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + asset=asset, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_redeem_history_get_with_http_info( + self, + request_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + asset: Optional[StrictStr] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner]]: + """Index Linked Plan Redemption History (USER_DATA) + + Get the history of Index Linked Plan Redemption transactions Max 30 day difference between startTime and endTime If no startTime and endTime, default to show past 30 day records Weight(IP): 1 + + :param request_id: (required) + :type request_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param asset: + :type asset: str + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_redeem_history_get_serialize( + request_id=request_id, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + asset=asset, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_redeem_history_get_without_preload_content( + self, + request_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + asset: Optional[StrictStr] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Index Linked Plan Redemption History (USER_DATA) + + Get the history of Index Linked Plan Redemption transactions Max 30 day difference between startTime and endTime If no startTime and endTime, default to show past 30 day records Weight(IP): 1 + + :param request_id: (required) + :type request_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param asset: + :type asset: str + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_redeem_history_get_serialize( + request_id=request_id, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + asset=asset, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_redeem_history_get_serialize( + self, + request_id, + timestamp, + signature, + start_time, + end_time, + current, + asset, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if request_id is not None: + + _query_params.append(('requestId', request_id)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/lending/auto-invest/redeem/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_redeem_post( + self, + index_id: Annotated[StrictInt, Field(description="PORTFOLIO plan's Id")], + redemption_percentage: Annotated[StrictInt, Field(description="user redeem percentage,10/20/100.")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + request_id: Annotated[Optional[StrictStr], Field(description="sourceType + unique, transactionId and requestId cannot be empty at the same time")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingAutoInvestRedeemPost200Response: + """Index Linked Plan Redemption (TRADE) + + To redeem index-Linked plan holdings Weight(IP): 1 + + :param index_id: PORTFOLIO plan's Id (required) + :type index_id: int + :param redemption_percentage: user redeem percentage,10/20/100. (required) + :type redemption_percentage: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param request_id: sourceType + unique, transactionId and requestId cannot be empty at the same time + :type request_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_redeem_post_serialize( + index_id=index_id, + redemption_percentage=redemption_percentage, + timestamp=timestamp, + signature=signature, + request_id=request_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_redeem_post_with_http_info( + self, + index_id: Annotated[StrictInt, Field(description="PORTFOLIO plan's Id")], + redemption_percentage: Annotated[StrictInt, Field(description="user redeem percentage,10/20/100.")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + request_id: Annotated[Optional[StrictStr], Field(description="sourceType + unique, transactionId and requestId cannot be empty at the same time")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingAutoInvestRedeemPost200Response]: + """Index Linked Plan Redemption (TRADE) + + To redeem index-Linked plan holdings Weight(IP): 1 + + :param index_id: PORTFOLIO plan's Id (required) + :type index_id: int + :param redemption_percentage: user redeem percentage,10/20/100. (required) + :type redemption_percentage: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param request_id: sourceType + unique, transactionId and requestId cannot be empty at the same time + :type request_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_redeem_post_serialize( + index_id=index_id, + redemption_percentage=redemption_percentage, + timestamp=timestamp, + signature=signature, + request_id=request_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_redeem_post_without_preload_content( + self, + index_id: Annotated[StrictInt, Field(description="PORTFOLIO plan's Id")], + redemption_percentage: Annotated[StrictInt, Field(description="user redeem percentage,10/20/100.")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + request_id: Annotated[Optional[StrictStr], Field(description="sourceType + unique, transactionId and requestId cannot be empty at the same time")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Index Linked Plan Redemption (TRADE) + + To redeem index-Linked plan holdings Weight(IP): 1 + + :param index_id: PORTFOLIO plan's Id (required) + :type index_id: int + :param redemption_percentage: user redeem percentage,10/20/100. (required) + :type redemption_percentage: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param request_id: sourceType + unique, transactionId and requestId cannot be empty at the same time + :type request_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_redeem_post_serialize( + index_id=index_id, + redemption_percentage=redemption_percentage, + timestamp=timestamp, + signature=signature, + request_id=request_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_redeem_post_serialize( + self, + index_id, + redemption_percentage, + timestamp, + signature, + request_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if index_id is not None: + + _query_params.append(('indexId', index_id)) + + if request_id is not None: + + _query_params.append(('requestId', request_id)) + + if redemption_percentage is not None: + + _query_params.append(('redemptionPercentage', redemption_percentage)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/lending/auto-invest/redeem', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_source_asset_list_get( + self, + usage_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + target_asset: Optional[StrictStr] = None, + index_id: Optional[StrictInt] = None, + flexible_allowed_to_use: Optional[StrictBool] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingAutoInvestSourceAssetListGet200Response: + """Query source asset list (USER_DATA) + + Query Source Asset to be used for investment Weight(IP): 1 + + :param usage_type: (required) + :type usage_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param target_asset: + :type target_asset: str + :param index_id: + :type index_id: int + :param flexible_allowed_to_use: + :type flexible_allowed_to_use: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_source_asset_list_get_serialize( + usage_type=usage_type, + timestamp=timestamp, + signature=signature, + target_asset=target_asset, + index_id=index_id, + flexible_allowed_to_use=flexible_allowed_to_use, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestSourceAssetListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_source_asset_list_get_with_http_info( + self, + usage_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + target_asset: Optional[StrictStr] = None, + index_id: Optional[StrictInt] = None, + flexible_allowed_to_use: Optional[StrictBool] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingAutoInvestSourceAssetListGet200Response]: + """Query source asset list (USER_DATA) + + Query Source Asset to be used for investment Weight(IP): 1 + + :param usage_type: (required) + :type usage_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param target_asset: + :type target_asset: str + :param index_id: + :type index_id: int + :param flexible_allowed_to_use: + :type flexible_allowed_to_use: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_source_asset_list_get_serialize( + usage_type=usage_type, + timestamp=timestamp, + signature=signature, + target_asset=target_asset, + index_id=index_id, + flexible_allowed_to_use=flexible_allowed_to_use, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestSourceAssetListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_source_asset_list_get_without_preload_content( + self, + usage_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + target_asset: Optional[StrictStr] = None, + index_id: Optional[StrictInt] = None, + flexible_allowed_to_use: Optional[StrictBool] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query source asset list (USER_DATA) + + Query Source Asset to be used for investment Weight(IP): 1 + + :param usage_type: (required) + :type usage_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param target_asset: + :type target_asset: str + :param index_id: + :type index_id: int + :param flexible_allowed_to_use: + :type flexible_allowed_to_use: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_source_asset_list_get_serialize( + usage_type=usage_type, + timestamp=timestamp, + signature=signature, + target_asset=target_asset, + index_id=index_id, + flexible_allowed_to_use=flexible_allowed_to_use, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestSourceAssetListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_source_asset_list_get_serialize( + self, + usage_type, + timestamp, + signature, + target_asset, + index_id, + flexible_allowed_to_use, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if target_asset is not None: + + _query_params.append(('targetAsset', target_asset)) + + if index_id is not None: + + _query_params.append(('indexId', index_id)) + + if usage_type is not None: + + _query_params.append(('usageType', usage_type)) + + if flexible_allowed_to_use is not None: + + _query_params.append(('flexibleAllowedToUse', flexible_allowed_to_use)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/lending/auto-invest/source-asset/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_target_asset_list_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + target_asset: Optional[StrictStr] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingAutoInvestTargetAssetListGet200Response: + """Get target asset list (USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param target_asset: + :type target_asset: str + :param size: Default:10 Max:100 + :type size: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_target_asset_list_get_serialize( + timestamp=timestamp, + signature=signature, + target_asset=target_asset, + size=size, + current=current, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestTargetAssetListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_target_asset_list_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + target_asset: Optional[StrictStr] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingAutoInvestTargetAssetListGet200Response]: + """Get target asset list (USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param target_asset: + :type target_asset: str + :param size: Default:10 Max:100 + :type size: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_target_asset_list_get_serialize( + timestamp=timestamp, + signature=signature, + target_asset=target_asset, + size=size, + current=current, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestTargetAssetListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_target_asset_list_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + target_asset: Optional[StrictStr] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get target asset list (USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param target_asset: + :type target_asset: str + :param size: Default:10 Max:100 + :type size: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_target_asset_list_get_serialize( + timestamp=timestamp, + signature=signature, + target_asset=target_asset, + size=size, + current=current, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingAutoInvestTargetAssetListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_target_asset_list_get_serialize( + self, + timestamp, + signature, + target_asset, + size, + current, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if target_asset is not None: + + _query_params.append(('targetAsset', target_asset)) + + if size is not None: + + _query_params.append(('size', size)) + + if current is not None: + + _query_params.append(('current', current)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/lending/auto-invest/target-asset/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_auto_invest_target_asset_roi_list_get( + self, + target_asset: StrictStr, + his_roi_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner]: + """Get target asset ROI data (USER_DATA) + + ROI return list for target asset Weight(IP): 1 + + :param target_asset: (required) + :type target_asset: str + :param his_roi_type: (required) + :type his_roi_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_target_asset_roi_list_get_serialize( + target_asset=target_asset, + his_roi_type=his_roi_type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_auto_invest_target_asset_roi_list_get_with_http_info( + self, + target_asset: StrictStr, + his_roi_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner]]: + """Get target asset ROI data (USER_DATA) + + ROI return list for target asset Weight(IP): 1 + + :param target_asset: (required) + :type target_asset: str + :param his_roi_type: (required) + :type his_roi_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_target_asset_roi_list_get_serialize( + target_asset=target_asset, + his_roi_type=his_roi_type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_auto_invest_target_asset_roi_list_get_without_preload_content( + self, + target_asset: StrictStr, + his_roi_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get target asset ROI data (USER_DATA) + + ROI return list for target asset Weight(IP): 1 + + :param target_asset: (required) + :type target_asset: str + :param his_roi_type: (required) + :type his_roi_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_auto_invest_target_asset_roi_list_get_serialize( + target_asset=target_asset, + his_roi_type=his_roi_type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_auto_invest_target_asset_roi_list_get_serialize( + self, + target_asset, + his_roi_type, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if target_asset is not None: + + _query_params.append(('targetAsset', target_asset)) + + if his_roi_type is not None: + + _query_params.append(('hisRoiType', his_roi_type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/lending/auto-invest/target-asset/roi/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/blvt_api.py b/target/python/binance_openapi/openapi_client/api/blvt_api.py new file mode 100644 index 0000000..90310de --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/blvt_api.py @@ -0,0 +1,2068 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr +from typing import List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_blvt_redeem_post200_response import SapiV1BlvtRedeemPost200Response +from openapi_client.models.sapi_v1_blvt_redeem_record_get200_response_inner import SapiV1BlvtRedeemRecordGet200ResponseInner +from openapi_client.models.sapi_v1_blvt_subscribe_post200_response import SapiV1BlvtSubscribePost200Response +from openapi_client.models.sapi_v1_blvt_subscribe_record_get200_response import SapiV1BlvtSubscribeRecordGet200Response +from openapi_client.models.sapi_v1_blvt_token_info_get200_response_inner import SapiV1BlvtTokenInfoGet200ResponseInner +from openapi_client.models.sapi_v1_blvt_user_limit_get200_response_inner import SapiV1BlvtUserLimitGet200ResponseInner + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class BLVTApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_blvt_redeem_post( + self, + token_name: Annotated[StrictStr, Field(description="BTCDOWN, BTCUP")], + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1BlvtRedeemPost200Response: + """Redeem BLVT (USER_DATA) + + Weight(IP): 1 + + :param token_name: BTCDOWN, BTCUP (required) + :type token_name: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_redeem_post_serialize( + token_name=token_name, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1BlvtRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_blvt_redeem_post_with_http_info( + self, + token_name: Annotated[StrictStr, Field(description="BTCDOWN, BTCUP")], + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1BlvtRedeemPost200Response]: + """Redeem BLVT (USER_DATA) + + Weight(IP): 1 + + :param token_name: BTCDOWN, BTCUP (required) + :type token_name: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_redeem_post_serialize( + token_name=token_name, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1BlvtRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_blvt_redeem_post_without_preload_content( + self, + token_name: Annotated[StrictStr, Field(description="BTCDOWN, BTCUP")], + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Redeem BLVT (USER_DATA) + + Weight(IP): 1 + + :param token_name: BTCDOWN, BTCUP (required) + :type token_name: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_redeem_post_serialize( + token_name=token_name, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1BlvtRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_blvt_redeem_post_serialize( + self, + token_name, + amount, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if token_name is not None: + + _query_params.append(('tokenName', token_name)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/blvt/redeem', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_blvt_redeem_record_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + token_name: Annotated[Optional[StrictStr], Field(description="BTCDOWN, BTCUP")] = None, + id: Optional[StrictInt] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 1000, max 1000")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1BlvtRedeemRecordGet200ResponseInner]: + """Redemption Record (USER_DATA) + + - Only the data of the latest 90 days is available Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param token_name: BTCDOWN, BTCUP + :type token_name: str + :param id: + :type id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: default 1000, max 1000 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_redeem_record_get_serialize( + timestamp=timestamp, + signature=signature, + token_name=token_name, + id=id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1BlvtRedeemRecordGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_blvt_redeem_record_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + token_name: Annotated[Optional[StrictStr], Field(description="BTCDOWN, BTCUP")] = None, + id: Optional[StrictInt] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 1000, max 1000")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1BlvtRedeemRecordGet200ResponseInner]]: + """Redemption Record (USER_DATA) + + - Only the data of the latest 90 days is available Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param token_name: BTCDOWN, BTCUP + :type token_name: str + :param id: + :type id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: default 1000, max 1000 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_redeem_record_get_serialize( + timestamp=timestamp, + signature=signature, + token_name=token_name, + id=id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1BlvtRedeemRecordGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_blvt_redeem_record_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + token_name: Annotated[Optional[StrictStr], Field(description="BTCDOWN, BTCUP")] = None, + id: Optional[StrictInt] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 1000, max 1000")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Redemption Record (USER_DATA) + + - Only the data of the latest 90 days is available Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param token_name: BTCDOWN, BTCUP + :type token_name: str + :param id: + :type id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: default 1000, max 1000 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_redeem_record_get_serialize( + timestamp=timestamp, + signature=signature, + token_name=token_name, + id=id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1BlvtRedeemRecordGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_blvt_redeem_record_get_serialize( + self, + timestamp, + signature, + token_name, + id, + start_time, + end_time, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if token_name is not None: + + _query_params.append(('tokenName', token_name)) + + if id is not None: + + _query_params.append(('id', id)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/blvt/redeem/record', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_blvt_subscribe_post( + self, + token_name: Annotated[StrictStr, Field(description="BTCDOWN, BTCUP")], + cost: Annotated[Union[StrictFloat, StrictInt], Field(description="Spot balance")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1BlvtSubscribePost200Response: + """Subscribe BLVT (USER_DATA) + + Weight(IP): 1 + + :param token_name: BTCDOWN, BTCUP (required) + :type token_name: str + :param cost: Spot balance (required) + :type cost: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_subscribe_post_serialize( + token_name=token_name, + cost=cost, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1BlvtSubscribePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_blvt_subscribe_post_with_http_info( + self, + token_name: Annotated[StrictStr, Field(description="BTCDOWN, BTCUP")], + cost: Annotated[Union[StrictFloat, StrictInt], Field(description="Spot balance")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1BlvtSubscribePost200Response]: + """Subscribe BLVT (USER_DATA) + + Weight(IP): 1 + + :param token_name: BTCDOWN, BTCUP (required) + :type token_name: str + :param cost: Spot balance (required) + :type cost: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_subscribe_post_serialize( + token_name=token_name, + cost=cost, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1BlvtSubscribePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_blvt_subscribe_post_without_preload_content( + self, + token_name: Annotated[StrictStr, Field(description="BTCDOWN, BTCUP")], + cost: Annotated[Union[StrictFloat, StrictInt], Field(description="Spot balance")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Subscribe BLVT (USER_DATA) + + Weight(IP): 1 + + :param token_name: BTCDOWN, BTCUP (required) + :type token_name: str + :param cost: Spot balance (required) + :type cost: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_subscribe_post_serialize( + token_name=token_name, + cost=cost, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1BlvtSubscribePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_blvt_subscribe_post_serialize( + self, + token_name, + cost, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if token_name is not None: + + _query_params.append(('tokenName', token_name)) + + if cost is not None: + + _query_params.append(('cost', cost)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/blvt/subscribe', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_blvt_subscribe_record_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + token_name: Annotated[Optional[StrictStr], Field(description="BTCDOWN, BTCUP")] = None, + id: Optional[StrictInt] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1BlvtSubscribeRecordGet200Response: + """Query Subscription Record (USER_DATA) + + - Only the data of the latest 90 days is available Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param token_name: BTCDOWN, BTCUP + :type token_name: str + :param id: + :type id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_subscribe_record_get_serialize( + timestamp=timestamp, + signature=signature, + token_name=token_name, + id=id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1BlvtSubscribeRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_blvt_subscribe_record_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + token_name: Annotated[Optional[StrictStr], Field(description="BTCDOWN, BTCUP")] = None, + id: Optional[StrictInt] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1BlvtSubscribeRecordGet200Response]: + """Query Subscription Record (USER_DATA) + + - Only the data of the latest 90 days is available Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param token_name: BTCDOWN, BTCUP + :type token_name: str + :param id: + :type id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_subscribe_record_get_serialize( + timestamp=timestamp, + signature=signature, + token_name=token_name, + id=id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1BlvtSubscribeRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_blvt_subscribe_record_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + token_name: Annotated[Optional[StrictStr], Field(description="BTCDOWN, BTCUP")] = None, + id: Optional[StrictInt] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Subscription Record (USER_DATA) + + - Only the data of the latest 90 days is available Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param token_name: BTCDOWN, BTCUP + :type token_name: str + :param id: + :type id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_subscribe_record_get_serialize( + timestamp=timestamp, + signature=signature, + token_name=token_name, + id=id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1BlvtSubscribeRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_blvt_subscribe_record_get_serialize( + self, + timestamp, + signature, + token_name, + id, + start_time, + end_time, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if token_name is not None: + + _query_params.append(('tokenName', token_name)) + + if id is not None: + + _query_params.append(('id', id)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/blvt/subscribe/record', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_blvt_token_info_get( + self, + token_name: Annotated[Optional[StrictStr], Field(description="BTCDOWN, BTCUP")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1BlvtTokenInfoGet200ResponseInner]: + """BLVT Info (MARKET_DATA) + + Weight(IP): 1 + + :param token_name: BTCDOWN, BTCUP + :type token_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_token_info_get_serialize( + token_name=token_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1BlvtTokenInfoGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_blvt_token_info_get_with_http_info( + self, + token_name: Annotated[Optional[StrictStr], Field(description="BTCDOWN, BTCUP")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1BlvtTokenInfoGet200ResponseInner]]: + """BLVT Info (MARKET_DATA) + + Weight(IP): 1 + + :param token_name: BTCDOWN, BTCUP + :type token_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_token_info_get_serialize( + token_name=token_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1BlvtTokenInfoGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_blvt_token_info_get_without_preload_content( + self, + token_name: Annotated[Optional[StrictStr], Field(description="BTCDOWN, BTCUP")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """BLVT Info (MARKET_DATA) + + Weight(IP): 1 + + :param token_name: BTCDOWN, BTCUP + :type token_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_token_info_get_serialize( + token_name=token_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1BlvtTokenInfoGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_blvt_token_info_get_serialize( + self, + token_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if token_name is not None: + + _query_params.append(('tokenName', token_name)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/blvt/tokenInfo', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_blvt_user_limit_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + token_name: Annotated[Optional[StrictStr], Field(description="BTCDOWN, BTCUP")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1BlvtUserLimitGet200ResponseInner]: + """BLVT User Limit Info (USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param token_name: BTCDOWN, BTCUP + :type token_name: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_user_limit_get_serialize( + timestamp=timestamp, + signature=signature, + token_name=token_name, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1BlvtUserLimitGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_blvt_user_limit_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + token_name: Annotated[Optional[StrictStr], Field(description="BTCDOWN, BTCUP")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1BlvtUserLimitGet200ResponseInner]]: + """BLVT User Limit Info (USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param token_name: BTCDOWN, BTCUP + :type token_name: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_user_limit_get_serialize( + timestamp=timestamp, + signature=signature, + token_name=token_name, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1BlvtUserLimitGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_blvt_user_limit_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + token_name: Annotated[Optional[StrictStr], Field(description="BTCDOWN, BTCUP")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """BLVT User Limit Info (USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param token_name: BTCDOWN, BTCUP + :type token_name: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_blvt_user_limit_get_serialize( + timestamp=timestamp, + signature=signature, + token_name=token_name, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1BlvtUserLimitGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_blvt_user_limit_get_serialize( + self, + timestamp, + signature, + token_name, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if token_name is not None: + + _query_params.append(('tokenName', token_name)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/blvt/userLimit', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/c2_c_api.py b/target/python/binance_openapi/openapi_client/api/c2_c_api.py new file mode 100644 index 0000000..9d70936 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/c2_c_api.py @@ -0,0 +1,425 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_c2c_order_match_list_user_order_history_get200_response import SapiV1C2cOrderMatchListUserOrderHistoryGet200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class C2CApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_c2c_order_match_list_user_order_history_get( + self, + trade_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_timestamp: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_timestamp: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + rows: Annotated[Optional[StrictInt], Field(description="default 100, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1C2cOrderMatchListUserOrderHistoryGet200Response: + """Get C2C Trade History (USER_DATA) + + - If startTimestamp and endTimestamp are not sent, the recent 30-day data will be returned. - The max interval between startTimestamp and endTimestamp is 30 days. Weight(IP): 1 + + :param trade_type: (required) + :type trade_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_timestamp: UTC timestamp in ms + :type start_timestamp: int + :param end_timestamp: UTC timestamp in ms + :type end_timestamp: int + :param page: Default 1 + :type page: int + :param rows: default 100, max 100 + :type rows: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_c2c_order_match_list_user_order_history_get_serialize( + trade_type=trade_type, + timestamp=timestamp, + signature=signature, + start_timestamp=start_timestamp, + end_timestamp=end_timestamp, + page=page, + rows=rows, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1C2cOrderMatchListUserOrderHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_c2c_order_match_list_user_order_history_get_with_http_info( + self, + trade_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_timestamp: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_timestamp: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + rows: Annotated[Optional[StrictInt], Field(description="default 100, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1C2cOrderMatchListUserOrderHistoryGet200Response]: + """Get C2C Trade History (USER_DATA) + + - If startTimestamp and endTimestamp are not sent, the recent 30-day data will be returned. - The max interval between startTimestamp and endTimestamp is 30 days. Weight(IP): 1 + + :param trade_type: (required) + :type trade_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_timestamp: UTC timestamp in ms + :type start_timestamp: int + :param end_timestamp: UTC timestamp in ms + :type end_timestamp: int + :param page: Default 1 + :type page: int + :param rows: default 100, max 100 + :type rows: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_c2c_order_match_list_user_order_history_get_serialize( + trade_type=trade_type, + timestamp=timestamp, + signature=signature, + start_timestamp=start_timestamp, + end_timestamp=end_timestamp, + page=page, + rows=rows, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1C2cOrderMatchListUserOrderHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_c2c_order_match_list_user_order_history_get_without_preload_content( + self, + trade_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_timestamp: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_timestamp: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + rows: Annotated[Optional[StrictInt], Field(description="default 100, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get C2C Trade History (USER_DATA) + + - If startTimestamp and endTimestamp are not sent, the recent 30-day data will be returned. - The max interval between startTimestamp and endTimestamp is 30 days. Weight(IP): 1 + + :param trade_type: (required) + :type trade_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_timestamp: UTC timestamp in ms + :type start_timestamp: int + :param end_timestamp: UTC timestamp in ms + :type end_timestamp: int + :param page: Default 1 + :type page: int + :param rows: default 100, max 100 + :type rows: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_c2c_order_match_list_user_order_history_get_serialize( + trade_type=trade_type, + timestamp=timestamp, + signature=signature, + start_timestamp=start_timestamp, + end_timestamp=end_timestamp, + page=page, + rows=rows, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1C2cOrderMatchListUserOrderHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_c2c_order_match_list_user_order_history_get_serialize( + self, + trade_type, + timestamp, + signature, + start_timestamp, + end_timestamp, + page, + rows, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if trade_type is not None: + + _query_params.append(('tradeType', trade_type)) + + if start_timestamp is not None: + + _query_params.append(('startTimestamp', start_timestamp)) + + if end_timestamp is not None: + + _query_params.append(('endTimestamp', end_timestamp)) + + if page is not None: + + _query_params.append(('page', page)) + + if rows is not None: + + _query_params.append(('rows', rows)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/c2c/orderMatch/listUserOrderHistory', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/convert_api.py b/target/python/binance_openapi/openapi_client/api/convert_api.py new file mode 100644 index 0000000..fadf1de --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/convert_api.py @@ -0,0 +1,3095 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_convert_accept_quote_post200_response import SapiV1ConvertAcceptQuotePost200Response +from openapi_client.models.sapi_v1_convert_asset_info_get200_response_inner import SapiV1ConvertAssetInfoGet200ResponseInner +from openapi_client.models.sapi_v1_convert_exchange_info_get200_response_inner import SapiV1ConvertExchangeInfoGet200ResponseInner +from openapi_client.models.sapi_v1_convert_get_quote_post200_response import SapiV1ConvertGetQuotePost200Response +from openapi_client.models.sapi_v1_convert_limit_cancel_order_post200_response import SapiV1ConvertLimitCancelOrderPost200Response +from openapi_client.models.sapi_v1_convert_limit_place_order_post200_response import SapiV1ConvertLimitPlaceOrderPost200Response +from openapi_client.models.sapi_v1_convert_limit_query_open_orders_get200_response import SapiV1ConvertLimitQueryOpenOrdersGet200Response +from openapi_client.models.sapi_v1_convert_order_status_get200_response import SapiV1ConvertOrderStatusGet200Response +from openapi_client.models.sapi_v1_convert_trade_flow_get200_response import SapiV1ConvertTradeFlowGet200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class ConvertApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_convert_accept_quote_post( + self, + quote_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ConvertAcceptQuotePost200Response: + """Accept Quote (TRADE) + + Accept the offered quote by quote ID. Weight(UID): 500 + + :param quote_id: (required) + :type quote_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_accept_quote_post_serialize( + quote_id=quote_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertAcceptQuotePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_convert_accept_quote_post_with_http_info( + self, + quote_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ConvertAcceptQuotePost200Response]: + """Accept Quote (TRADE) + + Accept the offered quote by quote ID. Weight(UID): 500 + + :param quote_id: (required) + :type quote_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_accept_quote_post_serialize( + quote_id=quote_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertAcceptQuotePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_convert_accept_quote_post_without_preload_content( + self, + quote_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Accept Quote (TRADE) + + Accept the offered quote by quote ID. Weight(UID): 500 + + :param quote_id: (required) + :type quote_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_accept_quote_post_serialize( + quote_id=quote_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertAcceptQuotePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_convert_accept_quote_post_serialize( + self, + quote_id, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if quote_id is not None: + + _query_params.append(('quoteId', quote_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/convert/acceptQuote', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_convert_asset_info_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1ConvertAssetInfoGet200ResponseInner]: + """Query order quantity precision per asset (USER_DATA) + + Query for supported asset precision information Weight(IP): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_asset_info_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1ConvertAssetInfoGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_convert_asset_info_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1ConvertAssetInfoGet200ResponseInner]]: + """Query order quantity precision per asset (USER_DATA) + + Query for supported asset precision information Weight(IP): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_asset_info_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1ConvertAssetInfoGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_convert_asset_info_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query order quantity precision per asset (USER_DATA) + + Query for supported asset precision information Weight(IP): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_asset_info_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1ConvertAssetInfoGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_convert_asset_info_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/convert/assetInfo', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_convert_exchange_info_get( + self, + from_asset: Annotated[Optional[StrictStr], Field(description="User spends coin")] = None, + to_asset: Annotated[Optional[StrictStr], Field(description="User receives coin")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1ConvertExchangeInfoGet200ResponseInner]: + """List All Convert Pairs + + Query for all convertible token pairs and the tokens’ respective upper/lower limits Weight(IP): 3000 + + :param from_asset: User spends coin + :type from_asset: str + :param to_asset: User receives coin + :type to_asset: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_exchange_info_get_serialize( + from_asset=from_asset, + to_asset=to_asset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1ConvertExchangeInfoGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_convert_exchange_info_get_with_http_info( + self, + from_asset: Annotated[Optional[StrictStr], Field(description="User spends coin")] = None, + to_asset: Annotated[Optional[StrictStr], Field(description="User receives coin")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1ConvertExchangeInfoGet200ResponseInner]]: + """List All Convert Pairs + + Query for all convertible token pairs and the tokens’ respective upper/lower limits Weight(IP): 3000 + + :param from_asset: User spends coin + :type from_asset: str + :param to_asset: User receives coin + :type to_asset: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_exchange_info_get_serialize( + from_asset=from_asset, + to_asset=to_asset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1ConvertExchangeInfoGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_convert_exchange_info_get_without_preload_content( + self, + from_asset: Annotated[Optional[StrictStr], Field(description="User spends coin")] = None, + to_asset: Annotated[Optional[StrictStr], Field(description="User receives coin")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List All Convert Pairs + + Query for all convertible token pairs and the tokens’ respective upper/lower limits Weight(IP): 3000 + + :param from_asset: User spends coin + :type from_asset: str + :param to_asset: User receives coin + :type to_asset: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_exchange_info_get_serialize( + from_asset=from_asset, + to_asset=to_asset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1ConvertExchangeInfoGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_convert_exchange_info_get_serialize( + self, + from_asset, + to_asset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if from_asset is not None: + + _query_params.append(('fromAsset', from_asset)) + + if to_asset is not None: + + _query_params.append(('toAsset', to_asset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/convert/exchangeInfo', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_convert_get_quote_post( + self, + from_asset: StrictStr, + to_asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="When specified, it is the amount you will be debited after the conversion")] = None, + to_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="When specified, it is the amount you will be debited after the conversion")] = None, + valid_time: Annotated[Optional[StrictStr], Field(description="10s, 30s, 1m, 2m, default 10s")] = None, + wallet_type: Annotated[Optional[StrictStr], Field(description="SPOT or FUNDING. Default is SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ConvertGetQuotePost200Response: + """Send quote request (USER_DATA) + + Request a quote for the requested token pairs Weight(UID): 200 + + :param from_asset: (required) + :type from_asset: str + :param to_asset: (required) + :type to_asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_amount: When specified, it is the amount you will be debited after the conversion + :type from_amount: float + :param to_amount: When specified, it is the amount you will be debited after the conversion + :type to_amount: float + :param valid_time: 10s, 30s, 1m, 2m, default 10s + :type valid_time: str + :param wallet_type: SPOT or FUNDING. Default is SPOT + :type wallet_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_get_quote_post_serialize( + from_asset=from_asset, + to_asset=to_asset, + timestamp=timestamp, + signature=signature, + from_amount=from_amount, + to_amount=to_amount, + valid_time=valid_time, + wallet_type=wallet_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertGetQuotePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_convert_get_quote_post_with_http_info( + self, + from_asset: StrictStr, + to_asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="When specified, it is the amount you will be debited after the conversion")] = None, + to_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="When specified, it is the amount you will be debited after the conversion")] = None, + valid_time: Annotated[Optional[StrictStr], Field(description="10s, 30s, 1m, 2m, default 10s")] = None, + wallet_type: Annotated[Optional[StrictStr], Field(description="SPOT or FUNDING. Default is SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ConvertGetQuotePost200Response]: + """Send quote request (USER_DATA) + + Request a quote for the requested token pairs Weight(UID): 200 + + :param from_asset: (required) + :type from_asset: str + :param to_asset: (required) + :type to_asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_amount: When specified, it is the amount you will be debited after the conversion + :type from_amount: float + :param to_amount: When specified, it is the amount you will be debited after the conversion + :type to_amount: float + :param valid_time: 10s, 30s, 1m, 2m, default 10s + :type valid_time: str + :param wallet_type: SPOT or FUNDING. Default is SPOT + :type wallet_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_get_quote_post_serialize( + from_asset=from_asset, + to_asset=to_asset, + timestamp=timestamp, + signature=signature, + from_amount=from_amount, + to_amount=to_amount, + valid_time=valid_time, + wallet_type=wallet_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertGetQuotePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_convert_get_quote_post_without_preload_content( + self, + from_asset: StrictStr, + to_asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="When specified, it is the amount you will be debited after the conversion")] = None, + to_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="When specified, it is the amount you will be debited after the conversion")] = None, + valid_time: Annotated[Optional[StrictStr], Field(description="10s, 30s, 1m, 2m, default 10s")] = None, + wallet_type: Annotated[Optional[StrictStr], Field(description="SPOT or FUNDING. Default is SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send quote request (USER_DATA) + + Request a quote for the requested token pairs Weight(UID): 200 + + :param from_asset: (required) + :type from_asset: str + :param to_asset: (required) + :type to_asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_amount: When specified, it is the amount you will be debited after the conversion + :type from_amount: float + :param to_amount: When specified, it is the amount you will be debited after the conversion + :type to_amount: float + :param valid_time: 10s, 30s, 1m, 2m, default 10s + :type valid_time: str + :param wallet_type: SPOT or FUNDING. Default is SPOT + :type wallet_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_get_quote_post_serialize( + from_asset=from_asset, + to_asset=to_asset, + timestamp=timestamp, + signature=signature, + from_amount=from_amount, + to_amount=to_amount, + valid_time=valid_time, + wallet_type=wallet_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertGetQuotePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_convert_get_quote_post_serialize( + self, + from_asset, + to_asset, + timestamp, + signature, + from_amount, + to_amount, + valid_time, + wallet_type, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if from_asset is not None: + + _query_params.append(('fromAsset', from_asset)) + + if to_asset is not None: + + _query_params.append(('toAsset', to_asset)) + + if from_amount is not None: + + _query_params.append(('fromAmount', from_amount)) + + if to_amount is not None: + + _query_params.append(('toAmount', to_amount)) + + if valid_time is not None: + + _query_params.append(('validTime', valid_time)) + + if wallet_type is not None: + + _query_params.append(('walletType', wallet_type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/convert/getQuote', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_convert_limit_cancel_order_post( + self, + order_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ConvertLimitCancelOrderPost200Response: + """Cancel limit order (USER_DATA) + + Enable users to cancel a limit order Weight(UID): 200 + + :param order_id: (required) + :type order_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_limit_cancel_order_post_serialize( + order_id=order_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertLimitCancelOrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_convert_limit_cancel_order_post_with_http_info( + self, + order_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ConvertLimitCancelOrderPost200Response]: + """Cancel limit order (USER_DATA) + + Enable users to cancel a limit order Weight(UID): 200 + + :param order_id: (required) + :type order_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_limit_cancel_order_post_serialize( + order_id=order_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertLimitCancelOrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_convert_limit_cancel_order_post_without_preload_content( + self, + order_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel limit order (USER_DATA) + + Enable users to cancel a limit order Weight(UID): 200 + + :param order_id: (required) + :type order_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_limit_cancel_order_post_serialize( + order_id=order_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertLimitCancelOrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_convert_limit_cancel_order_post_serialize( + self, + order_id, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/convert/limit/cancelOrder', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_convert_limit_place_order_post( + self, + base_asset: StrictStr, + quote_asset: StrictStr, + limit_price: Annotated[Union[StrictFloat, StrictInt], Field(description="Symbol limit price (from baseAsset to quoteAsset)")], + side: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + base_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Base asset amount. (One of baseAmount or quoteAmount is required)")] = None, + quote_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote asset amount. (One of baseAmount or quoteAmount is required)")] = None, + wallet_type: Annotated[Optional[StrictStr], Field(description="SPOT or FUNDING or SPOT_FUNDING. It is to use which type of assets. Default is SPOT.")] = None, + expired_type: Annotated[Optional[StrictStr], Field(description="1_D, 3_D, 7_D, 30_D (D means day)")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ConvertLimitPlaceOrderPost200Response: + """Place limit order (USER_DATA) + + Enable users to place a limit order - baseAsset or quoteAsset can be determined via exchangeInfo endpoint. - Limit price is defined from baseAsset to quoteAsset. - Either baseAmount or quoteAmount is used. Weight(UID): 500 + + :param base_asset: (required) + :type base_asset: str + :param quote_asset: (required) + :type quote_asset: str + :param limit_price: Symbol limit price (from baseAsset to quoteAsset) (required) + :type limit_price: float + :param side: (required) + :type side: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param base_amount: Base asset amount. (One of baseAmount or quoteAmount is required) + :type base_amount: float + :param quote_amount: Quote asset amount. (One of baseAmount or quoteAmount is required) + :type quote_amount: float + :param wallet_type: SPOT or FUNDING or SPOT_FUNDING. It is to use which type of assets. Default is SPOT. + :type wallet_type: str + :param expired_type: 1_D, 3_D, 7_D, 30_D (D means day) + :type expired_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_limit_place_order_post_serialize( + base_asset=base_asset, + quote_asset=quote_asset, + limit_price=limit_price, + side=side, + timestamp=timestamp, + signature=signature, + base_amount=base_amount, + quote_amount=quote_amount, + wallet_type=wallet_type, + expired_type=expired_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertLimitPlaceOrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_convert_limit_place_order_post_with_http_info( + self, + base_asset: StrictStr, + quote_asset: StrictStr, + limit_price: Annotated[Union[StrictFloat, StrictInt], Field(description="Symbol limit price (from baseAsset to quoteAsset)")], + side: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + base_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Base asset amount. (One of baseAmount or quoteAmount is required)")] = None, + quote_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote asset amount. (One of baseAmount or quoteAmount is required)")] = None, + wallet_type: Annotated[Optional[StrictStr], Field(description="SPOT or FUNDING or SPOT_FUNDING. It is to use which type of assets. Default is SPOT.")] = None, + expired_type: Annotated[Optional[StrictStr], Field(description="1_D, 3_D, 7_D, 30_D (D means day)")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ConvertLimitPlaceOrderPost200Response]: + """Place limit order (USER_DATA) + + Enable users to place a limit order - baseAsset or quoteAsset can be determined via exchangeInfo endpoint. - Limit price is defined from baseAsset to quoteAsset. - Either baseAmount or quoteAmount is used. Weight(UID): 500 + + :param base_asset: (required) + :type base_asset: str + :param quote_asset: (required) + :type quote_asset: str + :param limit_price: Symbol limit price (from baseAsset to quoteAsset) (required) + :type limit_price: float + :param side: (required) + :type side: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param base_amount: Base asset amount. (One of baseAmount or quoteAmount is required) + :type base_amount: float + :param quote_amount: Quote asset amount. (One of baseAmount or quoteAmount is required) + :type quote_amount: float + :param wallet_type: SPOT or FUNDING or SPOT_FUNDING. It is to use which type of assets. Default is SPOT. + :type wallet_type: str + :param expired_type: 1_D, 3_D, 7_D, 30_D (D means day) + :type expired_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_limit_place_order_post_serialize( + base_asset=base_asset, + quote_asset=quote_asset, + limit_price=limit_price, + side=side, + timestamp=timestamp, + signature=signature, + base_amount=base_amount, + quote_amount=quote_amount, + wallet_type=wallet_type, + expired_type=expired_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertLimitPlaceOrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_convert_limit_place_order_post_without_preload_content( + self, + base_asset: StrictStr, + quote_asset: StrictStr, + limit_price: Annotated[Union[StrictFloat, StrictInt], Field(description="Symbol limit price (from baseAsset to quoteAsset)")], + side: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + base_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Base asset amount. (One of baseAmount or quoteAmount is required)")] = None, + quote_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote asset amount. (One of baseAmount or quoteAmount is required)")] = None, + wallet_type: Annotated[Optional[StrictStr], Field(description="SPOT or FUNDING or SPOT_FUNDING. It is to use which type of assets. Default is SPOT.")] = None, + expired_type: Annotated[Optional[StrictStr], Field(description="1_D, 3_D, 7_D, 30_D (D means day)")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Place limit order (USER_DATA) + + Enable users to place a limit order - baseAsset or quoteAsset can be determined via exchangeInfo endpoint. - Limit price is defined from baseAsset to quoteAsset. - Either baseAmount or quoteAmount is used. Weight(UID): 500 + + :param base_asset: (required) + :type base_asset: str + :param quote_asset: (required) + :type quote_asset: str + :param limit_price: Symbol limit price (from baseAsset to quoteAsset) (required) + :type limit_price: float + :param side: (required) + :type side: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param base_amount: Base asset amount. (One of baseAmount or quoteAmount is required) + :type base_amount: float + :param quote_amount: Quote asset amount. (One of baseAmount or quoteAmount is required) + :type quote_amount: float + :param wallet_type: SPOT or FUNDING or SPOT_FUNDING. It is to use which type of assets. Default is SPOT. + :type wallet_type: str + :param expired_type: 1_D, 3_D, 7_D, 30_D (D means day) + :type expired_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_limit_place_order_post_serialize( + base_asset=base_asset, + quote_asset=quote_asset, + limit_price=limit_price, + side=side, + timestamp=timestamp, + signature=signature, + base_amount=base_amount, + quote_amount=quote_amount, + wallet_type=wallet_type, + expired_type=expired_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertLimitPlaceOrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_convert_limit_place_order_post_serialize( + self, + base_asset, + quote_asset, + limit_price, + side, + timestamp, + signature, + base_amount, + quote_amount, + wallet_type, + expired_type, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if base_asset is not None: + + _query_params.append(('baseAsset', base_asset)) + + if quote_asset is not None: + + _query_params.append(('quoteAsset', quote_asset)) + + if limit_price is not None: + + _query_params.append(('limitPrice', limit_price)) + + if base_amount is not None: + + _query_params.append(('baseAmount', base_amount)) + + if quote_amount is not None: + + _query_params.append(('quoteAmount', quote_amount)) + + if side is not None: + + _query_params.append(('side', side)) + + if wallet_type is not None: + + _query_params.append(('walletType', wallet_type)) + + if expired_type is not None: + + _query_params.append(('expiredType', expired_type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/convert/limit/placeOrder', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_convert_limit_query_open_orders_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ConvertLimitQueryOpenOrdersGet200Response: + """Query limit open orders (USER_DATA) + + Enable users to query for all existing limit orders Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_limit_query_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertLimitQueryOpenOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_convert_limit_query_open_orders_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ConvertLimitQueryOpenOrdersGet200Response]: + """Query limit open orders (USER_DATA) + + Enable users to query for all existing limit orders Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_limit_query_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertLimitQueryOpenOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_convert_limit_query_open_orders_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query limit open orders (USER_DATA) + + Enable users to query for all existing limit orders Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_limit_query_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertLimitQueryOpenOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_convert_limit_query_open_orders_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/convert/limit/queryOpenOrders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_convert_order_status_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Optional[StrictStr] = None, + quote_id: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ConvertOrderStatusGet200Response: + """Order status (USER_DATA) + + Query order status by order ID. Weight(UID): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: + :type order_id: str + :param quote_id: + :type quote_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_order_status_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + quote_id=quote_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertOrderStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_convert_order_status_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Optional[StrictStr] = None, + quote_id: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ConvertOrderStatusGet200Response]: + """Order status (USER_DATA) + + Query order status by order ID. Weight(UID): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: + :type order_id: str + :param quote_id: + :type quote_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_order_status_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + quote_id=quote_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertOrderStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_convert_order_status_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Optional[StrictStr] = None, + quote_id: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Order status (USER_DATA) + + Query order status by order ID. Weight(UID): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: + :type order_id: str + :param quote_id: + :type quote_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_order_status_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + quote_id=quote_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertOrderStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_convert_order_status_get_serialize( + self, + timestamp, + signature, + order_id, + quote_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if quote_id is not None: + + _query_params.append(('quoteId', quote_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/convert/orderStatus', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_convert_trade_flow_get( + self, + start_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + end_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + limit: Annotated[Optional[StrictInt], Field(description="default 100, max 1000")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ConvertTradeFlowGet200Response: + """Get Convert Trade History (USER_DATA) + + - The max interval between startTime and endTime is 30 days. Weight(UID): 3000 + + :param start_time: UTC timestamp in ms (required) + :type start_time: int + :param end_time: UTC timestamp in ms (required) + :type end_time: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param limit: default 100, max 1000 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_trade_flow_get_serialize( + start_time=start_time, + end_time=end_time, + timestamp=timestamp, + signature=signature, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertTradeFlowGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_convert_trade_flow_get_with_http_info( + self, + start_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + end_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + limit: Annotated[Optional[StrictInt], Field(description="default 100, max 1000")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ConvertTradeFlowGet200Response]: + """Get Convert Trade History (USER_DATA) + + - The max interval between startTime and endTime is 30 days. Weight(UID): 3000 + + :param start_time: UTC timestamp in ms (required) + :type start_time: int + :param end_time: UTC timestamp in ms (required) + :type end_time: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param limit: default 100, max 1000 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_trade_flow_get_serialize( + start_time=start_time, + end_time=end_time, + timestamp=timestamp, + signature=signature, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertTradeFlowGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_convert_trade_flow_get_without_preload_content( + self, + start_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + end_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + limit: Annotated[Optional[StrictInt], Field(description="default 100, max 1000")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Convert Trade History (USER_DATA) + + - The max interval between startTime and endTime is 30 days. Weight(UID): 3000 + + :param start_time: UTC timestamp in ms (required) + :type start_time: int + :param end_time: UTC timestamp in ms (required) + :type end_time: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param limit: default 100, max 1000 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_convert_trade_flow_get_serialize( + start_time=start_time, + end_time=end_time, + timestamp=timestamp, + signature=signature, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ConvertTradeFlowGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_convert_trade_flow_get_serialize( + self, + start_time, + end_time, + timestamp, + signature, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/convert/tradeFlow', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/crypto_loans_api.py b/target/python/binance_openapi/openapi_client/api/crypto_loans_api.py new file mode 100644 index 0000000..56fc7b6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/crypto_loans_api.py @@ -0,0 +1,7910 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_loan_adjust_ltv_post200_response import SapiV1LoanAdjustLtvPost200Response +from openapi_client.models.sapi_v1_loan_borrow_history_get200_response import SapiV1LoanBorrowHistoryGet200Response +from openapi_client.models.sapi_v1_loan_borrow_post200_response import SapiV1LoanBorrowPost200Response +from openapi_client.models.sapi_v1_loan_collateral_data_get200_response import SapiV1LoanCollateralDataGet200Response +from openapi_client.models.sapi_v1_loan_customize_margin_call_post200_response import SapiV1LoanCustomizeMarginCallPost200Response +from openapi_client.models.sapi_v1_loan_income_get200_response_inner import SapiV1LoanIncomeGet200ResponseInner +from openapi_client.models.sapi_v1_loan_loanable_data_get200_response import SapiV1LoanLoanableDataGet200Response +from openapi_client.models.sapi_v1_loan_ltv_adjustment_history_get200_response import SapiV1LoanLtvAdjustmentHistoryGet200Response +from openapi_client.models.sapi_v1_loan_ongoing_orders_get200_response import SapiV1LoanOngoingOrdersGet200Response +from openapi_client.models.sapi_v1_loan_repay_collateral_rate_get200_response import SapiV1LoanRepayCollateralRateGet200Response +from openapi_client.models.sapi_v1_loan_repay_history_get200_response import SapiV1LoanRepayHistoryGet200Response +from openapi_client.models.sapi_v1_loan_repay_post200_response import SapiV1LoanRepayPost200Response +from openapi_client.models.sapi_v2_loan_flexible_adjust_ltv_post200_response import SapiV2LoanFlexibleAdjustLtvPost200Response +from openapi_client.models.sapi_v2_loan_flexible_borrow_history_get200_response import SapiV2LoanFlexibleBorrowHistoryGet200Response +from openapi_client.models.sapi_v2_loan_flexible_borrow_post200_response import SapiV2LoanFlexibleBorrowPost200Response +from openapi_client.models.sapi_v2_loan_flexible_collateral_data_get200_response import SapiV2LoanFlexibleCollateralDataGet200Response +from openapi_client.models.sapi_v2_loan_flexible_loanable_data_get200_response import SapiV2LoanFlexibleLoanableDataGet200Response +from openapi_client.models.sapi_v2_loan_flexible_ltv_adjustment_history_get200_response import SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response +from openapi_client.models.sapi_v2_loan_flexible_ongoing_orders_get200_response import SapiV2LoanFlexibleOngoingOrdersGet200Response +from openapi_client.models.sapi_v2_loan_flexible_repay_history_get200_response import SapiV2LoanFlexibleRepayHistoryGet200Response +from openapi_client.models.sapi_v2_loan_flexible_repay_post200_response import SapiV2LoanFlexibleRepayPost200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class CryptoLoansApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_loan_adjust_ltv_post( + self, + order_id: Annotated[StrictInt, Field(description="Order ID")], + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Amount")], + direction: Annotated[StrictStr, Field(description="'ADDITIONAL', 'REDUCED'")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanAdjustLtvPost200Response: + """Crypto Loan Adjust LTV (TRADE) + + Weight(UID): 6000 + + :param order_id: Order ID (required) + :type order_id: int + :param amount: Amount (required) + :type amount: float + :param direction: 'ADDITIONAL', 'REDUCED' (required) + :type direction: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_adjust_ltv_post_serialize( + order_id=order_id, + amount=amount, + direction=direction, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanAdjustLtvPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_adjust_ltv_post_with_http_info( + self, + order_id: Annotated[StrictInt, Field(description="Order ID")], + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Amount")], + direction: Annotated[StrictStr, Field(description="'ADDITIONAL', 'REDUCED'")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanAdjustLtvPost200Response]: + """Crypto Loan Adjust LTV (TRADE) + + Weight(UID): 6000 + + :param order_id: Order ID (required) + :type order_id: int + :param amount: Amount (required) + :type amount: float + :param direction: 'ADDITIONAL', 'REDUCED' (required) + :type direction: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_adjust_ltv_post_serialize( + order_id=order_id, + amount=amount, + direction=direction, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanAdjustLtvPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_adjust_ltv_post_without_preload_content( + self, + order_id: Annotated[StrictInt, Field(description="Order ID")], + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Amount")], + direction: Annotated[StrictStr, Field(description="'ADDITIONAL', 'REDUCED'")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Crypto Loan Adjust LTV (TRADE) + + Weight(UID): 6000 + + :param order_id: Order ID (required) + :type order_id: int + :param amount: Amount (required) + :type amount: float + :param direction: 'ADDITIONAL', 'REDUCED' (required) + :type direction: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_adjust_ltv_post_serialize( + order_id=order_id, + amount=amount, + direction=direction, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanAdjustLtvPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_adjust_ltv_post_serialize( + self, + order_id, + amount, + direction, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/loan/adjust/ltv', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_borrow_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="orderId in POST /sapi/v1/loan/borrow")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 10, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanBorrowHistoryGet200Response: + """Get Crypto Loans Borrow History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: orderId in POST /sapi/v1/loan/borrow + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: default 10, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_borrow_history_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanBorrowHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_borrow_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="orderId in POST /sapi/v1/loan/borrow")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 10, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanBorrowHistoryGet200Response]: + """Get Crypto Loans Borrow History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: orderId in POST /sapi/v1/loan/borrow + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: default 10, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_borrow_history_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanBorrowHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_borrow_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="orderId in POST /sapi/v1/loan/borrow")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 10, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Crypto Loans Borrow History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: orderId in POST /sapi/v1/loan/borrow + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: default 10, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_borrow_history_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanBorrowHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_borrow_history_get_serialize( + self, + timestamp, + signature, + order_id, + loan_coin, + collateral_coin, + start_time, + end_time, + current, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/borrow/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_borrow_post( + self, + loan_coin: Annotated[StrictStr, Field(description="Coin loaned")], + collateral_coin: Annotated[StrictStr, Field(description="Coin used as collateral")], + loan_term: Annotated[StrictInt, Field(description="7/14/30/90/180 days")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Loan amount")] = None, + collateral_amount: Optional[Union[StrictFloat, StrictInt]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanBorrowPost200Response: + """Crypto Loan Borrow (TRADE) + + Weight(UID): 6000 + + :param loan_coin: Coin loaned (required) + :type loan_coin: str + :param collateral_coin: Coin used as collateral (required) + :type collateral_coin: str + :param loan_term: 7/14/30/90/180 days (required) + :type loan_term: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_amount: Loan amount + :type loan_amount: float + :param collateral_amount: + :type collateral_amount: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_borrow_post_serialize( + loan_coin=loan_coin, + collateral_coin=collateral_coin, + loan_term=loan_term, + timestamp=timestamp, + signature=signature, + loan_amount=loan_amount, + collateral_amount=collateral_amount, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanBorrowPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_borrow_post_with_http_info( + self, + loan_coin: Annotated[StrictStr, Field(description="Coin loaned")], + collateral_coin: Annotated[StrictStr, Field(description="Coin used as collateral")], + loan_term: Annotated[StrictInt, Field(description="7/14/30/90/180 days")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Loan amount")] = None, + collateral_amount: Optional[Union[StrictFloat, StrictInt]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanBorrowPost200Response]: + """Crypto Loan Borrow (TRADE) + + Weight(UID): 6000 + + :param loan_coin: Coin loaned (required) + :type loan_coin: str + :param collateral_coin: Coin used as collateral (required) + :type collateral_coin: str + :param loan_term: 7/14/30/90/180 days (required) + :type loan_term: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_amount: Loan amount + :type loan_amount: float + :param collateral_amount: + :type collateral_amount: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_borrow_post_serialize( + loan_coin=loan_coin, + collateral_coin=collateral_coin, + loan_term=loan_term, + timestamp=timestamp, + signature=signature, + loan_amount=loan_amount, + collateral_amount=collateral_amount, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanBorrowPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_borrow_post_without_preload_content( + self, + loan_coin: Annotated[StrictStr, Field(description="Coin loaned")], + collateral_coin: Annotated[StrictStr, Field(description="Coin used as collateral")], + loan_term: Annotated[StrictInt, Field(description="7/14/30/90/180 days")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Loan amount")] = None, + collateral_amount: Optional[Union[StrictFloat, StrictInt]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Crypto Loan Borrow (TRADE) + + Weight(UID): 6000 + + :param loan_coin: Coin loaned (required) + :type loan_coin: str + :param collateral_coin: Coin used as collateral (required) + :type collateral_coin: str + :param loan_term: 7/14/30/90/180 days (required) + :type loan_term: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_amount: Loan amount + :type loan_amount: float + :param collateral_amount: + :type collateral_amount: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_borrow_post_serialize( + loan_coin=loan_coin, + collateral_coin=collateral_coin, + loan_term=loan_term, + timestamp=timestamp, + signature=signature, + loan_amount=loan_amount, + collateral_amount=collateral_amount, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanBorrowPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_borrow_post_serialize( + self, + loan_coin, + collateral_coin, + loan_term, + timestamp, + signature, + loan_amount, + collateral_amount, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if loan_amount is not None: + + _query_params.append(('loanAmount', loan_amount)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if collateral_amount is not None: + + _query_params.append(('collateralAmount', collateral_amount)) + + if loan_term is not None: + + _query_params.append(('loanTerm', loan_term)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/loan/borrow', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_collateral_data_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanCollateralDataGet200Response: + """Get Collateral Assets Data (USER_DATA) + + Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_collateral_data_get_serialize( + timestamp=timestamp, + signature=signature, + collateral_coin=collateral_coin, + vip_level=vip_level, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanCollateralDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_collateral_data_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanCollateralDataGet200Response]: + """Get Collateral Assets Data (USER_DATA) + + Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_collateral_data_get_serialize( + timestamp=timestamp, + signature=signature, + collateral_coin=collateral_coin, + vip_level=vip_level, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanCollateralDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_collateral_data_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Collateral Assets Data (USER_DATA) + + Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_collateral_data_get_serialize( + timestamp=timestamp, + signature=signature, + collateral_coin=collateral_coin, + vip_level=vip_level, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanCollateralDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_collateral_data_get_serialize( + self, + timestamp, + signature, + collateral_coin, + vip_level, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if vip_level is not None: + + _query_params.append(('vipLevel', vip_level)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/collateral/data', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_customize_margin_call_post( + self, + margin_call: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Mandatory when collateralCoin is empty. Send either orderId or collateralCoin, if both parameters are sent, take orderId only.")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanCustomizeMarginCallPost200Response: + """Crypto Loan Customize Margin Call (TRADE) + + Customize margin call for ongoing orders only. Weight(UID): 6000 + + :param margin_call: (required) + :type margin_call: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Mandatory when collateralCoin is empty. Send either orderId or collateralCoin, if both parameters are sent, take orderId only. + :type order_id: int + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_customize_margin_call_post_serialize( + margin_call=margin_call, + timestamp=timestamp, + signature=signature, + order_id=order_id, + collateral_coin=collateral_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanCustomizeMarginCallPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_customize_margin_call_post_with_http_info( + self, + margin_call: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Mandatory when collateralCoin is empty. Send either orderId or collateralCoin, if both parameters are sent, take orderId only.")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanCustomizeMarginCallPost200Response]: + """Crypto Loan Customize Margin Call (TRADE) + + Customize margin call for ongoing orders only. Weight(UID): 6000 + + :param margin_call: (required) + :type margin_call: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Mandatory when collateralCoin is empty. Send either orderId or collateralCoin, if both parameters are sent, take orderId only. + :type order_id: int + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_customize_margin_call_post_serialize( + margin_call=margin_call, + timestamp=timestamp, + signature=signature, + order_id=order_id, + collateral_coin=collateral_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanCustomizeMarginCallPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_customize_margin_call_post_without_preload_content( + self, + margin_call: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Mandatory when collateralCoin is empty. Send either orderId or collateralCoin, if both parameters are sent, take orderId only.")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Crypto Loan Customize Margin Call (TRADE) + + Customize margin call for ongoing orders only. Weight(UID): 6000 + + :param margin_call: (required) + :type margin_call: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Mandatory when collateralCoin is empty. Send either orderId or collateralCoin, if both parameters are sent, take orderId only. + :type order_id: int + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_customize_margin_call_post_serialize( + margin_call=margin_call, + timestamp=timestamp, + signature=signature, + order_id=order_id, + collateral_coin=collateral_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanCustomizeMarginCallPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_customize_margin_call_post_serialize( + self, + margin_call, + timestamp, + signature, + order_id, + collateral_coin, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if margin_call is not None: + + _query_params.append(('marginCall', margin_call)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/loan/customize/margin_call', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_income_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + type: Annotated[Optional[StrictStr], Field(description="All types will be returned by default. * `borrowIn` * `collateralSpent` * `repayAmount` * `collateralReturn` - Collateral return after repayment * `addCollateral` * `removeCollateral` * `collateralReturnAfterLiquidation`")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 20, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1LoanIncomeGet200ResponseInner]: + """Get Crypto Loans Income History (USER_DATA) + + - If startTime and endTime are not sent, the recent 7-day data will be returned. - The max interval between startTime and endTime is 30 days. Weight(UID): 6000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param type: All types will be returned by default. * `borrowIn` * `collateralSpent` * `repayAmount` * `collateralReturn` - Collateral return after repayment * `addCollateral` * `removeCollateral` * `collateralReturnAfterLiquidation` + :type type: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: default 20, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_income_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + type=type, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LoanIncomeGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_income_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + type: Annotated[Optional[StrictStr], Field(description="All types will be returned by default. * `borrowIn` * `collateralSpent` * `repayAmount` * `collateralReturn` - Collateral return after repayment * `addCollateral` * `removeCollateral` * `collateralReturnAfterLiquidation`")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 20, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1LoanIncomeGet200ResponseInner]]: + """Get Crypto Loans Income History (USER_DATA) + + - If startTime and endTime are not sent, the recent 7-day data will be returned. - The max interval between startTime and endTime is 30 days. Weight(UID): 6000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param type: All types will be returned by default. * `borrowIn` * `collateralSpent` * `repayAmount` * `collateralReturn` - Collateral return after repayment * `addCollateral` * `removeCollateral` * `collateralReturnAfterLiquidation` + :type type: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: default 20, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_income_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + type=type, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LoanIncomeGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_income_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + type: Annotated[Optional[StrictStr], Field(description="All types will be returned by default. * `borrowIn` * `collateralSpent` * `repayAmount` * `collateralReturn` - Collateral return after repayment * `addCollateral` * `removeCollateral` * `collateralReturnAfterLiquidation`")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 20, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Crypto Loans Income History (USER_DATA) + + - If startTime and endTime are not sent, the recent 7-day data will be returned. - The max interval between startTime and endTime is 30 days. Weight(UID): 6000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param type: All types will be returned by default. * `borrowIn` * `collateralSpent` * `repayAmount` * `collateralReturn` - Collateral return after repayment * `addCollateral` * `removeCollateral` * `collateralReturnAfterLiquidation` + :type type: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: default 20, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_income_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + type=type, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LoanIncomeGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_income_get_serialize( + self, + timestamp, + signature, + asset, + type, + start_time, + end_time, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if type is not None: + + _query_params.append(('type', type)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/income', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_loanable_data_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanLoanableDataGet200Response: + """Get Loanable Assets Data (USER_DATA) + + Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_loanable_data_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + vip_level=vip_level, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanLoanableDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_loanable_data_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanLoanableDataGet200Response]: + """Get Loanable Assets Data (USER_DATA) + + Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_loanable_data_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + vip_level=vip_level, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanLoanableDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_loanable_data_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Loanable Assets Data (USER_DATA) + + Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_loanable_data_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + vip_level=vip_level, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanLoanableDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_loanable_data_get_serialize( + self, + timestamp, + signature, + loan_coin, + vip_level, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if vip_level is not None: + + _query_params.append(('vipLevel', vip_level)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/loanable/data', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_ltv_adjustment_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order ID")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 10, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanLtvAdjustmentHistoryGet200Response: + """Get Loan LTV Adjustment History (USER_DATA) + + If startTime and endTime are not sent, the recent 90-day data will be returned. The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order ID + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: default 10, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_ltv_adjustment_history_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanLtvAdjustmentHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_ltv_adjustment_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order ID")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 10, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanLtvAdjustmentHistoryGet200Response]: + """Get Loan LTV Adjustment History (USER_DATA) + + If startTime and endTime are not sent, the recent 90-day data will be returned. The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order ID + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: default 10, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_ltv_adjustment_history_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanLtvAdjustmentHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_ltv_adjustment_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order ID")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 10, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Loan LTV Adjustment History (USER_DATA) + + If startTime and endTime are not sent, the recent 90-day data will be returned. The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order ID + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: default 10, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_ltv_adjustment_history_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanLtvAdjustmentHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_ltv_adjustment_history_get_serialize( + self, + timestamp, + signature, + order_id, + loan_coin, + collateral_coin, + start_time, + end_time, + current, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/ltv/adjustment/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_ongoing_orders_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="orderId in POST /sapi/v1/loan/borrow")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1; default:1, max:1000")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 10, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanOngoingOrdersGet200Response: + """Get Loan Ongoing Orders (USER_DATA) + + Weight(IP): 300 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: orderId in POST /sapi/v1/loan/borrow + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param current: Current querying page. Start from 1; default:1, max:1000 + :type current: int + :param limit: default 10, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_ongoing_orders_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanOngoingOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_ongoing_orders_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="orderId in POST /sapi/v1/loan/borrow")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1; default:1, max:1000")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 10, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanOngoingOrdersGet200Response]: + """Get Loan Ongoing Orders (USER_DATA) + + Weight(IP): 300 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: orderId in POST /sapi/v1/loan/borrow + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param current: Current querying page. Start from 1; default:1, max:1000 + :type current: int + :param limit: default 10, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_ongoing_orders_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanOngoingOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_ongoing_orders_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="orderId in POST /sapi/v1/loan/borrow")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1; default:1, max:1000")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 10, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Loan Ongoing Orders (USER_DATA) + + Weight(IP): 300 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: orderId in POST /sapi/v1/loan/borrow + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param current: Current querying page. Start from 1; default:1, max:1000 + :type current: int + :param limit: default 10, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_ongoing_orders_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanOngoingOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_ongoing_orders_get_serialize( + self, + timestamp, + signature, + order_id, + loan_coin, + collateral_coin, + current, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if current is not None: + + _query_params.append(('current', current)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/ongoing/orders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_repay_collateral_rate_get( + self, + loan_coin: Annotated[StrictStr, Field(description="Coin loaned")], + collateral_coin: Annotated[StrictStr, Field(description="Coin used as collateral")], + repay_amount: Annotated[Union[StrictFloat, StrictInt], Field(description="repay amount of loanCoin")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanRepayCollateralRateGet200Response: + """Check Collateral Repay Rate (USER_DATA) + + Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second. Weight(IP): 6000 + + :param loan_coin: Coin loaned (required) + :type loan_coin: str + :param collateral_coin: Coin used as collateral (required) + :type collateral_coin: str + :param repay_amount: repay amount of loanCoin (required) + :type repay_amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_repay_collateral_rate_get_serialize( + loan_coin=loan_coin, + collateral_coin=collateral_coin, + repay_amount=repay_amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanRepayCollateralRateGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_repay_collateral_rate_get_with_http_info( + self, + loan_coin: Annotated[StrictStr, Field(description="Coin loaned")], + collateral_coin: Annotated[StrictStr, Field(description="Coin used as collateral")], + repay_amount: Annotated[Union[StrictFloat, StrictInt], Field(description="repay amount of loanCoin")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanRepayCollateralRateGet200Response]: + """Check Collateral Repay Rate (USER_DATA) + + Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second. Weight(IP): 6000 + + :param loan_coin: Coin loaned (required) + :type loan_coin: str + :param collateral_coin: Coin used as collateral (required) + :type collateral_coin: str + :param repay_amount: repay amount of loanCoin (required) + :type repay_amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_repay_collateral_rate_get_serialize( + loan_coin=loan_coin, + collateral_coin=collateral_coin, + repay_amount=repay_amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanRepayCollateralRateGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_repay_collateral_rate_get_without_preload_content( + self, + loan_coin: Annotated[StrictStr, Field(description="Coin loaned")], + collateral_coin: Annotated[StrictStr, Field(description="Coin used as collateral")], + repay_amount: Annotated[Union[StrictFloat, StrictInt], Field(description="repay amount of loanCoin")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Check Collateral Repay Rate (USER_DATA) + + Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second. Weight(IP): 6000 + + :param loan_coin: Coin loaned (required) + :type loan_coin: str + :param collateral_coin: Coin used as collateral (required) + :type collateral_coin: str + :param repay_amount: repay amount of loanCoin (required) + :type repay_amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_repay_collateral_rate_get_serialize( + loan_coin=loan_coin, + collateral_coin=collateral_coin, + repay_amount=repay_amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanRepayCollateralRateGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_repay_collateral_rate_get_serialize( + self, + loan_coin, + collateral_coin, + repay_amount, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if repay_amount is not None: + + _query_params.append(('repayAmount', repay_amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/repay/collateral/rate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_repay_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order ID")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 10, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanRepayHistoryGet200Response: + """Get Loan Repayment History (USER_DATA) + + If startTime and endTime are not sent, the recent 90-day data will be returned. The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order ID + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: default 10, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_repay_history_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanRepayHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_repay_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order ID")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 10, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanRepayHistoryGet200Response]: + """Get Loan Repayment History (USER_DATA) + + If startTime and endTime are not sent, the recent 90-day data will be returned. The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order ID + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: default 10, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_repay_history_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanRepayHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_repay_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order ID")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 10, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Loan Repayment History (USER_DATA) + + If startTime and endTime are not sent, the recent 90-day data will be returned. The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order ID + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: default 10, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_repay_history_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanRepayHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_repay_history_get_serialize( + self, + timestamp, + signature, + order_id, + loan_coin, + collateral_coin, + start_time, + end_time, + current, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/repay/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_repay_post( + self, + order_id: Annotated[StrictInt, Field(description="Order ID")], + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Repayment Amount")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + type: Annotated[Optional[StrictInt], Field(description="Default: 1. 1 for 'repay with borrowed coin'; 2 for 'repay with collateral'.")] = None, + collateral_return: Annotated[Optional[StrictBool], Field(description="Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanRepayPost200Response: + """Crypto Loan Repay (TRADE) + + Weight(UID): 6000 + + :param order_id: Order ID (required) + :type order_id: int + :param amount: Repayment Amount (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param type: Default: 1. 1 for 'repay with borrowed coin'; 2 for 'repay with collateral'. + :type type: int + :param collateral_return: Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order. + :type collateral_return: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_repay_post_serialize( + order_id=order_id, + amount=amount, + timestamp=timestamp, + signature=signature, + type=type, + collateral_return=collateral_return, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_repay_post_with_http_info( + self, + order_id: Annotated[StrictInt, Field(description="Order ID")], + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Repayment Amount")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + type: Annotated[Optional[StrictInt], Field(description="Default: 1. 1 for 'repay with borrowed coin'; 2 for 'repay with collateral'.")] = None, + collateral_return: Annotated[Optional[StrictBool], Field(description="Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanRepayPost200Response]: + """Crypto Loan Repay (TRADE) + + Weight(UID): 6000 + + :param order_id: Order ID (required) + :type order_id: int + :param amount: Repayment Amount (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param type: Default: 1. 1 for 'repay with borrowed coin'; 2 for 'repay with collateral'. + :type type: int + :param collateral_return: Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order. + :type collateral_return: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_repay_post_serialize( + order_id=order_id, + amount=amount, + timestamp=timestamp, + signature=signature, + type=type, + collateral_return=collateral_return, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_repay_post_without_preload_content( + self, + order_id: Annotated[StrictInt, Field(description="Order ID")], + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Repayment Amount")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + type: Annotated[Optional[StrictInt], Field(description="Default: 1. 1 for 'repay with borrowed coin'; 2 for 'repay with collateral'.")] = None, + collateral_return: Annotated[Optional[StrictBool], Field(description="Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Crypto Loan Repay (TRADE) + + Weight(UID): 6000 + + :param order_id: Order ID (required) + :type order_id: int + :param amount: Repayment Amount (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param type: Default: 1. 1 for 'repay with borrowed coin'; 2 for 'repay with collateral'. + :type type: int + :param collateral_return: Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order. + :type collateral_return: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_repay_post_serialize( + order_id=order_id, + amount=amount, + timestamp=timestamp, + signature=signature, + type=type, + collateral_return=collateral_return, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_repay_post_serialize( + self, + order_id, + amount, + timestamp, + signature, + type, + collateral_return, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if type is not None: + + _query_params.append(('type', type)) + + if collateral_return is not None: + + _query_params.append(('collateralReturn', collateral_return)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/loan/repay', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_loan_flexible_adjust_ltv_post( + self, + adjustment_amount: Union[StrictFloat, StrictInt], + direction: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2LoanFlexibleAdjustLtvPost200Response: + """Adjust LTV - Flexible Loan Adjust LTV (TRADE) + + - API Key needs Spot & Margin Trading permission for this endpoint Weight(UID): 6000 + + :param adjustment_amount: (required) + :type adjustment_amount: float + :param direction: (required) + :type direction: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_adjust_ltv_post_serialize( + adjustment_amount=adjustment_amount, + direction=direction, + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleAdjustLtvPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_loan_flexible_adjust_ltv_post_with_http_info( + self, + adjustment_amount: Union[StrictFloat, StrictInt], + direction: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2LoanFlexibleAdjustLtvPost200Response]: + """Adjust LTV - Flexible Loan Adjust LTV (TRADE) + + - API Key needs Spot & Margin Trading permission for this endpoint Weight(UID): 6000 + + :param adjustment_amount: (required) + :type adjustment_amount: float + :param direction: (required) + :type direction: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_adjust_ltv_post_serialize( + adjustment_amount=adjustment_amount, + direction=direction, + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleAdjustLtvPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_loan_flexible_adjust_ltv_post_without_preload_content( + self, + adjustment_amount: Union[StrictFloat, StrictInt], + direction: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Adjust LTV - Flexible Loan Adjust LTV (TRADE) + + - API Key needs Spot & Margin Trading permission for this endpoint Weight(UID): 6000 + + :param adjustment_amount: (required) + :type adjustment_amount: float + :param direction: (required) + :type direction: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_adjust_ltv_post_serialize( + adjustment_amount=adjustment_amount, + direction=direction, + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleAdjustLtvPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_loan_flexible_adjust_ltv_post_serialize( + self, + adjustment_amount, + direction, + timestamp, + signature, + loan_coin, + collateral_coin, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if adjustment_amount is not None: + + _query_params.append(('adjustmentAmount', adjustment_amount)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v2/loan/flexible/adjust/ltv', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_loan_flexible_borrow_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2LoanFlexibleBorrowHistoryGet200Response: + """Borrow - Get Flexible Loan Borrow History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_borrow_history_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleBorrowHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_loan_flexible_borrow_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2LoanFlexibleBorrowHistoryGet200Response]: + """Borrow - Get Flexible Loan Borrow History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_borrow_history_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleBorrowHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_loan_flexible_borrow_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Borrow - Get Flexible Loan Borrow History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_borrow_history_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleBorrowHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_loan_flexible_borrow_history_get_serialize( + self, + timestamp, + signature, + loan_coin, + collateral_coin, + start_time, + end_time, + current, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v2/loan/flexible/borrow/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_loan_flexible_borrow_post( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + loan_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Loan amount")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + collateral_amount: Optional[Union[StrictFloat, StrictInt]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2LoanFlexibleBorrowPost200Response: + """Borrow - Flexible Loan Borrow (TRADE) + + - Only available for master account Weight(UID): 6000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param loan_amount: Loan amount + :type loan_amount: float + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param collateral_amount: + :type collateral_amount: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_borrow_post_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + loan_amount=loan_amount, + collateral_coin=collateral_coin, + collateral_amount=collateral_amount, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleBorrowPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_loan_flexible_borrow_post_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + loan_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Loan amount")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + collateral_amount: Optional[Union[StrictFloat, StrictInt]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2LoanFlexibleBorrowPost200Response]: + """Borrow - Flexible Loan Borrow (TRADE) + + - Only available for master account Weight(UID): 6000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param loan_amount: Loan amount + :type loan_amount: float + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param collateral_amount: + :type collateral_amount: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_borrow_post_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + loan_amount=loan_amount, + collateral_coin=collateral_coin, + collateral_amount=collateral_amount, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleBorrowPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_loan_flexible_borrow_post_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + loan_amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Loan amount")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + collateral_amount: Optional[Union[StrictFloat, StrictInt]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Borrow - Flexible Loan Borrow (TRADE) + + - Only available for master account Weight(UID): 6000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param loan_amount: Loan amount + :type loan_amount: float + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param collateral_amount: + :type collateral_amount: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_borrow_post_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + loan_amount=loan_amount, + collateral_coin=collateral_coin, + collateral_amount=collateral_amount, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleBorrowPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_loan_flexible_borrow_post_serialize( + self, + timestamp, + signature, + loan_coin, + loan_amount, + collateral_coin, + collateral_amount, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if loan_amount is not None: + + _query_params.append(('loanAmount', loan_amount)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if collateral_amount is not None: + + _query_params.append(('collateralAmount', collateral_amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v2/loan/flexible/borrow', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_loan_flexible_collateral_data_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2LoanFlexibleCollateralDataGet200Response: + """Get Flexible Loan Collateral Assets Data (USER_DATA) + + Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_collateral_data_get_serialize( + timestamp=timestamp, + signature=signature, + collateral_coin=collateral_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleCollateralDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_loan_flexible_collateral_data_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2LoanFlexibleCollateralDataGet200Response]: + """Get Flexible Loan Collateral Assets Data (USER_DATA) + + Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_collateral_data_get_serialize( + timestamp=timestamp, + signature=signature, + collateral_coin=collateral_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleCollateralDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_loan_flexible_collateral_data_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Flexible Loan Collateral Assets Data (USER_DATA) + + Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_collateral_data_get_serialize( + timestamp=timestamp, + signature=signature, + collateral_coin=collateral_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleCollateralDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_loan_flexible_collateral_data_get_serialize( + self, + timestamp, + signature, + collateral_coin, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v2/loan/flexible/collateral/data', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_loan_flexible_loanable_data_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2LoanFlexibleLoanableDataGet200Response: + """Get Flexible Loan Assets Data (USER_DATA) + + Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_loanable_data_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleLoanableDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_loan_flexible_loanable_data_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2LoanFlexibleLoanableDataGet200Response]: + """Get Flexible Loan Assets Data (USER_DATA) + + Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_loanable_data_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleLoanableDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_loan_flexible_loanable_data_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Flexible Loan Assets Data (USER_DATA) + + Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_loanable_data_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleLoanableDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_loan_flexible_loanable_data_get_serialize( + self, + timestamp, + signature, + loan_coin, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v2/loan/flexible/loanable/data', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_loan_flexible_ltv_adjustment_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response: + """Adjust LTV - Get Flexible Loan LTV Adjustment History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_ltv_adjustment_history_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_loan_flexible_ltv_adjustment_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response]: + """Adjust LTV - Get Flexible Loan LTV Adjustment History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_ltv_adjustment_history_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_loan_flexible_ltv_adjustment_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Adjust LTV - Get Flexible Loan LTV Adjustment History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_ltv_adjustment_history_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_loan_flexible_ltv_adjustment_history_get_serialize( + self, + timestamp, + signature, + loan_coin, + collateral_coin, + start_time, + end_time, + current, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v2/loan/flexible/ltv/adjustment/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_loan_flexible_ongoing_orders_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2LoanFlexibleOngoingOrdersGet200Response: + """Borrow - Get Flexible Loan Ongoing Orders (USER_DATA) + + Weight(IP): 300 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_ongoing_orders_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleOngoingOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_loan_flexible_ongoing_orders_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2LoanFlexibleOngoingOrdersGet200Response]: + """Borrow - Get Flexible Loan Ongoing Orders (USER_DATA) + + Weight(IP): 300 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_ongoing_orders_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleOngoingOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_loan_flexible_ongoing_orders_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Borrow - Get Flexible Loan Ongoing Orders (USER_DATA) + + Weight(IP): 300 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_ongoing_orders_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleOngoingOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_loan_flexible_ongoing_orders_get_serialize( + self, + timestamp, + signature, + loan_coin, + collateral_coin, + current, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if current is not None: + + _query_params.append(('current', current)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v2/loan/flexible/ongoing/orders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_loan_flexible_repay_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2LoanFlexibleRepayHistoryGet200Response: + """Repay - Get Flexible Loan Repayment History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_repay_history_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleRepayHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_loan_flexible_repay_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2LoanFlexibleRepayHistoryGet200Response]: + """Repay - Get Flexible Loan Repayment History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_repay_history_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleRepayHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_loan_flexible_repay_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Repay - Get Flexible Loan Repayment History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_repay_history_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleRepayHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_loan_flexible_repay_history_get_serialize( + self, + timestamp, + signature, + loan_coin, + collateral_coin, + start_time, + end_time, + current, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v2/loan/flexible/repay/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_loan_flexible_repay_post( + self, + repay_amount: Annotated[Union[StrictFloat, StrictInt], Field(description="repay amount of loanCoin")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + collateral_return: Annotated[Optional[StrictBool], Field(description="Default: TRUE. TRUE: Return extra collateral to earn account; FALSE: Keep extra collateral in the order, and lower LTV.")] = None, + full_repayment: Annotated[Optional[StrictBool], Field(description="Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2LoanFlexibleRepayPost200Response: + """Repay - Flexible Loan Repay (TRADE) + + - repayAmount is mandatory even fullRepayment = FALSE Weight(IP): 6000 + + :param repay_amount: repay amount of loanCoin (required) + :type repay_amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param collateral_return: Default: TRUE. TRUE: Return extra collateral to earn account; FALSE: Keep extra collateral in the order, and lower LTV. + :type collateral_return: bool + :param full_repayment: Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount + :type full_repayment: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_repay_post_serialize( + repay_amount=repay_amount, + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + collateral_return=collateral_return, + full_repayment=full_repayment, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_loan_flexible_repay_post_with_http_info( + self, + repay_amount: Annotated[Union[StrictFloat, StrictInt], Field(description="repay amount of loanCoin")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + collateral_return: Annotated[Optional[StrictBool], Field(description="Default: TRUE. TRUE: Return extra collateral to earn account; FALSE: Keep extra collateral in the order, and lower LTV.")] = None, + full_repayment: Annotated[Optional[StrictBool], Field(description="Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2LoanFlexibleRepayPost200Response]: + """Repay - Flexible Loan Repay (TRADE) + + - repayAmount is mandatory even fullRepayment = FALSE Weight(IP): 6000 + + :param repay_amount: repay amount of loanCoin (required) + :type repay_amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param collateral_return: Default: TRUE. TRUE: Return extra collateral to earn account; FALSE: Keep extra collateral in the order, and lower LTV. + :type collateral_return: bool + :param full_repayment: Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount + :type full_repayment: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_repay_post_serialize( + repay_amount=repay_amount, + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + collateral_return=collateral_return, + full_repayment=full_repayment, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_loan_flexible_repay_post_without_preload_content( + self, + repay_amount: Annotated[Union[StrictFloat, StrictInt], Field(description="repay amount of loanCoin")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + collateral_return: Annotated[Optional[StrictBool], Field(description="Default: TRUE. TRUE: Return extra collateral to earn account; FALSE: Keep extra collateral in the order, and lower LTV.")] = None, + full_repayment: Annotated[Optional[StrictBool], Field(description="Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Repay - Flexible Loan Repay (TRADE) + + - repayAmount is mandatory even fullRepayment = FALSE Weight(IP): 6000 + + :param repay_amount: repay amount of loanCoin (required) + :type repay_amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param collateral_return: Default: TRUE. TRUE: Return extra collateral to earn account; FALSE: Keep extra collateral in the order, and lower LTV. + :type collateral_return: bool + :param full_repayment: Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount + :type full_repayment: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_loan_flexible_repay_post_serialize( + repay_amount=repay_amount, + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + collateral_return=collateral_return, + full_repayment=full_repayment, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2LoanFlexibleRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_loan_flexible_repay_post_serialize( + self, + repay_amount, + timestamp, + signature, + loan_coin, + collateral_coin, + collateral_return, + full_repayment, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if repay_amount is not None: + + _query_params.append(('repayAmount', repay_amount)) + + if collateral_return is not None: + + _query_params.append(('collateralReturn', collateral_return)) + + if full_repayment is not None: + + _query_params.append(('fullRepayment', full_repayment)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v2/loan/flexible/repay', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/dual_investment_api.py b/target/python/binance_openapi/openapi_client/api/dual_investment_api.py new file mode 100644 index 0000000..34f83d2 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/dual_investment_api.py @@ -0,0 +1,1786 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_dci_product_accounts_get200_response import SapiV1DciProductAccountsGet200Response +from openapi_client.models.sapi_v1_dci_product_auto_compound_edit_status_post200_response import SapiV1DciProductAutoCompoundEditStatusPost200Response +from openapi_client.models.sapi_v1_dci_product_list_get200_response import SapiV1DciProductListGet200Response +from openapi_client.models.sapi_v1_dci_product_positions_get200_response import SapiV1DciProductPositionsGet200Response +from openapi_client.models.sapi_v1_dci_product_subscribe_post200_response import SapiV1DciProductSubscribePost200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class DualInvestmentApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_dci_product_accounts_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1DciProductAccountsGet200Response: + """Check Dual Investment accounts(USER_DATA) + + Check Dual Investment accounts Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_accounts_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductAccountsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_dci_product_accounts_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1DciProductAccountsGet200Response]: + """Check Dual Investment accounts(USER_DATA) + + Check Dual Investment accounts Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_accounts_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductAccountsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_dci_product_accounts_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Check Dual Investment accounts(USER_DATA) + + Check Dual Investment accounts Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_accounts_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductAccountsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_dci_product_accounts_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/dci/product/accounts', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_dci_product_auto_compound_edit_status_post( + self, + position_id: Annotated[StrictInt, Field(description="Get positionId from /sapi/v1/dci/product/positions")], + auto_compound_plan: Annotated[StrictStr, Field(description="NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan;")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1DciProductAutoCompoundEditStatusPost200Response: + """Change Auto-Compound status(USER_DATA) + + Change Auto-Compound status - 15:31 ~ 16:00 UTC+8 This function is disabled Weight(IP): 1 Rate Limit: Maximum 1 time/s per account + + :param position_id: Get positionId from /sapi/v1/dci/product/positions (required) + :type position_id: int + :param auto_compound_plan: NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan; (required) + :type auto_compound_plan: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_auto_compound_edit_status_post_serialize( + position_id=position_id, + auto_compound_plan=auto_compound_plan, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductAutoCompoundEditStatusPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_dci_product_auto_compound_edit_status_post_with_http_info( + self, + position_id: Annotated[StrictInt, Field(description="Get positionId from /sapi/v1/dci/product/positions")], + auto_compound_plan: Annotated[StrictStr, Field(description="NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan;")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1DciProductAutoCompoundEditStatusPost200Response]: + """Change Auto-Compound status(USER_DATA) + + Change Auto-Compound status - 15:31 ~ 16:00 UTC+8 This function is disabled Weight(IP): 1 Rate Limit: Maximum 1 time/s per account + + :param position_id: Get positionId from /sapi/v1/dci/product/positions (required) + :type position_id: int + :param auto_compound_plan: NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan; (required) + :type auto_compound_plan: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_auto_compound_edit_status_post_serialize( + position_id=position_id, + auto_compound_plan=auto_compound_plan, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductAutoCompoundEditStatusPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_dci_product_auto_compound_edit_status_post_without_preload_content( + self, + position_id: Annotated[StrictInt, Field(description="Get positionId from /sapi/v1/dci/product/positions")], + auto_compound_plan: Annotated[StrictStr, Field(description="NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan;")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Change Auto-Compound status(USER_DATA) + + Change Auto-Compound status - 15:31 ~ 16:00 UTC+8 This function is disabled Weight(IP): 1 Rate Limit: Maximum 1 time/s per account + + :param position_id: Get positionId from /sapi/v1/dci/product/positions (required) + :type position_id: int + :param auto_compound_plan: NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan; (required) + :type auto_compound_plan: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_auto_compound_edit_status_post_serialize( + position_id=position_id, + auto_compound_plan=auto_compound_plan, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductAutoCompoundEditStatusPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_dci_product_auto_compound_edit_status_post_serialize( + self, + position_id, + auto_compound_plan, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if position_id is not None: + + _query_params.append(('positionId', position_id)) + + if auto_compound_plan is not None: + + _query_params.append(('autoCompoundPlan', auto_compound_plan)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/dci/product/auto_compound/edit-status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_dci_product_list_get( + self, + option_type: Annotated[StrictStr, Field(description="Input CALL or PUT")], + exercised_coin: Annotated[StrictStr, Field(description="Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT;")], + invest_coin: Annotated[StrictStr, Field(description="Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT;")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1DciProductListGet200Response: + """Get Dual Investment product list(USER_DATA) + + Get Dual Investment product list Weight(IP): 1 + + :param option_type: Input CALL or PUT (required) + :type option_type: str + :param exercised_coin: Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT; (required) + :type exercised_coin: str + :param invest_coin: Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT; (required) + :type invest_coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_list_get_serialize( + option_type=option_type, + exercised_coin=exercised_coin, + invest_coin=invest_coin, + timestamp=timestamp, + signature=signature, + page_size=page_size, + page_index=page_index, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_dci_product_list_get_with_http_info( + self, + option_type: Annotated[StrictStr, Field(description="Input CALL or PUT")], + exercised_coin: Annotated[StrictStr, Field(description="Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT;")], + invest_coin: Annotated[StrictStr, Field(description="Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT;")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1DciProductListGet200Response]: + """Get Dual Investment product list(USER_DATA) + + Get Dual Investment product list Weight(IP): 1 + + :param option_type: Input CALL or PUT (required) + :type option_type: str + :param exercised_coin: Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT; (required) + :type exercised_coin: str + :param invest_coin: Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT; (required) + :type invest_coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_list_get_serialize( + option_type=option_type, + exercised_coin=exercised_coin, + invest_coin=invest_coin, + timestamp=timestamp, + signature=signature, + page_size=page_size, + page_index=page_index, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_dci_product_list_get_without_preload_content( + self, + option_type: Annotated[StrictStr, Field(description="Input CALL or PUT")], + exercised_coin: Annotated[StrictStr, Field(description="Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT;")], + invest_coin: Annotated[StrictStr, Field(description="Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT;")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Dual Investment product list(USER_DATA) + + Get Dual Investment product list Weight(IP): 1 + + :param option_type: Input CALL or PUT (required) + :type option_type: str + :param exercised_coin: Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT; (required) + :type exercised_coin: str + :param invest_coin: Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT; (required) + :type invest_coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_list_get_serialize( + option_type=option_type, + exercised_coin=exercised_coin, + invest_coin=invest_coin, + timestamp=timestamp, + signature=signature, + page_size=page_size, + page_index=page_index, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_dci_product_list_get_serialize( + self, + option_type, + exercised_coin, + invest_coin, + timestamp, + signature, + page_size, + page_index, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if option_type is not None: + + _query_params.append(('optionType', option_type)) + + if exercised_coin is not None: + + _query_params.append(('exercisedCoin', exercised_coin)) + + if invest_coin is not None: + + _query_params.append(('investCoin', invest_coin)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if page_index is not None: + + _query_params.append(('pageIndex', page_index)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/dci/product/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_dci_product_positions_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + status: Annotated[Optional[StrictStr], Field(description="- PENDING: Products are purchasing, will give results later; - PURCHASE_SUCCESS: purchase successfully; - SETTLED: Products are finish settling; - PURCHASE_FAIL: fail to purchase; - REFUNDING: refund ongoing; - REFUND_SUCCESS: refund to spot account successfully; - SETTLING: Products are settling. If don't fill this field, will response all the position status.")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1DciProductPositionsGet200Response: + """Get Dual Investment positions(USER_DATA) + + Get Dual Investment positions (batch) Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param status: - PENDING: Products are purchasing, will give results later; - PURCHASE_SUCCESS: purchase successfully; - SETTLED: Products are finish settling; - PURCHASE_FAIL: fail to purchase; - REFUNDING: refund ongoing; - REFUND_SUCCESS: refund to spot account successfully; - SETTLING: Products are settling. If don't fill this field, will response all the position status. + :type status: str + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_positions_get_serialize( + timestamp=timestamp, + signature=signature, + status=status, + page_size=page_size, + page_index=page_index, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductPositionsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_dci_product_positions_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + status: Annotated[Optional[StrictStr], Field(description="- PENDING: Products are purchasing, will give results later; - PURCHASE_SUCCESS: purchase successfully; - SETTLED: Products are finish settling; - PURCHASE_FAIL: fail to purchase; - REFUNDING: refund ongoing; - REFUND_SUCCESS: refund to spot account successfully; - SETTLING: Products are settling. If don't fill this field, will response all the position status.")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1DciProductPositionsGet200Response]: + """Get Dual Investment positions(USER_DATA) + + Get Dual Investment positions (batch) Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param status: - PENDING: Products are purchasing, will give results later; - PURCHASE_SUCCESS: purchase successfully; - SETTLED: Products are finish settling; - PURCHASE_FAIL: fail to purchase; - REFUNDING: refund ongoing; - REFUND_SUCCESS: refund to spot account successfully; - SETTLING: Products are settling. If don't fill this field, will response all the position status. + :type status: str + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_positions_get_serialize( + timestamp=timestamp, + signature=signature, + status=status, + page_size=page_size, + page_index=page_index, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductPositionsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_dci_product_positions_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + status: Annotated[Optional[StrictStr], Field(description="- PENDING: Products are purchasing, will give results later; - PURCHASE_SUCCESS: purchase successfully; - SETTLED: Products are finish settling; - PURCHASE_FAIL: fail to purchase; - REFUNDING: refund ongoing; - REFUND_SUCCESS: refund to spot account successfully; - SETTLING: Products are settling. If don't fill this field, will response all the position status.")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Dual Investment positions(USER_DATA) + + Get Dual Investment positions (batch) Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param status: - PENDING: Products are purchasing, will give results later; - PURCHASE_SUCCESS: purchase successfully; - SETTLED: Products are finish settling; - PURCHASE_FAIL: fail to purchase; - REFUNDING: refund ongoing; - REFUND_SUCCESS: refund to spot account successfully; - SETTLING: Products are settling. If don't fill this field, will response all the position status. + :type status: str + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_positions_get_serialize( + timestamp=timestamp, + signature=signature, + status=status, + page_size=page_size, + page_index=page_index, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductPositionsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_dci_product_positions_get_serialize( + self, + timestamp, + signature, + status, + page_size, + page_index, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if status is not None: + + _query_params.append(('status', status)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if page_index is not None: + + _query_params.append(('pageIndex', page_index)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/dci/product/positions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_dci_product_subscribe_post( + self, + id: Annotated[StrictStr, Field(description="get id from /sapi/v1/dci/product/list")], + order_id: Annotated[StrictStr, Field(description="get orderId from /sapi/v1/dci/product/list")], + deposit_amount: Union[StrictFloat, StrictInt], + auto_compound_plan: Annotated[StrictStr, Field(description="NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan;")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1DciProductSubscribePost200Response: + """Subscribe Dual Investment products(USER_DATA) + + Subscribe Dual Investment products - `Products are not available.` means that the APR changes to lower value, or the orders are not available. - `Failed` is a system or network errors. Weight(IP): 1 + + :param id: get id from /sapi/v1/dci/product/list (required) + :type id: str + :param order_id: get orderId from /sapi/v1/dci/product/list (required) + :type order_id: str + :param deposit_amount: (required) + :type deposit_amount: float + :param auto_compound_plan: NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan; (required) + :type auto_compound_plan: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_subscribe_post_serialize( + id=id, + order_id=order_id, + deposit_amount=deposit_amount, + auto_compound_plan=auto_compound_plan, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductSubscribePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_dci_product_subscribe_post_with_http_info( + self, + id: Annotated[StrictStr, Field(description="get id from /sapi/v1/dci/product/list")], + order_id: Annotated[StrictStr, Field(description="get orderId from /sapi/v1/dci/product/list")], + deposit_amount: Union[StrictFloat, StrictInt], + auto_compound_plan: Annotated[StrictStr, Field(description="NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan;")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1DciProductSubscribePost200Response]: + """Subscribe Dual Investment products(USER_DATA) + + Subscribe Dual Investment products - `Products are not available.` means that the APR changes to lower value, or the orders are not available. - `Failed` is a system or network errors. Weight(IP): 1 + + :param id: get id from /sapi/v1/dci/product/list (required) + :type id: str + :param order_id: get orderId from /sapi/v1/dci/product/list (required) + :type order_id: str + :param deposit_amount: (required) + :type deposit_amount: float + :param auto_compound_plan: NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan; (required) + :type auto_compound_plan: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_subscribe_post_serialize( + id=id, + order_id=order_id, + deposit_amount=deposit_amount, + auto_compound_plan=auto_compound_plan, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductSubscribePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_dci_product_subscribe_post_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="get id from /sapi/v1/dci/product/list")], + order_id: Annotated[StrictStr, Field(description="get orderId from /sapi/v1/dci/product/list")], + deposit_amount: Union[StrictFloat, StrictInt], + auto_compound_plan: Annotated[StrictStr, Field(description="NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan;")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Subscribe Dual Investment products(USER_DATA) + + Subscribe Dual Investment products - `Products are not available.` means that the APR changes to lower value, or the orders are not available. - `Failed` is a system or network errors. Weight(IP): 1 + + :param id: get id from /sapi/v1/dci/product/list (required) + :type id: str + :param order_id: get orderId from /sapi/v1/dci/product/list (required) + :type order_id: str + :param deposit_amount: (required) + :type deposit_amount: float + :param auto_compound_plan: NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan; (required) + :type auto_compound_plan: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_dci_product_subscribe_post_serialize( + id=id, + order_id=order_id, + deposit_amount=deposit_amount, + auto_compound_plan=auto_compound_plan, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1DciProductSubscribePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_dci_product_subscribe_post_serialize( + self, + id, + order_id, + deposit_amount, + auto_compound_plan, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if id is not None: + + _query_params.append(('id', id)) + + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if deposit_amount is not None: + + _query_params.append(('depositAmount', deposit_amount)) + + if auto_compound_plan is not None: + + _query_params.append(('autoCompoundPlan', auto_compound_plan)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/dci/product/subscribe', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/fiat_api.py b/target/python/binance_openapi/openapi_client/api/fiat_api.py new file mode 100644 index 0000000..a9499eb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/fiat_api.py @@ -0,0 +1,812 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_fiat_orders_get200_response import SapiV1FiatOrdersGet200Response +from openapi_client.models.sapi_v1_fiat_payments_get200_response import SapiV1FiatPaymentsGet200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class FiatApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_fiat_orders_get( + self, + transaction_type: Annotated[int, Field(le=1, strict=True, ge=0, description="* `0` - deposit * `1` - withdraw")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + begin_time: Optional[StrictInt] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + rows: Annotated[Optional[StrictInt], Field(description="Default 100, max 500")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1FiatOrdersGet200Response: + """Fiat Deposit/Withdraw History (USER_DATA) + + - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(UID): 90000 + + :param transaction_type: * `0` - deposit * `1` - withdraw (required) + :type transaction_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param begin_time: + :type begin_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param rows: Default 100, max 500 + :type rows: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_fiat_orders_get_serialize( + transaction_type=transaction_type, + timestamp=timestamp, + signature=signature, + begin_time=begin_time, + end_time=end_time, + page=page, + rows=rows, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1FiatOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_fiat_orders_get_with_http_info( + self, + transaction_type: Annotated[int, Field(le=1, strict=True, ge=0, description="* `0` - deposit * `1` - withdraw")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + begin_time: Optional[StrictInt] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + rows: Annotated[Optional[StrictInt], Field(description="Default 100, max 500")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1FiatOrdersGet200Response]: + """Fiat Deposit/Withdraw History (USER_DATA) + + - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(UID): 90000 + + :param transaction_type: * `0` - deposit * `1` - withdraw (required) + :type transaction_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param begin_time: + :type begin_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param rows: Default 100, max 500 + :type rows: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_fiat_orders_get_serialize( + transaction_type=transaction_type, + timestamp=timestamp, + signature=signature, + begin_time=begin_time, + end_time=end_time, + page=page, + rows=rows, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1FiatOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_fiat_orders_get_without_preload_content( + self, + transaction_type: Annotated[int, Field(le=1, strict=True, ge=0, description="* `0` - deposit * `1` - withdraw")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + begin_time: Optional[StrictInt] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + rows: Annotated[Optional[StrictInt], Field(description="Default 100, max 500")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Fiat Deposit/Withdraw History (USER_DATA) + + - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(UID): 90000 + + :param transaction_type: * `0` - deposit * `1` - withdraw (required) + :type transaction_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param begin_time: + :type begin_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param rows: Default 100, max 500 + :type rows: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_fiat_orders_get_serialize( + transaction_type=transaction_type, + timestamp=timestamp, + signature=signature, + begin_time=begin_time, + end_time=end_time, + page=page, + rows=rows, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1FiatOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_fiat_orders_get_serialize( + self, + transaction_type, + timestamp, + signature, + begin_time, + end_time, + page, + rows, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if transaction_type is not None: + + _query_params.append(('transactionType', transaction_type)) + + if begin_time is not None: + + _query_params.append(('beginTime', begin_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if page is not None: + + _query_params.append(('page', page)) + + if rows is not None: + + _query_params.append(('rows', rows)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/fiat/orders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_fiat_payments_get( + self, + transaction_type: Annotated[int, Field(le=1, strict=True, ge=0, description="* `0` - deposit * `1` - withdraw")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + begin_time: Optional[StrictInt] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + rows: Annotated[Optional[StrictInt], Field(description="Default 100, max 500")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1FiatPaymentsGet200Response: + """Fiat Payments History (USER_DATA) + + - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(IP): 1 + + :param transaction_type: * `0` - deposit * `1` - withdraw (required) + :type transaction_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param begin_time: + :type begin_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param rows: Default 100, max 500 + :type rows: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_fiat_payments_get_serialize( + transaction_type=transaction_type, + timestamp=timestamp, + signature=signature, + begin_time=begin_time, + end_time=end_time, + page=page, + rows=rows, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1FiatPaymentsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_fiat_payments_get_with_http_info( + self, + transaction_type: Annotated[int, Field(le=1, strict=True, ge=0, description="* `0` - deposit * `1` - withdraw")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + begin_time: Optional[StrictInt] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + rows: Annotated[Optional[StrictInt], Field(description="Default 100, max 500")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1FiatPaymentsGet200Response]: + """Fiat Payments History (USER_DATA) + + - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(IP): 1 + + :param transaction_type: * `0` - deposit * `1` - withdraw (required) + :type transaction_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param begin_time: + :type begin_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param rows: Default 100, max 500 + :type rows: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_fiat_payments_get_serialize( + transaction_type=transaction_type, + timestamp=timestamp, + signature=signature, + begin_time=begin_time, + end_time=end_time, + page=page, + rows=rows, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1FiatPaymentsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_fiat_payments_get_without_preload_content( + self, + transaction_type: Annotated[int, Field(le=1, strict=True, ge=0, description="* `0` - deposit * `1` - withdraw")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + begin_time: Optional[StrictInt] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + rows: Annotated[Optional[StrictInt], Field(description="Default 100, max 500")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Fiat Payments History (USER_DATA) + + - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(IP): 1 + + :param transaction_type: * `0` - deposit * `1` - withdraw (required) + :type transaction_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param begin_time: + :type begin_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param rows: Default 100, max 500 + :type rows: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_fiat_payments_get_serialize( + transaction_type=transaction_type, + timestamp=timestamp, + signature=signature, + begin_time=begin_time, + end_time=end_time, + page=page, + rows=rows, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1FiatPaymentsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_fiat_payments_get_serialize( + self, + transaction_type, + timestamp, + signature, + begin_time, + end_time, + page, + rows, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if transaction_type is not None: + + _query_params.append(('transactionType', transaction_type)) + + if begin_time is not None: + + _query_params.append(('beginTime', begin_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if page is not None: + + _query_params.append(('page', page)) + + if rows is not None: + + _query_params.append(('rows', rows)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/fiat/payments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/futures_algo_api.py b/target/python/binance_openapi/openapi_client/api/futures_algo_api.py new file mode 100644 index 0000000..f674ecc --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/futures_algo_api.py @@ -0,0 +1,2291 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_algo_futures_historical_orders_get200_response import SapiV1AlgoFuturesHistoricalOrdersGet200Response +from openapi_client.models.sapi_v1_algo_futures_new_order_vp_post200_response import SapiV1AlgoFuturesNewOrderVpPost200Response +from openapi_client.models.sapi_v1_algo_futures_open_orders_get200_response import SapiV1AlgoFuturesOpenOrdersGet200Response +from openapi_client.models.sapi_v1_algo_futures_order_delete200_response import SapiV1AlgoFuturesOrderDelete200Response +from openapi_client.models.sapi_v1_algo_futures_sub_orders_get200_response import SapiV1AlgoFuturesSubOrdersGet200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class FuturesAlgoApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_algo_futures_historical_orders_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + side: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AlgoFuturesHistoricalOrdersGet200Response: + """Query Historical Algo Orders (USER_DATA) + + - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param side: + :type side: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_historical_orders_get_serialize( + timestamp=timestamp, + signature=signature, + symbol=symbol, + side=side, + start_time=start_time, + end_time=end_time, + page=page, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesHistoricalOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_algo_futures_historical_orders_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + side: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AlgoFuturesHistoricalOrdersGet200Response]: + """Query Historical Algo Orders (USER_DATA) + + - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param side: + :type side: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_historical_orders_get_serialize( + timestamp=timestamp, + signature=signature, + symbol=symbol, + side=side, + start_time=start_time, + end_time=end_time, + page=page, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesHistoricalOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_algo_futures_historical_orders_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + side: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Historical Algo Orders (USER_DATA) + + - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param side: + :type side: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_historical_orders_get_serialize( + timestamp=timestamp, + signature=signature, + symbol=symbol, + side=side, + start_time=start_time, + end_time=end_time, + page=page, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesHistoricalOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_algo_futures_historical_orders_get_serialize( + self, + timestamp, + signature, + symbol, + side, + start_time, + end_time, + page, + page_size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if side is not None: + + _query_params.append(('side', side)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/algo/futures/historicalOrders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_algo_futures_new_order_twap_post( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Annotated[Union[StrictFloat, StrictInt], Field(description="Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT")], + duration: Annotated[StrictInt, Field(description="Duration for TWAP orders in seconds. [300, 86400];Less than 5min => defaults to 5 min; Greater than 24h => defaults to 24h")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_side: Annotated[Optional[StrictStr], Field(description="Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode.")] = None, + client_algo_id: Annotated[Optional[StrictStr], Field(description="A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value")] = None, + reduce_only: Annotated[Optional[StrictBool], Field(description="'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position")] = None, + limit_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Limit price of the order; If it is not sent, will place order by market price by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AlgoFuturesNewOrderVpPost200Response: + """Time-Weighted Average Price(Twap) New Order (TRADE) + + Send in a Twap new order. Only support on USDⓈ-M Contracts. You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com - Total Algo open orders max allowed: 10 orders. - Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. - Receiving \"success\": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive \"success\": true, but the order status will be expired after we check it. - quantity * 60 / duration should be larger than minQty - duration cannot be less than 5 mins or more than 24 hours. - For delivery contracts, TWAP end time should be one hour earlier than the delivery time of the symbol. Weight(UID): 3000 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT (required) + :type quantity: float + :param duration: Duration for TWAP orders in seconds. [300, 86400];Less than 5min => defaults to 5 min; Greater than 24h => defaults to 24h (required) + :type duration: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_side: Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. + :type position_side: str + :param client_algo_id: A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value + :type client_algo_id: str + :param reduce_only: 'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position + :type reduce_only: bool + :param limit_price: Limit price of the order; If it is not sent, will place order by market price by default + :type limit_price: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_new_order_twap_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + duration=duration, + timestamp=timestamp, + signature=signature, + position_side=position_side, + client_algo_id=client_algo_id, + reduce_only=reduce_only, + limit_price=limit_price, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesNewOrderVpPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_algo_futures_new_order_twap_post_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Annotated[Union[StrictFloat, StrictInt], Field(description="Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT")], + duration: Annotated[StrictInt, Field(description="Duration for TWAP orders in seconds. [300, 86400];Less than 5min => defaults to 5 min; Greater than 24h => defaults to 24h")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_side: Annotated[Optional[StrictStr], Field(description="Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode.")] = None, + client_algo_id: Annotated[Optional[StrictStr], Field(description="A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value")] = None, + reduce_only: Annotated[Optional[StrictBool], Field(description="'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position")] = None, + limit_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Limit price of the order; If it is not sent, will place order by market price by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AlgoFuturesNewOrderVpPost200Response]: + """Time-Weighted Average Price(Twap) New Order (TRADE) + + Send in a Twap new order. Only support on USDⓈ-M Contracts. You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com - Total Algo open orders max allowed: 10 orders. - Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. - Receiving \"success\": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive \"success\": true, but the order status will be expired after we check it. - quantity * 60 / duration should be larger than minQty - duration cannot be less than 5 mins or more than 24 hours. - For delivery contracts, TWAP end time should be one hour earlier than the delivery time of the symbol. Weight(UID): 3000 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT (required) + :type quantity: float + :param duration: Duration for TWAP orders in seconds. [300, 86400];Less than 5min => defaults to 5 min; Greater than 24h => defaults to 24h (required) + :type duration: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_side: Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. + :type position_side: str + :param client_algo_id: A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value + :type client_algo_id: str + :param reduce_only: 'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position + :type reduce_only: bool + :param limit_price: Limit price of the order; If it is not sent, will place order by market price by default + :type limit_price: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_new_order_twap_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + duration=duration, + timestamp=timestamp, + signature=signature, + position_side=position_side, + client_algo_id=client_algo_id, + reduce_only=reduce_only, + limit_price=limit_price, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesNewOrderVpPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_algo_futures_new_order_twap_post_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Annotated[Union[StrictFloat, StrictInt], Field(description="Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT")], + duration: Annotated[StrictInt, Field(description="Duration for TWAP orders in seconds. [300, 86400];Less than 5min => defaults to 5 min; Greater than 24h => defaults to 24h")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_side: Annotated[Optional[StrictStr], Field(description="Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode.")] = None, + client_algo_id: Annotated[Optional[StrictStr], Field(description="A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value")] = None, + reduce_only: Annotated[Optional[StrictBool], Field(description="'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position")] = None, + limit_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Limit price of the order; If it is not sent, will place order by market price by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Time-Weighted Average Price(Twap) New Order (TRADE) + + Send in a Twap new order. Only support on USDⓈ-M Contracts. You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com - Total Algo open orders max allowed: 10 orders. - Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. - Receiving \"success\": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive \"success\": true, but the order status will be expired after we check it. - quantity * 60 / duration should be larger than minQty - duration cannot be less than 5 mins or more than 24 hours. - For delivery contracts, TWAP end time should be one hour earlier than the delivery time of the symbol. Weight(UID): 3000 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT (required) + :type quantity: float + :param duration: Duration for TWAP orders in seconds. [300, 86400];Less than 5min => defaults to 5 min; Greater than 24h => defaults to 24h (required) + :type duration: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_side: Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. + :type position_side: str + :param client_algo_id: A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value + :type client_algo_id: str + :param reduce_only: 'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position + :type reduce_only: bool + :param limit_price: Limit price of the order; If it is not sent, will place order by market price by default + :type limit_price: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_new_order_twap_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + duration=duration, + timestamp=timestamp, + signature=signature, + position_side=position_side, + client_algo_id=client_algo_id, + reduce_only=reduce_only, + limit_price=limit_price, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesNewOrderVpPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_algo_futures_new_order_twap_post_serialize( + self, + symbol, + side, + quantity, + duration, + timestamp, + signature, + position_side, + client_algo_id, + reduce_only, + limit_price, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if side is not None: + + _query_params.append(('side', side)) + + if position_side is not None: + + _query_params.append(('positionSide', position_side)) + + if quantity is not None: + + _query_params.append(('quantity', quantity)) + + if duration is not None: + + _query_params.append(('duration', duration)) + + if client_algo_id is not None: + + _query_params.append(('clientAlgoId', client_algo_id)) + + if reduce_only is not None: + + _query_params.append(('reduceOnly', reduce_only)) + + if limit_price is not None: + + _query_params.append(('limitPrice', limit_price)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/algo/futures/newOrderTwap', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_algo_futures_new_order_vp_post( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Annotated[Union[StrictFloat, StrictInt], Field(description="Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT")], + urgency: Annotated[StrictStr, Field(description="Represent the relative speed of the current execution; ENUM: LOW, MEDIUM, HIGH")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_side: Annotated[Optional[StrictStr], Field(description="Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode.")] = None, + client_algo_id: Annotated[Optional[StrictStr], Field(description="A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value")] = None, + reduce_only: Annotated[Optional[StrictBool], Field(description="'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position")] = None, + limit_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Limit price of the order; If it is not sent, will place order by market price by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AlgoFuturesNewOrderVpPost200Response: + """Volume Participation(VP) New Order (TRADE) + + Send in a VP new order. Only support on USDⓈ-M Contracts. - You need to enable `Futures Trading Permission` for the api key which requests this endpoint. - Base URL: https://api.binance.com - Total Algo open orders max allowed: 10 orders. - Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. - Receiving \"success\": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive \"success\": true, but the order status will be expired after we check it. Weight(UID): 3000 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT (required) + :type quantity: float + :param urgency: Represent the relative speed of the current execution; ENUM: LOW, MEDIUM, HIGH (required) + :type urgency: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_side: Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. + :type position_side: str + :param client_algo_id: A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value + :type client_algo_id: str + :param reduce_only: 'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position + :type reduce_only: bool + :param limit_price: Limit price of the order; If it is not sent, will place order by market price by default + :type limit_price: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_new_order_vp_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + urgency=urgency, + timestamp=timestamp, + signature=signature, + position_side=position_side, + client_algo_id=client_algo_id, + reduce_only=reduce_only, + limit_price=limit_price, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesNewOrderVpPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_algo_futures_new_order_vp_post_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Annotated[Union[StrictFloat, StrictInt], Field(description="Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT")], + urgency: Annotated[StrictStr, Field(description="Represent the relative speed of the current execution; ENUM: LOW, MEDIUM, HIGH")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_side: Annotated[Optional[StrictStr], Field(description="Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode.")] = None, + client_algo_id: Annotated[Optional[StrictStr], Field(description="A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value")] = None, + reduce_only: Annotated[Optional[StrictBool], Field(description="'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position")] = None, + limit_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Limit price of the order; If it is not sent, will place order by market price by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AlgoFuturesNewOrderVpPost200Response]: + """Volume Participation(VP) New Order (TRADE) + + Send in a VP new order. Only support on USDⓈ-M Contracts. - You need to enable `Futures Trading Permission` for the api key which requests this endpoint. - Base URL: https://api.binance.com - Total Algo open orders max allowed: 10 orders. - Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. - Receiving \"success\": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive \"success\": true, but the order status will be expired after we check it. Weight(UID): 3000 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT (required) + :type quantity: float + :param urgency: Represent the relative speed of the current execution; ENUM: LOW, MEDIUM, HIGH (required) + :type urgency: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_side: Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. + :type position_side: str + :param client_algo_id: A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value + :type client_algo_id: str + :param reduce_only: 'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position + :type reduce_only: bool + :param limit_price: Limit price of the order; If it is not sent, will place order by market price by default + :type limit_price: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_new_order_vp_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + urgency=urgency, + timestamp=timestamp, + signature=signature, + position_side=position_side, + client_algo_id=client_algo_id, + reduce_only=reduce_only, + limit_price=limit_price, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesNewOrderVpPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_algo_futures_new_order_vp_post_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Annotated[Union[StrictFloat, StrictInt], Field(description="Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT")], + urgency: Annotated[StrictStr, Field(description="Represent the relative speed of the current execution; ENUM: LOW, MEDIUM, HIGH")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_side: Annotated[Optional[StrictStr], Field(description="Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode.")] = None, + client_algo_id: Annotated[Optional[StrictStr], Field(description="A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value")] = None, + reduce_only: Annotated[Optional[StrictBool], Field(description="'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position")] = None, + limit_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Limit price of the order; If it is not sent, will place order by market price by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Volume Participation(VP) New Order (TRADE) + + Send in a VP new order. Only support on USDⓈ-M Contracts. - You need to enable `Futures Trading Permission` for the api key which requests this endpoint. - Base URL: https://api.binance.com - Total Algo open orders max allowed: 10 orders. - Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. - Receiving \"success\": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive \"success\": true, but the order status will be expired after we check it. Weight(UID): 3000 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT (required) + :type quantity: float + :param urgency: Represent the relative speed of the current execution; ENUM: LOW, MEDIUM, HIGH (required) + :type urgency: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_side: Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. + :type position_side: str + :param client_algo_id: A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value + :type client_algo_id: str + :param reduce_only: 'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position + :type reduce_only: bool + :param limit_price: Limit price of the order; If it is not sent, will place order by market price by default + :type limit_price: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_new_order_vp_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + urgency=urgency, + timestamp=timestamp, + signature=signature, + position_side=position_side, + client_algo_id=client_algo_id, + reduce_only=reduce_only, + limit_price=limit_price, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesNewOrderVpPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_algo_futures_new_order_vp_post_serialize( + self, + symbol, + side, + quantity, + urgency, + timestamp, + signature, + position_side, + client_algo_id, + reduce_only, + limit_price, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if side is not None: + + _query_params.append(('side', side)) + + if position_side is not None: + + _query_params.append(('positionSide', position_side)) + + if quantity is not None: + + _query_params.append(('quantity', quantity)) + + if urgency is not None: + + _query_params.append(('urgency', urgency)) + + if client_algo_id is not None: + + _query_params.append(('clientAlgoId', client_algo_id)) + + if reduce_only is not None: + + _query_params.append(('reduceOnly', reduce_only)) + + if limit_price is not None: + + _query_params.append(('limitPrice', limit_price)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/algo/futures/newOrderVp', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_algo_futures_open_orders_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AlgoFuturesOpenOrdersGet200Response: + """Query Current Algo Open Orders (USER_DATA) + + - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesOpenOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_algo_futures_open_orders_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AlgoFuturesOpenOrdersGet200Response]: + """Query Current Algo Open Orders (USER_DATA) + + - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesOpenOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_algo_futures_open_orders_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Current Algo Open Orders (USER_DATA) + + - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesOpenOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_algo_futures_open_orders_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/algo/futures/openOrders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_algo_futures_order_delete( + self, + algo_id: Annotated[StrictInt, Field(description="Eg. 14511")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AlgoFuturesOrderDelete200Response: + """Cancel Algo Order(TRADE) + + Cancel an active order. - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + + :param algo_id: Eg. 14511 (required) + :type algo_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_order_delete_serialize( + algo_id=algo_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesOrderDelete200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_algo_futures_order_delete_with_http_info( + self, + algo_id: Annotated[StrictInt, Field(description="Eg. 14511")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AlgoFuturesOrderDelete200Response]: + """Cancel Algo Order(TRADE) + + Cancel an active order. - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + + :param algo_id: Eg. 14511 (required) + :type algo_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_order_delete_serialize( + algo_id=algo_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesOrderDelete200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_algo_futures_order_delete_without_preload_content( + self, + algo_id: Annotated[StrictInt, Field(description="Eg. 14511")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel Algo Order(TRADE) + + Cancel an active order. - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + + :param algo_id: Eg. 14511 (required) + :type algo_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_order_delete_serialize( + algo_id=algo_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesOrderDelete200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_algo_futures_order_delete_serialize( + self, + algo_id, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if algo_id is not None: + + _query_params.append(('algoId', algo_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/sapi/v1/algo/futures/order', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_algo_futures_sub_orders_get( + self, + algo_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AlgoFuturesSubOrdersGet200Response: + """Query Sub Orders (USER_DATA) + + - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + + :param algo_id: (required) + :type algo_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page: Default 1 + :type page: int + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_sub_orders_get_serialize( + algo_id=algo_id, + timestamp=timestamp, + signature=signature, + page=page, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesSubOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_algo_futures_sub_orders_get_with_http_info( + self, + algo_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AlgoFuturesSubOrdersGet200Response]: + """Query Sub Orders (USER_DATA) + + - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + + :param algo_id: (required) + :type algo_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page: Default 1 + :type page: int + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_sub_orders_get_serialize( + algo_id=algo_id, + timestamp=timestamp, + signature=signature, + page=page, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesSubOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_algo_futures_sub_orders_get_without_preload_content( + self, + algo_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Sub Orders (USER_DATA) + + - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 + + :param algo_id: (required) + :type algo_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page: Default 1 + :type page: int + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_futures_sub_orders_get_serialize( + algo_id=algo_id, + timestamp=timestamp, + signature=signature, + page=page, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoFuturesSubOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_algo_futures_sub_orders_get_serialize( + self, + algo_id, + timestamp, + signature, + page, + page_size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if algo_id is not None: + + _query_params.append(('algoId', algo_id)) + + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/algo/futures/subOrders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/futures_api.py b/target/python/binance_openapi/openapi_client/api/futures_api.py new file mode 100644 index 0000000..01c501e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/futures_api.py @@ -0,0 +1,1148 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_futures_hist_data_link_get200_response import SapiV1FuturesHistDataLinkGet200Response +from openapi_client.models.sapi_v1_futures_transfer_get200_response import SapiV1FuturesTransferGet200Response +from openapi_client.models.sapi_v1_margin_borrow_repay_post200_response import SapiV1MarginBorrowRepayPost200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class FuturesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_futures_hist_data_link_get( + self, + symbol: StrictStr, + data_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1FuturesHistDataLinkGet200Response: + """Get Future TickLevel Orderbook Historical Data Download Link (USER_DATA) + + Weight(IP): 1 + + :param symbol: (required) + :type symbol: str + :param data_type: (required) + :type data_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_futures_hist_data_link_get_serialize( + symbol=symbol, + data_type=data_type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1FuturesHistDataLinkGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_futures_hist_data_link_get_with_http_info( + self, + symbol: StrictStr, + data_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1FuturesHistDataLinkGet200Response]: + """Get Future TickLevel Orderbook Historical Data Download Link (USER_DATA) + + Weight(IP): 1 + + :param symbol: (required) + :type symbol: str + :param data_type: (required) + :type data_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_futures_hist_data_link_get_serialize( + symbol=symbol, + data_type=data_type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1FuturesHistDataLinkGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_futures_hist_data_link_get_without_preload_content( + self, + symbol: StrictStr, + data_type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Future TickLevel Orderbook Historical Data Download Link (USER_DATA) + + Weight(IP): 1 + + :param symbol: (required) + :type symbol: str + :param data_type: (required) + :type data_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_futures_hist_data_link_get_serialize( + symbol=symbol, + data_type=data_type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1FuturesHistDataLinkGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_futures_hist_data_link_get_serialize( + self, + symbol, + data_type, + timestamp, + signature, + start_time, + end_time, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if data_type is not None: + + _query_params.append(('dataType', data_type)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/futures/histDataLink', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_futures_transfer_get( + self, + asset: StrictStr, + start_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1FuturesTransferGet200Response: + """Get Future Account Transaction History List (USER_DATA) + + Weight(IP): 10 + + :param asset: (required) + :type asset: str + :param start_time: UTC timestamp in ms (required) + :type start_time: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_futures_transfer_get_serialize( + asset=asset, + start_time=start_time, + timestamp=timestamp, + signature=signature, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1FuturesTransferGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_futures_transfer_get_with_http_info( + self, + asset: StrictStr, + start_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1FuturesTransferGet200Response]: + """Get Future Account Transaction History List (USER_DATA) + + Weight(IP): 10 + + :param asset: (required) + :type asset: str + :param start_time: UTC timestamp in ms (required) + :type start_time: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_futures_transfer_get_serialize( + asset=asset, + start_time=start_time, + timestamp=timestamp, + signature=signature, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1FuturesTransferGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_futures_transfer_get_without_preload_content( + self, + asset: StrictStr, + start_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Future Account Transaction History List (USER_DATA) + + Weight(IP): 10 + + :param asset: (required) + :type asset: str + :param start_time: UTC timestamp in ms (required) + :type start_time: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_futures_transfer_get_serialize( + asset=asset, + start_time=start_time, + timestamp=timestamp, + signature=signature, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1FuturesTransferGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_futures_transfer_get_serialize( + self, + asset, + start_time, + timestamp, + signature, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/futures/transfer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_futures_transfer_post( + self, + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + type: Annotated[StrictInt, Field(description="1: transfer from spot account to USDT-Ⓜ futures account. 2: transfer from USDT-Ⓜ futures account to spot account. 3: transfer from spot account to COIN-Ⓜ futures account. 4: transfer from COIN-Ⓜ futures account to spot account.")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginBorrowRepayPost200Response: + """New Future Account Transfer (USER_DATA) + + Execute transfer between spot account and futures account. Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param type: 1: transfer from spot account to USDT-Ⓜ futures account. 2: transfer from USDT-Ⓜ futures account to spot account. 3: transfer from spot account to COIN-Ⓜ futures account. 4: transfer from COIN-Ⓜ futures account to spot account. (required) + :type type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_futures_transfer_post_serialize( + asset=asset, + amount=amount, + type=type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginBorrowRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_futures_transfer_post_with_http_info( + self, + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + type: Annotated[StrictInt, Field(description="1: transfer from spot account to USDT-Ⓜ futures account. 2: transfer from USDT-Ⓜ futures account to spot account. 3: transfer from spot account to COIN-Ⓜ futures account. 4: transfer from COIN-Ⓜ futures account to spot account.")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginBorrowRepayPost200Response]: + """New Future Account Transfer (USER_DATA) + + Execute transfer between spot account and futures account. Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param type: 1: transfer from spot account to USDT-Ⓜ futures account. 2: transfer from USDT-Ⓜ futures account to spot account. 3: transfer from spot account to COIN-Ⓜ futures account. 4: transfer from COIN-Ⓜ futures account to spot account. (required) + :type type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_futures_transfer_post_serialize( + asset=asset, + amount=amount, + type=type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginBorrowRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_futures_transfer_post_without_preload_content( + self, + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + type: Annotated[StrictInt, Field(description="1: transfer from spot account to USDT-Ⓜ futures account. 2: transfer from USDT-Ⓜ futures account to spot account. 3: transfer from spot account to COIN-Ⓜ futures account. 4: transfer from COIN-Ⓜ futures account to spot account.")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """New Future Account Transfer (USER_DATA) + + Execute transfer between spot account and futures account. Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param type: 1: transfer from spot account to USDT-Ⓜ futures account. 2: transfer from USDT-Ⓜ futures account to spot account. 3: transfer from spot account to COIN-Ⓜ futures account. 4: transfer from COIN-Ⓜ futures account to spot account. (required) + :type type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_futures_transfer_post_serialize( + asset=asset, + amount=amount, + type=type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginBorrowRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_futures_transfer_post_serialize( + self, + asset, + amount, + type, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if type is not None: + + _query_params.append(('type', type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/futures/transfer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/gift_card_api.py b/target/python/binance_openapi/openapi_client/api/gift_card_api.py new file mode 100644 index 0000000..d5dcef7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/gift_card_api.py @@ -0,0 +1,2002 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr +from typing import Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_giftcard_buy_code_token_limit_get200_response import SapiV1GiftcardBuyCodeTokenLimitGet200Response +from openapi_client.models.sapi_v1_giftcard_create_code_post200_response import SapiV1GiftcardCreateCodePost200Response +from openapi_client.models.sapi_v1_giftcard_cryptography_rsa_public_key_get200_response import SapiV1GiftcardCryptographyRsaPublicKeyGet200Response +from openapi_client.models.sapi_v1_giftcard_redeem_code_post200_response import SapiV1GiftcardRedeemCodePost200Response +from openapi_client.models.sapi_v1_giftcard_verify_get200_response import SapiV1GiftcardVerifyGet200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class GiftCardApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_giftcard_buy_code_post( + self, + base_token: Annotated[StrictStr, Field(description="The token you want to pay, example BUSD")], + face_token: Annotated[StrictStr, Field(description="The token you want to buy, example BNB. If faceToken = baseToken, it's the same as createCode endpoint.")], + base_token_amount: Annotated[Union[StrictFloat, StrictInt], Field(description="The base token asset quantity, example 1.002")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1GiftcardCreateCodePost200Response: + """Buy a Binance Code (TRADE) + + This API is for buying a fixed-value Binance Code, which means your Binance Code will be redeemable to a token that is different to the token that you are paying in. If the token you’re paying and the redeemable token are the same, please use the Create Binance Code endpoint. You can use supported crypto currency or fiat token as baseToken to buy Binance Code that is redeemable to your chosen faceToken. Once successfully purchased, the amount of baseToken would be deducted from your funding wallet. To get started with, please make sure: - You have a Binance account - You have passed kyc - You have a sufficient balance in your Binance funding wallet - You need Enable Withdrawals for the API Key which requests this endpoint. Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H Weight(IP): 1 + + :param base_token: The token you want to pay, example BUSD (required) + :type base_token: str + :param face_token: The token you want to buy, example BNB. If faceToken = baseToken, it's the same as createCode endpoint. (required) + :type face_token: str + :param base_token_amount: The base token asset quantity, example 1.002 (required) + :type base_token_amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_buy_code_post_serialize( + base_token=base_token, + face_token=face_token, + base_token_amount=base_token_amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardCreateCodePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_giftcard_buy_code_post_with_http_info( + self, + base_token: Annotated[StrictStr, Field(description="The token you want to pay, example BUSD")], + face_token: Annotated[StrictStr, Field(description="The token you want to buy, example BNB. If faceToken = baseToken, it's the same as createCode endpoint.")], + base_token_amount: Annotated[Union[StrictFloat, StrictInt], Field(description="The base token asset quantity, example 1.002")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1GiftcardCreateCodePost200Response]: + """Buy a Binance Code (TRADE) + + This API is for buying a fixed-value Binance Code, which means your Binance Code will be redeemable to a token that is different to the token that you are paying in. If the token you’re paying and the redeemable token are the same, please use the Create Binance Code endpoint. You can use supported crypto currency or fiat token as baseToken to buy Binance Code that is redeemable to your chosen faceToken. Once successfully purchased, the amount of baseToken would be deducted from your funding wallet. To get started with, please make sure: - You have a Binance account - You have passed kyc - You have a sufficient balance in your Binance funding wallet - You need Enable Withdrawals for the API Key which requests this endpoint. Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H Weight(IP): 1 + + :param base_token: The token you want to pay, example BUSD (required) + :type base_token: str + :param face_token: The token you want to buy, example BNB. If faceToken = baseToken, it's the same as createCode endpoint. (required) + :type face_token: str + :param base_token_amount: The base token asset quantity, example 1.002 (required) + :type base_token_amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_buy_code_post_serialize( + base_token=base_token, + face_token=face_token, + base_token_amount=base_token_amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardCreateCodePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_giftcard_buy_code_post_without_preload_content( + self, + base_token: Annotated[StrictStr, Field(description="The token you want to pay, example BUSD")], + face_token: Annotated[StrictStr, Field(description="The token you want to buy, example BNB. If faceToken = baseToken, it's the same as createCode endpoint.")], + base_token_amount: Annotated[Union[StrictFloat, StrictInt], Field(description="The base token asset quantity, example 1.002")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Buy a Binance Code (TRADE) + + This API is for buying a fixed-value Binance Code, which means your Binance Code will be redeemable to a token that is different to the token that you are paying in. If the token you’re paying and the redeemable token are the same, please use the Create Binance Code endpoint. You can use supported crypto currency or fiat token as baseToken to buy Binance Code that is redeemable to your chosen faceToken. Once successfully purchased, the amount of baseToken would be deducted from your funding wallet. To get started with, please make sure: - You have a Binance account - You have passed kyc - You have a sufficient balance in your Binance funding wallet - You need Enable Withdrawals for the API Key which requests this endpoint. Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H Weight(IP): 1 + + :param base_token: The token you want to pay, example BUSD (required) + :type base_token: str + :param face_token: The token you want to buy, example BNB. If faceToken = baseToken, it's the same as createCode endpoint. (required) + :type face_token: str + :param base_token_amount: The base token asset quantity, example 1.002 (required) + :type base_token_amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_buy_code_post_serialize( + base_token=base_token, + face_token=face_token, + base_token_amount=base_token_amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardCreateCodePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_giftcard_buy_code_post_serialize( + self, + base_token, + face_token, + base_token_amount, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if base_token is not None: + + _query_params.append(('baseToken', base_token)) + + if face_token is not None: + + _query_params.append(('faceToken', face_token)) + + if base_token_amount is not None: + + _query_params.append(('baseTokenAmount', base_token_amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/giftcard/buyCode', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_giftcard_buy_code_token_limit_get( + self, + base_token: Annotated[StrictStr, Field(description="The token you want to pay, example BUSD")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1GiftcardBuyCodeTokenLimitGet200Response: + """Fetch Token Limit (USER_DATA) + + This API is to help you verify which tokens are available for you to purchase fixed-value gift cards as mentioned in section 2 and it's limitation. Weight(IP): 1 + + :param base_token: The token you want to pay, example BUSD (required) + :type base_token: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_buy_code_token_limit_get_serialize( + base_token=base_token, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardBuyCodeTokenLimitGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_giftcard_buy_code_token_limit_get_with_http_info( + self, + base_token: Annotated[StrictStr, Field(description="The token you want to pay, example BUSD")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1GiftcardBuyCodeTokenLimitGet200Response]: + """Fetch Token Limit (USER_DATA) + + This API is to help you verify which tokens are available for you to purchase fixed-value gift cards as mentioned in section 2 and it's limitation. Weight(IP): 1 + + :param base_token: The token you want to pay, example BUSD (required) + :type base_token: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_buy_code_token_limit_get_serialize( + base_token=base_token, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardBuyCodeTokenLimitGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_giftcard_buy_code_token_limit_get_without_preload_content( + self, + base_token: Annotated[StrictStr, Field(description="The token you want to pay, example BUSD")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Fetch Token Limit (USER_DATA) + + This API is to help you verify which tokens are available for you to purchase fixed-value gift cards as mentioned in section 2 and it's limitation. Weight(IP): 1 + + :param base_token: The token you want to pay, example BUSD (required) + :type base_token: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_buy_code_token_limit_get_serialize( + base_token=base_token, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardBuyCodeTokenLimitGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_giftcard_buy_code_token_limit_get_serialize( + self, + base_token, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if base_token is not None: + + _query_params.append(('baseToken', base_token)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/giftcard/buyCode/token-limit', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_giftcard_create_code_post( + self, + token: Annotated[StrictStr, Field(description="The coin type contained in the Binance Code")], + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="The amount of the coin")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1GiftcardCreateCodePost200Response: + """Create a Binance Code (USER_DATA) + + This API is for creating a Binance Code. To get started with, please make sure: - You have a Binance account - You have passed kyc - You have a sufficient balance in your Binance funding wallet - You need Enable Withdrawals for the API Key which requests this endpoint. Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H Weight(IP): 1 + + :param token: The coin type contained in the Binance Code (required) + :type token: str + :param amount: The amount of the coin (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_create_code_post_serialize( + token=token, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardCreateCodePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_giftcard_create_code_post_with_http_info( + self, + token: Annotated[StrictStr, Field(description="The coin type contained in the Binance Code")], + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="The amount of the coin")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1GiftcardCreateCodePost200Response]: + """Create a Binance Code (USER_DATA) + + This API is for creating a Binance Code. To get started with, please make sure: - You have a Binance account - You have passed kyc - You have a sufficient balance in your Binance funding wallet - You need Enable Withdrawals for the API Key which requests this endpoint. Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H Weight(IP): 1 + + :param token: The coin type contained in the Binance Code (required) + :type token: str + :param amount: The amount of the coin (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_create_code_post_serialize( + token=token, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardCreateCodePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_giftcard_create_code_post_without_preload_content( + self, + token: Annotated[StrictStr, Field(description="The coin type contained in the Binance Code")], + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="The amount of the coin")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a Binance Code (USER_DATA) + + This API is for creating a Binance Code. To get started with, please make sure: - You have a Binance account - You have passed kyc - You have a sufficient balance in your Binance funding wallet - You need Enable Withdrawals for the API Key which requests this endpoint. Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H Weight(IP): 1 + + :param token: The coin type contained in the Binance Code (required) + :type token: str + :param amount: The amount of the coin (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_create_code_post_serialize( + token=token, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardCreateCodePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_giftcard_create_code_post_serialize( + self, + token, + amount, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if token is not None: + + _query_params.append(('token', token)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/giftcard/createCode', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_giftcard_cryptography_rsa_public_key_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1GiftcardCryptographyRsaPublicKeyGet200Response: + """Fetch RSA Public Key (USER_DATA) + + This API is for fetching the RSA Public Key. This RSA Public key will be used to encrypt the card code. Please note that the RSA Public key fetched is valid only for the current day. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_cryptography_rsa_public_key_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardCryptographyRsaPublicKeyGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_giftcard_cryptography_rsa_public_key_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1GiftcardCryptographyRsaPublicKeyGet200Response]: + """Fetch RSA Public Key (USER_DATA) + + This API is for fetching the RSA Public Key. This RSA Public key will be used to encrypt the card code. Please note that the RSA Public key fetched is valid only for the current day. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_cryptography_rsa_public_key_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardCryptographyRsaPublicKeyGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_giftcard_cryptography_rsa_public_key_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Fetch RSA Public Key (USER_DATA) + + This API is for fetching the RSA Public Key. This RSA Public key will be used to encrypt the card code. Please note that the RSA Public key fetched is valid only for the current day. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_cryptography_rsa_public_key_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardCryptographyRsaPublicKeyGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_giftcard_cryptography_rsa_public_key_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/giftcard/cryptography/rsa-public-key', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_giftcard_redeem_code_post( + self, + code: Annotated[StrictStr, Field(description="Binance Code")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + external_uid: Annotated[Optional[StrictStr], Field(description="Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance codes on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters).")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1GiftcardRedeemCodePost200Response: + """Redeem a Binance Code (USER_DATA) + + This API is for redeeming the Binance Code. Once redeemed, the coins will be deposited in your funding wallet. Please note that if you enter the wrong code 5 times within 24 hours, you will no longer be able to redeem any Binance Code that day. Weight(IP): 1 + + :param code: Binance Code (required) + :type code: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param external_uid: Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance codes on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters). + :type external_uid: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_redeem_code_post_serialize( + code=code, + timestamp=timestamp, + signature=signature, + external_uid=external_uid, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardRedeemCodePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_giftcard_redeem_code_post_with_http_info( + self, + code: Annotated[StrictStr, Field(description="Binance Code")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + external_uid: Annotated[Optional[StrictStr], Field(description="Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance codes on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters).")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1GiftcardRedeemCodePost200Response]: + """Redeem a Binance Code (USER_DATA) + + This API is for redeeming the Binance Code. Once redeemed, the coins will be deposited in your funding wallet. Please note that if you enter the wrong code 5 times within 24 hours, you will no longer be able to redeem any Binance Code that day. Weight(IP): 1 + + :param code: Binance Code (required) + :type code: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param external_uid: Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance codes on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters). + :type external_uid: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_redeem_code_post_serialize( + code=code, + timestamp=timestamp, + signature=signature, + external_uid=external_uid, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardRedeemCodePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_giftcard_redeem_code_post_without_preload_content( + self, + code: Annotated[StrictStr, Field(description="Binance Code")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + external_uid: Annotated[Optional[StrictStr], Field(description="Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance codes on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters).")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Redeem a Binance Code (USER_DATA) + + This API is for redeeming the Binance Code. Once redeemed, the coins will be deposited in your funding wallet. Please note that if you enter the wrong code 5 times within 24 hours, you will no longer be able to redeem any Binance Code that day. Weight(IP): 1 + + :param code: Binance Code (required) + :type code: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param external_uid: Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance codes on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters). + :type external_uid: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_redeem_code_post_serialize( + code=code, + timestamp=timestamp, + signature=signature, + external_uid=external_uid, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardRedeemCodePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_giftcard_redeem_code_post_serialize( + self, + code, + timestamp, + signature, + external_uid, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if code is not None: + + _query_params.append(('code', code)) + + if external_uid is not None: + + _query_params.append(('externalUid', external_uid)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/giftcard/redeemCode', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_giftcard_verify_get( + self, + reference_no: Annotated[StrictStr, Field(description="reference number")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1GiftcardVerifyGet200Response: + """Verify a Binance Code (USER_DATA) + + This API is for verifying whether the Binance Code is valid or not by entering Binance Code or reference number. Please note that if you enter the wrong binance code 5 times within an hour, you will no longer be able to verify any binance code for that hour. Weight(IP): 1 + + :param reference_no: reference number (required) + :type reference_no: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_verify_get_serialize( + reference_no=reference_no, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardVerifyGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_giftcard_verify_get_with_http_info( + self, + reference_no: Annotated[StrictStr, Field(description="reference number")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1GiftcardVerifyGet200Response]: + """Verify a Binance Code (USER_DATA) + + This API is for verifying whether the Binance Code is valid or not by entering Binance Code or reference number. Please note that if you enter the wrong binance code 5 times within an hour, you will no longer be able to verify any binance code for that hour. Weight(IP): 1 + + :param reference_no: reference number (required) + :type reference_no: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_verify_get_serialize( + reference_no=reference_no, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardVerifyGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_giftcard_verify_get_without_preload_content( + self, + reference_no: Annotated[StrictStr, Field(description="reference number")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Verify a Binance Code (USER_DATA) + + This API is for verifying whether the Binance Code is valid or not by entering Binance Code or reference number. Please note that if you enter the wrong binance code 5 times within an hour, you will no longer be able to verify any binance code for that hour. Weight(IP): 1 + + :param reference_no: reference number (required) + :type reference_no: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_giftcard_verify_get_serialize( + reference_no=reference_no, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1GiftcardVerifyGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_giftcard_verify_get_serialize( + self, + reference_no, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if reference_no is not None: + + _query_params.append(('referenceNo', reference_no)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/giftcard/verify', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/isolated_margin_stream_api.py b/target/python/binance_openapi/openapi_client/api/isolated_margin_stream_api.py new file mode 100644 index 0000000..803fea0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/isolated_margin_stream_api.py @@ -0,0 +1,811 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Any, Dict, Optional +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_user_data_stream_isolated_post200_response import SapiV1UserDataStreamIsolatedPost200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class IsolatedMarginStreamApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_user_data_stream_isolated_delete( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Close a ListenKey (USER_STREAM) + + Close out a user data stream. Weight: 1 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_isolated_delete_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_user_data_stream_isolated_delete_with_http_info( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Close a ListenKey (USER_STREAM) + + Close out a user data stream. Weight: 1 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_isolated_delete_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_user_data_stream_isolated_delete_without_preload_content( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Close a ListenKey (USER_STREAM) + + Close out a user data stream. Weight: 1 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_isolated_delete_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_user_data_stream_isolated_delete_serialize( + self, + listen_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if listen_key is not None: + + _query_params.append(('listenKey', listen_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/sapi/v1/userDataStream/isolated', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_user_data_stream_isolated_post( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1UserDataStreamIsolatedPost200Response: + """Generate a Listen Key (USER_STREAM) + + Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_isolated_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1UserDataStreamIsolatedPost200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_user_data_stream_isolated_post_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1UserDataStreamIsolatedPost200Response]: + """Generate a Listen Key (USER_STREAM) + + Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_isolated_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1UserDataStreamIsolatedPost200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_user_data_stream_isolated_post_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Generate a Listen Key (USER_STREAM) + + Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_isolated_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1UserDataStreamIsolatedPost200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_user_data_stream_isolated_post_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/userDataStream/isolated', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_user_data_stream_isolated_put( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Ping/Keep-alive a Listen Key (USER_STREAM) + + Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 1 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_isolated_put_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_user_data_stream_isolated_put_with_http_info( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Ping/Keep-alive a Listen Key (USER_STREAM) + + Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 1 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_isolated_put_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_user_data_stream_isolated_put_without_preload_content( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Ping/Keep-alive a Listen Key (USER_STREAM) + + Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 1 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_isolated_put_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_user_data_stream_isolated_put_serialize( + self, + listen_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if listen_key is not None: + + _query_params.append(('listenKey', listen_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/sapi/v1/userDataStream/isolated', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/margin_api.py b/target/python/binance_openapi/openapi_client/api/margin_api.py new file mode 100644 index 0000000..0a7af16 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/margin_api.py @@ -0,0 +1,16131 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.api_v3_all_order_list_get200_response_inner import ApiV3AllOrderListGet200ResponseInner +from openapi_client.models.bnb_burn_status import BnbBurnStatus +from openapi_client.models.isolated_margin_account_info import IsolatedMarginAccountInfo +from openapi_client.models.margin_oco_order import MarginOcoOrder +from openapi_client.models.margin_order import MarginOrder +from openapi_client.models.margin_order_detail import MarginOrderDetail +from openapi_client.models.margin_trade import MarginTrade +from openapi_client.models.sapi_v1_margin_account_get200_response import SapiV1MarginAccountGet200Response +from openapi_client.models.sapi_v1_margin_all_assets_get200_response_inner import SapiV1MarginAllAssetsGet200ResponseInner +from openapi_client.models.sapi_v1_margin_all_pairs_get200_response_inner import SapiV1MarginAllPairsGet200ResponseInner +from openapi_client.models.sapi_v1_margin_available_inventory_get200_response import SapiV1MarginAvailableInventoryGet200Response +from openapi_client.models.sapi_v1_margin_borrow_repay_get200_response import SapiV1MarginBorrowRepayGet200Response +from openapi_client.models.sapi_v1_margin_borrow_repay_post200_response import SapiV1MarginBorrowRepayPost200Response +from openapi_client.models.sapi_v1_margin_capital_flow_get200_response_inner import SapiV1MarginCapitalFlowGet200ResponseInner +from openapi_client.models.sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner import SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner +from openapi_client.models.sapi_v1_margin_cross_margin_data_get200_response_inner import SapiV1MarginCrossMarginDataGet200ResponseInner +from openapi_client.models.sapi_v1_margin_delist_schedule_get200_response_inner import SapiV1MarginDelistScheduleGet200ResponseInner +from openapi_client.models.sapi_v1_margin_exchange_small_liability_get200_response_inner import SapiV1MarginExchangeSmallLiabilityGet200ResponseInner +from openapi_client.models.sapi_v1_margin_exchange_small_liability_history_get200_response import SapiV1MarginExchangeSmallLiabilityHistoryGet200Response +from openapi_client.models.sapi_v1_margin_force_liquidation_rec_get200_response import SapiV1MarginForceLiquidationRecGet200Response +from openapi_client.models.sapi_v1_margin_interest_history_get200_response import SapiV1MarginInterestHistoryGet200Response +from openapi_client.models.sapi_v1_margin_interest_rate_history_get200_response_inner import SapiV1MarginInterestRateHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_margin_isolated_account_limit_get200_response import SapiV1MarginIsolatedAccountLimitGet200Response +from openapi_client.models.sapi_v1_margin_isolated_account_post200_response import SapiV1MarginIsolatedAccountPost200Response +from openapi_client.models.sapi_v1_margin_isolated_all_pairs_get200_response_inner import SapiV1MarginIsolatedAllPairsGet200ResponseInner +from openapi_client.models.sapi_v1_margin_isolated_margin_data_get200_response_inner import SapiV1MarginIsolatedMarginDataGet200ResponseInner +from openapi_client.models.sapi_v1_margin_isolated_margin_tier_get200_response_inner import SapiV1MarginIsolatedMarginTierGet200ResponseInner +from openapi_client.models.sapi_v1_margin_leverage_bracket_get200_response_inner import SapiV1MarginLeverageBracketGet200ResponseInner +from openapi_client.models.sapi_v1_margin_max_borrowable_get200_response import SapiV1MarginMaxBorrowableGet200Response +from openapi_client.models.sapi_v1_margin_max_leverage_post200_response import SapiV1MarginMaxLeveragePost200Response +from openapi_client.models.sapi_v1_margin_max_transferable_get200_response import SapiV1MarginMaxTransferableGet200Response +from openapi_client.models.sapi_v1_margin_next_hourly_interest_rate_get200_response_inner import SapiV1MarginNextHourlyInterestRateGet200ResponseInner +from openapi_client.models.sapi_v1_margin_open_order_list_get200_response_inner import SapiV1MarginOpenOrderListGet200ResponseInner +from openapi_client.models.sapi_v1_margin_open_orders_delete200_response_inner import SapiV1MarginOpenOrdersDelete200ResponseInner +from openapi_client.models.sapi_v1_margin_order_list_get200_response import SapiV1MarginOrderListGet200Response +from openapi_client.models.sapi_v1_margin_order_oco_post200_response import SapiV1MarginOrderOcoPost200Response +from openapi_client.models.sapi_v1_margin_order_post200_response import SapiV1MarginOrderPost200Response +from openapi_client.models.sapi_v1_margin_price_index_get200_response import SapiV1MarginPriceIndexGet200Response +from openapi_client.models.sapi_v1_margin_rate_limit_order_get200_response_inner import SapiV1MarginRateLimitOrderGet200ResponseInner +from openapi_client.models.sapi_v1_margin_trade_coeff_get200_response import SapiV1MarginTradeCoeffGet200Response +from openapi_client.models.sapi_v1_margin_transfer_get200_response import SapiV1MarginTransferGet200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class MarginApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_bnb_burn_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BnbBurnStatus: + """Get BNB Burn Status(USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_bnb_burn_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BnbBurnStatus", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_bnb_burn_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BnbBurnStatus]: + """Get BNB Burn Status(USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_bnb_burn_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BnbBurnStatus", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_bnb_burn_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get BNB Burn Status(USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_bnb_burn_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BnbBurnStatus", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_bnb_burn_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/bnbBurn', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_bnb_burn_post( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + spot_bnb_burn: Annotated[Optional[StrictStr], Field(description="Determines whether to use BNB to pay for trading fees on SPOT")] = None, + interest_bnb_burn: Annotated[Optional[StrictStr], Field(description="Determines whether to use BNB to pay for margin loan's interest")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BnbBurnStatus: + """Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) + + - \"spotBNBBurn\" and \"interestBNBBurn\" should be sent at least one. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param spot_bnb_burn: Determines whether to use BNB to pay for trading fees on SPOT + :type spot_bnb_burn: str + :param interest_bnb_burn: Determines whether to use BNB to pay for margin loan's interest + :type interest_bnb_burn: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_bnb_burn_post_serialize( + timestamp=timestamp, + signature=signature, + spot_bnb_burn=spot_bnb_burn, + interest_bnb_burn=interest_bnb_burn, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BnbBurnStatus", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_bnb_burn_post_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + spot_bnb_burn: Annotated[Optional[StrictStr], Field(description="Determines whether to use BNB to pay for trading fees on SPOT")] = None, + interest_bnb_burn: Annotated[Optional[StrictStr], Field(description="Determines whether to use BNB to pay for margin loan's interest")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BnbBurnStatus]: + """Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) + + - \"spotBNBBurn\" and \"interestBNBBurn\" should be sent at least one. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param spot_bnb_burn: Determines whether to use BNB to pay for trading fees on SPOT + :type spot_bnb_burn: str + :param interest_bnb_burn: Determines whether to use BNB to pay for margin loan's interest + :type interest_bnb_burn: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_bnb_burn_post_serialize( + timestamp=timestamp, + signature=signature, + spot_bnb_burn=spot_bnb_burn, + interest_bnb_burn=interest_bnb_burn, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BnbBurnStatus", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_bnb_burn_post_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + spot_bnb_burn: Annotated[Optional[StrictStr], Field(description="Determines whether to use BNB to pay for trading fees on SPOT")] = None, + interest_bnb_burn: Annotated[Optional[StrictStr], Field(description="Determines whether to use BNB to pay for margin loan's interest")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) + + - \"spotBNBBurn\" and \"interestBNBBurn\" should be sent at least one. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param spot_bnb_burn: Determines whether to use BNB to pay for trading fees on SPOT + :type spot_bnb_burn: str + :param interest_bnb_burn: Determines whether to use BNB to pay for margin loan's interest + :type interest_bnb_burn: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_bnb_burn_post_serialize( + timestamp=timestamp, + signature=signature, + spot_bnb_burn=spot_bnb_burn, + interest_bnb_burn=interest_bnb_burn, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BnbBurnStatus", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_bnb_burn_post_serialize( + self, + timestamp, + signature, + spot_bnb_burn, + interest_bnb_burn, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if spot_bnb_burn is not None: + + _query_params.append(('spotBNBBurn', spot_bnb_burn)) + + if interest_bnb_burn is not None: + + _query_params.append(('interestBNBBurn', interest_bnb_burn)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/bnbBurn', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_account_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginAccountGet200Response: + """Query Cross Margin Account Details (USER_DATA) + + Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_account_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginAccountGet200Response]: + """Query Cross Margin Account Details (USER_DATA) + + Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_account_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Cross Margin Account Details (USER_DATA) + + Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_account_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/account', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_all_assets_get( + self, + asset: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginAllAssetsGet200ResponseInner]: + """Get All Margin Assets (MARKET_DATA) + + Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_all_assets_get_serialize( + asset=asset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginAllAssetsGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_all_assets_get_with_http_info( + self, + asset: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginAllAssetsGet200ResponseInner]]: + """Get All Margin Assets (MARKET_DATA) + + Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_all_assets_get_serialize( + asset=asset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginAllAssetsGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_all_assets_get_without_preload_content( + self, + asset: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get All Margin Assets (MARKET_DATA) + + Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_all_assets_get_serialize( + asset=asset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginAllAssetsGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_all_assets_get_serialize( + self, + asset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/allAssets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_all_order_list_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Mandatory for isolated margin, not supported for cross margin")] = None, + from_id: Annotated[Optional[StrictStr], Field(description="If supplied, neither `startTime` or `endTime` can be provided")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default Value: 500; Max Value: 1000")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApiV3AllOrderListGet200ResponseInner]: + """Query Margin Account's all OCO (USER_DATA) + + Retrieves all OCO for a specific margin account based on provided optional parameters Weight(IP): 200 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param symbol: Mandatory for isolated margin, not supported for cross margin + :type symbol: str + :param from_id: If supplied, neither `startTime` or `endTime` can be provided + :type from_id: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default Value: 500; Max Value: 1000 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_all_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + symbol=symbol, + from_id=from_id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3AllOrderListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_all_order_list_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Mandatory for isolated margin, not supported for cross margin")] = None, + from_id: Annotated[Optional[StrictStr], Field(description="If supplied, neither `startTime` or `endTime` can be provided")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default Value: 500; Max Value: 1000")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApiV3AllOrderListGet200ResponseInner]]: + """Query Margin Account's all OCO (USER_DATA) + + Retrieves all OCO for a specific margin account based on provided optional parameters Weight(IP): 200 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param symbol: Mandatory for isolated margin, not supported for cross margin + :type symbol: str + :param from_id: If supplied, neither `startTime` or `endTime` can be provided + :type from_id: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default Value: 500; Max Value: 1000 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_all_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + symbol=symbol, + from_id=from_id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3AllOrderListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_all_order_list_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Mandatory for isolated margin, not supported for cross margin")] = None, + from_id: Annotated[Optional[StrictStr], Field(description="If supplied, neither `startTime` or `endTime` can be provided")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default Value: 500; Max Value: 1000")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Margin Account's all OCO (USER_DATA) + + Retrieves all OCO for a specific margin account based on provided optional parameters Weight(IP): 200 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param symbol: Mandatory for isolated margin, not supported for cross margin + :type symbol: str + :param from_id: If supplied, neither `startTime` or `endTime` can be provided + :type from_id: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default Value: 500; Max Value: 1000 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_all_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + symbol=symbol, + from_id=from_id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3AllOrderListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_all_order_list_get_serialize( + self, + timestamp, + signature, + is_isolated, + symbol, + from_id, + start_time, + end_time, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if from_id is not None: + + _query_params.append(('fromId', from_id)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/allOrderList', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_all_orders_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[MarginOrderDetail]: + """Query Margin Account's All Orders (USER_DATA) + + - If `orderId` is set, it will get orders >= that orderId. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 200 Request Limit: 60 times/min per IP + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param order_id: Order id + :type order_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_all_orders_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + order_id=order_id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MarginOrderDetail]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_all_orders_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[MarginOrderDetail]]: + """Query Margin Account's All Orders (USER_DATA) + + - If `orderId` is set, it will get orders >= that orderId. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 200 Request Limit: 60 times/min per IP + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param order_id: Order id + :type order_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_all_orders_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + order_id=order_id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MarginOrderDetail]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_all_orders_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Margin Account's All Orders (USER_DATA) + + - If `orderId` is set, it will get orders >= that orderId. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 200 Request Limit: 60 times/min per IP + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param order_id: Order id + :type order_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_all_orders_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + order_id=order_id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MarginOrderDetail]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_all_orders_get_serialize( + self, + symbol, + timestamp, + signature, + is_isolated, + order_id, + start_time, + end_time, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/allOrders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_all_pairs_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginAllPairsGet200ResponseInner]: + """Get All Cross Margin Pairs (MARKET_DATA) + + Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_all_pairs_get_serialize( + symbol=symbol, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginAllPairsGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_all_pairs_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginAllPairsGet200ResponseInner]]: + """Get All Cross Margin Pairs (MARKET_DATA) + + Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_all_pairs_get_serialize( + symbol=symbol, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginAllPairsGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_all_pairs_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get All Cross Margin Pairs (MARKET_DATA) + + Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_all_pairs_get_serialize( + symbol=symbol, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginAllPairsGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_all_pairs_get_serialize( + self, + symbol, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/allPairs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_available_inventory_get( + self, + type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginAvailableInventoryGet200Response: + """Query Margin Available Inventory (USER_DATA) + + Margin available Inventory query Weight(UID): 50 + + :param type: (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_available_inventory_get_serialize( + type=type, + timestamp=timestamp, + signature=signature, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginAvailableInventoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_available_inventory_get_with_http_info( + self, + type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginAvailableInventoryGet200Response]: + """Query Margin Available Inventory (USER_DATA) + + Margin available Inventory query Weight(UID): 50 + + :param type: (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_available_inventory_get_serialize( + type=type, + timestamp=timestamp, + signature=signature, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginAvailableInventoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_available_inventory_get_without_preload_content( + self, + type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Margin Available Inventory (USER_DATA) + + Margin available Inventory query Weight(UID): 50 + + :param type: (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_available_inventory_get_serialize( + type=type, + timestamp=timestamp, + signature=signature, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginAvailableInventoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_available_inventory_get_serialize( + self, + type, + timestamp, + signature, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if type is not None: + + _query_params.append(('type', type)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/available-inventory', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_borrow_repay_get( + self, + asset: StrictStr, + type: Annotated[StrictStr, Field(description="BORROW or REPAY")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + tx_id: Annotated[Optional[StrictInt], Field(description="tranId in POST /sapi/v1/margin/loan")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginBorrowRepayGet200Response: + """Query borrow/repay records in Margin account(USER_DATA) + + Query borrow/repay records in Margin account - txId or startTime must be sent. txId takes precedence. Response in descending order - If an asset is sent, data within 30 days before endTime; If an asset is not sent, data within 7 days before endTime - If neither startTime nor endTime is sent, the recent 7-day data will be returned. - startTime set as endTime - 7 days by default, endTime set as current time by default Weight(IP): 10 + + :param asset: (required) + :type asset: str + :param type: BORROW or REPAY (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param tx_id: tranId in POST /sapi/v1/margin/loan + :type tx_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_borrow_repay_get_serialize( + asset=asset, + type=type, + timestamp=timestamp, + signature=signature, + isolated_symbol=isolated_symbol, + tx_id=tx_id, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginBorrowRepayGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_borrow_repay_get_with_http_info( + self, + asset: StrictStr, + type: Annotated[StrictStr, Field(description="BORROW or REPAY")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + tx_id: Annotated[Optional[StrictInt], Field(description="tranId in POST /sapi/v1/margin/loan")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginBorrowRepayGet200Response]: + """Query borrow/repay records in Margin account(USER_DATA) + + Query borrow/repay records in Margin account - txId or startTime must be sent. txId takes precedence. Response in descending order - If an asset is sent, data within 30 days before endTime; If an asset is not sent, data within 7 days before endTime - If neither startTime nor endTime is sent, the recent 7-day data will be returned. - startTime set as endTime - 7 days by default, endTime set as current time by default Weight(IP): 10 + + :param asset: (required) + :type asset: str + :param type: BORROW or REPAY (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param tx_id: tranId in POST /sapi/v1/margin/loan + :type tx_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_borrow_repay_get_serialize( + asset=asset, + type=type, + timestamp=timestamp, + signature=signature, + isolated_symbol=isolated_symbol, + tx_id=tx_id, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginBorrowRepayGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_borrow_repay_get_without_preload_content( + self, + asset: StrictStr, + type: Annotated[StrictStr, Field(description="BORROW or REPAY")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + tx_id: Annotated[Optional[StrictInt], Field(description="tranId in POST /sapi/v1/margin/loan")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query borrow/repay records in Margin account(USER_DATA) + + Query borrow/repay records in Margin account - txId or startTime must be sent. txId takes precedence. Response in descending order - If an asset is sent, data within 30 days before endTime; If an asset is not sent, data within 7 days before endTime - If neither startTime nor endTime is sent, the recent 7-day data will be returned. - startTime set as endTime - 7 days by default, endTime set as current time by default Weight(IP): 10 + + :param asset: (required) + :type asset: str + :param type: BORROW or REPAY (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param tx_id: tranId in POST /sapi/v1/margin/loan + :type tx_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_borrow_repay_get_serialize( + asset=asset, + type=type, + timestamp=timestamp, + signature=signature, + isolated_symbol=isolated_symbol, + tx_id=tx_id, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginBorrowRepayGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_borrow_repay_get_serialize( + self, + asset, + type, + timestamp, + signature, + isolated_symbol, + tx_id, + start_time, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if isolated_symbol is not None: + + _query_params.append(('isolatedSymbol', isolated_symbol)) + + if tx_id is not None: + + _query_params.append(('txId', tx_id)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if type is not None: + + _query_params.append(('type', type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/borrow-repay', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_borrow_repay_post( + self, + asset: StrictStr, + is_isolated: Annotated[StrictStr, Field(description="TRUE for isolated margin, FALSE for crossed margin")], + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + amount: Union[StrictFloat, StrictInt], + type: Annotated[StrictStr, Field(description="BORROW or REPAY")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginBorrowRepayPost200Response: + """Margin account borrow/repay(MARGIN) + + Margin account borrow/repay(MARGIN) Weight(UID): 3000 + + :param asset: (required) + :type asset: str + :param is_isolated: TRUE for isolated margin, FALSE for crossed margin (required) + :type is_isolated: str + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param amount: (required) + :type amount: float + :param type: BORROW or REPAY (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_borrow_repay_post_serialize( + asset=asset, + is_isolated=is_isolated, + symbol=symbol, + amount=amount, + type=type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginBorrowRepayPost200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_borrow_repay_post_with_http_info( + self, + asset: StrictStr, + is_isolated: Annotated[StrictStr, Field(description="TRUE for isolated margin, FALSE for crossed margin")], + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + amount: Union[StrictFloat, StrictInt], + type: Annotated[StrictStr, Field(description="BORROW or REPAY")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginBorrowRepayPost200Response]: + """Margin account borrow/repay(MARGIN) + + Margin account borrow/repay(MARGIN) Weight(UID): 3000 + + :param asset: (required) + :type asset: str + :param is_isolated: TRUE for isolated margin, FALSE for crossed margin (required) + :type is_isolated: str + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param amount: (required) + :type amount: float + :param type: BORROW or REPAY (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_borrow_repay_post_serialize( + asset=asset, + is_isolated=is_isolated, + symbol=symbol, + amount=amount, + type=type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginBorrowRepayPost200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_borrow_repay_post_without_preload_content( + self, + asset: StrictStr, + is_isolated: Annotated[StrictStr, Field(description="TRUE for isolated margin, FALSE for crossed margin")], + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + amount: Union[StrictFloat, StrictInt], + type: Annotated[StrictStr, Field(description="BORROW or REPAY")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Margin account borrow/repay(MARGIN) + + Margin account borrow/repay(MARGIN) Weight(UID): 3000 + + :param asset: (required) + :type asset: str + :param is_isolated: TRUE for isolated margin, FALSE for crossed margin (required) + :type is_isolated: str + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param amount: (required) + :type amount: float + :param type: BORROW or REPAY (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_borrow_repay_post_serialize( + asset=asset, + is_isolated=is_isolated, + symbol=symbol, + amount=amount, + type=type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginBorrowRepayPost200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_borrow_repay_post_serialize( + self, + asset, + is_isolated, + symbol, + amount, + type, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if type is not None: + + _query_params.append(('type', type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/margin/borrow-repay', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_capital_flow_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Required when querying isolated data")] = None, + type: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Only supports querying the data of the last 90 days")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + from_id: Annotated[Optional[StrictInt], Field(description="If fromId is set, the data with id > fromId will be returned. Otherwise the latest data will be returned")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The number of data items returned each time is limited. Default 500; Max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginCapitalFlowGet200ResponseInner]: + """Get cross or isolated margin capital flow(USER_DATA) + + Get cross or isolated margin capital flow Weight(IP): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param symbol: Required when querying isolated data + :type symbol: str + :param type: + :type type: str + :param start_time: Only supports querying the data of the last 90 days + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param from_id: If fromId is set, the data with id > fromId will be returned. Otherwise the latest data will be returned + :type from_id: int + :param limit: The number of data items returned each time is limited. Default 500; Max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_capital_flow_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + symbol=symbol, + type=type, + start_time=start_time, + end_time=end_time, + from_id=from_id, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginCapitalFlowGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_capital_flow_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Required when querying isolated data")] = None, + type: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Only supports querying the data of the last 90 days")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + from_id: Annotated[Optional[StrictInt], Field(description="If fromId is set, the data with id > fromId will be returned. Otherwise the latest data will be returned")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The number of data items returned each time is limited. Default 500; Max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginCapitalFlowGet200ResponseInner]]: + """Get cross or isolated margin capital flow(USER_DATA) + + Get cross or isolated margin capital flow Weight(IP): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param symbol: Required when querying isolated data + :type symbol: str + :param type: + :type type: str + :param start_time: Only supports querying the data of the last 90 days + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param from_id: If fromId is set, the data with id > fromId will be returned. Otherwise the latest data will be returned + :type from_id: int + :param limit: The number of data items returned each time is limited. Default 500; Max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_capital_flow_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + symbol=symbol, + type=type, + start_time=start_time, + end_time=end_time, + from_id=from_id, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginCapitalFlowGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_capital_flow_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Required when querying isolated data")] = None, + type: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Only supports querying the data of the last 90 days")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + from_id: Annotated[Optional[StrictInt], Field(description="If fromId is set, the data with id > fromId will be returned. Otherwise the latest data will be returned")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The number of data items returned each time is limited. Default 500; Max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get cross or isolated margin capital flow(USER_DATA) + + Get cross or isolated margin capital flow Weight(IP): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param symbol: Required when querying isolated data + :type symbol: str + :param type: + :type type: str + :param start_time: Only supports querying the data of the last 90 days + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param from_id: If fromId is set, the data with id > fromId will be returned. Otherwise the latest data will be returned + :type from_id: int + :param limit: The number of data items returned each time is limited. Default 500; Max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_capital_flow_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + symbol=symbol, + type=type, + start_time=start_time, + end_time=end_time, + from_id=from_id, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginCapitalFlowGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_capital_flow_get_serialize( + self, + timestamp, + signature, + asset, + symbol, + type, + start_time, + end_time, + from_id, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if type is not None: + + _query_params.append(('type', type)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if from_id is not None: + + _query_params.append(('fromId', from_id)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/capital-flow', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_cross_margin_collateral_ratio_get( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner]: + """Cross margin collateral ratio (MARKET_DATA) + + Weight(IP): 100 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_cross_margin_collateral_ratio_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_cross_margin_collateral_ratio_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner]]: + """Cross margin collateral ratio (MARKET_DATA) + + Weight(IP): 100 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_cross_margin_collateral_ratio_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_cross_margin_collateral_ratio_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cross margin collateral ratio (MARKET_DATA) + + Weight(IP): 100 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_cross_margin_collateral_ratio_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_cross_margin_collateral_ratio_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/crossMarginCollateralRatio', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_cross_margin_data_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginCrossMarginDataGet200ResponseInner]: + """Query Cross Margin Fee Data (USER_DATA) + + Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight(IP): 1 when coin is specified; 5 when the coin parameter is omitted + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param coin: Coin name + :type coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_cross_margin_data_get_serialize( + timestamp=timestamp, + signature=signature, + vip_level=vip_level, + coin=coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginCrossMarginDataGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_cross_margin_data_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginCrossMarginDataGet200ResponseInner]]: + """Query Cross Margin Fee Data (USER_DATA) + + Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight(IP): 1 when coin is specified; 5 when the coin parameter is omitted + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param coin: Coin name + :type coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_cross_margin_data_get_serialize( + timestamp=timestamp, + signature=signature, + vip_level=vip_level, + coin=coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginCrossMarginDataGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_cross_margin_data_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Cross Margin Fee Data (USER_DATA) + + Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight(IP): 1 when coin is specified; 5 when the coin parameter is omitted + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param coin: Coin name + :type coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_cross_margin_data_get_serialize( + timestamp=timestamp, + signature=signature, + vip_level=vip_level, + coin=coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginCrossMarginDataGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_cross_margin_data_get_serialize( + self, + timestamp, + signature, + vip_level, + coin, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if vip_level is not None: + + _query_params.append(('vipLevel', vip_level)) + + if coin is not None: + + _query_params.append(('coin', coin)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/crossMarginData', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_delist_schedule_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginDelistScheduleGet200ResponseInner]: + """Get tokens or symbols delist schedule for cross margin and isolated margin (MARKET_DATA) + + Get tokens or symbols delist schedule for cross margin and isolated margin Weight(IP): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_delist_schedule_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginDelistScheduleGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_delist_schedule_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginDelistScheduleGet200ResponseInner]]: + """Get tokens or symbols delist schedule for cross margin and isolated margin (MARKET_DATA) + + Get tokens or symbols delist schedule for cross margin and isolated margin Weight(IP): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_delist_schedule_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginDelistScheduleGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_delist_schedule_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get tokens or symbols delist schedule for cross margin and isolated margin (MARKET_DATA) + + Get tokens or symbols delist schedule for cross margin and isolated margin Weight(IP): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_delist_schedule_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginDelistScheduleGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_delist_schedule_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/delist-schedule', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_exchange_small_liability_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginExchangeSmallLiabilityGet200ResponseInner]: + """Get Small Liability Exchange Coin List (USER_DATA) + + Query the coins which can be small liability exchange Weight(UID): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_exchange_small_liability_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginExchangeSmallLiabilityGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_exchange_small_liability_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginExchangeSmallLiabilityGet200ResponseInner]]: + """Get Small Liability Exchange Coin List (USER_DATA) + + Query the coins which can be small liability exchange Weight(UID): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_exchange_small_liability_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginExchangeSmallLiabilityGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_exchange_small_liability_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Small Liability Exchange Coin List (USER_DATA) + + Query the coins which can be small liability exchange Weight(UID): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_exchange_small_liability_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginExchangeSmallLiabilityGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_exchange_small_liability_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/exchange-small-liability', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_exchange_small_liability_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginExchangeSmallLiabilityHistoryGet200Response: + """Get Small Liability Exchange History (USER_DATA) + + Get Small liability Exchange History Weight(UID): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_exchange_small_liability_history_get_serialize( + timestamp=timestamp, + signature=signature, + current=current, + size=size, + start_time=start_time, + end_time=end_time, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginExchangeSmallLiabilityHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_exchange_small_liability_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginExchangeSmallLiabilityHistoryGet200Response]: + """Get Small Liability Exchange History (USER_DATA) + + Get Small liability Exchange History Weight(UID): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_exchange_small_liability_history_get_serialize( + timestamp=timestamp, + signature=signature, + current=current, + size=size, + start_time=start_time, + end_time=end_time, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginExchangeSmallLiabilityHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_exchange_small_liability_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Small Liability Exchange History (USER_DATA) + + Get Small liability Exchange History Weight(UID): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_exchange_small_liability_history_get_serialize( + timestamp=timestamp, + signature=signature, + current=current, + size=size, + start_time=start_time, + end_time=end_time, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginExchangeSmallLiabilityHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_exchange_small_liability_history_get_serialize( + self, + timestamp, + signature, + current, + size, + start_time, + end_time, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/exchange-small-liability-history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_force_liquidation_rec_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginForceLiquidationRecGet200Response: + """Get Force Liquidation Record (USER_DATA) + + - Response in descending order Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_force_liquidation_rec_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + isolated_symbol=isolated_symbol, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginForceLiquidationRecGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_force_liquidation_rec_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginForceLiquidationRecGet200Response]: + """Get Force Liquidation Record (USER_DATA) + + - Response in descending order Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_force_liquidation_rec_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + isolated_symbol=isolated_symbol, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginForceLiquidationRecGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_force_liquidation_rec_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Force Liquidation Record (USER_DATA) + + - Response in descending order Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_force_liquidation_rec_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + isolated_symbol=isolated_symbol, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginForceLiquidationRecGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_force_liquidation_rec_get_serialize( + self, + timestamp, + signature, + start_time, + end_time, + isolated_symbol, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if isolated_symbol is not None: + + _query_params.append(('isolatedSymbol', isolated_symbol)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/forceLiquidationRec', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_interest_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + archived: Annotated[Optional[StrictStr], Field(description="Default: false. Set to true for archived data from 6 months ago")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginInterestHistoryGet200Response: + """Get Interest History (USER_DATA) + + - Response in descending order - If `isolatedSymbol` is not sent, crossed margin data will be returned - Set `archived` to `true` to query data from 6 months ago - `type` in response has 4 enums: - `PERIODIC` interest charged per hour - `ON_BORROW` first interest charged on borrow - `PERIODIC_CONVERTED` interest charged per hour converted into BNB - `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param archived: Default: false. Set to true for archived data from 6 months ago + :type archived: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_interest_history_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + isolated_symbol=isolated_symbol, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + archived=archived, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginInterestHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_interest_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + archived: Annotated[Optional[StrictStr], Field(description="Default: false. Set to true for archived data from 6 months ago")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginInterestHistoryGet200Response]: + """Get Interest History (USER_DATA) + + - Response in descending order - If `isolatedSymbol` is not sent, crossed margin data will be returned - Set `archived` to `true` to query data from 6 months ago - `type` in response has 4 enums: - `PERIODIC` interest charged per hour - `ON_BORROW` first interest charged on borrow - `PERIODIC_CONVERTED` interest charged per hour converted into BNB - `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param archived: Default: false. Set to true for archived data from 6 months ago + :type archived: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_interest_history_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + isolated_symbol=isolated_symbol, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + archived=archived, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginInterestHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_interest_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + archived: Annotated[Optional[StrictStr], Field(description="Default: false. Set to true for archived data from 6 months ago")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Interest History (USER_DATA) + + - Response in descending order - If `isolatedSymbol` is not sent, crossed margin data will be returned - Set `archived` to `true` to query data from 6 months ago - `type` in response has 4 enums: - `PERIODIC` interest charged per hour - `ON_BORROW` first interest charged on borrow - `PERIODIC_CONVERTED` interest charged per hour converted into BNB - `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param archived: Default: false. Set to true for archived data from 6 months ago + :type archived: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_interest_history_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + isolated_symbol=isolated_symbol, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + archived=archived, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginInterestHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_interest_history_get_serialize( + self, + timestamp, + signature, + asset, + isolated_symbol, + start_time, + end_time, + current, + size, + archived, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if isolated_symbol is not None: + + _query_params.append(('isolatedSymbol', isolated_symbol)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if archived is not None: + + _query_params.append(('archived', archived)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/interestHistory', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_interest_rate_history_get( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginInterestRateHistoryGet200ResponseInner]: + """Margin Interest Rate History (USER_DATA) + + The max interval between startTime and endTime is 30 days. Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_interest_rate_history_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + vip_level=vip_level, + start_time=start_time, + end_time=end_time, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginInterestRateHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_interest_rate_history_get_with_http_info( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginInterestRateHistoryGet200ResponseInner]]: + """Margin Interest Rate History (USER_DATA) + + The max interval between startTime and endTime is 30 days. Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_interest_rate_history_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + vip_level=vip_level, + start_time=start_time, + end_time=end_time, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginInterestRateHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_interest_rate_history_get_without_preload_content( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Margin Interest Rate History (USER_DATA) + + The max interval between startTime and endTime is 30 days. Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_interest_rate_history_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + vip_level=vip_level, + start_time=start_time, + end_time=end_time, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginInterestRateHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_interest_rate_history_get_serialize( + self, + asset, + timestamp, + signature, + vip_level, + start_time, + end_time, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if vip_level is not None: + + _query_params.append(('vipLevel', vip_level)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/interestRateHistory', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_isolated_account_delete( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginIsolatedAccountPost200Response: + """Disable Isolated Margin Account (TRADE) + + Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours . Weight(UID): 300 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_account_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginIsolatedAccountPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_isolated_account_delete_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginIsolatedAccountPost200Response]: + """Disable Isolated Margin Account (TRADE) + + Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours . Weight(UID): 300 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_account_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginIsolatedAccountPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_isolated_account_delete_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Disable Isolated Margin Account (TRADE) + + Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours . Weight(UID): 300 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_account_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginIsolatedAccountPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_isolated_account_delete_serialize( + self, + symbol, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/sapi/v1/margin/isolated/account', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_isolated_account_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbols: Annotated[Optional[StrictStr], Field(description="Max 5 symbols can be sent; separated by ','")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> IsolatedMarginAccountInfo: + """Query Isolated Margin Account Info (USER_DATA) + + - If \"symbols\" is not sent, all isolated assets will be returned. - If \"symbols\" is sent, only the isolated assets of the sent symbols will be returned. Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbols: Max 5 symbols can be sent; separated by ',' + :type symbols: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_account_get_serialize( + timestamp=timestamp, + signature=signature, + symbols=symbols, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IsolatedMarginAccountInfo", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_isolated_account_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbols: Annotated[Optional[StrictStr], Field(description="Max 5 symbols can be sent; separated by ','")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[IsolatedMarginAccountInfo]: + """Query Isolated Margin Account Info (USER_DATA) + + - If \"symbols\" is not sent, all isolated assets will be returned. - If \"symbols\" is sent, only the isolated assets of the sent symbols will be returned. Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbols: Max 5 symbols can be sent; separated by ',' + :type symbols: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_account_get_serialize( + timestamp=timestamp, + signature=signature, + symbols=symbols, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IsolatedMarginAccountInfo", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_isolated_account_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbols: Annotated[Optional[StrictStr], Field(description="Max 5 symbols can be sent; separated by ','")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Isolated Margin Account Info (USER_DATA) + + - If \"symbols\" is not sent, all isolated assets will be returned. - If \"symbols\" is sent, only the isolated assets of the sent symbols will be returned. Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbols: Max 5 symbols can be sent; separated by ',' + :type symbols: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_account_get_serialize( + timestamp=timestamp, + signature=signature, + symbols=symbols, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IsolatedMarginAccountInfo", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_isolated_account_get_serialize( + self, + timestamp, + signature, + symbols, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbols is not None: + + _query_params.append(('symbols', symbols)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/isolated/account', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_isolated_account_limit_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginIsolatedAccountLimitGet200Response: + """Query Enabled Isolated Margin Account Limit (USER_DATA) + + Query enabled isolated margin account limit. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_account_limit_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginIsolatedAccountLimitGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_isolated_account_limit_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginIsolatedAccountLimitGet200Response]: + """Query Enabled Isolated Margin Account Limit (USER_DATA) + + Query enabled isolated margin account limit. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_account_limit_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginIsolatedAccountLimitGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_isolated_account_limit_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Enabled Isolated Margin Account Limit (USER_DATA) + + Query enabled isolated margin account limit. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_account_limit_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginIsolatedAccountLimitGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_isolated_account_limit_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/isolated/accountLimit', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_isolated_account_post( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginIsolatedAccountPost200Response: + """Enable Isolated Margin Account (TRADE) + + Enable isolated margin account for a specific symbol. Weight(UID): 300 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_account_post_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginIsolatedAccountPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_isolated_account_post_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginIsolatedAccountPost200Response]: + """Enable Isolated Margin Account (TRADE) + + Enable isolated margin account for a specific symbol. Weight(UID): 300 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_account_post_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginIsolatedAccountPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_isolated_account_post_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Enable Isolated Margin Account (TRADE) + + Enable isolated margin account for a specific symbol. Weight(UID): 300 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_account_post_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginIsolatedAccountPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_isolated_account_post_serialize( + self, + symbol, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/margin/isolated/account', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_isolated_all_pairs_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginIsolatedAllPairsGet200ResponseInner]: + """Get All Isolated Margin Symbol(USER_DATA) + + Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_all_pairs_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginIsolatedAllPairsGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_isolated_all_pairs_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginIsolatedAllPairsGet200ResponseInner]]: + """Get All Isolated Margin Symbol(USER_DATA) + + Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_all_pairs_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginIsolatedAllPairsGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_isolated_all_pairs_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get All Isolated Margin Symbol(USER_DATA) + + Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_all_pairs_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginIsolatedAllPairsGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_isolated_all_pairs_get_serialize( + self, + symbol, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/isolated/allPairs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_isolated_margin_data_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginIsolatedMarginDataGet200ResponseInner]: + """Query Isolated Margin Fee Data (USER_DATA) + + Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight(IP): 1 when a single is specified; 10 when the symbol parameter is omitted + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_margin_data_get_serialize( + timestamp=timestamp, + signature=signature, + vip_level=vip_level, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginIsolatedMarginDataGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_isolated_margin_data_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginIsolatedMarginDataGet200ResponseInner]]: + """Query Isolated Margin Fee Data (USER_DATA) + + Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight(IP): 1 when a single is specified; 10 when the symbol parameter is omitted + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_margin_data_get_serialize( + timestamp=timestamp, + signature=signature, + vip_level=vip_level, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginIsolatedMarginDataGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_isolated_margin_data_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Isolated Margin Fee Data (USER_DATA) + + Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight(IP): 1 when a single is specified; 10 when the symbol parameter is omitted + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_margin_data_get_serialize( + timestamp=timestamp, + signature=signature, + vip_level=vip_level, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginIsolatedMarginDataGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_isolated_margin_data_get_serialize( + self, + timestamp, + signature, + vip_level, + symbol, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if vip_level is not None: + + _query_params.append(('vipLevel', vip_level)) + + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/isolatedMarginData', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_isolated_margin_tier_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + tier: Annotated[Optional[StrictStr], Field(description="All margin tier data will be returned if tier is omitted")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginIsolatedMarginTierGet200ResponseInner]: + """Query Isolated Margin Tier Data (USER_DATA) + + Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param tier: All margin tier data will be returned if tier is omitted + :type tier: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_margin_tier_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + tier=tier, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginIsolatedMarginTierGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_isolated_margin_tier_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + tier: Annotated[Optional[StrictStr], Field(description="All margin tier data will be returned if tier is omitted")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginIsolatedMarginTierGet200ResponseInner]]: + """Query Isolated Margin Tier Data (USER_DATA) + + Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param tier: All margin tier data will be returned if tier is omitted + :type tier: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_margin_tier_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + tier=tier, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginIsolatedMarginTierGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_isolated_margin_tier_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + tier: Annotated[Optional[StrictStr], Field(description="All margin tier data will be returned if tier is omitted")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Isolated Margin Tier Data (USER_DATA) + + Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param tier: All margin tier data will be returned if tier is omitted + :type tier: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_isolated_margin_tier_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + tier=tier, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginIsolatedMarginTierGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_isolated_margin_tier_get_serialize( + self, + symbol, + timestamp, + signature, + tier, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if tier is not None: + + _query_params.append(('tier', tier)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/isolatedMarginTier', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_leverage_bracket_get( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginLeverageBracketGet200ResponseInner]: + """Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) + + Liability Coin Leverage Bracket in Cross Margin Pro Mode Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_leverage_bracket_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginLeverageBracketGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_leverage_bracket_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginLeverageBracketGet200ResponseInner]]: + """Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) + + Liability Coin Leverage Bracket in Cross Margin Pro Mode Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_leverage_bracket_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginLeverageBracketGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_leverage_bracket_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) + + Liability Coin Leverage Bracket in Cross Margin Pro Mode Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_leverage_bracket_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginLeverageBracketGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_leverage_bracket_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/leverageBracket', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_manual_liquidation_post( + self, + type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginExchangeSmallLiabilityGet200ResponseInner]: + """Margin manual liquidation(MARGIN) + + Margin manual liquidation Weight(UID): 3000 + + :param type: (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: + :type symbol: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_manual_liquidation_post_serialize( + type=type, + timestamp=timestamp, + signature=signature, + symbol=symbol, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginExchangeSmallLiabilityGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_manual_liquidation_post_with_http_info( + self, + type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginExchangeSmallLiabilityGet200ResponseInner]]: + """Margin manual liquidation(MARGIN) + + Margin manual liquidation Weight(UID): 3000 + + :param type: (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: + :type symbol: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_manual_liquidation_post_serialize( + type=type, + timestamp=timestamp, + signature=signature, + symbol=symbol, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginExchangeSmallLiabilityGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_manual_liquidation_post_without_preload_content( + self, + type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Margin manual liquidation(MARGIN) + + Margin manual liquidation Weight(UID): 3000 + + :param type: (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: + :type symbol: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_manual_liquidation_post_serialize( + type=type, + timestamp=timestamp, + signature=signature, + symbol=symbol, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginExchangeSmallLiabilityGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_manual_liquidation_post_serialize( + self, + type, + timestamp, + signature, + symbol, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if type is not None: + + _query_params.append(('type', type)) + + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/margin/manual-liquidation', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_max_borrowable_get( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginMaxBorrowableGet200Response: + """Query Max Borrow (USER_DATA) + + - If `isolatedSymbol` is not sent, crossed margin data will be sent. - `borrowLimit` is also available from https://www.binance.com/en/margin-fee Weight(IP): 50 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_max_borrowable_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + isolated_symbol=isolated_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxBorrowableGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_max_borrowable_get_with_http_info( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginMaxBorrowableGet200Response]: + """Query Max Borrow (USER_DATA) + + - If `isolatedSymbol` is not sent, crossed margin data will be sent. - `borrowLimit` is also available from https://www.binance.com/en/margin-fee Weight(IP): 50 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_max_borrowable_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + isolated_symbol=isolated_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxBorrowableGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_max_borrowable_get_without_preload_content( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Max Borrow (USER_DATA) + + - If `isolatedSymbol` is not sent, crossed margin data will be sent. - `borrowLimit` is also available from https://www.binance.com/en/margin-fee Weight(IP): 50 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_max_borrowable_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + isolated_symbol=isolated_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxBorrowableGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_max_borrowable_get_serialize( + self, + asset, + timestamp, + signature, + isolated_symbol, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if isolated_symbol is not None: + + _query_params.append(('isolatedSymbol', isolated_symbol)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/maxBorrowable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_max_leverage_post( + self, + max_leverage: Annotated[StrictInt, Field(description="Can only adjust 3 or 5")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginMaxLeveragePost200Response: + """Adjust cross margin max leverage (USER_DATA) + + Adjust cross margin max leverage Weight(UID): 3000 + + :param max_leverage: Can only adjust 3 or 5 (required) + :type max_leverage: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_max_leverage_post_serialize( + max_leverage=max_leverage, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxLeveragePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_max_leverage_post_with_http_info( + self, + max_leverage: Annotated[StrictInt, Field(description="Can only adjust 3 or 5")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginMaxLeveragePost200Response]: + """Adjust cross margin max leverage (USER_DATA) + + Adjust cross margin max leverage Weight(UID): 3000 + + :param max_leverage: Can only adjust 3 or 5 (required) + :type max_leverage: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_max_leverage_post_serialize( + max_leverage=max_leverage, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxLeveragePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_max_leverage_post_without_preload_content( + self, + max_leverage: Annotated[StrictInt, Field(description="Can only adjust 3 or 5")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Adjust cross margin max leverage (USER_DATA) + + Adjust cross margin max leverage Weight(UID): 3000 + + :param max_leverage: Can only adjust 3 or 5 (required) + :type max_leverage: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_max_leverage_post_serialize( + max_leverage=max_leverage, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxLeveragePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_max_leverage_post_serialize( + self, + max_leverage, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if max_leverage is not None: + + _query_params.append(('maxLeverage', max_leverage)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/margin/max-leverage', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_max_transferable_get( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginMaxTransferableGet200Response: + """Query Max Transfer-Out Amount (USER_DATA) + + - If `isolatedSymbol` is not sent, crossed margin data will be sent. Weight(IP): 50 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_max_transferable_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + isolated_symbol=isolated_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxTransferableGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_max_transferable_get_with_http_info( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginMaxTransferableGet200Response]: + """Query Max Transfer-Out Amount (USER_DATA) + + - If `isolatedSymbol` is not sent, crossed margin data will be sent. Weight(IP): 50 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_max_transferable_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + isolated_symbol=isolated_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxTransferableGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_max_transferable_get_without_preload_content( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Max Transfer-Out Amount (USER_DATA) + + - If `isolatedSymbol` is not sent, crossed margin data will be sent. Weight(IP): 50 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_max_transferable_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + isolated_symbol=isolated_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxTransferableGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_max_transferable_get_serialize( + self, + asset, + timestamp, + signature, + isolated_symbol, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if isolated_symbol is not None: + + _query_params.append(('isolatedSymbol', isolated_symbol)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/maxTransferable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_my_trades_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[MarginTrade]: + """Query Margin Account's Trade List (USER_DATA) + + - If `fromId` is set, it will get orders >= that `fromId`. Otherwise most recent trades are returned. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_my_trades_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + start_time=start_time, + end_time=end_time, + from_id=from_id, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MarginTrade]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_my_trades_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[MarginTrade]]: + """Query Margin Account's Trade List (USER_DATA) + + - If `fromId` is set, it will get orders >= that `fromId`. Otherwise most recent trades are returned. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_my_trades_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + start_time=start_time, + end_time=end_time, + from_id=from_id, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MarginTrade]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_my_trades_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Margin Account's Trade List (USER_DATA) + + - If `fromId` is set, it will get orders >= that `fromId`. Otherwise most recent trades are returned. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_my_trades_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + start_time=start_time, + end_time=end_time, + from_id=from_id, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MarginTrade]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_my_trades_get_serialize( + self, + symbol, + timestamp, + signature, + is_isolated, + start_time, + end_time, + from_id, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if from_id is not None: + + _query_params.append(('fromId', from_id)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/myTrades', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_next_hourly_interest_rate_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + assets: Annotated[Optional[StrictStr], Field(description="List of assets, separated by commas, up to 20")] = None, + is_isolated: Annotated[Optional[StrictStr], Field(description="for isolated margin or not, \"TRUE\", \"FALSE\"")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginNextHourlyInterestRateGet200ResponseInner]: + """Get a future hourly interest rate (USER_DATA) + + Get user the next hourly estimate interest Weight(UID): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param assets: List of assets, separated by commas, up to 20 + :type assets: str + :param is_isolated: for isolated margin or not, \"TRUE\", \"FALSE\" + :type is_isolated: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_next_hourly_interest_rate_get_serialize( + timestamp=timestamp, + signature=signature, + assets=assets, + is_isolated=is_isolated, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginNextHourlyInterestRateGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_next_hourly_interest_rate_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + assets: Annotated[Optional[StrictStr], Field(description="List of assets, separated by commas, up to 20")] = None, + is_isolated: Annotated[Optional[StrictStr], Field(description="for isolated margin or not, \"TRUE\", \"FALSE\"")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginNextHourlyInterestRateGet200ResponseInner]]: + """Get a future hourly interest rate (USER_DATA) + + Get user the next hourly estimate interest Weight(UID): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param assets: List of assets, separated by commas, up to 20 + :type assets: str + :param is_isolated: for isolated margin or not, \"TRUE\", \"FALSE\" + :type is_isolated: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_next_hourly_interest_rate_get_serialize( + timestamp=timestamp, + signature=signature, + assets=assets, + is_isolated=is_isolated, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginNextHourlyInterestRateGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_next_hourly_interest_rate_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + assets: Annotated[Optional[StrictStr], Field(description="List of assets, separated by commas, up to 20")] = None, + is_isolated: Annotated[Optional[StrictStr], Field(description="for isolated margin or not, \"TRUE\", \"FALSE\"")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a future hourly interest rate (USER_DATA) + + Get user the next hourly estimate interest Weight(UID): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param assets: List of assets, separated by commas, up to 20 + :type assets: str + :param is_isolated: for isolated margin or not, \"TRUE\", \"FALSE\" + :type is_isolated: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_next_hourly_interest_rate_get_serialize( + timestamp=timestamp, + signature=signature, + assets=assets, + is_isolated=is_isolated, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginNextHourlyInterestRateGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_next_hourly_interest_rate_get_serialize( + self, + timestamp, + signature, + assets, + is_isolated, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if assets is not None: + + _query_params.append(('assets', assets)) + + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/next-hourly-interest-rate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_open_order_list_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Mandatory for isolated margin, not supported for cross margin")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginOpenOrderListGet200ResponseInner]: + """Query Margin Account's Open OCO (USER_DATA) + + Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param symbol: Mandatory for isolated margin, not supported for cross margin + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_open_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginOpenOrderListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_open_order_list_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Mandatory for isolated margin, not supported for cross margin")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginOpenOrderListGet200ResponseInner]]: + """Query Margin Account's Open OCO (USER_DATA) + + Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param symbol: Mandatory for isolated margin, not supported for cross margin + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_open_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginOpenOrderListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_open_order_list_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Mandatory for isolated margin, not supported for cross margin")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Margin Account's Open OCO (USER_DATA) + + Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param symbol: Mandatory for isolated margin, not supported for cross margin + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_open_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginOpenOrderListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_open_order_list_get_serialize( + self, + timestamp, + signature, + is_isolated, + symbol, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/openOrderList', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_open_orders_delete( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginOpenOrdersDelete200ResponseInner]: + """Margin Account Cancel all Open Orders on a Symbol (TRADE) + + - Cancels all active orders on a symbol for margin account. - This includes OCO orders. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_open_orders_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginOpenOrdersDelete200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_open_orders_delete_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginOpenOrdersDelete200ResponseInner]]: + """Margin Account Cancel all Open Orders on a Symbol (TRADE) + + - Cancels all active orders on a symbol for margin account. - This includes OCO orders. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_open_orders_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginOpenOrdersDelete200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_open_orders_delete_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Margin Account Cancel all Open Orders on a Symbol (TRADE) + + - Cancels all active orders on a symbol for margin account. - This includes OCO orders. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_open_orders_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginOpenOrdersDelete200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_open_orders_delete_serialize( + self, + symbol, + timestamp, + signature, + is_isolated, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/sapi/v1/margin/openOrders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_open_orders_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[MarginOrderDetail]: + """Query Margin Account's Open Orders (USER_DATA) + + - If the `symbol` is not sent, orders for all symbols will be returned in an array. - When all symbols are returned, the number of requests counted against the rate limiter is equal to the number of symbols currently trading on the exchange - If isIsolated =\"TRUE\", symbol must be sent. Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + symbol=symbol, + is_isolated=is_isolated, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MarginOrderDetail]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_open_orders_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[MarginOrderDetail]]: + """Query Margin Account's Open Orders (USER_DATA) + + - If the `symbol` is not sent, orders for all symbols will be returned in an array. - When all symbols are returned, the number of requests counted against the rate limiter is equal to the number of symbols currently trading on the exchange - If isIsolated =\"TRUE\", symbol must be sent. Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + symbol=symbol, + is_isolated=is_isolated, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MarginOrderDetail]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_open_orders_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Margin Account's Open Orders (USER_DATA) + + - If the `symbol` is not sent, orders for all symbols will be returned in an array. - When all symbols are returned, the number of requests counted against the rate limiter is equal to the number of symbols currently trading on the exchange - If isIsolated =\"TRUE\", symbol must be sent. Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + symbol=symbol, + is_isolated=is_isolated, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MarginOrderDetail]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_open_orders_get_serialize( + self, + timestamp, + signature, + symbol, + is_isolated, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/openOrders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_order_delete( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MarginOrder: + """Margin Account Cancel Order (TRADE) + + Cancel an active order for margin account. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param order_id: Order id + :type order_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + order_id=order_id, + orig_client_order_id=orig_client_order_id, + new_client_order_id=new_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarginOrder", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_order_delete_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MarginOrder]: + """Margin Account Cancel Order (TRADE) + + Cancel an active order for margin account. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param order_id: Order id + :type order_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + order_id=order_id, + orig_client_order_id=orig_client_order_id, + new_client_order_id=new_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarginOrder", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_order_delete_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Margin Account Cancel Order (TRADE) + + Cancel an active order for margin account. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param order_id: Order id + :type order_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + order_id=order_id, + orig_client_order_id=orig_client_order_id, + new_client_order_id=new_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarginOrder", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_order_delete_serialize( + self, + symbol, + timestamp, + signature, + is_isolated, + order_id, + orig_client_order_id, + new_client_order_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if orig_client_order_id is not None: + + _query_params.append(('origClientOrderId', orig_client_order_id)) + + if new_client_order_id is not None: + + _query_params.append(('newClientOrderId', new_client_order_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/sapi/v1/margin/order', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_order_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MarginOrderDetail: + """Query Margin Account's Order (USER_DATA) + + - Either `orderId` or `origClientOrderId` must be sent. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param order_id: Order id + :type order_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + order_id=order_id, + orig_client_order_id=orig_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarginOrderDetail", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_order_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MarginOrderDetail]: + """Query Margin Account's Order (USER_DATA) + + - Either `orderId` or `origClientOrderId` must be sent. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param order_id: Order id + :type order_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + order_id=order_id, + orig_client_order_id=orig_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarginOrderDetail", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_order_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Margin Account's Order (USER_DATA) + + - Either `orderId` or `origClientOrderId` must be sent. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param order_id: Order id + :type order_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + order_id=order_id, + orig_client_order_id=orig_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarginOrderDetail", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_order_get_serialize( + self, + symbol, + timestamp, + signature, + is_isolated, + order_id, + orig_client_order_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if orig_client_order_id is not None: + + _query_params.append(('origClientOrderId', orig_client_order_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/order', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_order_list_delete( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + order_list_id: Annotated[Optional[StrictInt], Field(description="Order list id")] = None, + list_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the entire orderList")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MarginOcoOrder: + """Margin Account Cancel OCO (TRADE) + + Cancel an entire Order List for a margin account - Canceling an individual leg will cancel the entire OCO - Either `orderListId` or `listClientOrderId` must be provided Weight(UID): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param order_list_id: Order list id + :type order_list_id: int + :param list_client_order_id: A unique Id for the entire orderList + :type list_client_order_id: str + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_list_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + order_list_id=order_list_id, + list_client_order_id=list_client_order_id, + new_client_order_id=new_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarginOcoOrder", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_order_list_delete_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + order_list_id: Annotated[Optional[StrictInt], Field(description="Order list id")] = None, + list_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the entire orderList")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MarginOcoOrder]: + """Margin Account Cancel OCO (TRADE) + + Cancel an entire Order List for a margin account - Canceling an individual leg will cancel the entire OCO - Either `orderListId` or `listClientOrderId` must be provided Weight(UID): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param order_list_id: Order list id + :type order_list_id: int + :param list_client_order_id: A unique Id for the entire orderList + :type list_client_order_id: str + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_list_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + order_list_id=order_list_id, + list_client_order_id=list_client_order_id, + new_client_order_id=new_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarginOcoOrder", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_order_list_delete_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + order_list_id: Annotated[Optional[StrictInt], Field(description="Order list id")] = None, + list_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the entire orderList")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Margin Account Cancel OCO (TRADE) + + Cancel an entire Order List for a margin account - Canceling an individual leg will cancel the entire OCO - Either `orderListId` or `listClientOrderId` must be provided Weight(UID): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param order_list_id: Order list id + :type order_list_id: int + :param list_client_order_id: A unique Id for the entire orderList + :type list_client_order_id: str + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_list_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + order_list_id=order_list_id, + list_client_order_id=list_client_order_id, + new_client_order_id=new_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarginOcoOrder", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_order_list_delete_serialize( + self, + symbol, + timestamp, + signature, + is_isolated, + order_list_id, + list_client_order_id, + new_client_order_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if order_list_id is not None: + + _query_params.append(('orderListId', order_list_id)) + + if list_client_order_id is not None: + + _query_params.append(('listClientOrderId', list_client_order_id)) + + if new_client_order_id is not None: + + _query_params.append(('newClientOrderId', new_client_order_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/sapi/v1/margin/orderList', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_order_list_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Mandatory for isolated margin, not supported for cross margin")] = None, + order_list_id: Annotated[Optional[StrictInt], Field(description="Order list id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginOrderListGet200Response: + """Query Margin Account's OCO (USER_DATA) + + Retrieves a specific OCO based on provided optional parameters - Either `orderListId` or `origClientOrderId` must be provided Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param symbol: Mandatory for isolated margin, not supported for cross margin + :type symbol: str + :param order_list_id: Order list id + :type order_list_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + symbol=symbol, + order_list_id=order_list_id, + orig_client_order_id=orig_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginOrderListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_order_list_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Mandatory for isolated margin, not supported for cross margin")] = None, + order_list_id: Annotated[Optional[StrictInt], Field(description="Order list id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginOrderListGet200Response]: + """Query Margin Account's OCO (USER_DATA) + + Retrieves a specific OCO based on provided optional parameters - Either `orderListId` or `origClientOrderId` must be provided Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param symbol: Mandatory for isolated margin, not supported for cross margin + :type symbol: str + :param order_list_id: Order list id + :type order_list_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + symbol=symbol, + order_list_id=order_list_id, + orig_client_order_id=orig_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginOrderListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_order_list_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Mandatory for isolated margin, not supported for cross margin")] = None, + order_list_id: Annotated[Optional[StrictInt], Field(description="Order list id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Margin Account's OCO (USER_DATA) + + Retrieves a specific OCO based on provided optional parameters - Either `orderListId` or `origClientOrderId` must be provided Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param symbol: Mandatory for isolated margin, not supported for cross margin + :type symbol: str + :param order_list_id: Order list id + :type order_list_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + symbol=symbol, + order_list_id=order_list_id, + orig_client_order_id=orig_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginOrderListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_order_list_get_serialize( + self, + timestamp, + signature, + is_isolated, + symbol, + order_list_id, + orig_client_order_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if order_list_id is not None: + + _query_params.append(('orderListId', order_list_id)) + + if orig_client_order_id is not None: + + _query_params.append(('origClientOrderId', orig_client_order_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/orderList', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_order_oco_post( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Union[StrictFloat, StrictInt], + price: Annotated[Union[StrictFloat, StrictInt], Field(description="Order price")], + stop_price: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + list_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the entire orderList")] = None, + limit_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the limit order")] = None, + limit_iceberg_qty: Optional[Union[StrictFloat, StrictInt]] = None, + stop_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the stop loss/stop loss limit leg")] = None, + stop_limit_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="If provided, stopLimitTimeInForce is required.")] = None, + stop_iceberg_qty: Optional[Union[StrictFloat, StrictInt]] = None, + stop_limit_time_in_force: Optional[StrictStr] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON.")] = None, + side_effect_type: Annotated[Optional[StrictStr], Field(description="Default `NO_SIDE_EFFECT`")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginOrderOcoPost200Response: + """Margin Account New OCO (TRADE) + + Send in a new OCO for a margin account - Price Restrictions: - SELL: Limit Price > Last Price > Stop Price - BUY: Limit Price < Last Price < Stop Price - Quantity Restrictions: - Both legs must have the same quantity - ICEBERG quantities however do not have to be the same. - Order Rate Limit - OCO counts as 2 orders against the order rate limit. Weight(UID): 6 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: (required) + :type quantity: float + :param price: Order price (required) + :type price: float + :param stop_price: (required) + :type stop_price: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param list_client_order_id: A unique Id for the entire orderList + :type list_client_order_id: str + :param limit_client_order_id: A unique Id for the limit order + :type limit_client_order_id: str + :param limit_iceberg_qty: + :type limit_iceberg_qty: float + :param stop_client_order_id: A unique Id for the stop loss/stop loss limit leg + :type stop_client_order_id: str + :param stop_limit_price: If provided, stopLimitTimeInForce is required. + :type stop_limit_price: float + :param stop_iceberg_qty: + :type stop_iceberg_qty: float + :param stop_limit_time_in_force: + :type stop_limit_time_in_force: str + :param new_order_resp_type: Set the response JSON. + :type new_order_resp_type: str + :param side_effect_type: Default `NO_SIDE_EFFECT` + :type side_effect_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_oco_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + price=price, + stop_price=stop_price, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + list_client_order_id=list_client_order_id, + limit_client_order_id=limit_client_order_id, + limit_iceberg_qty=limit_iceberg_qty, + stop_client_order_id=stop_client_order_id, + stop_limit_price=stop_limit_price, + stop_iceberg_qty=stop_iceberg_qty, + stop_limit_time_in_force=stop_limit_time_in_force, + new_order_resp_type=new_order_resp_type, + side_effect_type=side_effect_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginOrderOcoPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_order_oco_post_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Union[StrictFloat, StrictInt], + price: Annotated[Union[StrictFloat, StrictInt], Field(description="Order price")], + stop_price: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + list_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the entire orderList")] = None, + limit_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the limit order")] = None, + limit_iceberg_qty: Optional[Union[StrictFloat, StrictInt]] = None, + stop_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the stop loss/stop loss limit leg")] = None, + stop_limit_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="If provided, stopLimitTimeInForce is required.")] = None, + stop_iceberg_qty: Optional[Union[StrictFloat, StrictInt]] = None, + stop_limit_time_in_force: Optional[StrictStr] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON.")] = None, + side_effect_type: Annotated[Optional[StrictStr], Field(description="Default `NO_SIDE_EFFECT`")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginOrderOcoPost200Response]: + """Margin Account New OCO (TRADE) + + Send in a new OCO for a margin account - Price Restrictions: - SELL: Limit Price > Last Price > Stop Price - BUY: Limit Price < Last Price < Stop Price - Quantity Restrictions: - Both legs must have the same quantity - ICEBERG quantities however do not have to be the same. - Order Rate Limit - OCO counts as 2 orders against the order rate limit. Weight(UID): 6 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: (required) + :type quantity: float + :param price: Order price (required) + :type price: float + :param stop_price: (required) + :type stop_price: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param list_client_order_id: A unique Id for the entire orderList + :type list_client_order_id: str + :param limit_client_order_id: A unique Id for the limit order + :type limit_client_order_id: str + :param limit_iceberg_qty: + :type limit_iceberg_qty: float + :param stop_client_order_id: A unique Id for the stop loss/stop loss limit leg + :type stop_client_order_id: str + :param stop_limit_price: If provided, stopLimitTimeInForce is required. + :type stop_limit_price: float + :param stop_iceberg_qty: + :type stop_iceberg_qty: float + :param stop_limit_time_in_force: + :type stop_limit_time_in_force: str + :param new_order_resp_type: Set the response JSON. + :type new_order_resp_type: str + :param side_effect_type: Default `NO_SIDE_EFFECT` + :type side_effect_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_oco_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + price=price, + stop_price=stop_price, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + list_client_order_id=list_client_order_id, + limit_client_order_id=limit_client_order_id, + limit_iceberg_qty=limit_iceberg_qty, + stop_client_order_id=stop_client_order_id, + stop_limit_price=stop_limit_price, + stop_iceberg_qty=stop_iceberg_qty, + stop_limit_time_in_force=stop_limit_time_in_force, + new_order_resp_type=new_order_resp_type, + side_effect_type=side_effect_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginOrderOcoPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_order_oco_post_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Union[StrictFloat, StrictInt], + price: Annotated[Union[StrictFloat, StrictInt], Field(description="Order price")], + stop_price: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + list_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the entire orderList")] = None, + limit_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the limit order")] = None, + limit_iceberg_qty: Optional[Union[StrictFloat, StrictInt]] = None, + stop_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the stop loss/stop loss limit leg")] = None, + stop_limit_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="If provided, stopLimitTimeInForce is required.")] = None, + stop_iceberg_qty: Optional[Union[StrictFloat, StrictInt]] = None, + stop_limit_time_in_force: Optional[StrictStr] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON.")] = None, + side_effect_type: Annotated[Optional[StrictStr], Field(description="Default `NO_SIDE_EFFECT`")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Margin Account New OCO (TRADE) + + Send in a new OCO for a margin account - Price Restrictions: - SELL: Limit Price > Last Price > Stop Price - BUY: Limit Price < Last Price < Stop Price - Quantity Restrictions: - Both legs must have the same quantity - ICEBERG quantities however do not have to be the same. - Order Rate Limit - OCO counts as 2 orders against the order rate limit. Weight(UID): 6 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: (required) + :type quantity: float + :param price: Order price (required) + :type price: float + :param stop_price: (required) + :type stop_price: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param list_client_order_id: A unique Id for the entire orderList + :type list_client_order_id: str + :param limit_client_order_id: A unique Id for the limit order + :type limit_client_order_id: str + :param limit_iceberg_qty: + :type limit_iceberg_qty: float + :param stop_client_order_id: A unique Id for the stop loss/stop loss limit leg + :type stop_client_order_id: str + :param stop_limit_price: If provided, stopLimitTimeInForce is required. + :type stop_limit_price: float + :param stop_iceberg_qty: + :type stop_iceberg_qty: float + :param stop_limit_time_in_force: + :type stop_limit_time_in_force: str + :param new_order_resp_type: Set the response JSON. + :type new_order_resp_type: str + :param side_effect_type: Default `NO_SIDE_EFFECT` + :type side_effect_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_oco_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + price=price, + stop_price=stop_price, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + list_client_order_id=list_client_order_id, + limit_client_order_id=limit_client_order_id, + limit_iceberg_qty=limit_iceberg_qty, + stop_client_order_id=stop_client_order_id, + stop_limit_price=stop_limit_price, + stop_iceberg_qty=stop_iceberg_qty, + stop_limit_time_in_force=stop_limit_time_in_force, + new_order_resp_type=new_order_resp_type, + side_effect_type=side_effect_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginOrderOcoPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_order_oco_post_serialize( + self, + symbol, + side, + quantity, + price, + stop_price, + timestamp, + signature, + is_isolated, + list_client_order_id, + limit_client_order_id, + limit_iceberg_qty, + stop_client_order_id, + stop_limit_price, + stop_iceberg_qty, + stop_limit_time_in_force, + new_order_resp_type, + side_effect_type, + self_trade_prevention_mode, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if list_client_order_id is not None: + + _query_params.append(('listClientOrderId', list_client_order_id)) + + if side is not None: + + _query_params.append(('side', side)) + + if quantity is not None: + + _query_params.append(('quantity', quantity)) + + if limit_client_order_id is not None: + + _query_params.append(('limitClientOrderId', limit_client_order_id)) + + if price is not None: + + _query_params.append(('price', price)) + + if limit_iceberg_qty is not None: + + _query_params.append(('limitIcebergQty', limit_iceberg_qty)) + + if stop_client_order_id is not None: + + _query_params.append(('stopClientOrderId', stop_client_order_id)) + + if stop_price is not None: + + _query_params.append(('stopPrice', stop_price)) + + if stop_limit_price is not None: + + _query_params.append(('stopLimitPrice', stop_limit_price)) + + if stop_iceberg_qty is not None: + + _query_params.append(('stopIcebergQty', stop_iceberg_qty)) + + if stop_limit_time_in_force is not None: + + _query_params.append(('stopLimitTimeInForce', stop_limit_time_in_force)) + + if new_order_resp_type is not None: + + _query_params.append(('newOrderRespType', new_order_resp_type)) + + if side_effect_type is not None: + + _query_params.append(('sideEffectType', side_effect_type)) + + if self_trade_prevention_mode is not None: + + _query_params.append(('selfTradePreventionMode', self_trade_prevention_mode)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/margin/order/oco', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_order_post( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + quantity: Union[StrictFloat, StrictInt], + auto_repay_at_cancel: StrictBool, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + quote_order_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote quantity")] = None, + price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order price")] = None, + stop_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON.")] = None, + side_effect_type: Annotated[Optional[StrictStr], Field(description="Default `NO_SIDE_EFFECT`")] = None, + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginOrderPost200Response: + """Margin Account New Order (TRADE) + + Post a new order for margin account. Weight(UID): 6 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param quantity: (required) + :type quantity: float + :param auto_repay_at_cancel: (required) + :type auto_repay_at_cancel: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param quote_order_qty: Quote quantity + :type quote_order_qty: float + :param price: Order price + :type price: float + :param stop_price: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type stop_price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. + :type new_order_resp_type: str + :param side_effect_type: Default `NO_SIDE_EFFECT` + :type side_effect_type: str + :param time_in_force: Order time in force + :type time_in_force: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_post_serialize( + symbol=symbol, + side=side, + type=type, + quantity=quantity, + auto_repay_at_cancel=auto_repay_at_cancel, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + quote_order_qty=quote_order_qty, + price=price, + stop_price=stop_price, + new_client_order_id=new_client_order_id, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + side_effect_type=side_effect_type, + time_in_force=time_in_force, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginOrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_order_post_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + quantity: Union[StrictFloat, StrictInt], + auto_repay_at_cancel: StrictBool, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + quote_order_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote quantity")] = None, + price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order price")] = None, + stop_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON.")] = None, + side_effect_type: Annotated[Optional[StrictStr], Field(description="Default `NO_SIDE_EFFECT`")] = None, + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginOrderPost200Response]: + """Margin Account New Order (TRADE) + + Post a new order for margin account. Weight(UID): 6 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param quantity: (required) + :type quantity: float + :param auto_repay_at_cancel: (required) + :type auto_repay_at_cancel: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param quote_order_qty: Quote quantity + :type quote_order_qty: float + :param price: Order price + :type price: float + :param stop_price: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type stop_price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. + :type new_order_resp_type: str + :param side_effect_type: Default `NO_SIDE_EFFECT` + :type side_effect_type: str + :param time_in_force: Order time in force + :type time_in_force: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_post_serialize( + symbol=symbol, + side=side, + type=type, + quantity=quantity, + auto_repay_at_cancel=auto_repay_at_cancel, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + quote_order_qty=quote_order_qty, + price=price, + stop_price=stop_price, + new_client_order_id=new_client_order_id, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + side_effect_type=side_effect_type, + time_in_force=time_in_force, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginOrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_order_post_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + quantity: Union[StrictFloat, StrictInt], + auto_repay_at_cancel: StrictBool, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + quote_order_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote quantity")] = None, + price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order price")] = None, + stop_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON.")] = None, + side_effect_type: Annotated[Optional[StrictStr], Field(description="Default `NO_SIDE_EFFECT`")] = None, + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Margin Account New Order (TRADE) + + Post a new order for margin account. Weight(UID): 6 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param quantity: (required) + :type quantity: float + :param auto_repay_at_cancel: (required) + :type auto_repay_at_cancel: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param quote_order_qty: Quote quantity + :type quote_order_qty: float + :param price: Order price + :type price: float + :param stop_price: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type stop_price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. + :type new_order_resp_type: str + :param side_effect_type: Default `NO_SIDE_EFFECT` + :type side_effect_type: str + :param time_in_force: Order time in force + :type time_in_force: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_order_post_serialize( + symbol=symbol, + side=side, + type=type, + quantity=quantity, + auto_repay_at_cancel=auto_repay_at_cancel, + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + quote_order_qty=quote_order_qty, + price=price, + stop_price=stop_price, + new_client_order_id=new_client_order_id, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + side_effect_type=side_effect_type, + time_in_force=time_in_force, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginOrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_order_post_serialize( + self, + symbol, + side, + type, + quantity, + auto_repay_at_cancel, + timestamp, + signature, + is_isolated, + quote_order_qty, + price, + stop_price, + new_client_order_id, + iceberg_qty, + new_order_resp_type, + side_effect_type, + time_in_force, + self_trade_prevention_mode, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if side is not None: + + _query_params.append(('side', side)) + + if type is not None: + + _query_params.append(('type', type)) + + if quantity is not None: + + _query_params.append(('quantity', quantity)) + + if quote_order_qty is not None: + + _query_params.append(('quoteOrderQty', quote_order_qty)) + + if price is not None: + + _query_params.append(('price', price)) + + if stop_price is not None: + + _query_params.append(('stopPrice', stop_price)) + + if new_client_order_id is not None: + + _query_params.append(('newClientOrderId', new_client_order_id)) + + if iceberg_qty is not None: + + _query_params.append(('icebergQty', iceberg_qty)) + + if new_order_resp_type is not None: + + _query_params.append(('newOrderRespType', new_order_resp_type)) + + if side_effect_type is not None: + + _query_params.append(('sideEffectType', side_effect_type)) + + if time_in_force is not None: + + _query_params.append(('timeInForce', time_in_force)) + + if auto_repay_at_cancel is not None: + + _query_params.append(('autoRepayAtCancel', auto_repay_at_cancel)) + + if self_trade_prevention_mode is not None: + + _query_params.append(('selfTradePreventionMode', self_trade_prevention_mode)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/margin/order', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_price_index_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginPriceIndexGet200Response: + """Query Margin PriceIndex (MARKET_DATA) + + Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_price_index_get_serialize( + symbol=symbol, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginPriceIndexGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_price_index_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginPriceIndexGet200Response]: + """Query Margin PriceIndex (MARKET_DATA) + + Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_price_index_get_serialize( + symbol=symbol, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginPriceIndexGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_price_index_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Margin PriceIndex (MARKET_DATA) + + Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_price_index_get_serialize( + symbol=symbol, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginPriceIndexGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_price_index_get_serialize( + self, + symbol, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/priceIndex', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_rate_limit_order_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="isolated symbol, mandatory for isolated margin")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1MarginRateLimitOrderGet200ResponseInner]: + """Query Current Margin Order Count Usage (TRADE) + + Displays the user's current margin order count usage for all intervals. Weight(IP): 20 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param symbol: isolated symbol, mandatory for isolated margin + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_rate_limit_order_get_serialize( + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginRateLimitOrderGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_rate_limit_order_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="isolated symbol, mandatory for isolated margin")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1MarginRateLimitOrderGet200ResponseInner]]: + """Query Current Margin Order Count Usage (TRADE) + + Displays the user's current margin order count usage for all intervals. Weight(IP): 20 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param symbol: isolated symbol, mandatory for isolated margin + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_rate_limit_order_get_serialize( + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginRateLimitOrderGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_rate_limit_order_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + is_isolated: Annotated[Optional[StrictStr], Field(description="* `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin")] = None, + symbol: Annotated[Optional[StrictStr], Field(description="isolated symbol, mandatory for isolated margin")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Current Margin Order Count Usage (TRADE) + + Displays the user's current margin order count usage for all intervals. Weight(IP): 20 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param is_isolated: * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin + :type is_isolated: str + :param symbol: isolated symbol, mandatory for isolated margin + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_rate_limit_order_get_serialize( + timestamp=timestamp, + signature=signature, + is_isolated=is_isolated, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1MarginRateLimitOrderGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_rate_limit_order_get_serialize( + self, + timestamp, + signature, + is_isolated, + symbol, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if is_isolated is not None: + + _query_params.append(('isIsolated', is_isolated)) + + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/rateLimit/order', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_trade_coeff_get( + self, + email: Annotated[StrictStr, Field(description="Email Address")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginTradeCoeffGet200Response: + """Get Summary of Margin account (USER_DATA) + + Get personal margin level information Weight(IP): 10 + + :param email: Email Address (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_trade_coeff_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginTradeCoeffGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_trade_coeff_get_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Email Address")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginTradeCoeffGet200Response]: + """Get Summary of Margin account (USER_DATA) + + Get personal margin level information Weight(IP): 10 + + :param email: Email Address (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_trade_coeff_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginTradeCoeffGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_trade_coeff_get_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Email Address")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Summary of Margin account (USER_DATA) + + Get personal margin level information Weight(IP): 10 + + :param email: Email Address (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_trade_coeff_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginTradeCoeffGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_trade_coeff_get_serialize( + self, + email, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/tradeCoeff', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_margin_transfer_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + type: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginTransferGet200Response: + """Get Cross Margin Transfer History (USER_DATA) + + - Response in descending order - Returns data for last 7 days by default - Set `archived` to `true` to query data from 6 months ago Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param type: + :type type: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_transfer_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + type=type, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + isolated_symbol=isolated_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginTransferGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_margin_transfer_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + type: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginTransferGet200Response]: + """Get Cross Margin Transfer History (USER_DATA) + + - Response in descending order - Returns data for last 7 days by default - Set `archived` to `true` to query data from 6 months ago Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param type: + :type type: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_transfer_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + type=type, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + isolated_symbol=isolated_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginTransferGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_margin_transfer_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + type: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + isolated_symbol: Annotated[Optional[StrictStr], Field(description="Isolated symbol")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Cross Margin Transfer History (USER_DATA) + + - Response in descending order - Returns data for last 7 days by default - Set `archived` to `true` to query data from 6 months ago Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param type: + :type type: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param isolated_symbol: Isolated symbol + :type isolated_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_margin_transfer_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + type=type, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + isolated_symbol=isolated_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginTransferGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_margin_transfer_get_serialize( + self, + timestamp, + signature, + asset, + type, + start_time, + end_time, + current, + size, + isolated_symbol, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if type is not None: + + _query_params.append(('type', type)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if isolated_symbol is not None: + + _query_params.append(('isolatedSymbol', isolated_symbol)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/margin/transfer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/margin_stream_api.py b/target/python/binance_openapi/openapi_client/api/margin_stream_api.py new file mode 100644 index 0000000..ef2c832 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/margin_stream_api.py @@ -0,0 +1,811 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Any, Dict, Optional +from typing_extensions import Annotated +from openapi_client.models.api_v3_user_data_stream_post200_response import ApiV3UserDataStreamPost200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class MarginStreamApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_user_data_stream_delete( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Close a ListenKey (USER_STREAM) + + Close out a user data stream. Weight: 1 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_delete_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_user_data_stream_delete_with_http_info( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Close a ListenKey (USER_STREAM) + + Close out a user data stream. Weight: 1 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_delete_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_user_data_stream_delete_without_preload_content( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Close a ListenKey (USER_STREAM) + + Close out a user data stream. Weight: 1 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_delete_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_user_data_stream_delete_serialize( + self, + listen_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if listen_key is not None: + + _query_params.append(('listenKey', listen_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/sapi/v1/userDataStream', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_user_data_stream_post( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3UserDataStreamPost200Response: + """Create a ListenKey (USER_STREAM) + + Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3UserDataStreamPost200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_user_data_stream_post_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3UserDataStreamPost200Response]: + """Create a ListenKey (USER_STREAM) + + Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3UserDataStreamPost200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_user_data_stream_post_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a ListenKey (USER_STREAM) + + Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3UserDataStreamPost200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_user_data_stream_post_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/userDataStream', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_user_data_stream_put( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Ping/Keep-alive a ListenKey (USER_STREAM) + + Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 1 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_put_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_user_data_stream_put_with_http_info( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Ping/Keep-alive a ListenKey (USER_STREAM) + + Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 1 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_put_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_user_data_stream_put_without_preload_content( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Ping/Keep-alive a ListenKey (USER_STREAM) + + Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 1 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_user_data_stream_put_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_user_data_stream_put_serialize( + self, + listen_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if listen_key is not None: + + _query_params.append(('listenKey', listen_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/sapi/v1/userDataStream', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/market_api.py b/target/python/binance_openapi/openapi_client/api/market_api.py new file mode 100644 index 0000000..fb95cd2 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/market_api.py @@ -0,0 +1,4462 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import Any, Dict, List, Optional +from typing_extensions import Annotated +from openapi_client.models.agg_trade import AggTrade +from openapi_client.models.api_v3_avg_price_get200_response import ApiV3AvgPriceGet200Response +from openapi_client.models.api_v3_depth_get200_response import ApiV3DepthGet200Response +from openapi_client.models.api_v3_exchange_info_get200_response import ApiV3ExchangeInfoGet200Response +from openapi_client.models.api_v3_klines_get200_response_inner_inner import ApiV3KlinesGet200ResponseInnerInner +from openapi_client.models.api_v3_ticker24hr_get200_response import ApiV3Ticker24hrGet200Response +from openapi_client.models.api_v3_ticker_book_ticker_get200_response import ApiV3TickerBookTickerGet200Response +from openapi_client.models.api_v3_ticker_get200_response import ApiV3TickerGet200Response +from openapi_client.models.api_v3_ticker_price_get200_response import ApiV3TickerPriceGet200Response +from openapi_client.models.api_v3_ticker_trading_day_get200_response import ApiV3TickerTradingDayGet200Response +from openapi_client.models.api_v3_time_get200_response import ApiV3TimeGet200Response +from openapi_client.models.trade import Trade + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class MarketApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def api_v3_agg_trades_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[AggTrade]: + """Compressed/Aggregate Trades List + + Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated. - If `fromId`, `startTime`, and `endTime` are not sent, the most recent aggregate trades will be returned. - Note that if a trade has the following values, this was a duplicate aggregate trade and marked as invalid: p = '0' // price q = '0' // qty f = -1 // first_trade_id l = -1 // last_trade_id Weight(IP): 2 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_agg_trades_get_serialize( + symbol=symbol, + from_id=from_id, + start_time=start_time, + end_time=end_time, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AggTrade]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_agg_trades_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[AggTrade]]: + """Compressed/Aggregate Trades List + + Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated. - If `fromId`, `startTime`, and `endTime` are not sent, the most recent aggregate trades will be returned. - Note that if a trade has the following values, this was a duplicate aggregate trade and marked as invalid: p = '0' // price q = '0' // qty f = -1 // first_trade_id l = -1 // last_trade_id Weight(IP): 2 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_agg_trades_get_serialize( + symbol=symbol, + from_id=from_id, + start_time=start_time, + end_time=end_time, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AggTrade]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_agg_trades_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Compressed/Aggregate Trades List + + Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated. - If `fromId`, `startTime`, and `endTime` are not sent, the most recent aggregate trades will be returned. - Note that if a trade has the following values, this was a duplicate aggregate trade and marked as invalid: p = '0' // price q = '0' // qty f = -1 // first_trade_id l = -1 // last_trade_id Weight(IP): 2 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_agg_trades_get_serialize( + symbol=symbol, + from_id=from_id, + start_time=start_time, + end_time=end_time, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AggTrade]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_agg_trades_get_serialize( + self, + symbol, + from_id, + start_time, + end_time, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if from_id is not None: + + _query_params.append(('fromId', from_id)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/aggTrades', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_avg_price_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3AvgPriceGet200Response: + """Current Average Price + + Current average price for a symbol. Weight(IP): 2 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_avg_price_get_serialize( + symbol=symbol, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3AvgPriceGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_avg_price_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3AvgPriceGet200Response]: + """Current Average Price + + Current average price for a symbol. Weight(IP): 2 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_avg_price_get_serialize( + symbol=symbol, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3AvgPriceGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_avg_price_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Current Average Price + + Current average price for a symbol. Weight(IP): 2 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_avg_price_get_serialize( + symbol=symbol, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3AvgPriceGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_avg_price_get_serialize( + self, + symbol, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/avgPrice', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_depth_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + limit: Annotated[Optional[Annotated[int, Field(le=5000, strict=True)]], Field(description="If limit > 5000, then the response will truncate to 5000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3DepthGet200Response: + """Order Book + + | Limit | Weight(IP) | |---------------------|-------------| | 1-100 | 5 | | 101-500 | 25 | | 501-1000 | 50 | | 1001-5000 | 250 | + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param limit: If limit > 5000, then the response will truncate to 5000 + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_depth_get_serialize( + symbol=symbol, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3DepthGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_depth_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + limit: Annotated[Optional[Annotated[int, Field(le=5000, strict=True)]], Field(description="If limit > 5000, then the response will truncate to 5000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3DepthGet200Response]: + """Order Book + + | Limit | Weight(IP) | |---------------------|-------------| | 1-100 | 5 | | 101-500 | 25 | | 501-1000 | 50 | | 1001-5000 | 250 | + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param limit: If limit > 5000, then the response will truncate to 5000 + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_depth_get_serialize( + symbol=symbol, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3DepthGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_depth_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + limit: Annotated[Optional[Annotated[int, Field(le=5000, strict=True)]], Field(description="If limit > 5000, then the response will truncate to 5000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Order Book + + | Limit | Weight(IP) | |---------------------|-------------| | 1-100 | 5 | | 101-500 | 25 | | 501-1000 | 50 | | 1001-5000 | 250 | + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param limit: If limit > 5000, then the response will truncate to 5000 + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_depth_get_serialize( + symbol=symbol, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3DepthGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_depth_get_serialize( + self, + symbol, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/depth', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_exchange_info_get( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + permissions: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3ExchangeInfoGet200Response: + """Exchange Information + + Current exchange trading rules and symbol information - If any symbol provided in either symbol or symbols do not exist, the endpoint will throw an error. - All parameters are optional. - permissions can support single or multiple values (e.g. SPOT, [\"MARGIN\",\"LEVERAGED\"]) - If permissions parameter not provided, the default values will be [\"SPOT\",\"MARGIN\",\"LEVERAGED\"]. - To display all permissions you need to specify them explicitly. (e.g. SPOT, MARGIN,...) Examples of Symbol Permissions Interpretation from the Response: - [[\"A\",\"B\"]] means you may place an order if your account has either permission \"A\" or permission \"B\". - [[\"A\"],[\"B\"]] means you can place an order if your account has permission \"A\" and permission \"B\". - [[\"A\"],[\"B\",\"C\"]] means you can place an order if your account has permission \"A\" and permission \"B\" or permission \"C\". (Inclusive or is applied here, not exclusive or, so your account may have both permission \"B\" and permission \"C\".) Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param permissions: + :type permissions: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_exchange_info_get_serialize( + symbol=symbol, + symbols=symbols, + permissions=permissions, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3ExchangeInfoGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_exchange_info_get_with_http_info( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + permissions: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3ExchangeInfoGet200Response]: + """Exchange Information + + Current exchange trading rules and symbol information - If any symbol provided in either symbol or symbols do not exist, the endpoint will throw an error. - All parameters are optional. - permissions can support single or multiple values (e.g. SPOT, [\"MARGIN\",\"LEVERAGED\"]) - If permissions parameter not provided, the default values will be [\"SPOT\",\"MARGIN\",\"LEVERAGED\"]. - To display all permissions you need to specify them explicitly. (e.g. SPOT, MARGIN,...) Examples of Symbol Permissions Interpretation from the Response: - [[\"A\",\"B\"]] means you may place an order if your account has either permission \"A\" or permission \"B\". - [[\"A\"],[\"B\"]] means you can place an order if your account has permission \"A\" and permission \"B\". - [[\"A\"],[\"B\",\"C\"]] means you can place an order if your account has permission \"A\" and permission \"B\" or permission \"C\". (Inclusive or is applied here, not exclusive or, so your account may have both permission \"B\" and permission \"C\".) Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param permissions: + :type permissions: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_exchange_info_get_serialize( + symbol=symbol, + symbols=symbols, + permissions=permissions, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3ExchangeInfoGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_exchange_info_get_without_preload_content( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + permissions: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Exchange Information + + Current exchange trading rules and symbol information - If any symbol provided in either symbol or symbols do not exist, the endpoint will throw an error. - All parameters are optional. - permissions can support single or multiple values (e.g. SPOT, [\"MARGIN\",\"LEVERAGED\"]) - If permissions parameter not provided, the default values will be [\"SPOT\",\"MARGIN\",\"LEVERAGED\"]. - To display all permissions you need to specify them explicitly. (e.g. SPOT, MARGIN,...) Examples of Symbol Permissions Interpretation from the Response: - [[\"A\",\"B\"]] means you may place an order if your account has either permission \"A\" or permission \"B\". - [[\"A\"],[\"B\"]] means you can place an order if your account has permission \"A\" and permission \"B\". - [[\"A\"],[\"B\",\"C\"]] means you can place an order if your account has permission \"A\" and permission \"B\" or permission \"C\". (Inclusive or is applied here, not exclusive or, so your account may have both permission \"B\" and permission \"C\".) Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param permissions: + :type permissions: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_exchange_info_get_serialize( + symbol=symbol, + symbols=symbols, + permissions=permissions, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3ExchangeInfoGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_exchange_info_get_serialize( + self, + symbol, + symbols, + permissions, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if symbols is not None: + + _query_params.append(('symbols', symbols)) + + if permissions is not None: + + _query_params.append(('permissions', permissions)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/exchangeInfo', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_historical_trades_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[Trade]: + """Old Trade Lookup + + Get older market trades. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param limit: Default 500; max 1000. + :type limit: int + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_historical_trades_get_serialize( + symbol=symbol, + limit=limit, + from_id=from_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Trade]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_historical_trades_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[Trade]]: + """Old Trade Lookup + + Get older market trades. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param limit: Default 500; max 1000. + :type limit: int + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_historical_trades_get_serialize( + symbol=symbol, + limit=limit, + from_id=from_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Trade]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_historical_trades_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Old Trade Lookup + + Get older market trades. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param limit: Default 500; max 1000. + :type limit: int + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_historical_trades_get_serialize( + symbol=symbol, + limit=limit, + from_id=from_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Trade]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_historical_trades_get_serialize( + self, + symbol, + limit, + from_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if from_id is not None: + + _query_params.append(('fromId', from_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/historicalTrades', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_klines_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + interval: Annotated[StrictStr, Field(description="kline intervals")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + time_zone: Annotated[Optional[StrictStr], Field(description="Default: 0 (UTC)")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[List[ApiV3KlinesGet200ResponseInnerInner]]: + """Kline/Candlestick Data + + Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. - If `startTime` and `endTime` are not sent, the most recent klines are returned. Weight(IP): 2 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param interval: kline intervals (required) + :type interval: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param time_zone: Default: 0 (UTC) + :type time_zone: str + :param limit: Default 500; max 1000. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_klines_get_serialize( + symbol=symbol, + interval=interval, + start_time=start_time, + end_time=end_time, + time_zone=time_zone, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[List[ApiV3KlinesGet200ResponseInnerInner]]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_klines_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + interval: Annotated[StrictStr, Field(description="kline intervals")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + time_zone: Annotated[Optional[StrictStr], Field(description="Default: 0 (UTC)")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[List[ApiV3KlinesGet200ResponseInnerInner]]]: + """Kline/Candlestick Data + + Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. - If `startTime` and `endTime` are not sent, the most recent klines are returned. Weight(IP): 2 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param interval: kline intervals (required) + :type interval: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param time_zone: Default: 0 (UTC) + :type time_zone: str + :param limit: Default 500; max 1000. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_klines_get_serialize( + symbol=symbol, + interval=interval, + start_time=start_time, + end_time=end_time, + time_zone=time_zone, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[List[ApiV3KlinesGet200ResponseInnerInner]]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_klines_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + interval: Annotated[StrictStr, Field(description="kline intervals")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + time_zone: Annotated[Optional[StrictStr], Field(description="Default: 0 (UTC)")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Kline/Candlestick Data + + Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. - If `startTime` and `endTime` are not sent, the most recent klines are returned. Weight(IP): 2 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param interval: kline intervals (required) + :type interval: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param time_zone: Default: 0 (UTC) + :type time_zone: str + :param limit: Default 500; max 1000. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_klines_get_serialize( + symbol=symbol, + interval=interval, + start_time=start_time, + end_time=end_time, + time_zone=time_zone, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[List[ApiV3KlinesGet200ResponseInnerInner]]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_klines_get_serialize( + self, + symbol, + interval, + start_time, + end_time, + time_zone, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if interval is not None: + + _query_params.append(('interval', interval)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if time_zone is not None: + + _query_params.append(('timeZone', time_zone)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/klines', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_ping_get( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Test Connectivity + + Test connectivity to the Rest API. Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ping_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_ping_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Test Connectivity + + Test connectivity to the Rest API. Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ping_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_ping_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Test Connectivity + + Test connectivity to the Rest API. Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ping_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_ping_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/ping', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_ticker24hr_get( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + type: Annotated[Optional[StrictStr], Field(description="Supported values: FULL or MINI. If none provided, the default is FULL")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3Ticker24hrGet200Response: + """24hr Ticker Price Change Statistics + + 24 hour rolling window price change statistics. Careful when accessing this with no symbol. - If the symbol is not sent, tickers for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `80` when the symbol parameter is omitted; + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param type: Supported values: FULL or MINI. If none provided, the default is FULL + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker24hr_get_serialize( + symbol=symbol, + symbols=symbols, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3Ticker24hrGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_ticker24hr_get_with_http_info( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + type: Annotated[Optional[StrictStr], Field(description="Supported values: FULL or MINI. If none provided, the default is FULL")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3Ticker24hrGet200Response]: + """24hr Ticker Price Change Statistics + + 24 hour rolling window price change statistics. Careful when accessing this with no symbol. - If the symbol is not sent, tickers for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `80` when the symbol parameter is omitted; + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param type: Supported values: FULL or MINI. If none provided, the default is FULL + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker24hr_get_serialize( + symbol=symbol, + symbols=symbols, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3Ticker24hrGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_ticker24hr_get_without_preload_content( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + type: Annotated[Optional[StrictStr], Field(description="Supported values: FULL or MINI. If none provided, the default is FULL")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """24hr Ticker Price Change Statistics + + 24 hour rolling window price change statistics. Careful when accessing this with no symbol. - If the symbol is not sent, tickers for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `80` when the symbol parameter is omitted; + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param type: Supported values: FULL or MINI. If none provided, the default is FULL + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker24hr_get_serialize( + symbol=symbol, + symbols=symbols, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3Ticker24hrGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_ticker24hr_get_serialize( + self, + symbol, + symbols, + type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if symbols is not None: + + _query_params.append(('symbols', symbols)) + + if type is not None: + + _query_params.append(('type', type)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/ticker/24hr', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_ticker_book_ticker_get( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3TickerBookTickerGet200Response: + """Symbol Order Book Ticker + + Best price/qty on the order book for a symbol or symbols. - If the symbol is not sent, bookTickers for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `4` when the symbol parameter is omitted; + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker_book_ticker_get_serialize( + symbol=symbol, + symbols=symbols, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TickerBookTickerGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_ticker_book_ticker_get_with_http_info( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3TickerBookTickerGet200Response]: + """Symbol Order Book Ticker + + Best price/qty on the order book for a symbol or symbols. - If the symbol is not sent, bookTickers for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `4` when the symbol parameter is omitted; + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker_book_ticker_get_serialize( + symbol=symbol, + symbols=symbols, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TickerBookTickerGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_ticker_book_ticker_get_without_preload_content( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Symbol Order Book Ticker + + Best price/qty on the order book for a symbol or symbols. - If the symbol is not sent, bookTickers for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `4` when the symbol parameter is omitted; + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker_book_ticker_get_serialize( + symbol=symbol, + symbols=symbols, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TickerBookTickerGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_ticker_book_ticker_get_serialize( + self, + symbol, + symbols, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if symbols is not None: + + _query_params.append(('symbols', symbols)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/ticker/bookTicker', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_ticker_get( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + window_size: Annotated[Optional[StrictStr], Field(description="Defaults to 1d if no parameter provided. Supported windowSize values: 1m,2m....59m for minutes 1h, 2h....23h - for hours 1d...7d - for days. Units cannot be combined (e.g. 1d2h is not allowed)")] = None, + type: Annotated[Optional[StrictStr], Field(description="Supported values: FULL or MINI. If none provided, the default is FULL")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3TickerGet200Response: + """Rolling window price change statistics + + The window used to compute statistics is typically slightly wider than requested windowSize. openTime for /api/v3/ticker always starts on a minute, while the closeTime is the current time of the request. As such, the effective window might be up to 1 minute wider than requested. E.g. If the closeTime is 1641287867099 (January 04, 2022 09:17:47:099 UTC) , and the windowSize is 1d. the openTime will be: 1641201420000 (January 3, 2022, 09:17:00 UTC) Weight(IP): 4 for each requested symbol regardless of windowSize. The weight for this request will cap at 200 once the number of symbols in the request is more than 50. + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param window_size: Defaults to 1d if no parameter provided. Supported windowSize values: 1m,2m....59m for minutes 1h, 2h....23h - for hours 1d...7d - for days. Units cannot be combined (e.g. 1d2h is not allowed) + :type window_size: str + :param type: Supported values: FULL or MINI. If none provided, the default is FULL + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker_get_serialize( + symbol=symbol, + symbols=symbols, + window_size=window_size, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TickerGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_ticker_get_with_http_info( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + window_size: Annotated[Optional[StrictStr], Field(description="Defaults to 1d if no parameter provided. Supported windowSize values: 1m,2m....59m for minutes 1h, 2h....23h - for hours 1d...7d - for days. Units cannot be combined (e.g. 1d2h is not allowed)")] = None, + type: Annotated[Optional[StrictStr], Field(description="Supported values: FULL or MINI. If none provided, the default is FULL")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3TickerGet200Response]: + """Rolling window price change statistics + + The window used to compute statistics is typically slightly wider than requested windowSize. openTime for /api/v3/ticker always starts on a minute, while the closeTime is the current time of the request. As such, the effective window might be up to 1 minute wider than requested. E.g. If the closeTime is 1641287867099 (January 04, 2022 09:17:47:099 UTC) , and the windowSize is 1d. the openTime will be: 1641201420000 (January 3, 2022, 09:17:00 UTC) Weight(IP): 4 for each requested symbol regardless of windowSize. The weight for this request will cap at 200 once the number of symbols in the request is more than 50. + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param window_size: Defaults to 1d if no parameter provided. Supported windowSize values: 1m,2m....59m for minutes 1h, 2h....23h - for hours 1d...7d - for days. Units cannot be combined (e.g. 1d2h is not allowed) + :type window_size: str + :param type: Supported values: FULL or MINI. If none provided, the default is FULL + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker_get_serialize( + symbol=symbol, + symbols=symbols, + window_size=window_size, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TickerGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_ticker_get_without_preload_content( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + window_size: Annotated[Optional[StrictStr], Field(description="Defaults to 1d if no parameter provided. Supported windowSize values: 1m,2m....59m for minutes 1h, 2h....23h - for hours 1d...7d - for days. Units cannot be combined (e.g. 1d2h is not allowed)")] = None, + type: Annotated[Optional[StrictStr], Field(description="Supported values: FULL or MINI. If none provided, the default is FULL")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Rolling window price change statistics + + The window used to compute statistics is typically slightly wider than requested windowSize. openTime for /api/v3/ticker always starts on a minute, while the closeTime is the current time of the request. As such, the effective window might be up to 1 minute wider than requested. E.g. If the closeTime is 1641287867099 (January 04, 2022 09:17:47:099 UTC) , and the windowSize is 1d. the openTime will be: 1641201420000 (January 3, 2022, 09:17:00 UTC) Weight(IP): 4 for each requested symbol regardless of windowSize. The weight for this request will cap at 200 once the number of symbols in the request is more than 50. + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param window_size: Defaults to 1d if no parameter provided. Supported windowSize values: 1m,2m....59m for minutes 1h, 2h....23h - for hours 1d...7d - for days. Units cannot be combined (e.g. 1d2h is not allowed) + :type window_size: str + :param type: Supported values: FULL or MINI. If none provided, the default is FULL + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker_get_serialize( + symbol=symbol, + symbols=symbols, + window_size=window_size, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TickerGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_ticker_get_serialize( + self, + symbol, + symbols, + window_size, + type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if symbols is not None: + + _query_params.append(('symbols', symbols)) + + if window_size is not None: + + _query_params.append(('windowSize', window_size)) + + if type is not None: + + _query_params.append(('type', type)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/ticker', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_ticker_price_get( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3TickerPriceGet200Response: + """Symbol Price Ticker + + Latest price for a symbol or symbols. - If the symbol is not sent, prices for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `4` when the symbol parameter is omitted; + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker_price_get_serialize( + symbol=symbol, + symbols=symbols, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TickerPriceGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_ticker_price_get_with_http_info( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3TickerPriceGet200Response]: + """Symbol Price Ticker + + Latest price for a symbol or symbols. - If the symbol is not sent, prices for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `4` when the symbol parameter is omitted; + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker_price_get_serialize( + symbol=symbol, + symbols=symbols, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TickerPriceGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_ticker_price_get_without_preload_content( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Symbol Price Ticker + + Latest price for a symbol or symbols. - If the symbol is not sent, prices for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `4` when the symbol parameter is omitted; + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker_price_get_serialize( + symbol=symbol, + symbols=symbols, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TickerPriceGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_ticker_price_get_serialize( + self, + symbol, + symbols, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if symbols is not None: + + _query_params.append(('symbols', symbols)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/ticker/price', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_ticker_trading_day_get( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + time_zone: Annotated[Optional[StrictStr], Field(description="Default: 0 (UTC)")] = None, + type: Annotated[Optional[StrictStr], Field(description="Supported values: FULL or MINI. If none provided, the default is FULL")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3TickerTradingDayGet200Response: + """Trading Day Ticker + + Price change statistics for a trading day. Notes: - Supported values for timeZone: - Hours and minutes (e.g. -1:00, 05:45) - Only hours (e.g. 0, 8, 4) Weight: - `4` for each requested symbol. - The weight for this request will cap at `200` once the number of symbols in the request is more than `50`. + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param time_zone: Default: 0 (UTC) + :type time_zone: str + :param type: Supported values: FULL or MINI. If none provided, the default is FULL + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker_trading_day_get_serialize( + symbol=symbol, + symbols=symbols, + time_zone=time_zone, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TickerTradingDayGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_ticker_trading_day_get_with_http_info( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + time_zone: Annotated[Optional[StrictStr], Field(description="Default: 0 (UTC)")] = None, + type: Annotated[Optional[StrictStr], Field(description="Supported values: FULL or MINI. If none provided, the default is FULL")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3TickerTradingDayGet200Response]: + """Trading Day Ticker + + Price change statistics for a trading day. Notes: - Supported values for timeZone: - Hours and minutes (e.g. -1:00, 05:45) - Only hours (e.g. 0, 8, 4) Weight: - `4` for each requested symbol. - The weight for this request will cap at `200` once the number of symbols in the request is more than `50`. + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param time_zone: Default: 0 (UTC) + :type time_zone: str + :param type: Supported values: FULL or MINI. If none provided, the default is FULL + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker_trading_day_get_serialize( + symbol=symbol, + symbols=symbols, + time_zone=time_zone, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TickerTradingDayGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_ticker_trading_day_get_without_preload_content( + self, + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + symbols: Optional[StrictStr] = None, + time_zone: Annotated[Optional[StrictStr], Field(description="Default: 0 (UTC)")] = None, + type: Annotated[Optional[StrictStr], Field(description="Supported values: FULL or MINI. If none provided, the default is FULL")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Trading Day Ticker + + Price change statistics for a trading day. Notes: - Supported values for timeZone: - Hours and minutes (e.g. -1:00, 05:45) - Only hours (e.g. 0, 8, 4) Weight: - `4` for each requested symbol. - The weight for this request will cap at `200` once the number of symbols in the request is more than `50`. + + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param symbols: + :type symbols: str + :param time_zone: Default: 0 (UTC) + :type time_zone: str + :param type: Supported values: FULL or MINI. If none provided, the default is FULL + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ticker_trading_day_get_serialize( + symbol=symbol, + symbols=symbols, + time_zone=time_zone, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TickerTradingDayGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_ticker_trading_day_get_serialize( + self, + symbol, + symbols, + time_zone, + type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if symbols is not None: + + _query_params.append(('symbols', symbols)) + + if time_zone is not None: + + _query_params.append(('timeZone', time_zone)) + + if type is not None: + + _query_params.append(('type', type)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/ticker/tradingDay', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_time_get( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3TimeGet200Response: + """Check Server Time + + Test connectivity to the Rest API and get the current server time. Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_time_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TimeGet200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_time_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3TimeGet200Response]: + """Check Server Time + + Test connectivity to the Rest API and get the current server time. Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_time_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TimeGet200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_time_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Check Server Time + + Test connectivity to the Rest API and get the current server time. Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_time_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3TimeGet200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_time_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/time', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_trades_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[Trade]: + """Recent Trades List + + Get recent trades. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param limit: Default 500; max 1000. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_trades_get_serialize( + symbol=symbol, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Trade]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_trades_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[Trade]]: + """Recent Trades List + + Get recent trades. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param limit: Default 500; max 1000. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_trades_get_serialize( + symbol=symbol, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Trade]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_trades_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Recent Trades List + + Get recent trades. Weight(IP): 10 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param limit: Default 500; max 1000. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_trades_get_serialize( + symbol=symbol, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Trade]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_trades_get_serialize( + self, + symbol, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/trades', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_ui_klines_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + interval: Annotated[StrictStr, Field(description="kline intervals")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + time_zone: Annotated[Optional[StrictStr], Field(description="Default: 0 (UTC)")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[List[ApiV3KlinesGet200ResponseInnerInner]]: + """UIKlines + + The request is similar to klines having the same parameters and response. uiKlines return modified kline data, optimized for presentation of candlestick charts. Weight(IP): 2 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param interval: kline intervals (required) + :type interval: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param time_zone: Default: 0 (UTC) + :type time_zone: str + :param limit: Default 500; max 1000. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ui_klines_get_serialize( + symbol=symbol, + interval=interval, + start_time=start_time, + end_time=end_time, + time_zone=time_zone, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[List[ApiV3KlinesGet200ResponseInnerInner]]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_ui_klines_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + interval: Annotated[StrictStr, Field(description="kline intervals")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + time_zone: Annotated[Optional[StrictStr], Field(description="Default: 0 (UTC)")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[List[ApiV3KlinesGet200ResponseInnerInner]]]: + """UIKlines + + The request is similar to klines having the same parameters and response. uiKlines return modified kline data, optimized for presentation of candlestick charts. Weight(IP): 2 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param interval: kline intervals (required) + :type interval: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param time_zone: Default: 0 (UTC) + :type time_zone: str + :param limit: Default 500; max 1000. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ui_klines_get_serialize( + symbol=symbol, + interval=interval, + start_time=start_time, + end_time=end_time, + time_zone=time_zone, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[List[ApiV3KlinesGet200ResponseInnerInner]]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_ui_klines_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + interval: Annotated[StrictStr, Field(description="kline intervals")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + time_zone: Annotated[Optional[StrictStr], Field(description="Default: 0 (UTC)")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """UIKlines + + The request is similar to klines having the same parameters and response. uiKlines return modified kline data, optimized for presentation of candlestick charts. Weight(IP): 2 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param interval: kline intervals (required) + :type interval: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param time_zone: Default: 0 (UTC) + :type time_zone: str + :param limit: Default 500; max 1000. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_ui_klines_get_serialize( + symbol=symbol, + interval=interval, + start_time=start_time, + end_time=end_time, + time_zone=time_zone, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[List[ApiV3KlinesGet200ResponseInnerInner]]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_ui_klines_get_serialize( + self, + symbol, + interval, + start_time, + end_time, + time_zone, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if interval is not None: + + _query_params.append(('interval', interval)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if time_zone is not None: + + _query_params.append(('timeZone', time_zone)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/uiKlines', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/mining_api.py b/target/python/binance_openapi/openapi_client/api/mining_api.py new file mode 100644 index 0000000..0f85284 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/mining_api.py @@ -0,0 +1,4638 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_mining_hash_transfer_config_cancel_post200_response import SapiV1MiningHashTransferConfigCancelPost200Response +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response import SapiV1MiningHashTransferConfigDetailsListGet200Response +from openapi_client.models.sapi_v1_mining_hash_transfer_config_post200_response import SapiV1MiningHashTransferConfigPost200Response +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response import SapiV1MiningHashTransferProfitDetailsGet200Response +from openapi_client.models.sapi_v1_mining_payment_list_get200_response import SapiV1MiningPaymentListGet200Response +from openapi_client.models.sapi_v1_mining_payment_other_get200_response import SapiV1MiningPaymentOtherGet200Response +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response import SapiV1MiningPaymentUidGet200Response +from openapi_client.models.sapi_v1_mining_pub_algo_list_get200_response import SapiV1MiningPubAlgoListGet200Response +from openapi_client.models.sapi_v1_mining_pub_coin_list_get200_response import SapiV1MiningPubCoinListGet200Response +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response import SapiV1MiningStatisticsUserListGet200Response +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response import SapiV1MiningStatisticsUserStatusGet200Response +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response import SapiV1MiningWorkerDetailGet200Response +from openapi_client.models.sapi_v1_mining_worker_list_get200_response import SapiV1MiningWorkerListGet200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class MiningApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_mining_hash_transfer_config_cancel_post( + self, + config_id: Annotated[StrictStr, Field(description="Mining ID")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MiningHashTransferConfigCancelPost200Response: + """Cancel Hashrate Resale configuration (USER_DATA) + + Weight(IP): 5 + + :param config_id: Mining ID (required) + :type config_id: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_hash_transfer_config_cancel_post_serialize( + config_id=config_id, + user_name=user_name, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningHashTransferConfigCancelPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_mining_hash_transfer_config_cancel_post_with_http_info( + self, + config_id: Annotated[StrictStr, Field(description="Mining ID")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MiningHashTransferConfigCancelPost200Response]: + """Cancel Hashrate Resale configuration (USER_DATA) + + Weight(IP): 5 + + :param config_id: Mining ID (required) + :type config_id: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_hash_transfer_config_cancel_post_serialize( + config_id=config_id, + user_name=user_name, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningHashTransferConfigCancelPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_mining_hash_transfer_config_cancel_post_without_preload_content( + self, + config_id: Annotated[StrictStr, Field(description="Mining ID")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel Hashrate Resale configuration (USER_DATA) + + Weight(IP): 5 + + :param config_id: Mining ID (required) + :type config_id: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_hash_transfer_config_cancel_post_serialize( + config_id=config_id, + user_name=user_name, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningHashTransferConfigCancelPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_mining_hash_transfer_config_cancel_post_serialize( + self, + config_id, + user_name, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if config_id is not None: + + _query_params.append(('configId', config_id)) + + if user_name is not None: + + _query_params.append(('userName', user_name)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/mining/hash-transfer/config/cancel', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_mining_hash_transfer_config_details_list_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MiningHashTransferConfigDetailsListGet200Response: + """Hashrate Resale List (USER_DATA) + + Weight(IP): 5 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_hash_transfer_config_details_list_get_serialize( + timestamp=timestamp, + signature=signature, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningHashTransferConfigDetailsListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_mining_hash_transfer_config_details_list_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MiningHashTransferConfigDetailsListGet200Response]: + """Hashrate Resale List (USER_DATA) + + Weight(IP): 5 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_hash_transfer_config_details_list_get_serialize( + timestamp=timestamp, + signature=signature, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningHashTransferConfigDetailsListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_mining_hash_transfer_config_details_list_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Hashrate Resale List (USER_DATA) + + Weight(IP): 5 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_hash_transfer_config_details_list_get_serialize( + timestamp=timestamp, + signature=signature, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningHashTransferConfigDetailsListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_mining_hash_transfer_config_details_list_get_serialize( + self, + timestamp, + signature, + page_index, + page_size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page_index is not None: + + _query_params.append(('pageIndex', page_index)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/mining/hash-transfer/config/details/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_mining_hash_transfer_config_post( + self, + user_name: Annotated[StrictStr, Field(description="Mining Account")], + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + to_pool_user: Annotated[StrictStr, Field(description="Mining Account")], + hash_rate: Annotated[StrictStr, Field(description="Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than 500000)")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + end_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MiningHashTransferConfigPost200Response: + """Hashrate Resale Request (USER_DATA) + + Weight(IP): 5 + + :param user_name: Mining Account (required) + :type user_name: str + :param algo: Algorithm(sha256) (required) + :type algo: str + :param to_pool_user: Mining Account (required) + :type to_pool_user: str + :param hash_rate: Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than 500000) (required) + :type hash_rate: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_date: Search date, millisecond timestamp, while empty query all + :type start_date: str + :param end_date: Search date, millisecond timestamp, while empty query all + :type end_date: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_hash_transfer_config_post_serialize( + user_name=user_name, + algo=algo, + to_pool_user=to_pool_user, + hash_rate=hash_rate, + timestamp=timestamp, + signature=signature, + start_date=start_date, + end_date=end_date, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningHashTransferConfigPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_mining_hash_transfer_config_post_with_http_info( + self, + user_name: Annotated[StrictStr, Field(description="Mining Account")], + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + to_pool_user: Annotated[StrictStr, Field(description="Mining Account")], + hash_rate: Annotated[StrictStr, Field(description="Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than 500000)")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + end_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MiningHashTransferConfigPost200Response]: + """Hashrate Resale Request (USER_DATA) + + Weight(IP): 5 + + :param user_name: Mining Account (required) + :type user_name: str + :param algo: Algorithm(sha256) (required) + :type algo: str + :param to_pool_user: Mining Account (required) + :type to_pool_user: str + :param hash_rate: Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than 500000) (required) + :type hash_rate: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_date: Search date, millisecond timestamp, while empty query all + :type start_date: str + :param end_date: Search date, millisecond timestamp, while empty query all + :type end_date: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_hash_transfer_config_post_serialize( + user_name=user_name, + algo=algo, + to_pool_user=to_pool_user, + hash_rate=hash_rate, + timestamp=timestamp, + signature=signature, + start_date=start_date, + end_date=end_date, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningHashTransferConfigPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_mining_hash_transfer_config_post_without_preload_content( + self, + user_name: Annotated[StrictStr, Field(description="Mining Account")], + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + to_pool_user: Annotated[StrictStr, Field(description="Mining Account")], + hash_rate: Annotated[StrictStr, Field(description="Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than 500000)")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + end_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Hashrate Resale Request (USER_DATA) + + Weight(IP): 5 + + :param user_name: Mining Account (required) + :type user_name: str + :param algo: Algorithm(sha256) (required) + :type algo: str + :param to_pool_user: Mining Account (required) + :type to_pool_user: str + :param hash_rate: Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than 500000) (required) + :type hash_rate: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_date: Search date, millisecond timestamp, while empty query all + :type start_date: str + :param end_date: Search date, millisecond timestamp, while empty query all + :type end_date: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_hash_transfer_config_post_serialize( + user_name=user_name, + algo=algo, + to_pool_user=to_pool_user, + hash_rate=hash_rate, + timestamp=timestamp, + signature=signature, + start_date=start_date, + end_date=end_date, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningHashTransferConfigPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_mining_hash_transfer_config_post_serialize( + self, + user_name, + algo, + to_pool_user, + hash_rate, + timestamp, + signature, + start_date, + end_date, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if user_name is not None: + + _query_params.append(('userName', user_name)) + + if algo is not None: + + _query_params.append(('algo', algo)) + + if start_date is not None: + + _query_params.append(('startDate', start_date)) + + if end_date is not None: + + _query_params.append(('endDate', end_date)) + + if to_pool_user is not None: + + _query_params.append(('toPoolUser', to_pool_user)) + + if hash_rate is not None: + + _query_params.append(('hashRate', hash_rate)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/mining/hash-transfer/config', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_mining_hash_transfer_profit_details_get( + self, + config_id: Annotated[StrictStr, Field(description="Mining ID")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MiningHashTransferProfitDetailsGet200Response: + """Hashrate Resale Details (USER_DATA) + + Weight(IP): 5 + + :param config_id: Mining ID (required) + :type config_id: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_hash_transfer_profit_details_get_serialize( + config_id=config_id, + user_name=user_name, + timestamp=timestamp, + signature=signature, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningHashTransferProfitDetailsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_mining_hash_transfer_profit_details_get_with_http_info( + self, + config_id: Annotated[StrictStr, Field(description="Mining ID")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MiningHashTransferProfitDetailsGet200Response]: + """Hashrate Resale Details (USER_DATA) + + Weight(IP): 5 + + :param config_id: Mining ID (required) + :type config_id: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_hash_transfer_profit_details_get_serialize( + config_id=config_id, + user_name=user_name, + timestamp=timestamp, + signature=signature, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningHashTransferProfitDetailsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_mining_hash_transfer_profit_details_get_without_preload_content( + self, + config_id: Annotated[StrictStr, Field(description="Mining ID")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Hashrate Resale Details (USER_DATA) + + Weight(IP): 5 + + :param config_id: Mining ID (required) + :type config_id: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_hash_transfer_profit_details_get_serialize( + config_id=config_id, + user_name=user_name, + timestamp=timestamp, + signature=signature, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningHashTransferProfitDetailsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_mining_hash_transfer_profit_details_get_serialize( + self, + config_id, + user_name, + timestamp, + signature, + page_index, + page_size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if config_id is not None: + + _query_params.append(('configId', config_id)) + + if user_name is not None: + + _query_params.append(('userName', user_name)) + + if page_index is not None: + + _query_params.append(('pageIndex', page_index)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/mining/hash-transfer/profit/details', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_mining_payment_list_get( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + start_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + end_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MiningPaymentListGet200Response: + """Earnings List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param start_date: Search date, millisecond timestamp, while empty query all + :type start_date: str + :param end_date: Search date, millisecond timestamp, while empty query all + :type end_date: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_payment_list_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + coin=coin, + start_date=start_date, + end_date=end_date, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPaymentListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_mining_payment_list_get_with_http_info( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + start_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + end_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MiningPaymentListGet200Response]: + """Earnings List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param start_date: Search date, millisecond timestamp, while empty query all + :type start_date: str + :param end_date: Search date, millisecond timestamp, while empty query all + :type end_date: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_payment_list_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + coin=coin, + start_date=start_date, + end_date=end_date, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPaymentListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_mining_payment_list_get_without_preload_content( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + start_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + end_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Earnings List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param start_date: Search date, millisecond timestamp, while empty query all + :type start_date: str + :param end_date: Search date, millisecond timestamp, while empty query all + :type end_date: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_payment_list_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + coin=coin, + start_date=start_date, + end_date=end_date, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPaymentListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_mining_payment_list_get_serialize( + self, + algo, + user_name, + timestamp, + signature, + coin, + start_date, + end_date, + page_index, + page_size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if algo is not None: + + _query_params.append(('algo', algo)) + + if user_name is not None: + + _query_params.append(('userName', user_name)) + + if coin is not None: + + _query_params.append(('coin', coin)) + + if start_date is not None: + + _query_params.append(('startDate', start_date)) + + if end_date is not None: + + _query_params.append(('endDate', end_date)) + + if page_index is not None: + + _query_params.append(('pageIndex', page_index)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/mining/payment/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_mining_payment_other_get( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + start_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + end_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MiningPaymentOtherGet200Response: + """Extra Bonus List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param start_date: Search date, millisecond timestamp, while empty query all + :type start_date: str + :param end_date: Search date, millisecond timestamp, while empty query all + :type end_date: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_payment_other_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + coin=coin, + start_date=start_date, + end_date=end_date, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPaymentOtherGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_mining_payment_other_get_with_http_info( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + start_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + end_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MiningPaymentOtherGet200Response]: + """Extra Bonus List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param start_date: Search date, millisecond timestamp, while empty query all + :type start_date: str + :param end_date: Search date, millisecond timestamp, while empty query all + :type end_date: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_payment_other_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + coin=coin, + start_date=start_date, + end_date=end_date, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPaymentOtherGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_mining_payment_other_get_without_preload_content( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + start_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + end_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Extra Bonus List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param start_date: Search date, millisecond timestamp, while empty query all + :type start_date: str + :param end_date: Search date, millisecond timestamp, while empty query all + :type end_date: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_payment_other_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + coin=coin, + start_date=start_date, + end_date=end_date, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPaymentOtherGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_mining_payment_other_get_serialize( + self, + algo, + user_name, + timestamp, + signature, + coin, + start_date, + end_date, + page_index, + page_size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if algo is not None: + + _query_params.append(('algo', algo)) + + if user_name is not None: + + _query_params.append(('userName', user_name)) + + if coin is not None: + + _query_params.append(('coin', coin)) + + if start_date is not None: + + _query_params.append(('startDate', start_date)) + + if end_date is not None: + + _query_params.append(('endDate', end_date)) + + if page_index is not None: + + _query_params.append(('pageIndex', page_index)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/mining/payment/other', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_mining_payment_uid_get( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + end_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MiningPaymentUidGet200Response: + """Mining Account Earning (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_date: Search date, millisecond timestamp, while empty query all + :type start_date: str + :param end_date: Search date, millisecond timestamp, while empty query all + :type end_date: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_payment_uid_get_serialize( + algo=algo, + timestamp=timestamp, + signature=signature, + start_date=start_date, + end_date=end_date, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPaymentUidGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_mining_payment_uid_get_with_http_info( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + end_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MiningPaymentUidGet200Response]: + """Mining Account Earning (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_date: Search date, millisecond timestamp, while empty query all + :type start_date: str + :param end_date: Search date, millisecond timestamp, while empty query all + :type end_date: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_payment_uid_get_serialize( + algo=algo, + timestamp=timestamp, + signature=signature, + start_date=start_date, + end_date=end_date, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPaymentUidGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_mining_payment_uid_get_without_preload_content( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + end_date: Annotated[Optional[StrictStr], Field(description="Search date, millisecond timestamp, while empty query all")] = None, + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="Number of pages, minimum 10, maximum 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Mining Account Earning (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_date: Search date, millisecond timestamp, while empty query all + :type start_date: str + :param end_date: Search date, millisecond timestamp, while empty query all + :type end_date: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param page_size: Number of pages, minimum 10, maximum 200 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_payment_uid_get_serialize( + algo=algo, + timestamp=timestamp, + signature=signature, + start_date=start_date, + end_date=end_date, + page_index=page_index, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPaymentUidGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_mining_payment_uid_get_serialize( + self, + algo, + timestamp, + signature, + start_date, + end_date, + page_index, + page_size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if algo is not None: + + _query_params.append(('algo', algo)) + + if start_date is not None: + + _query_params.append(('startDate', start_date)) + + if end_date is not None: + + _query_params.append(('endDate', end_date)) + + if page_index is not None: + + _query_params.append(('pageIndex', page_index)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/mining/payment/uid', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_mining_pub_algo_list_get( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MiningPubAlgoListGet200Response: + """Acquiring Algorithm (MARKET_DATA) + + Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_pub_algo_list_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPubAlgoListGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_mining_pub_algo_list_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MiningPubAlgoListGet200Response]: + """Acquiring Algorithm (MARKET_DATA) + + Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_pub_algo_list_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPubAlgoListGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_mining_pub_algo_list_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Acquiring Algorithm (MARKET_DATA) + + Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_pub_algo_list_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPubAlgoListGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_mining_pub_algo_list_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/mining/pub/algoList', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_mining_pub_coin_list_get( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MiningPubCoinListGet200Response: + """Acquiring CoinName (MARKET_DATA) + + Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_pub_coin_list_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPubCoinListGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_mining_pub_coin_list_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MiningPubCoinListGet200Response]: + """Acquiring CoinName (MARKET_DATA) + + Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_pub_coin_list_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPubCoinListGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_mining_pub_coin_list_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Acquiring CoinName (MARKET_DATA) + + Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_pub_coin_list_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningPubCoinListGet200Response", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_mining_pub_coin_list_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/mining/pub/coinList', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_mining_statistics_user_list_get( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MiningStatisticsUserListGet200Response: + """Account List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_statistics_user_list_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningStatisticsUserListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_mining_statistics_user_list_get_with_http_info( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MiningStatisticsUserListGet200Response]: + """Account List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_statistics_user_list_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningStatisticsUserListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_mining_statistics_user_list_get_without_preload_content( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Account List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_statistics_user_list_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningStatisticsUserListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_mining_statistics_user_list_get_serialize( + self, + algo, + user_name, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if algo is not None: + + _query_params.append(('algo', algo)) + + if user_name is not None: + + _query_params.append(('userName', user_name)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/mining/statistics/user/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_mining_statistics_user_status_get( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MiningStatisticsUserStatusGet200Response: + """Statistic List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_statistics_user_status_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningStatisticsUserStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_mining_statistics_user_status_get_with_http_info( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MiningStatisticsUserStatusGet200Response]: + """Statistic List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_statistics_user_status_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningStatisticsUserStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_mining_statistics_user_status_get_without_preload_content( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Statistic List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_statistics_user_status_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningStatisticsUserStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_mining_statistics_user_status_get_serialize( + self, + algo, + user_name, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if algo is not None: + + _query_params.append(('algo', algo)) + + if user_name is not None: + + _query_params.append(('userName', user_name)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/mining/statistics/user/status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_mining_worker_detail_get( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + worker_name: Annotated[StrictStr, Field(description="Miner’s name")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MiningWorkerDetailGet200Response: + """Request for Detail Miner List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param worker_name: Miner’s name (required) + :type worker_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_worker_detail_get_serialize( + algo=algo, + user_name=user_name, + worker_name=worker_name, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningWorkerDetailGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_mining_worker_detail_get_with_http_info( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + worker_name: Annotated[StrictStr, Field(description="Miner’s name")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MiningWorkerDetailGet200Response]: + """Request for Detail Miner List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param worker_name: Miner’s name (required) + :type worker_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_worker_detail_get_serialize( + algo=algo, + user_name=user_name, + worker_name=worker_name, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningWorkerDetailGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_mining_worker_detail_get_without_preload_content( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + worker_name: Annotated[StrictStr, Field(description="Miner’s name")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Request for Detail Miner List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param worker_name: Miner’s name (required) + :type worker_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_worker_detail_get_serialize( + algo=algo, + user_name=user_name, + worker_name=worker_name, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningWorkerDetailGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_mining_worker_detail_get_serialize( + self, + algo, + user_name, + worker_name, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if algo is not None: + + _query_params.append(('algo', algo)) + + if user_name is not None: + + _query_params.append(('userName', user_name)) + + if worker_name is not None: + + _query_params.append(('workerName', worker_name)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/mining/worker/detail', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_mining_worker_list_get( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + sort: Annotated[Optional[StrictInt], Field(description="sort sequence(default=0)0 positive sequence, 1 negative sequence")] = None, + sort_column: Annotated[Optional[StrictInt], Field(description="Sort by( default 1): 1: miner name, 2: real-time computing power, 3: daily average computing power, 4: real-time rejection rate, 5: last submission time")] = None, + worker_status: Annotated[Optional[StrictInt], Field(description="miners status(default=0)0 all, 1 valid, 2 invalid, 3 failure")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MiningWorkerListGet200Response: + """Request for Miner List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param sort: sort sequence(default=0)0 positive sequence, 1 negative sequence + :type sort: int + :param sort_column: Sort by( default 1): 1: miner name, 2: real-time computing power, 3: daily average computing power, 4: real-time rejection rate, 5: last submission time + :type sort_column: int + :param worker_status: miners status(default=0)0 all, 1 valid, 2 invalid, 3 failure + :type worker_status: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_worker_list_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + page_index=page_index, + sort=sort, + sort_column=sort_column, + worker_status=worker_status, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningWorkerListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_mining_worker_list_get_with_http_info( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + sort: Annotated[Optional[StrictInt], Field(description="sort sequence(default=0)0 positive sequence, 1 negative sequence")] = None, + sort_column: Annotated[Optional[StrictInt], Field(description="Sort by( default 1): 1: miner name, 2: real-time computing power, 3: daily average computing power, 4: real-time rejection rate, 5: last submission time")] = None, + worker_status: Annotated[Optional[StrictInt], Field(description="miners status(default=0)0 all, 1 valid, 2 invalid, 3 failure")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MiningWorkerListGet200Response]: + """Request for Miner List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param sort: sort sequence(default=0)0 positive sequence, 1 negative sequence + :type sort: int + :param sort_column: Sort by( default 1): 1: miner name, 2: real-time computing power, 3: daily average computing power, 4: real-time rejection rate, 5: last submission time + :type sort_column: int + :param worker_status: miners status(default=0)0 all, 1 valid, 2 invalid, 3 failure + :type worker_status: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_worker_list_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + page_index=page_index, + sort=sort, + sort_column=sort_column, + worker_status=worker_status, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningWorkerListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_mining_worker_list_get_without_preload_content( + self, + algo: Annotated[StrictStr, Field(description="Algorithm(sha256)")], + user_name: Annotated[StrictStr, Field(description="Mining Account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page_index: Annotated[Optional[StrictInt], Field(description="Page number, default is first page, start form 1")] = None, + sort: Annotated[Optional[StrictInt], Field(description="sort sequence(default=0)0 positive sequence, 1 negative sequence")] = None, + sort_column: Annotated[Optional[StrictInt], Field(description="Sort by( default 1): 1: miner name, 2: real-time computing power, 3: daily average computing power, 4: real-time rejection rate, 5: last submission time")] = None, + worker_status: Annotated[Optional[StrictInt], Field(description="miners status(default=0)0 all, 1 valid, 2 invalid, 3 failure")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Request for Miner List (USER_DATA) + + Weight(IP): 5 + + :param algo: Algorithm(sha256) (required) + :type algo: str + :param user_name: Mining Account (required) + :type user_name: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page_index: Page number, default is first page, start form 1 + :type page_index: int + :param sort: sort sequence(default=0)0 positive sequence, 1 negative sequence + :type sort: int + :param sort_column: Sort by( default 1): 1: miner name, 2: real-time computing power, 3: daily average computing power, 4: real-time rejection rate, 5: last submission time + :type sort_column: int + :param worker_status: miners status(default=0)0 all, 1 valid, 2 invalid, 3 failure + :type worker_status: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_mining_worker_list_get_serialize( + algo=algo, + user_name=user_name, + timestamp=timestamp, + signature=signature, + page_index=page_index, + sort=sort, + sort_column=sort_column, + worker_status=worker_status, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MiningWorkerListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_mining_worker_list_get_serialize( + self, + algo, + user_name, + timestamp, + signature, + page_index, + sort, + sort_column, + worker_status, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if algo is not None: + + _query_params.append(('algo', algo)) + + if user_name is not None: + + _query_params.append(('userName', user_name)) + + if page_index is not None: + + _query_params.append(('pageIndex', page_index)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if sort_column is not None: + + _query_params.append(('sortColumn', sort_column)) + + if worker_status is not None: + + _query_params.append(('workerStatus', worker_status)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/mining/worker/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/nft_api.py b/target/python/binance_openapi/openapi_client/api/nft_api.py new file mode 100644 index 0000000..3850daa --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/nft_api.py @@ -0,0 +1,1501 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_nft_history_deposit_get200_response import SapiV1NftHistoryDepositGet200Response +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response import SapiV1NftHistoryTransactionsGet200Response +from openapi_client.models.sapi_v1_nft_history_withdraw_get200_response import SapiV1NftHistoryWithdrawGet200Response +from openapi_client.models.sapi_v1_nft_user_get_asset_get200_response import SapiV1NftUserGetAssetGet200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class NFTApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_nft_history_deposit_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 50, Max 50")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1NftHistoryDepositGet200Response: + """Get NFT Deposit History(USER_DATA) + + - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 50, Max 50 + :type limit: int + :param page: Default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_nft_history_deposit_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1NftHistoryDepositGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_nft_history_deposit_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 50, Max 50")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1NftHistoryDepositGet200Response]: + """Get NFT Deposit History(USER_DATA) + + - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 50, Max 50 + :type limit: int + :param page: Default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_nft_history_deposit_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1NftHistoryDepositGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_nft_history_deposit_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 50, Max 50")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get NFT Deposit History(USER_DATA) + + - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 50, Max 50 + :type limit: int + :param page: Default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_nft_history_deposit_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1NftHistoryDepositGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_nft_history_deposit_get_serialize( + self, + timestamp, + signature, + start_time, + end_time, + limit, + page, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if page is not None: + + _query_params.append(('page', page)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/nft/history/deposit', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_nft_history_transactions_get( + self, + order_type: Annotated[StrictInt, Field(description="0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 50, Max 50")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1NftHistoryTransactionsGet200Response: + """Get NFT Transaction History (USER_DATA) + + - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 + + :param order_type: 0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee (required) + :type order_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 50, Max 50 + :type limit: int + :param page: Default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_nft_history_transactions_get_serialize( + order_type=order_type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1NftHistoryTransactionsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_nft_history_transactions_get_with_http_info( + self, + order_type: Annotated[StrictInt, Field(description="0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 50, Max 50")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1NftHistoryTransactionsGet200Response]: + """Get NFT Transaction History (USER_DATA) + + - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 + + :param order_type: 0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee (required) + :type order_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 50, Max 50 + :type limit: int + :param page: Default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_nft_history_transactions_get_serialize( + order_type=order_type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1NftHistoryTransactionsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_nft_history_transactions_get_without_preload_content( + self, + order_type: Annotated[StrictInt, Field(description="0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 50, Max 50")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get NFT Transaction History (USER_DATA) + + - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 + + :param order_type: 0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee (required) + :type order_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 50, Max 50 + :type limit: int + :param page: Default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_nft_history_transactions_get_serialize( + order_type=order_type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1NftHistoryTransactionsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_nft_history_transactions_get_serialize( + self, + order_type, + timestamp, + signature, + start_time, + end_time, + limit, + page, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_type is not None: + + _query_params.append(('orderType', order_type)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if page is not None: + + _query_params.append(('page', page)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/nft/history/transactions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_nft_history_withdraw_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 50, Max 50")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1NftHistoryWithdrawGet200Response: + """Get NFT Withdraw History (USER_DATA) + + - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 50, Max 50 + :type limit: int + :param page: Default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_nft_history_withdraw_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1NftHistoryWithdrawGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_nft_history_withdraw_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 50, Max 50")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1NftHistoryWithdrawGet200Response]: + """Get NFT Withdraw History (USER_DATA) + + - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 50, Max 50 + :type limit: int + :param page: Default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_nft_history_withdraw_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1NftHistoryWithdrawGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_nft_history_withdraw_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 50, Max 50")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get NFT Withdraw History (USER_DATA) + + - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 50, Max 50 + :type limit: int + :param page: Default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_nft_history_withdraw_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1NftHistoryWithdrawGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_nft_history_withdraw_get_serialize( + self, + timestamp, + signature, + start_time, + end_time, + limit, + page, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if page is not None: + + _query_params.append(('page', page)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/nft/history/withdraw', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_nft_user_get_asset_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + limit: Annotated[Optional[StrictInt], Field(description="Default 50, Max 50")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1NftUserGetAssetGet200Response: + """Get NFT Asset (USER_DATA) + + Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param limit: Default 50, Max 50 + :type limit: int + :param page: Default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_nft_user_get_asset_get_serialize( + timestamp=timestamp, + signature=signature, + limit=limit, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1NftUserGetAssetGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_nft_user_get_asset_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + limit: Annotated[Optional[StrictInt], Field(description="Default 50, Max 50")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1NftUserGetAssetGet200Response]: + """Get NFT Asset (USER_DATA) + + Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param limit: Default 50, Max 50 + :type limit: int + :param page: Default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_nft_user_get_asset_get_serialize( + timestamp=timestamp, + signature=signature, + limit=limit, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1NftUserGetAssetGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_nft_user_get_asset_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + limit: Annotated[Optional[StrictInt], Field(description="Default 50, Max 50")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get NFT Asset (USER_DATA) + + Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param limit: Default 50, Max 50 + :type limit: int + :param page: Default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_nft_user_get_asset_get_serialize( + timestamp=timestamp, + signature=signature, + limit=limit, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1NftUserGetAssetGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_nft_user_get_asset_get_serialize( + self, + timestamp, + signature, + limit, + page, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if page is not None: + + _query_params.append(('page', page)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/nft/user/getAsset', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/pay_api.py b/target/python/binance_openapi/openapi_client/api/pay_api.py new file mode 100644 index 0000000..11becab --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/pay_api.py @@ -0,0 +1,391 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_pay_transactions_get200_response import SapiV1PayTransactionsGet200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class PayApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_pay_transactions_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 100, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1PayTransactionsGet200Response: + """Get Pay Trade History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90 days' data will be returned. - The max interval between startTime and endTime is 90 days. - Support for querying orders within the last 18 months. Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: default 100, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_pay_transactions_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PayTransactionsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_pay_transactions_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 100, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1PayTransactionsGet200Response]: + """Get Pay Trade History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90 days' data will be returned. - The max interval between startTime and endTime is 90 days. - Support for querying orders within the last 18 months. Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: default 100, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_pay_transactions_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PayTransactionsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_pay_transactions_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="default 100, max 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Pay Trade History (USER_DATA) + + - If startTime and endTime are not sent, the recent 90 days' data will be returned. - The max interval between startTime and endTime is 90 days. - Support for querying orders within the last 18 months. Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: default 100, max 100 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_pay_transactions_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PayTransactionsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_pay_transactions_get_serialize( + self, + timestamp, + signature, + start_time, + end_time, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/pay/transactions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/portfolio_margin_api.py b/target/python/binance_openapi/openapi_client/api/portfolio_margin_api.py new file mode 100644 index 0000000..2845f4d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/portfolio_margin_api.py @@ -0,0 +1,3971 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_margin_borrow_repay_post200_response import SapiV1MarginBorrowRepayPost200Response +from openapi_client.models.sapi_v1_portfolio_account_get200_response import SapiV1PortfolioAccountGet200Response +from openapi_client.models.sapi_v1_portfolio_asset_index_price_get200_response_inner import SapiV1PortfolioAssetIndexPriceGet200ResponseInner +from openapi_client.models.sapi_v1_portfolio_auto_collection_post200_response import SapiV1PortfolioAutoCollectionPost200Response +from openapi_client.models.sapi_v1_portfolio_collateral_rate_get200_response_inner import SapiV1PortfolioCollateralRateGet200ResponseInner +from openapi_client.models.sapi_v1_portfolio_interest_history_get200_response_inner import SapiV1PortfolioInterestHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_portfolio_margin_asset_leverage_get200_response_inner import SapiV1PortfolioMarginAssetLeverageGet200ResponseInner +from openapi_client.models.sapi_v1_portfolio_pm_loan_get200_response import SapiV1PortfolioPmLoanGet200Response +from openapi_client.models.sapi_v1_portfolio_repay_futures_switch_get200_response import SapiV1PortfolioRepayFuturesSwitchGet200Response +from openapi_client.models.sapi_v1_portfolio_repay_post200_response import SapiV1PortfolioRepayPost200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class PortfolioMarginApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_portfolio_account_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1PortfolioAccountGet200Response: + """Portfolio Margin Account (USER_DATA) + + Get the account info 'Weight(IP): 1' + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_portfolio_account_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1PortfolioAccountGet200Response]: + """Portfolio Margin Account (USER_DATA) + + Get the account info 'Weight(IP): 1' + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_portfolio_account_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Portfolio Margin Account (USER_DATA) + + Get the account info 'Weight(IP): 1' + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_portfolio_account_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/portfolio/account', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_portfolio_asset_collection_post( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1PortfolioAutoCollectionPost200Response: + """Fund Collection by Asset (USER_DATA) + + Transfers specific asset from Futures Account to Margin account Weight(IP): 60 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_asset_collection_post_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAutoCollectionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_portfolio_asset_collection_post_with_http_info( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1PortfolioAutoCollectionPost200Response]: + """Fund Collection by Asset (USER_DATA) + + Transfers specific asset from Futures Account to Margin account Weight(IP): 60 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_asset_collection_post_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAutoCollectionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_portfolio_asset_collection_post_without_preload_content( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Fund Collection by Asset (USER_DATA) + + Transfers specific asset from Futures Account to Margin account Weight(IP): 60 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_asset_collection_post_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAutoCollectionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_portfolio_asset_collection_post_serialize( + self, + asset, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/portfolio/asset-collection', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_portfolio_asset_index_price_get( + self, + asset: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1PortfolioAssetIndexPriceGet200ResponseInner]: + """Query Portfolio Margin Asset Index Price (MARKET_DATA) + + Query Portfolio Margin Asset Index Price Weight(IP): - 1 if send asset - 50 if not send asset + + :param asset: + :type asset: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_asset_index_price_get_serialize( + asset=asset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1PortfolioAssetIndexPriceGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_portfolio_asset_index_price_get_with_http_info( + self, + asset: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1PortfolioAssetIndexPriceGet200ResponseInner]]: + """Query Portfolio Margin Asset Index Price (MARKET_DATA) + + Query Portfolio Margin Asset Index Price Weight(IP): - 1 if send asset - 50 if not send asset + + :param asset: + :type asset: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_asset_index_price_get_serialize( + asset=asset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1PortfolioAssetIndexPriceGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_portfolio_asset_index_price_get_without_preload_content( + self, + asset: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Portfolio Margin Asset Index Price (MARKET_DATA) + + Query Portfolio Margin Asset Index Price Weight(IP): - 1 if send asset - 50 if not send asset + + :param asset: + :type asset: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_asset_index_price_get_serialize( + asset=asset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1PortfolioAssetIndexPriceGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_portfolio_asset_index_price_get_serialize( + self, + asset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/portfolio/asset-index-price', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_portfolio_auto_collection_post( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1PortfolioAutoCollectionPost200Response: + """Fund Auto-collection (USER_DATA) + + Transfers all assets from Futures Account to Margin account Weight(IP): 1500 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_auto_collection_post_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAutoCollectionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_portfolio_auto_collection_post_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1PortfolioAutoCollectionPost200Response]: + """Fund Auto-collection (USER_DATA) + + Transfers all assets from Futures Account to Margin account Weight(IP): 1500 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_auto_collection_post_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAutoCollectionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_portfolio_auto_collection_post_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Fund Auto-collection (USER_DATA) + + Transfers all assets from Futures Account to Margin account Weight(IP): 1500 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_auto_collection_post_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAutoCollectionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_portfolio_auto_collection_post_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/portfolio/auto-collection', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_portfolio_bnb_transfer_post( + self, + transfer_side: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginBorrowRepayPost200Response: + """BNB Transfer (USER_DATA) + + BNB transfer can be between Margin Account and USDM Account Weight(IP): 1500 + + :param transfer_side: (required) + :type transfer_side: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_bnb_transfer_post_serialize( + transfer_side=transfer_side, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginBorrowRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_portfolio_bnb_transfer_post_with_http_info( + self, + transfer_side: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginBorrowRepayPost200Response]: + """BNB Transfer (USER_DATA) + + BNB transfer can be between Margin Account and USDM Account Weight(IP): 1500 + + :param transfer_side: (required) + :type transfer_side: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_bnb_transfer_post_serialize( + transfer_side=transfer_side, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginBorrowRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_portfolio_bnb_transfer_post_without_preload_content( + self, + transfer_side: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """BNB Transfer (USER_DATA) + + BNB transfer can be between Margin Account and USDM Account Weight(IP): 1500 + + :param transfer_side: (required) + :type transfer_side: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_bnb_transfer_post_serialize( + transfer_side=transfer_side, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginBorrowRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_portfolio_bnb_transfer_post_serialize( + self, + transfer_side, + amount, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if transfer_side is not None: + + _query_params.append(('transferSide', transfer_side)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/portfolio/bnb-transfer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_portfolio_collateral_rate_get( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1PortfolioCollateralRateGet200ResponseInner]: + """Portfolio Margin Collateral Rate (MARKET_DATA) + + Portfolio Margin Collateral Rate. Weight(IP): 50 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_collateral_rate_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1PortfolioCollateralRateGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_portfolio_collateral_rate_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1PortfolioCollateralRateGet200ResponseInner]]: + """Portfolio Margin Collateral Rate (MARKET_DATA) + + Portfolio Margin Collateral Rate. Weight(IP): 50 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_collateral_rate_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1PortfolioCollateralRateGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_portfolio_collateral_rate_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Portfolio Margin Collateral Rate (MARKET_DATA) + + Portfolio Margin Collateral Rate. Weight(IP): 50 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_collateral_rate_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1PortfolioCollateralRateGet200ResponseInner]", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_portfolio_collateral_rate_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/portfolio/collateralRate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_portfolio_interest_history_get( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1PortfolioInterestHistoryGet200ResponseInner]: + """Query Classic Portfolio Margin Negative Balance Interest History (USER_DATA) + + Query interest history of negative balance for portfolio margin. Weight(IP): 50 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_interest_history_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1PortfolioInterestHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_portfolio_interest_history_get_with_http_info( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1PortfolioInterestHistoryGet200ResponseInner]]: + """Query Classic Portfolio Margin Negative Balance Interest History (USER_DATA) + + Query interest history of negative balance for portfolio margin. Weight(IP): 50 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_interest_history_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1PortfolioInterestHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_portfolio_interest_history_get_without_preload_content( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Classic Portfolio Margin Negative Balance Interest History (USER_DATA) + + Query interest history of negative balance for portfolio margin. Weight(IP): 50 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_interest_history_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1PortfolioInterestHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_portfolio_interest_history_get_serialize( + self, + asset, + timestamp, + signature, + start_time, + end_time, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/portfolio/interest-history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_portfolio_margin_asset_leverage_get( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1PortfolioMarginAssetLeverageGet200ResponseInner]: + """Get Portfolio Margin Asset Leverage (USER_DATA) + + Weight(IP): 50 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_margin_asset_leverage_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1PortfolioMarginAssetLeverageGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_portfolio_margin_asset_leverage_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1PortfolioMarginAssetLeverageGet200ResponseInner]]: + """Get Portfolio Margin Asset Leverage (USER_DATA) + + Weight(IP): 50 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_margin_asset_leverage_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1PortfolioMarginAssetLeverageGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_portfolio_margin_asset_leverage_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Portfolio Margin Asset Leverage (USER_DATA) + + Weight(IP): 50 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_margin_asset_leverage_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1PortfolioMarginAssetLeverageGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_portfolio_margin_asset_leverage_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/portfolio/margin-asset-leverage', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_portfolio_pm_loan_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1PortfolioPmLoanGet200Response: + """Portfolio Margin Bankruptcy Loan Amount (USER_DATA) + + Query Portfolio Margin Bankruptcy Loan Amount. Weight(UID): 500 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_pm_loan_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioPmLoanGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_portfolio_pm_loan_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1PortfolioPmLoanGet200Response]: + """Portfolio Margin Bankruptcy Loan Amount (USER_DATA) + + Query Portfolio Margin Bankruptcy Loan Amount. Weight(UID): 500 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_pm_loan_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioPmLoanGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_portfolio_pm_loan_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Portfolio Margin Bankruptcy Loan Amount (USER_DATA) + + Query Portfolio Margin Bankruptcy Loan Amount. Weight(UID): 500 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_pm_loan_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioPmLoanGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_portfolio_pm_loan_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/portfolio/pmLoan', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_portfolio_repay_futures_negative_balance_post( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1PortfolioAutoCollectionPost200Response: + """Repay futures Negative Balance (USER_DATA) + + Repay futures Negative Balance Weight(IP): 1500 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_repay_futures_negative_balance_post_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAutoCollectionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_portfolio_repay_futures_negative_balance_post_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1PortfolioAutoCollectionPost200Response]: + """Repay futures Negative Balance (USER_DATA) + + Repay futures Negative Balance Weight(IP): 1500 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_repay_futures_negative_balance_post_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAutoCollectionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_portfolio_repay_futures_negative_balance_post_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Repay futures Negative Balance (USER_DATA) + + Repay futures Negative Balance Weight(IP): 1500 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_repay_futures_negative_balance_post_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAutoCollectionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_portfolio_repay_futures_negative_balance_post_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/portfolio/repay-futures-negative-balance', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_portfolio_repay_futures_switch_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1PortfolioRepayFuturesSwitchGet200Response: + """Get Auto-repay-futures Status (USER_DATA) + + Query Auto-repay-futures Status Weight(IP): 30 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_repay_futures_switch_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioRepayFuturesSwitchGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_portfolio_repay_futures_switch_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1PortfolioRepayFuturesSwitchGet200Response]: + """Get Auto-repay-futures Status (USER_DATA) + + Query Auto-repay-futures Status Weight(IP): 30 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_repay_futures_switch_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioRepayFuturesSwitchGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_portfolio_repay_futures_switch_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Auto-repay-futures Status (USER_DATA) + + Query Auto-repay-futures Status Weight(IP): 30 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_repay_futures_switch_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioRepayFuturesSwitchGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_portfolio_repay_futures_switch_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/portfolio/repay-futures-switch', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_portfolio_repay_futures_switch_post( + self, + auto_repay: StrictBool, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1PortfolioAutoCollectionPost200Response: + """Change Auto-repay-futures Status (USER_DATA) + + Change Auto-repay-futures Status Weight(IP): 1500 + + :param auto_repay: (required) + :type auto_repay: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_repay_futures_switch_post_serialize( + auto_repay=auto_repay, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAutoCollectionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_portfolio_repay_futures_switch_post_with_http_info( + self, + auto_repay: StrictBool, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1PortfolioAutoCollectionPost200Response]: + """Change Auto-repay-futures Status (USER_DATA) + + Change Auto-repay-futures Status Weight(IP): 1500 + + :param auto_repay: (required) + :type auto_repay: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_repay_futures_switch_post_serialize( + auto_repay=auto_repay, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAutoCollectionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_portfolio_repay_futures_switch_post_without_preload_content( + self, + auto_repay: StrictBool, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Change Auto-repay-futures Status (USER_DATA) + + Change Auto-repay-futures Status Weight(IP): 1500 + + :param auto_repay: (required) + :type auto_repay: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_repay_futures_switch_post_serialize( + auto_repay=auto_repay, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioAutoCollectionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_portfolio_repay_futures_switch_post_serialize( + self, + auto_repay, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if auto_repay is not None: + + _query_params.append(('autoRepay', auto_repay)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/portfolio/repay-futures-switch', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_portfolio_repay_post( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + var_from: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1PortfolioRepayPost200Response: + """Portfolio Margin Bankruptcy Loan Repay (USER_DATA) + + Repay Portfolio Margin Bankruptcy Loan. Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param var_from: + :type var_from: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_repay_post_serialize( + timestamp=timestamp, + signature=signature, + var_from=var_from, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_portfolio_repay_post_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + var_from: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1PortfolioRepayPost200Response]: + """Portfolio Margin Bankruptcy Loan Repay (USER_DATA) + + Repay Portfolio Margin Bankruptcy Loan. Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param var_from: + :type var_from: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_repay_post_serialize( + timestamp=timestamp, + signature=signature, + var_from=var_from, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_portfolio_repay_post_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + var_from: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Portfolio Margin Bankruptcy Loan Repay (USER_DATA) + + Repay Portfolio Margin Bankruptcy Loan. Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param var_from: + :type var_from: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_portfolio_repay_post_serialize( + timestamp=timestamp, + signature=signature, + var_from=var_from, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1PortfolioRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_portfolio_repay_post_serialize( + self, + timestamp, + signature, + var_from, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if var_from is not None: + + _query_params.append(('from', var_from)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/portfolio/repay', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/rebate_api.py b/target/python/binance_openapi/openapi_client/api/rebate_api.py new file mode 100644 index 0000000..8d623ea --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/rebate_api.py @@ -0,0 +1,391 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import Optional +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response import SapiV1RebateTaxQueryGet200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class RebateApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_rebate_tax_query_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1RebateTaxQueryGet200Response: + """Get Spot Rebate History Records (USER_DATA) + + - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. - The earliest startTime is supported on June 10, 2020 Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_rebate_tax_query_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1RebateTaxQueryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_rebate_tax_query_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1RebateTaxQueryGet200Response]: + """Get Spot Rebate History Records (USER_DATA) + + - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. - The earliest startTime is supported on June 10, 2020 Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_rebate_tax_query_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1RebateTaxQueryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_rebate_tax_query_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Spot Rebate History Records (USER_DATA) + + - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. - The earliest startTime is supported on June 10, 2020 Weight(UID): 3000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: default 1 + :type page: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_rebate_tax_query_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1RebateTaxQueryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_rebate_tax_query_get_serialize( + self, + timestamp, + signature, + start_time, + end_time, + page, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if page is not None: + + _query_params.append(('page', page)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/rebate/taxQuery', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/savings_api.py b/target/python/binance_openapi/openapi_client/api/savings_api.py new file mode 100644 index 0000000..7e05134 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/savings_api.py @@ -0,0 +1,1501 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_lending_customized_fixed_purchase_post200_response import SapiV1LendingCustomizedFixedPurchasePost200Response +from openapi_client.models.sapi_v1_lending_position_changed_post200_response import SapiV1LendingPositionChangedPost200Response +from openapi_client.models.sapi_v1_lending_project_list_get200_response_inner import SapiV1LendingProjectListGet200ResponseInner +from openapi_client.models.sapi_v1_lending_project_position_list_get200_response_inner import SapiV1LendingProjectPositionListGet200ResponseInner + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class SavingsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_lending_customized_fixed_purchase_post( + self, + project_id: StrictStr, + lot: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingCustomizedFixedPurchasePost200Response: + """Purchase Fixed/Activity Project (USER_DATA) + + Weight(IP): 1 + + :param project_id: (required) + :type project_id: str + :param lot: (required) + :type lot: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_customized_fixed_purchase_post_serialize( + project_id=project_id, + lot=lot, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingCustomizedFixedPurchasePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_customized_fixed_purchase_post_with_http_info( + self, + project_id: StrictStr, + lot: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingCustomizedFixedPurchasePost200Response]: + """Purchase Fixed/Activity Project (USER_DATA) + + Weight(IP): 1 + + :param project_id: (required) + :type project_id: str + :param lot: (required) + :type lot: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_customized_fixed_purchase_post_serialize( + project_id=project_id, + lot=lot, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingCustomizedFixedPurchasePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_customized_fixed_purchase_post_without_preload_content( + self, + project_id: StrictStr, + lot: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Purchase Fixed/Activity Project (USER_DATA) + + Weight(IP): 1 + + :param project_id: (required) + :type project_id: str + :param lot: (required) + :type lot: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_customized_fixed_purchase_post_serialize( + project_id=project_id, + lot=lot, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingCustomizedFixedPurchasePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_customized_fixed_purchase_post_serialize( + self, + project_id, + lot, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if project_id is not None: + + _query_params.append(('projectId', project_id)) + + if lot is not None: + + _query_params.append(('lot', lot)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/lending/customizedFixed/purchase', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_position_changed_post( + self, + project_id: StrictStr, + lot: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_id: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LendingPositionChangedPost200Response: + """Change Fixed/Activity Position to Daily Position (USER_DATA) + + - PositionId is mandatory parameter for fixed position. Weight(IP): 1 + + :param project_id: (required) + :type project_id: str + :param lot: (required) + :type lot: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_id: + :type position_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_position_changed_post_serialize( + project_id=project_id, + lot=lot, + timestamp=timestamp, + signature=signature, + position_id=position_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingPositionChangedPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_position_changed_post_with_http_info( + self, + project_id: StrictStr, + lot: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_id: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LendingPositionChangedPost200Response]: + """Change Fixed/Activity Position to Daily Position (USER_DATA) + + - PositionId is mandatory parameter for fixed position. Weight(IP): 1 + + :param project_id: (required) + :type project_id: str + :param lot: (required) + :type lot: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_id: + :type position_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_position_changed_post_serialize( + project_id=project_id, + lot=lot, + timestamp=timestamp, + signature=signature, + position_id=position_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingPositionChangedPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_position_changed_post_without_preload_content( + self, + project_id: StrictStr, + lot: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_id: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Change Fixed/Activity Position to Daily Position (USER_DATA) + + - PositionId is mandatory parameter for fixed position. Weight(IP): 1 + + :param project_id: (required) + :type project_id: str + :param lot: (required) + :type lot: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_id: + :type position_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_position_changed_post_serialize( + project_id=project_id, + lot=lot, + timestamp=timestamp, + signature=signature, + position_id=position_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LendingPositionChangedPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_position_changed_post_serialize( + self, + project_id, + lot, + timestamp, + signature, + position_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if project_id is not None: + + _query_params.append(('projectId', project_id)) + + if lot is not None: + + _query_params.append(('lot', lot)) + + if position_id is not None: + + _query_params.append(('positionId', position_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/lending/positionChanged', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_project_list_get( + self, + type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + status: Annotated[Optional[StrictStr], Field(description="Default `ALL`")] = None, + is_sort_asc: Annotated[Optional[StrictBool], Field(description="default \"true\"")] = None, + sort_by: Annotated[Optional[StrictStr], Field(description="Default `START_TIME`")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1LendingProjectListGet200ResponseInner]: + """Get Fixed/Activity Project List(USER_DATA) + + Weight(IP): 1 + + :param type: (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param status: Default `ALL` + :type status: str + :param is_sort_asc: default \"true\" + :type is_sort_asc: bool + :param sort_by: Default `START_TIME` + :type sort_by: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_project_list_get_serialize( + type=type, + timestamp=timestamp, + signature=signature, + asset=asset, + status=status, + is_sort_asc=is_sort_asc, + sort_by=sort_by, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingProjectListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_project_list_get_with_http_info( + self, + type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + status: Annotated[Optional[StrictStr], Field(description="Default `ALL`")] = None, + is_sort_asc: Annotated[Optional[StrictBool], Field(description="default \"true\"")] = None, + sort_by: Annotated[Optional[StrictStr], Field(description="Default `START_TIME`")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1LendingProjectListGet200ResponseInner]]: + """Get Fixed/Activity Project List(USER_DATA) + + Weight(IP): 1 + + :param type: (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param status: Default `ALL` + :type status: str + :param is_sort_asc: default \"true\" + :type is_sort_asc: bool + :param sort_by: Default `START_TIME` + :type sort_by: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_project_list_get_serialize( + type=type, + timestamp=timestamp, + signature=signature, + asset=asset, + status=status, + is_sort_asc=is_sort_asc, + sort_by=sort_by, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingProjectListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_project_list_get_without_preload_content( + self, + type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + status: Annotated[Optional[StrictStr], Field(description="Default `ALL`")] = None, + is_sort_asc: Annotated[Optional[StrictBool], Field(description="default \"true\"")] = None, + sort_by: Annotated[Optional[StrictStr], Field(description="Default `START_TIME`")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Fixed/Activity Project List(USER_DATA) + + Weight(IP): 1 + + :param type: (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param status: Default `ALL` + :type status: str + :param is_sort_asc: default \"true\" + :type is_sort_asc: bool + :param sort_by: Default `START_TIME` + :type sort_by: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_project_list_get_serialize( + type=type, + timestamp=timestamp, + signature=signature, + asset=asset, + status=status, + is_sort_asc=is_sort_asc, + sort_by=sort_by, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingProjectListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_project_list_get_serialize( + self, + type, + timestamp, + signature, + asset, + status, + is_sort_asc, + sort_by, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if type is not None: + + _query_params.append(('type', type)) + + if status is not None: + + _query_params.append(('status', status)) + + if is_sort_asc is not None: + + _query_params.append(('isSortAsc', is_sort_asc)) + + if sort_by is not None: + + _query_params.append(('sortBy', sort_by)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/lending/project/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_lending_project_position_list_get( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + project_id: Optional[StrictStr] = None, + status: Annotated[Optional[StrictStr], Field(description="Default `ALL`")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1LendingProjectPositionListGet200ResponseInner]: + """Get Fixed/Activity Project Position (USER_DATA) + + Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param project_id: + :type project_id: str + :param status: Default `ALL` + :type status: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_project_position_list_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + project_id=project_id, + status=status, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingProjectPositionListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_lending_project_position_list_get_with_http_info( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + project_id: Optional[StrictStr] = None, + status: Annotated[Optional[StrictStr], Field(description="Default `ALL`")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1LendingProjectPositionListGet200ResponseInner]]: + """Get Fixed/Activity Project Position (USER_DATA) + + Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param project_id: + :type project_id: str + :param status: Default `ALL` + :type status: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_project_position_list_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + project_id=project_id, + status=status, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingProjectPositionListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_lending_project_position_list_get_without_preload_content( + self, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + project_id: Optional[StrictStr] = None, + status: Annotated[Optional[StrictStr], Field(description="Default `ALL`")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Fixed/Activity Project Position (USER_DATA) + + Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param project_id: + :type project_id: str + :param status: Default `ALL` + :type status: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_lending_project_position_list_get_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + project_id=project_id, + status=status, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LendingProjectPositionListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_lending_project_position_list_get_serialize( + self, + asset, + timestamp, + signature, + project_id, + status, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if project_id is not None: + + _query_params.append(('projectId', project_id)) + + if status is not None: + + _query_params.append(('status', status)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/lending/project/position/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/simple_earn_api.py b/target/python/binance_openapi/openapi_client/api/simple_earn_api.py new file mode 100644 index 0000000..efa9610 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/simple_earn_api.py @@ -0,0 +1,8341 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_margin_max_leverage_post200_response import SapiV1MarginMaxLeveragePost200Response +from openapi_client.models.sapi_v1_simple_earn_account_get200_response import SapiV1SimpleEarnAccountGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_collateral_record_get200_response import SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rate_history_get200_response import SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_redemption_record_get200_response import SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rewards_record_get200_response import SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_subscription_record_get200_response import SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response import SapiV1SimpleEarnFlexibleListGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_personal_left_quota_get200_response import SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_position_get200_response import SapiV1SimpleEarnFlexiblePositionGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_redeem_post200_response import SapiV1SimpleEarnFlexibleRedeemPost200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_subscribe_post200_response import SapiV1SimpleEarnFlexibleSubscribePost200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_subscription_preview_get200_response import SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_history_redemption_record_get200_response import SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_history_rewards_record_get200_response import SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_history_subscription_record_get200_response import SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response import SapiV1SimpleEarnLockedListGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_position_get200_response import SapiV1SimpleEarnLockedPositionGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_subscribe_post200_response import SapiV1SimpleEarnLockedSubscribePost200Response +from openapi_client.models.sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner import SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class SimpleEarnApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_simple_earn_account_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnAccountGet200Response: + """Simple Account (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_account_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnAccountGet200Response]: + """Simple Account (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_account_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Simple Account (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_account_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/account', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_flexible_history_collateral_record_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + product_id: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response: + """Get Collateral Record (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param product_id: + :type product_id: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_collateral_record_get_serialize( + timestamp=timestamp, + signature=signature, + product_id=product_id, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_flexible_history_collateral_record_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + product_id: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response]: + """Get Collateral Record (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param product_id: + :type product_id: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_collateral_record_get_serialize( + timestamp=timestamp, + signature=signature, + product_id=product_id, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_flexible_history_collateral_record_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + product_id: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Collateral Record (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param product_id: + :type product_id: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_collateral_record_get_serialize( + timestamp=timestamp, + signature=signature, + product_id=product_id, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_flexible_history_collateral_record_get_serialize( + self, + timestamp, + signature, + product_id, + start_time, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if product_id is not None: + + _query_params.append(('productId', product_id)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/flexible/history/collateralRecord', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_flexible_history_rate_history_get( + self, + product_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response: + """Get Rate History (USER_DATA) + + Weight(IP): 150 + + :param product_id: (required) + :type product_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_rate_history_get_serialize( + product_id=product_id, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_flexible_history_rate_history_get_with_http_info( + self, + product_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response]: + """Get Rate History (USER_DATA) + + Weight(IP): 150 + + :param product_id: (required) + :type product_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_rate_history_get_serialize( + product_id=product_id, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_flexible_history_rate_history_get_without_preload_content( + self, + product_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Rate History (USER_DATA) + + Weight(IP): 150 + + :param product_id: (required) + :type product_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_rate_history_get_serialize( + product_id=product_id, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_flexible_history_rate_history_get_serialize( + self, + product_id, + timestamp, + signature, + start_time, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if product_id is not None: + + _query_params.append(('productId', product_id)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/flexible/history/rateHistory', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_flexible_history_redemption_record_get( + self, + product_id: Optional[StrictStr] = None, + redeem_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response: + """Get Flexible Redemption Record (USER_DATA) + + Weight(IP): 150 + + :param product_id: + :type product_id: str + :param redeem_id: + :type redeem_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_redemption_record_get_serialize( + product_id=product_id, + redeem_id=redeem_id, + asset=asset, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_flexible_history_redemption_record_get_with_http_info( + self, + product_id: Optional[StrictStr] = None, + redeem_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response]: + """Get Flexible Redemption Record (USER_DATA) + + Weight(IP): 150 + + :param product_id: + :type product_id: str + :param redeem_id: + :type redeem_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_redemption_record_get_serialize( + product_id=product_id, + redeem_id=redeem_id, + asset=asset, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_flexible_history_redemption_record_get_without_preload_content( + self, + product_id: Optional[StrictStr] = None, + redeem_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Flexible Redemption Record (USER_DATA) + + Weight(IP): 150 + + :param product_id: + :type product_id: str + :param redeem_id: + :type redeem_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_redemption_record_get_serialize( + product_id=product_id, + redeem_id=redeem_id, + asset=asset, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_flexible_history_redemption_record_get_serialize( + self, + product_id, + redeem_id, + asset, + start_time, + end_time, + current, + size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if product_id is not None: + + _query_params.append(('productId', product_id)) + + if redeem_id is not None: + + _query_params.append(('redeemId', redeem_id)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/flexible/history/redemptionRecord', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_flexible_history_rewards_record_get( + self, + type: Annotated[StrictStr, Field(description="\"BONUS\", \"REALTIME\", \"REWARDS\"")], + product_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response: + """Get Flexible Rewards History (USER_DATA) + + Weight(IP): 150 + + :param type: \"BONUS\", \"REALTIME\", \"REWARDS\" (required) + :type type: str + :param product_id: + :type product_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_rewards_record_get_serialize( + type=type, + product_id=product_id, + asset=asset, + start_time=start_time, + end_time=end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_flexible_history_rewards_record_get_with_http_info( + self, + type: Annotated[StrictStr, Field(description="\"BONUS\", \"REALTIME\", \"REWARDS\"")], + product_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response]: + """Get Flexible Rewards History (USER_DATA) + + Weight(IP): 150 + + :param type: \"BONUS\", \"REALTIME\", \"REWARDS\" (required) + :type type: str + :param product_id: + :type product_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_rewards_record_get_serialize( + type=type, + product_id=product_id, + asset=asset, + start_time=start_time, + end_time=end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_flexible_history_rewards_record_get_without_preload_content( + self, + type: Annotated[StrictStr, Field(description="\"BONUS\", \"REALTIME\", \"REWARDS\"")], + product_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Flexible Rewards History (USER_DATA) + + Weight(IP): 150 + + :param type: \"BONUS\", \"REALTIME\", \"REWARDS\" (required) + :type type: str + :param product_id: + :type product_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_rewards_record_get_serialize( + type=type, + product_id=product_id, + asset=asset, + start_time=start_time, + end_time=end_time, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_flexible_history_rewards_record_get_serialize( + self, + type, + product_id, + asset, + start_time, + end_time, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if product_id is not None: + + _query_params.append(('productId', product_id)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if type is not None: + + _query_params.append(('type', type)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/flexible/history/rewardsRecord', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_flexible_history_subscription_record_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + product_id: Optional[StrictStr] = None, + purchase_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response: + """Get Flexible Subscription Record (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param product_id: + :type product_id: str + :param purchase_id: + :type purchase_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_subscription_record_get_serialize( + timestamp=timestamp, + signature=signature, + product_id=product_id, + purchase_id=purchase_id, + asset=asset, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_flexible_history_subscription_record_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + product_id: Optional[StrictStr] = None, + purchase_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response]: + """Get Flexible Subscription Record (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param product_id: + :type product_id: str + :param purchase_id: + :type purchase_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_subscription_record_get_serialize( + timestamp=timestamp, + signature=signature, + product_id=product_id, + purchase_id=purchase_id, + asset=asset, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_flexible_history_subscription_record_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + product_id: Optional[StrictStr] = None, + purchase_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Flexible Subscription Record (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param product_id: + :type product_id: str + :param purchase_id: + :type purchase_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_history_subscription_record_get_serialize( + timestamp=timestamp, + signature=signature, + product_id=product_id, + purchase_id=purchase_id, + asset=asset, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_flexible_history_subscription_record_get_serialize( + self, + timestamp, + signature, + product_id, + purchase_id, + asset, + start_time, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if product_id is not None: + + _query_params.append(('productId', product_id)) + + if purchase_id is not None: + + _query_params.append(('purchaseId', purchase_id)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/flexible/history/subscriptionRecord', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_flexible_list_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnFlexibleListGet200Response: + """Get Simple Earn Flexible Product List (USER_DATA) + + Get available Simple Earn flexible product list Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_list_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_flexible_list_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnFlexibleListGet200Response]: + """Get Simple Earn Flexible Product List (USER_DATA) + + Get available Simple Earn flexible product list Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_list_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_flexible_list_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Simple Earn Flexible Product List (USER_DATA) + + Get available Simple Earn flexible product list Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_list_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_flexible_list_get_serialize( + self, + timestamp, + signature, + asset, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/flexible/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_flexible_personal_left_quota_get( + self, + product_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response: + """Get Flexible Personal Left Quota (USER_DATA) + + Weight(IP): 150 + + :param product_id: (required) + :type product_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_personal_left_quota_get_serialize( + product_id=product_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_flexible_personal_left_quota_get_with_http_info( + self, + product_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response]: + """Get Flexible Personal Left Quota (USER_DATA) + + Weight(IP): 150 + + :param product_id: (required) + :type product_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_personal_left_quota_get_serialize( + product_id=product_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_flexible_personal_left_quota_get_without_preload_content( + self, + product_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Flexible Personal Left Quota (USER_DATA) + + Weight(IP): 150 + + :param product_id: (required) + :type product_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_personal_left_quota_get_serialize( + product_id=product_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_flexible_personal_left_quota_get_serialize( + self, + product_id, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if product_id is not None: + + _query_params.append(('productId', product_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/flexible/personalLeftQuota', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_flexible_position_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + product_id: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnFlexiblePositionGet200Response: + """Get Flexible Product Position (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param product_id: + :type product_id: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_position_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + product_id=product_id, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexiblePositionGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_flexible_position_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + product_id: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnFlexiblePositionGet200Response]: + """Get Flexible Product Position (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param product_id: + :type product_id: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_position_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + product_id=product_id, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexiblePositionGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_flexible_position_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + product_id: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Flexible Product Position (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param product_id: + :type product_id: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_position_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + product_id=product_id, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexiblePositionGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_flexible_position_get_serialize( + self, + timestamp, + signature, + asset, + product_id, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if product_id is not None: + + _query_params.append(('productId', product_id)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/flexible/position', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_flexible_redeem_post( + self, + product_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + redeem_all: Annotated[Optional[StrictBool], Field(description="true or false, default to false")] = None, + amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="if redeemAll is false, amount is mandatory")] = None, + dest_account: Annotated[Optional[StrictStr], Field(description="SPOT,FUND,ALL, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnFlexibleRedeemPost200Response: + """Redeem Flexible Product (TRADE) + + Weight(IP): 1 Rate Limit: 1/3s per account + + :param product_id: (required) + :type product_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param redeem_all: true or false, default to false + :type redeem_all: bool + :param amount: if redeemAll is false, amount is mandatory + :type amount: float + :param dest_account: SPOT,FUND,ALL, default SPOT + :type dest_account: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_redeem_post_serialize( + product_id=product_id, + timestamp=timestamp, + signature=signature, + redeem_all=redeem_all, + amount=amount, + dest_account=dest_account, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_flexible_redeem_post_with_http_info( + self, + product_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + redeem_all: Annotated[Optional[StrictBool], Field(description="true or false, default to false")] = None, + amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="if redeemAll is false, amount is mandatory")] = None, + dest_account: Annotated[Optional[StrictStr], Field(description="SPOT,FUND,ALL, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnFlexibleRedeemPost200Response]: + """Redeem Flexible Product (TRADE) + + Weight(IP): 1 Rate Limit: 1/3s per account + + :param product_id: (required) + :type product_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param redeem_all: true or false, default to false + :type redeem_all: bool + :param amount: if redeemAll is false, amount is mandatory + :type amount: float + :param dest_account: SPOT,FUND,ALL, default SPOT + :type dest_account: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_redeem_post_serialize( + product_id=product_id, + timestamp=timestamp, + signature=signature, + redeem_all=redeem_all, + amount=amount, + dest_account=dest_account, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_flexible_redeem_post_without_preload_content( + self, + product_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + redeem_all: Annotated[Optional[StrictBool], Field(description="true or false, default to false")] = None, + amount: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="if redeemAll is false, amount is mandatory")] = None, + dest_account: Annotated[Optional[StrictStr], Field(description="SPOT,FUND,ALL, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Redeem Flexible Product (TRADE) + + Weight(IP): 1 Rate Limit: 1/3s per account + + :param product_id: (required) + :type product_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param redeem_all: true or false, default to false + :type redeem_all: bool + :param amount: if redeemAll is false, amount is mandatory + :type amount: float + :param dest_account: SPOT,FUND,ALL, default SPOT + :type dest_account: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_redeem_post_serialize( + product_id=product_id, + timestamp=timestamp, + signature=signature, + redeem_all=redeem_all, + amount=amount, + dest_account=dest_account, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_flexible_redeem_post_serialize( + self, + product_id, + timestamp, + signature, + redeem_all, + amount, + dest_account, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if product_id is not None: + + _query_params.append(('productId', product_id)) + + if redeem_all is not None: + + _query_params.append(('redeemAll', redeem_all)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if dest_account is not None: + + _query_params.append(('destAccount', dest_account)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/simple-earn/flexible/redeem', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_flexible_set_auto_subscribe_post( + self, + product_id: StrictStr, + auto_subscribe: Annotated[StrictBool, Field(description="true or false")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginMaxLeveragePost200Response: + """Set Flexible Auto Subscribe (USER_DATA) + + Weight(IP): 150 + + :param product_id: (required) + :type product_id: str + :param auto_subscribe: true or false (required) + :type auto_subscribe: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_set_auto_subscribe_post_serialize( + product_id=product_id, + auto_subscribe=auto_subscribe, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxLeveragePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_flexible_set_auto_subscribe_post_with_http_info( + self, + product_id: StrictStr, + auto_subscribe: Annotated[StrictBool, Field(description="true or false")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginMaxLeveragePost200Response]: + """Set Flexible Auto Subscribe (USER_DATA) + + Weight(IP): 150 + + :param product_id: (required) + :type product_id: str + :param auto_subscribe: true or false (required) + :type auto_subscribe: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_set_auto_subscribe_post_serialize( + product_id=product_id, + auto_subscribe=auto_subscribe, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxLeveragePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_flexible_set_auto_subscribe_post_without_preload_content( + self, + product_id: StrictStr, + auto_subscribe: Annotated[StrictBool, Field(description="true or false")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set Flexible Auto Subscribe (USER_DATA) + + Weight(IP): 150 + + :param product_id: (required) + :type product_id: str + :param auto_subscribe: true or false (required) + :type auto_subscribe: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_set_auto_subscribe_post_serialize( + product_id=product_id, + auto_subscribe=auto_subscribe, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxLeveragePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_flexible_set_auto_subscribe_post_serialize( + self, + product_id, + auto_subscribe, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if product_id is not None: + + _query_params.append(('productId', product_id)) + + if auto_subscribe is not None: + + _query_params.append(('autoSubscribe', auto_subscribe)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/simple-earn/flexible/setAutoSubscribe', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_flexible_subscribe_post( + self, + product_id: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + auto_subscribe: Annotated[Optional[StrictBool], Field(description="true or false, default true.")] = None, + source_account: Annotated[Optional[StrictStr], Field(description="SPOT,FUND,ALL, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnFlexibleSubscribePost200Response: + """Subscribe Flexible Product (TRADE) + + Weight(IP): 1 Rate Limit: 1/3s per account + + :param product_id: (required) + :type product_id: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param auto_subscribe: true or false, default true. + :type auto_subscribe: bool + :param source_account: SPOT,FUND,ALL, default SPOT + :type source_account: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_subscribe_post_serialize( + product_id=product_id, + amount=amount, + timestamp=timestamp, + signature=signature, + auto_subscribe=auto_subscribe, + source_account=source_account, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleSubscribePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_flexible_subscribe_post_with_http_info( + self, + product_id: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + auto_subscribe: Annotated[Optional[StrictBool], Field(description="true or false, default true.")] = None, + source_account: Annotated[Optional[StrictStr], Field(description="SPOT,FUND,ALL, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnFlexibleSubscribePost200Response]: + """Subscribe Flexible Product (TRADE) + + Weight(IP): 1 Rate Limit: 1/3s per account + + :param product_id: (required) + :type product_id: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param auto_subscribe: true or false, default true. + :type auto_subscribe: bool + :param source_account: SPOT,FUND,ALL, default SPOT + :type source_account: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_subscribe_post_serialize( + product_id=product_id, + amount=amount, + timestamp=timestamp, + signature=signature, + auto_subscribe=auto_subscribe, + source_account=source_account, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleSubscribePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_flexible_subscribe_post_without_preload_content( + self, + product_id: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + auto_subscribe: Annotated[Optional[StrictBool], Field(description="true or false, default true.")] = None, + source_account: Annotated[Optional[StrictStr], Field(description="SPOT,FUND,ALL, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Subscribe Flexible Product (TRADE) + + Weight(IP): 1 Rate Limit: 1/3s per account + + :param product_id: (required) + :type product_id: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param auto_subscribe: true or false, default true. + :type auto_subscribe: bool + :param source_account: SPOT,FUND,ALL, default SPOT + :type source_account: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_subscribe_post_serialize( + product_id=product_id, + amount=amount, + timestamp=timestamp, + signature=signature, + auto_subscribe=auto_subscribe, + source_account=source_account, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleSubscribePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_flexible_subscribe_post_serialize( + self, + product_id, + amount, + timestamp, + signature, + auto_subscribe, + source_account, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if product_id is not None: + + _query_params.append(('productId', product_id)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if auto_subscribe is not None: + + _query_params.append(('autoSubscribe', auto_subscribe)) + + if source_account is not None: + + _query_params.append(('sourceAccount', source_account)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/simple-earn/flexible/subscribe', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_flexible_subscription_preview_get( + self, + product_id: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response: + """Get Flexible Subscription Preview (USER_DATA) + + Weight(IP): 150 + + :param product_id: (required) + :type product_id: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_subscription_preview_get_serialize( + product_id=product_id, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_flexible_subscription_preview_get_with_http_info( + self, + product_id: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response]: + """Get Flexible Subscription Preview (USER_DATA) + + Weight(IP): 150 + + :param product_id: (required) + :type product_id: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_subscription_preview_get_serialize( + product_id=product_id, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_flexible_subscription_preview_get_without_preload_content( + self, + product_id: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Flexible Subscription Preview (USER_DATA) + + Weight(IP): 150 + + :param product_id: (required) + :type product_id: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_flexible_subscription_preview_get_serialize( + product_id=product_id, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_flexible_subscription_preview_get_serialize( + self, + product_id, + amount, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if product_id is not None: + + _query_params.append(('productId', product_id)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/flexible/subscriptionPreview', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_locked_history_redemption_record_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_id: Optional[StrictStr] = None, + redeem_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response: + """Get Locked Redemption Record (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_id: + :type position_id: str + :param redeem_id: + :type redeem_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_history_redemption_record_get_serialize( + timestamp=timestamp, + signature=signature, + position_id=position_id, + redeem_id=redeem_id, + asset=asset, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_locked_history_redemption_record_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_id: Optional[StrictStr] = None, + redeem_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response]: + """Get Locked Redemption Record (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_id: + :type position_id: str + :param redeem_id: + :type redeem_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_history_redemption_record_get_serialize( + timestamp=timestamp, + signature=signature, + position_id=position_id, + redeem_id=redeem_id, + asset=asset, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_locked_history_redemption_record_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_id: Optional[StrictStr] = None, + redeem_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Locked Redemption Record (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_id: + :type position_id: str + :param redeem_id: + :type redeem_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_history_redemption_record_get_serialize( + timestamp=timestamp, + signature=signature, + position_id=position_id, + redeem_id=redeem_id, + asset=asset, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_locked_history_redemption_record_get_serialize( + self, + timestamp, + signature, + position_id, + redeem_id, + asset, + start_time, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if position_id is not None: + + _query_params.append(('positionId', position_id)) + + if redeem_id is not None: + + _query_params.append(('redeemId', redeem_id)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/locked/history/redemptionRecord', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_locked_history_rewards_record_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response: + """Get Locked Rewards History (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_id: + :type position_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_history_rewards_record_get_serialize( + timestamp=timestamp, + signature=signature, + position_id=position_id, + asset=asset, + start_time=start_time, + end_time=end_time, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_locked_history_rewards_record_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response]: + """Get Locked Rewards History (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_id: + :type position_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_history_rewards_record_get_serialize( + timestamp=timestamp, + signature=signature, + position_id=position_id, + asset=asset, + start_time=start_time, + end_time=end_time, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_locked_history_rewards_record_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + position_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Locked Rewards History (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param position_id: + :type position_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_history_rewards_record_get_serialize( + timestamp=timestamp, + signature=signature, + position_id=position_id, + asset=asset, + start_time=start_time, + end_time=end_time, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_locked_history_rewards_record_get_serialize( + self, + timestamp, + signature, + position_id, + asset, + start_time, + end_time, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if position_id is not None: + + _query_params.append(('positionId', position_id)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/locked/history/rewardsRecord', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_locked_history_subscription_record_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + purchase_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response: + """Get Locked Subscription Record (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param purchase_id: + :type purchase_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_history_subscription_record_get_serialize( + timestamp=timestamp, + signature=signature, + purchase_id=purchase_id, + asset=asset, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_locked_history_subscription_record_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + purchase_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response]: + """Get Locked Subscription Record (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param purchase_id: + :type purchase_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_history_subscription_record_get_serialize( + timestamp=timestamp, + signature=signature, + purchase_id=purchase_id, + asset=asset, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_locked_history_subscription_record_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + purchase_id: Optional[StrictStr] = None, + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Locked Subscription Record (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param purchase_id: + :type purchase_id: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_history_subscription_record_get_serialize( + timestamp=timestamp, + signature=signature, + purchase_id=purchase_id, + asset=asset, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_locked_history_subscription_record_get_serialize( + self, + timestamp, + signature, + purchase_id, + asset, + start_time, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if purchase_id is not None: + + _query_params.append(('purchaseId', purchase_id)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/locked/history/subscriptionRecord', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_locked_list_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnLockedListGet200Response: + """Get Simple Earn Locked Product List (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_list_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_locked_list_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnLockedListGet200Response]: + """Get Simple Earn Locked Product List (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_list_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_locked_list_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Simple Earn Locked Product List (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_list_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_locked_list_get_serialize( + self, + timestamp, + signature, + asset, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/locked/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_locked_personal_left_quota_get( + self, + project_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response: + """Get Locked Personal Left Quota (USER_DATA) + + Weight(IP): 150 + + :param project_id: (required) + :type project_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_personal_left_quota_get_serialize( + project_id=project_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_locked_personal_left_quota_get_with_http_info( + self, + project_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response]: + """Get Locked Personal Left Quota (USER_DATA) + + Weight(IP): 150 + + :param project_id: (required) + :type project_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_personal_left_quota_get_serialize( + project_id=project_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_locked_personal_left_quota_get_without_preload_content( + self, + project_id: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Locked Personal Left Quota (USER_DATA) + + Weight(IP): 150 + + :param project_id: (required) + :type project_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_personal_left_quota_get_serialize( + project_id=project_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_locked_personal_left_quota_get_serialize( + self, + project_id, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if project_id is not None: + + _query_params.append(('projectId', project_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/locked/personalLeftQuota', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_locked_position_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + position_id: Optional[StrictStr] = None, + project_id: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnLockedPositionGet200Response: + """Get Locked Product Position (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param position_id: + :type position_id: str + :param project_id: + :type project_id: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_position_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + position_id=position_id, + project_id=project_id, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedPositionGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_locked_position_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + position_id: Optional[StrictStr] = None, + project_id: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnLockedPositionGet200Response]: + """Get Locked Product Position (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param position_id: + :type position_id: str + :param project_id: + :type project_id: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_position_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + position_id=position_id, + project_id=project_id, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedPositionGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_locked_position_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + position_id: Optional[StrictStr] = None, + project_id: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Locked Product Position (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param position_id: + :type position_id: str + :param project_id: + :type project_id: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_position_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + position_id=position_id, + project_id=project_id, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedPositionGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_locked_position_get_serialize( + self, + timestamp, + signature, + asset, + position_id, + project_id, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if position_id is not None: + + _query_params.append(('positionId', position_id)) + + if project_id is not None: + + _query_params.append(('projectId', project_id)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/locked/position', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_locked_redeem_post( + self, + position_id: Annotated[StrictStr, Field(description="1234")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnFlexibleRedeemPost200Response: + """Redeem Locked Product (TRADE) + + Weight(IP): 1 Rate Limit: 1/3s per account + + :param position_id: 1234 (required) + :type position_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_redeem_post_serialize( + position_id=position_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_locked_redeem_post_with_http_info( + self, + position_id: Annotated[StrictStr, Field(description="1234")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnFlexibleRedeemPost200Response]: + """Redeem Locked Product (TRADE) + + Weight(IP): 1 Rate Limit: 1/3s per account + + :param position_id: 1234 (required) + :type position_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_redeem_post_serialize( + position_id=position_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_locked_redeem_post_without_preload_content( + self, + position_id: Annotated[StrictStr, Field(description="1234")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Redeem Locked Product (TRADE) + + Weight(IP): 1 Rate Limit: 1/3s per account + + :param position_id: 1234 (required) + :type position_id: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_redeem_post_serialize( + position_id=position_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnFlexibleRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_locked_redeem_post_serialize( + self, + position_id, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if position_id is not None: + + _query_params.append(('positionId', position_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/simple-earn/locked/redeem', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_locked_set_auto_subscribe_post( + self, + position_id: StrictStr, + auto_subscribe: Annotated[StrictBool, Field(description="true or false")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1MarginMaxLeveragePost200Response: + """Set Locked Auto Subscribe (USER_DATA) + + Weight(IP): 150 + + :param position_id: (required) + :type position_id: str + :param auto_subscribe: true or false (required) + :type auto_subscribe: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_set_auto_subscribe_post_serialize( + position_id=position_id, + auto_subscribe=auto_subscribe, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxLeveragePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_locked_set_auto_subscribe_post_with_http_info( + self, + position_id: StrictStr, + auto_subscribe: Annotated[StrictBool, Field(description="true or false")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1MarginMaxLeveragePost200Response]: + """Set Locked Auto Subscribe (USER_DATA) + + Weight(IP): 150 + + :param position_id: (required) + :type position_id: str + :param auto_subscribe: true or false (required) + :type auto_subscribe: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_set_auto_subscribe_post_serialize( + position_id=position_id, + auto_subscribe=auto_subscribe, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxLeveragePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_locked_set_auto_subscribe_post_without_preload_content( + self, + position_id: StrictStr, + auto_subscribe: Annotated[StrictBool, Field(description="true or false")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set Locked Auto Subscribe (USER_DATA) + + Weight(IP): 150 + + :param position_id: (required) + :type position_id: str + :param auto_subscribe: true or false (required) + :type auto_subscribe: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_set_auto_subscribe_post_serialize( + position_id=position_id, + auto_subscribe=auto_subscribe, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1MarginMaxLeveragePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_locked_set_auto_subscribe_post_serialize( + self, + position_id, + auto_subscribe, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if position_id is not None: + + _query_params.append(('positionId', position_id)) + + if auto_subscribe is not None: + + _query_params.append(('autoSubscribe', auto_subscribe)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/simple-earn/locked/setAutoSubscribe', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_locked_subscribe_post( + self, + project_id: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + auto_subscribe: Annotated[Optional[StrictBool], Field(description="true or false, default true.")] = None, + source_account: Annotated[Optional[StrictStr], Field(description="SPOT,FUND,ALL, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SimpleEarnLockedSubscribePost200Response: + """Subscribe Locked Product (TRADE) + + Weight(IP): 1 Rate Limit: 1/3s per account + + :param project_id: (required) + :type project_id: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param auto_subscribe: true or false, default true. + :type auto_subscribe: bool + :param source_account: SPOT,FUND,ALL, default SPOT + :type source_account: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_subscribe_post_serialize( + project_id=project_id, + amount=amount, + timestamp=timestamp, + signature=signature, + auto_subscribe=auto_subscribe, + source_account=source_account, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedSubscribePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_locked_subscribe_post_with_http_info( + self, + project_id: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + auto_subscribe: Annotated[Optional[StrictBool], Field(description="true or false, default true.")] = None, + source_account: Annotated[Optional[StrictStr], Field(description="SPOT,FUND,ALL, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SimpleEarnLockedSubscribePost200Response]: + """Subscribe Locked Product (TRADE) + + Weight(IP): 1 Rate Limit: 1/3s per account + + :param project_id: (required) + :type project_id: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param auto_subscribe: true or false, default true. + :type auto_subscribe: bool + :param source_account: SPOT,FUND,ALL, default SPOT + :type source_account: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_subscribe_post_serialize( + project_id=project_id, + amount=amount, + timestamp=timestamp, + signature=signature, + auto_subscribe=auto_subscribe, + source_account=source_account, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedSubscribePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_locked_subscribe_post_without_preload_content( + self, + project_id: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + auto_subscribe: Annotated[Optional[StrictBool], Field(description="true or false, default true.")] = None, + source_account: Annotated[Optional[StrictStr], Field(description="SPOT,FUND,ALL, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Subscribe Locked Product (TRADE) + + Weight(IP): 1 Rate Limit: 1/3s per account + + :param project_id: (required) + :type project_id: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param auto_subscribe: true or false, default true. + :type auto_subscribe: bool + :param source_account: SPOT,FUND,ALL, default SPOT + :type source_account: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_subscribe_post_serialize( + project_id=project_id, + amount=amount, + timestamp=timestamp, + signature=signature, + auto_subscribe=auto_subscribe, + source_account=source_account, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SimpleEarnLockedSubscribePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_locked_subscribe_post_serialize( + self, + project_id, + amount, + timestamp, + signature, + auto_subscribe, + source_account, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if project_id is not None: + + _query_params.append(('projectId', project_id)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if auto_subscribe is not None: + + _query_params.append(('autoSubscribe', auto_subscribe)) + + if source_account is not None: + + _query_params.append(('sourceAccount', source_account)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/simple-earn/locked/subscribe', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_simple_earn_locked_subscription_preview_get( + self, + project_id: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + auto_subscribe: Annotated[Optional[StrictBool], Field(description="true or false, default true.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner]: + """Get Locked Subscription Preview (USER_DATA) + + Weight(IP): 150 + + :param project_id: (required) + :type project_id: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param auto_subscribe: true or false, default true. + :type auto_subscribe: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_subscription_preview_get_serialize( + project_id=project_id, + amount=amount, + timestamp=timestamp, + signature=signature, + auto_subscribe=auto_subscribe, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_simple_earn_locked_subscription_preview_get_with_http_info( + self, + project_id: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + auto_subscribe: Annotated[Optional[StrictBool], Field(description="true or false, default true.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner]]: + """Get Locked Subscription Preview (USER_DATA) + + Weight(IP): 150 + + :param project_id: (required) + :type project_id: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param auto_subscribe: true or false, default true. + :type auto_subscribe: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_subscription_preview_get_serialize( + project_id=project_id, + amount=amount, + timestamp=timestamp, + signature=signature, + auto_subscribe=auto_subscribe, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_simple_earn_locked_subscription_preview_get_without_preload_content( + self, + project_id: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + auto_subscribe: Annotated[Optional[StrictBool], Field(description="true or false, default true.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Locked Subscription Preview (USER_DATA) + + Weight(IP): 150 + + :param project_id: (required) + :type project_id: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param auto_subscribe: true or false, default true. + :type auto_subscribe: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_simple_earn_locked_subscription_preview_get_serialize( + project_id=project_id, + amount=amount, + timestamp=timestamp, + signature=signature, + auto_subscribe=auto_subscribe, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_simple_earn_locked_subscription_preview_get_serialize( + self, + project_id, + amount, + timestamp, + signature, + auto_subscribe, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if project_id is not None: + + _query_params.append(('projectId', project_id)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if auto_subscribe is not None: + + _query_params.append(('autoSubscribe', auto_subscribe)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/simple-earn/locked/subscriptionPreview', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/spot_algo_api.py b/target/python/binance_openapi/openapi_client/api/spot_algo_api.py new file mode 100644 index 0000000..6d9847a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/spot_algo_api.py @@ -0,0 +1,1820 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_algo_spot_historical_orders_get200_response import SapiV1AlgoSpotHistoricalOrdersGet200Response +from openapi_client.models.sapi_v1_algo_spot_new_order_twap_post200_response import SapiV1AlgoSpotNewOrderTwapPost200Response +from openapi_client.models.sapi_v1_algo_spot_open_orders_get200_response import SapiV1AlgoSpotOpenOrdersGet200Response +from openapi_client.models.sapi_v1_algo_spot_order_delete200_response import SapiV1AlgoSpotOrderDelete200Response +from openapi_client.models.sapi_v1_algo_spot_sub_orders_get200_response import SapiV1AlgoSpotSubOrdersGet200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class SpotAlgoApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_algo_spot_historical_orders_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AlgoSpotHistoricalOrdersGet200Response: + """Query Historical Algo Orders + + Get all historical SPOT TWAP orders Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_historical_orders_get_serialize( + symbol=symbol, + side=side, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotHistoricalOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_algo_spot_historical_orders_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AlgoSpotHistoricalOrdersGet200Response]: + """Query Historical Algo Orders + + Get all historical SPOT TWAP orders Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_historical_orders_get_serialize( + symbol=symbol, + side=side, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotHistoricalOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_algo_spot_historical_orders_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Historical Algo Orders + + Get all historical SPOT TWAP orders Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_historical_orders_get_serialize( + symbol=symbol, + side=side, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotHistoricalOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_algo_spot_historical_orders_get_serialize( + self, + symbol, + side, + timestamp, + signature, + start_time, + end_time, + page, + page_size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if side is not None: + + _query_params.append(('side', side)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/algo/spot/historicalOrders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_algo_spot_new_order_twap_post( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Union[StrictFloat, StrictInt], + duration: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + client_algo_id: Optional[StrictStr] = None, + limit_price: Optional[Union[StrictFloat, StrictInt]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AlgoSpotNewOrderTwapPost200Response: + """Time-Weighted Average Price (Twap) New Order + + Place a new spot TWAP order with Algo service. Weight(UID): 3000 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: (required) + :type quantity: float + :param duration: (required) + :type duration: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param client_algo_id: + :type client_algo_id: str + :param limit_price: + :type limit_price: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_new_order_twap_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + duration=duration, + timestamp=timestamp, + signature=signature, + client_algo_id=client_algo_id, + limit_price=limit_price, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotNewOrderTwapPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_algo_spot_new_order_twap_post_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Union[StrictFloat, StrictInt], + duration: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + client_algo_id: Optional[StrictStr] = None, + limit_price: Optional[Union[StrictFloat, StrictInt]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AlgoSpotNewOrderTwapPost200Response]: + """Time-Weighted Average Price (Twap) New Order + + Place a new spot TWAP order with Algo service. Weight(UID): 3000 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: (required) + :type quantity: float + :param duration: (required) + :type duration: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param client_algo_id: + :type client_algo_id: str + :param limit_price: + :type limit_price: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_new_order_twap_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + duration=duration, + timestamp=timestamp, + signature=signature, + client_algo_id=client_algo_id, + limit_price=limit_price, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotNewOrderTwapPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_algo_spot_new_order_twap_post_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Union[StrictFloat, StrictInt], + duration: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + client_algo_id: Optional[StrictStr] = None, + limit_price: Optional[Union[StrictFloat, StrictInt]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Time-Weighted Average Price (Twap) New Order + + Place a new spot TWAP order with Algo service. Weight(UID): 3000 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: (required) + :type quantity: float + :param duration: (required) + :type duration: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param client_algo_id: + :type client_algo_id: str + :param limit_price: + :type limit_price: float + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_new_order_twap_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + duration=duration, + timestamp=timestamp, + signature=signature, + client_algo_id=client_algo_id, + limit_price=limit_price, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotNewOrderTwapPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_algo_spot_new_order_twap_post_serialize( + self, + symbol, + side, + quantity, + duration, + timestamp, + signature, + client_algo_id, + limit_price, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if side is not None: + + _query_params.append(('side', side)) + + if quantity is not None: + + _query_params.append(('quantity', quantity)) + + if duration is not None: + + _query_params.append(('duration', duration)) + + if client_algo_id is not None: + + _query_params.append(('clientAlgoId', client_algo_id)) + + if limit_price is not None: + + _query_params.append(('limitPrice', limit_price)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/algo/spot/newOrderTwap', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_algo_spot_open_orders_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AlgoSpotOpenOrdersGet200Response: + """Query Current Algo Open Orders + + Get all open SPOT TWAP orders Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotOpenOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_algo_spot_open_orders_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AlgoSpotOpenOrdersGet200Response]: + """Query Current Algo Open Orders + + Get all open SPOT TWAP orders Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotOpenOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_algo_spot_open_orders_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Current Algo Open Orders + + Get all open SPOT TWAP orders Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotOpenOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_algo_spot_open_orders_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/algo/spot/openOrders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_algo_spot_order_delete( + self, + algo_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AlgoSpotOrderDelete200Response: + """Cancel Algo Order + + Cancel an open TWAP order Weight(IP): 1 + + :param algo_id: (required) + :type algo_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_order_delete_serialize( + algo_id=algo_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotOrderDelete200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_algo_spot_order_delete_with_http_info( + self, + algo_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AlgoSpotOrderDelete200Response]: + """Cancel Algo Order + + Cancel an open TWAP order Weight(IP): 1 + + :param algo_id: (required) + :type algo_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_order_delete_serialize( + algo_id=algo_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotOrderDelete200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_algo_spot_order_delete_without_preload_content( + self, + algo_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel Algo Order + + Cancel an open TWAP order Weight(IP): 1 + + :param algo_id: (required) + :type algo_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_order_delete_serialize( + algo_id=algo_id, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotOrderDelete200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_algo_spot_order_delete_serialize( + self, + algo_id, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if algo_id is not None: + + _query_params.append(('algoId', algo_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/sapi/v1/algo/spot/order', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_algo_spot_sub_orders_get( + self, + algo_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AlgoSpotSubOrdersGet200Response: + """Query Sub Orders + + Get respective sub orders for a specified algoId Weight(IP): 1 + + :param algo_id: (required) + :type algo_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page: Default 1 + :type page: int + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_sub_orders_get_serialize( + algo_id=algo_id, + timestamp=timestamp, + signature=signature, + page=page, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotSubOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_algo_spot_sub_orders_get_with_http_info( + self, + algo_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AlgoSpotSubOrdersGet200Response]: + """Query Sub Orders + + Get respective sub orders for a specified algoId Weight(IP): 1 + + :param algo_id: (required) + :type algo_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page: Default 1 + :type page: int + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_sub_orders_get_serialize( + algo_id=algo_id, + timestamp=timestamp, + signature=signature, + page=page, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotSubOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_algo_spot_sub_orders_get_without_preload_content( + self, + algo_id: StrictInt, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + page_size: Annotated[Optional[StrictStr], Field(description="MIN 1, MAX 100; Default 100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Sub Orders + + Get respective sub orders for a specified algoId Weight(IP): 1 + + :param algo_id: (required) + :type algo_id: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page: Default 1 + :type page: int + :param page_size: MIN 1, MAX 100; Default 100 + :type page_size: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_algo_spot_sub_orders_get_serialize( + algo_id=algo_id, + timestamp=timestamp, + signature=signature, + page=page, + page_size=page_size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AlgoSpotSubOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_algo_spot_sub_orders_get_serialize( + self, + algo_id, + timestamp, + signature, + page, + page_size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if algo_id is not None: + + _query_params.append(('algoId', algo_id)) + + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/algo/spot/subOrders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/staking_api.py b/target/python/binance_openapi/openapi_client/api/staking_api.py new file mode 100644 index 0000000..accdc32 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/staking_api.py @@ -0,0 +1,4206 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr +from typing import Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_eth_staking_eth_history_rate_history_get200_response import SapiV1EthStakingEthHistoryRateHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_redemption_history_get200_response import SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_rewards_history_get200_response import SapiV1EthStakingEthHistoryRewardsHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_staking_history_get200_response import SapiV1EthStakingEthHistoryStakingHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response import SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_quota_get200_response import SapiV1EthStakingEthQuotaGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_redeem_post200_response import SapiV1EthStakingEthRedeemPost200Response +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response import SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response import SapiV1EthStakingWbethHistoryWrapHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_wbeth_wrap_post200_response import SapiV1EthStakingWbethWrapPost200Response +from openapi_client.models.sapi_v2_eth_staking_account_get200_response import SapiV2EthStakingAccountGet200Response +from openapi_client.models.sapi_v2_eth_staking_eth_stake_post200_response import SapiV2EthStakingEthStakePost200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class StakingApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_eth_staking_eth_history_rate_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1EthStakingEthHistoryRateHistoryGet200Response: + """Get WBETH Rate History (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_rate_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryRateHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_eth_staking_eth_history_rate_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1EthStakingEthHistoryRateHistoryGet200Response]: + """Get WBETH Rate History (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_rate_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryRateHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_eth_staking_eth_history_rate_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get WBETH Rate History (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_rate_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryRateHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_eth_staking_eth_history_rate_history_get_serialize( + self, + timestamp, + signature, + start_time, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/eth-staking/eth/history/rateHistory', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_eth_staking_eth_history_redemption_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response: + """Get ETH redemption history (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_redemption_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_eth_staking_eth_history_redemption_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response]: + """Get ETH redemption history (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_redemption_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_eth_staking_eth_history_redemption_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get ETH redemption history (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_redemption_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_eth_staking_eth_history_redemption_history_get_serialize( + self, + timestamp, + signature, + start_time, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/eth-staking/eth/history/redemptionHistory', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_eth_staking_eth_history_rewards_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1EthStakingEthHistoryRewardsHistoryGet200Response: + """Get BETH rewards distribution history(USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_rewards_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryRewardsHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_eth_staking_eth_history_rewards_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1EthStakingEthHistoryRewardsHistoryGet200Response]: + """Get BETH rewards distribution history(USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_rewards_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryRewardsHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_eth_staking_eth_history_rewards_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get BETH rewards distribution history(USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_rewards_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryRewardsHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_eth_staking_eth_history_rewards_history_get_serialize( + self, + timestamp, + signature, + start_time, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/eth-staking/eth/history/rewardsHistory', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_eth_staking_eth_history_staking_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1EthStakingEthHistoryStakingHistoryGet200Response: + """Get ETH staking history (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_staking_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryStakingHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_eth_staking_eth_history_staking_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1EthStakingEthHistoryStakingHistoryGet200Response]: + """Get ETH staking history (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_staking_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryStakingHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_eth_staking_eth_history_staking_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get ETH staking history (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_staking_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryStakingHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_eth_staking_eth_history_staking_history_get_serialize( + self, + timestamp, + signature, + start_time, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/eth-staking/eth/history/stakingHistory', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response: + """Get WBETH rewards history(USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response]: + """Get WBETH rewards history(USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get WBETH rewards history(USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_serialize( + self, + timestamp, + signature, + start_time, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/eth-staking/eth/history/wbethRewardsHistory', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_eth_staking_eth_quota_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1EthStakingEthQuotaGet200Response: + """Get current ETH staking quota (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_quota_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthQuotaGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_eth_staking_eth_quota_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1EthStakingEthQuotaGet200Response]: + """Get current ETH staking quota (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_quota_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthQuotaGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_eth_staking_eth_quota_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get current ETH staking quota (USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_quota_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthQuotaGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_eth_staking_eth_quota_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/eth-staking/eth/quota', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_eth_staking_eth_redeem_post( + self, + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Amount in BETH, limit 8 decimals")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Annotated[Optional[StrictStr], Field(description="WBETH or BETH, default to BETH")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1EthStakingEthRedeemPost200Response: + """Redeem ETH (TRADE) + + Redeem WBETH or BETH and get ETH - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 + + :param amount: Amount in BETH, limit 8 decimals (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: WBETH or BETH, default to BETH + :type asset: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_redeem_post_serialize( + amount=amount, + timestamp=timestamp, + signature=signature, + asset=asset, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_eth_staking_eth_redeem_post_with_http_info( + self, + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Amount in BETH, limit 8 decimals")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Annotated[Optional[StrictStr], Field(description="WBETH or BETH, default to BETH")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1EthStakingEthRedeemPost200Response]: + """Redeem ETH (TRADE) + + Redeem WBETH or BETH and get ETH - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 + + :param amount: Amount in BETH, limit 8 decimals (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: WBETH or BETH, default to BETH + :type asset: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_redeem_post_serialize( + amount=amount, + timestamp=timestamp, + signature=signature, + asset=asset, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_eth_staking_eth_redeem_post_without_preload_content( + self, + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Amount in BETH, limit 8 decimals")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Annotated[Optional[StrictStr], Field(description="WBETH or BETH, default to BETH")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Redeem ETH (TRADE) + + Redeem WBETH or BETH and get ETH - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 + + :param amount: Amount in BETH, limit 8 decimals (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: WBETH or BETH, default to BETH + :type asset: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_eth_redeem_post_serialize( + amount=amount, + timestamp=timestamp, + signature=signature, + asset=asset, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingEthRedeemPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_eth_staking_eth_redeem_post_serialize( + self, + amount, + timestamp, + signature, + asset, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/eth-staking/eth/redeem', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_eth_staking_wbeth_history_unwrap_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response: + """Get WBETH unwrap history (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_wbeth_history_unwrap_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_eth_staking_wbeth_history_unwrap_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response]: + """Get WBETH unwrap history (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_wbeth_history_unwrap_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_eth_staking_wbeth_history_unwrap_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get WBETH unwrap history (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_wbeth_history_unwrap_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_eth_staking_wbeth_history_unwrap_history_get_serialize( + self, + timestamp, + signature, + start_time, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/eth-staking/wbeth/history/unwrapHistory', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_eth_staking_wbeth_history_wrap_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1EthStakingWbethHistoryWrapHistoryGet200Response: + """Get WBETH wrap history (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_wbeth_history_wrap_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingWbethHistoryWrapHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_eth_staking_wbeth_history_wrap_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1EthStakingWbethHistoryWrapHistoryGet200Response]: + """Get WBETH wrap history (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_wbeth_history_wrap_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingWbethHistoryWrapHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_eth_staking_wbeth_history_wrap_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get WBETH wrap history (USER_DATA) + + - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_wbeth_history_wrap_history_get_serialize( + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingWbethHistoryWrapHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_eth_staking_wbeth_history_wrap_history_get_serialize( + self, + timestamp, + signature, + start_time, + end_time, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/eth-staking/wbeth/history/wrapHistory', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_eth_staking_wbeth_wrap_post( + self, + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Amount in BETH, limit 4 decimals")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1EthStakingWbethWrapPost200Response: + """Wrap BETH(TRADE) + + - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 + + :param amount: Amount in BETH, limit 4 decimals (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_wbeth_wrap_post_serialize( + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingWbethWrapPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_eth_staking_wbeth_wrap_post_with_http_info( + self, + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Amount in BETH, limit 4 decimals")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1EthStakingWbethWrapPost200Response]: + """Wrap BETH(TRADE) + + - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 + + :param amount: Amount in BETH, limit 4 decimals (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_wbeth_wrap_post_serialize( + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingWbethWrapPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_eth_staking_wbeth_wrap_post_without_preload_content( + self, + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Amount in BETH, limit 4 decimals")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Wrap BETH(TRADE) + + - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 + + :param amount: Amount in BETH, limit 4 decimals (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_eth_staking_wbeth_wrap_post_serialize( + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1EthStakingWbethWrapPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_eth_staking_wbeth_wrap_post_serialize( + self, + amount, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if amount is not None: + + _query_params.append(('amount', amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/eth-staking/wbeth/wrap', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_eth_staking_account_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2EthStakingAccountGet200Response: + """ETH Staking account V2(USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_eth_staking_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2EthStakingAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_eth_staking_account_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2EthStakingAccountGet200Response]: + """ETH Staking account V2(USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_eth_staking_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2EthStakingAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_eth_staking_account_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """ETH Staking account V2(USER_DATA) + + Weight(IP): 150 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_eth_staking_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2EthStakingAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_eth_staking_account_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v2/eth-staking/account', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_eth_staking_eth_stake_post( + self, + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Amount in ETH, limit 4 decimals")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2EthStakingEthStakePost200Response: + """Subscribe ETH Staking V2(TRADE) + + Stake ETH to get WBETH - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 + + :param amount: Amount in ETH, limit 4 decimals (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_eth_staking_eth_stake_post_serialize( + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2EthStakingEthStakePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_eth_staking_eth_stake_post_with_http_info( + self, + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Amount in ETH, limit 4 decimals")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2EthStakingEthStakePost200Response]: + """Subscribe ETH Staking V2(TRADE) + + Stake ETH to get WBETH - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 + + :param amount: Amount in ETH, limit 4 decimals (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_eth_staking_eth_stake_post_serialize( + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2EthStakingEthStakePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_eth_staking_eth_stake_post_without_preload_content( + self, + amount: Annotated[Union[StrictFloat, StrictInt], Field(description="Amount in ETH, limit 4 decimals")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Subscribe ETH Staking V2(TRADE) + + Stake ETH to get WBETH - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 + + :param amount: Amount in ETH, limit 4 decimals (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_eth_staking_eth_stake_post_serialize( + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2EthStakingEthStakePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_eth_staking_eth_stake_post_serialize( + self, + amount, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if amount is not None: + + _query_params.append(('amount', amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v2/eth-staking/eth/stake', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/stream_api.py b/target/python/binance_openapi/openapi_client/api/stream_api.py new file mode 100644 index 0000000..1d871ec --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/stream_api.py @@ -0,0 +1,811 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Any, Dict, Optional +from typing_extensions import Annotated +from openapi_client.models.api_v3_user_data_stream_post200_response import ApiV3UserDataStreamPost200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class StreamApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def api_v3_user_data_stream_delete( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Close a ListenKey (USER_STREAM) + + Close out a user data stream. Weight: 2 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_user_data_stream_delete_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_user_data_stream_delete_with_http_info( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Close a ListenKey (USER_STREAM) + + Close out a user data stream. Weight: 2 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_user_data_stream_delete_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_user_data_stream_delete_without_preload_content( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Close a ListenKey (USER_STREAM) + + Close out a user data stream. Weight: 2 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_user_data_stream_delete_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_user_data_stream_delete_serialize( + self, + listen_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if listen_key is not None: + + _query_params.append(('listenKey', listen_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/v3/userDataStream', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_user_data_stream_post( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3UserDataStreamPost200Response: + """Create a ListenKey (USER_STREAM) + + Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 2 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_user_data_stream_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3UserDataStreamPost200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_user_data_stream_post_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3UserDataStreamPost200Response]: + """Create a ListenKey (USER_STREAM) + + Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 2 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_user_data_stream_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3UserDataStreamPost200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_user_data_stream_post_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a ListenKey (USER_STREAM) + + Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 2 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_user_data_stream_post_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3UserDataStreamPost200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_user_data_stream_post_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v3/userDataStream', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_user_data_stream_put( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Ping/Keep-alive a ListenKey (USER_STREAM) + + Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 2 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_user_data_stream_put_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_user_data_stream_put_with_http_info( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Ping/Keep-alive a ListenKey (USER_STREAM) + + Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 2 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_user_data_stream_put_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_user_data_stream_put_without_preload_content( + self, + listen_key: Annotated[Optional[StrictStr], Field(description="User websocket listen key")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Ping/Keep-alive a ListenKey (USER_STREAM) + + Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 2 + + :param listen_key: User websocket listen key + :type listen_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_user_data_stream_put_serialize( + listen_key=listen_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_user_data_stream_put_serialize( + self, + listen_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if listen_key is not None: + + _query_params.append(('listenKey', listen_key)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/api/v3/userDataStream', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/sub_account_api.py b/target/python/binance_openapi/openapi_client/api/sub_account_api.py new file mode 100644 index 0000000..8619815 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/sub_account_api.py @@ -0,0 +1,15968 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_capital_deposit_sub_address_get200_response import SapiV1CapitalDepositSubAddressGet200Response +from openapi_client.models.sapi_v1_capital_deposit_sub_hisrec_get200_response_inner import SapiV1CapitalDepositSubHisrecGet200ResponseInner +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response import SapiV1ManagedSubaccountAccountSnapshotGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_asset_get200_response_inner import SapiV1ManagedSubaccountAssetGet200ResponseInner +from openapi_client.models.sapi_v1_managed_subaccount_deposit_address_get200_response import SapiV1ManagedSubaccountDepositAddressGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_deposit_post200_response import SapiV1ManagedSubaccountDepositPost200Response +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response import SapiV1ManagedSubaccountFetchFutureAssetGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_info_get200_response import SapiV1ManagedSubaccountInfoGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_margin_asset_get200_response import SapiV1ManagedSubaccountMarginAssetGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response import SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_get200_response import SapiV1ManagedSubaccountQueryTransLogGet200Response +from openapi_client.models.sapi_v1_sub_account_blvt_enable_post200_response import SapiV1SubAccountBlvtEnablePost200Response +from openapi_client.models.sapi_v1_sub_account_eoptions_enable_post200_response import SapiV1SubAccountEoptionsEnablePost200Response +from openapi_client.models.sapi_v1_sub_account_futures_account_get200_response import SapiV1SubAccountFuturesAccountGet200Response +from openapi_client.models.sapi_v1_sub_account_futures_account_summary_get200_response import SapiV1SubAccountFuturesAccountSummaryGet200Response +from openapi_client.models.sapi_v1_sub_account_futures_enable_post200_response import SapiV1SubAccountFuturesEnablePost200Response +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_get200_response import SapiV1SubAccountFuturesInternalTransferGet200Response +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_post200_response import SapiV1SubAccountFuturesInternalTransferPost200Response +from openapi_client.models.sapi_v1_sub_account_futures_position_risk_get200_response_inner import SapiV1SubAccountFuturesPositionRiskGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_futures_transfer_post200_response import SapiV1SubAccountFuturesTransferPost200Response +from openapi_client.models.sapi_v1_sub_account_list_get200_response import SapiV1SubAccountListGet200Response +from openapi_client.models.sapi_v1_sub_account_margin_account_get200_response import SapiV1SubAccountMarginAccountGet200Response +from openapi_client.models.sapi_v1_sub_account_margin_account_summary_get200_response import SapiV1SubAccountMarginAccountSummaryGet200Response +from openapi_client.models.sapi_v1_sub_account_margin_enable_post200_response import SapiV1SubAccountMarginEnablePost200Response +from openapi_client.models.sapi_v1_sub_account_spot_summary_get200_response import SapiV1SubAccountSpotSummaryGet200Response +from openapi_client.models.sapi_v1_sub_account_status_get200_response_inner import SapiV1SubAccountStatusGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response import SapiV1SubAccountSubAccountApiIpRestrictionGet200Response +from openapi_client.models.sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response import SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response +from openapi_client.models.sapi_v1_sub_account_sub_transfer_history_get200_response_inner import SapiV1SubAccountSubTransferHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_transaction_statistics_get200_response import SapiV1SubAccountTransactionStatisticsGet200Response +from openapi_client.models.sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner import SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_universal_transfer_get200_response_inner import SapiV1SubAccountUniversalTransferGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_universal_transfer_post200_response import SapiV1SubAccountUniversalTransferPost200Response +from openapi_client.models.sapi_v1_sub_account_virtual_sub_account_post200_response import SapiV1SubAccountVirtualSubAccountPost200Response +from openapi_client.models.sapi_v2_sub_account_futures_account_get200_response import SapiV2SubAccountFuturesAccountGet200Response +from openapi_client.models.sapi_v2_sub_account_futures_account_summary_get200_response import SapiV2SubAccountFuturesAccountSummaryGet200Response +from openapi_client.models.sapi_v2_sub_account_futures_position_risk_get200_response import SapiV2SubAccountFuturesPositionRiskGet200Response +from openapi_client.models.sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response import SapiV2SubAccountSubAccountApiIpRestrictionPost200Response +from openapi_client.models.sapi_v3_sub_account_assets_get200_response import SapiV3SubAccountAssetsGet200Response +from openapi_client.models.sapi_v4_sub_account_assets_get200_response import SapiV4SubAccountAssetsGet200Response + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class SubAccountApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_capital_deposit_sub_address_get( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + coin: Annotated[StrictStr, Field(description="Coin name")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + network: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1CapitalDepositSubAddressGet200Response: + """Sub-account Spot Assets Summary (For Master Account) + + Fetch sub-account deposit address Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param coin: Coin name (required) + :type coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param network: + :type network: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_sub_address_get_serialize( + email=email, + coin=coin, + timestamp=timestamp, + signature=signature, + network=network, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalDepositSubAddressGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_capital_deposit_sub_address_get_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + coin: Annotated[StrictStr, Field(description="Coin name")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + network: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1CapitalDepositSubAddressGet200Response]: + """Sub-account Spot Assets Summary (For Master Account) + + Fetch sub-account deposit address Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param coin: Coin name (required) + :type coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param network: + :type network: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_sub_address_get_serialize( + email=email, + coin=coin, + timestamp=timestamp, + signature=signature, + network=network, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalDepositSubAddressGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_capital_deposit_sub_address_get_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + coin: Annotated[StrictStr, Field(description="Coin name")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + network: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Sub-account Spot Assets Summary (For Master Account) + + Fetch sub-account deposit address Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param coin: Coin name (required) + :type coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param network: + :type network: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_sub_address_get_serialize( + email=email, + coin=coin, + timestamp=timestamp, + signature=signature, + network=network, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalDepositSubAddressGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_capital_deposit_sub_address_get_serialize( + self, + email, + coin, + timestamp, + signature, + network, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if coin is not None: + + _query_params.append(('coin', coin)) + + if network is not None: + + _query_params.append(('network', network)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/capital/deposit/subAddress', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_capital_deposit_sub_hisrec_get( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + status: Annotated[Optional[StrictInt], Field(description="0(0:pending,6: credited but cannot withdraw, 1:success)")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Optional[StrictInt] = None, + offset: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1CapitalDepositSubHisrecGet200ResponseInner]: + """Sub-account Deposit History (For Master Account) + + Fetch sub-account deposit history Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param status: 0(0:pending,6: credited but cannot withdraw, 1:success) + :type status: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: + :type limit: int + :param offset: + :type offset: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_sub_hisrec_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + coin=coin, + status=status, + start_time=start_time, + end_time=end_time, + limit=limit, + offset=offset, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalDepositSubHisrecGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_capital_deposit_sub_hisrec_get_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + status: Annotated[Optional[StrictInt], Field(description="0(0:pending,6: credited but cannot withdraw, 1:success)")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Optional[StrictInt] = None, + offset: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1CapitalDepositSubHisrecGet200ResponseInner]]: + """Sub-account Deposit History (For Master Account) + + Fetch sub-account deposit history Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param status: 0(0:pending,6: credited but cannot withdraw, 1:success) + :type status: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: + :type limit: int + :param offset: + :type offset: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_sub_hisrec_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + coin=coin, + status=status, + start_time=start_time, + end_time=end_time, + limit=limit, + offset=offset, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalDepositSubHisrecGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_capital_deposit_sub_hisrec_get_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + status: Annotated[Optional[StrictInt], Field(description="0(0:pending,6: credited but cannot withdraw, 1:success)")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Optional[StrictInt] = None, + offset: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Sub-account Deposit History (For Master Account) + + Fetch sub-account deposit history Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param status: 0(0:pending,6: credited but cannot withdraw, 1:success) + :type status: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: + :type limit: int + :param offset: + :type offset: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_sub_hisrec_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + coin=coin, + status=status, + start_time=start_time, + end_time=end_time, + limit=limit, + offset=offset, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalDepositSubHisrecGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_capital_deposit_sub_hisrec_get_serialize( + self, + email, + timestamp, + signature, + coin, + status, + start_time, + end_time, + limit, + offset, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if coin is not None: + + _query_params.append(('coin', coin)) + + if status is not None: + + _query_params.append(('status', status)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/capital/deposit/subHisrec', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_managed_subaccount_account_snapshot_get( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + type: Annotated[StrictStr, Field(description="\"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM)")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="min 7, max 30, default 7")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ManagedSubaccountAccountSnapshotGet200Response: + """Managed sub-account snapshot (For Investor Master Account) + + - The query time period must be less then 30 days - Support query within the last one month only - If `startTime` and `endTime` not sent, return records of the last 7 days by default Weight(IP): 2400 + + :param email: Sub-account email (required) + :type email: str + :param type: \"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM) (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: min 7, max 30, default 7 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_account_snapshot_get_serialize( + email=email, + type=type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountAccountSnapshotGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_managed_subaccount_account_snapshot_get_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + type: Annotated[StrictStr, Field(description="\"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM)")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="min 7, max 30, default 7")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ManagedSubaccountAccountSnapshotGet200Response]: + """Managed sub-account snapshot (For Investor Master Account) + + - The query time period must be less then 30 days - Support query within the last one month only - If `startTime` and `endTime` not sent, return records of the last 7 days by default Weight(IP): 2400 + + :param email: Sub-account email (required) + :type email: str + :param type: \"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM) (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: min 7, max 30, default 7 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_account_snapshot_get_serialize( + email=email, + type=type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountAccountSnapshotGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_managed_subaccount_account_snapshot_get_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + type: Annotated[StrictStr, Field(description="\"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM)")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="min 7, max 30, default 7")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Managed sub-account snapshot (For Investor Master Account) + + - The query time period must be less then 30 days - Support query within the last one month only - If `startTime` and `endTime` not sent, return records of the last 7 days by default Weight(IP): 2400 + + :param email: Sub-account email (required) + :type email: str + :param type: \"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM) (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: min 7, max 30, default 7 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_account_snapshot_get_serialize( + email=email, + type=type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountAccountSnapshotGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_managed_subaccount_account_snapshot_get_serialize( + self, + email, + type, + timestamp, + signature, + start_time, + end_time, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if type is not None: + + _query_params.append(('type', type)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/managed-subaccount/accountSnapshot', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_managed_subaccount_asset_get( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1ManagedSubaccountAssetGet200ResponseInner]: + """Managed sub-account asset details(For Investor Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_asset_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1ManagedSubaccountAssetGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_managed_subaccount_asset_get_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1ManagedSubaccountAssetGet200ResponseInner]]: + """Managed sub-account asset details(For Investor Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_asset_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1ManagedSubaccountAssetGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_managed_subaccount_asset_get_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Managed sub-account asset details(For Investor Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_asset_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1ManagedSubaccountAssetGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_managed_subaccount_asset_get_serialize( + self, + email, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/managed-subaccount/asset', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_managed_subaccount_deposit_address_get( + self, + email: StrictStr, + coin: Annotated[StrictStr, Field(description="Coin name")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + network: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ManagedSubaccountDepositAddressGet200Response: + """Get Managed Sub-account Deposit Address (For Investor Master Account) + + Get investor's managed sub-account deposit address Weight(UID): 1 + + :param email: (required) + :type email: str + :param coin: Coin name (required) + :type coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param network: + :type network: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_deposit_address_get_serialize( + email=email, + coin=coin, + timestamp=timestamp, + signature=signature, + network=network, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountDepositAddressGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_managed_subaccount_deposit_address_get_with_http_info( + self, + email: StrictStr, + coin: Annotated[StrictStr, Field(description="Coin name")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + network: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ManagedSubaccountDepositAddressGet200Response]: + """Get Managed Sub-account Deposit Address (For Investor Master Account) + + Get investor's managed sub-account deposit address Weight(UID): 1 + + :param email: (required) + :type email: str + :param coin: Coin name (required) + :type coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param network: + :type network: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_deposit_address_get_serialize( + email=email, + coin=coin, + timestamp=timestamp, + signature=signature, + network=network, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountDepositAddressGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_managed_subaccount_deposit_address_get_without_preload_content( + self, + email: StrictStr, + coin: Annotated[StrictStr, Field(description="Coin name")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + network: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Managed Sub-account Deposit Address (For Investor Master Account) + + Get investor's managed sub-account deposit address Weight(UID): 1 + + :param email: (required) + :type email: str + :param coin: Coin name (required) + :type coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param network: + :type network: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_deposit_address_get_serialize( + email=email, + coin=coin, + timestamp=timestamp, + signature=signature, + network=network, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountDepositAddressGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_managed_subaccount_deposit_address_get_serialize( + self, + email, + coin, + timestamp, + signature, + network, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if coin is not None: + + _query_params.append(('coin', coin)) + + if network is not None: + + _query_params.append(('network', network)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/managed-subaccount/deposit/address', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_managed_subaccount_deposit_post( + self, + to_email: Annotated[StrictStr, Field(description="Recipient email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ManagedSubaccountDepositPost200Response: + """Deposit assets into the managed sub-account(For Investor Master Account) + + Weight(IP): 1 + + :param to_email: Recipient email (required) + :type to_email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_deposit_post_serialize( + to_email=to_email, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountDepositPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_managed_subaccount_deposit_post_with_http_info( + self, + to_email: Annotated[StrictStr, Field(description="Recipient email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ManagedSubaccountDepositPost200Response]: + """Deposit assets into the managed sub-account(For Investor Master Account) + + Weight(IP): 1 + + :param to_email: Recipient email (required) + :type to_email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_deposit_post_serialize( + to_email=to_email, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountDepositPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_managed_subaccount_deposit_post_without_preload_content( + self, + to_email: Annotated[StrictStr, Field(description="Recipient email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Deposit assets into the managed sub-account(For Investor Master Account) + + Weight(IP): 1 + + :param to_email: Recipient email (required) + :type to_email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_deposit_post_serialize( + to_email=to_email, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountDepositPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_managed_subaccount_deposit_post_serialize( + self, + to_email, + asset, + amount, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if to_email is not None: + + _query_params.append(('toEmail', to_email)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/managed-subaccount/deposit', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_managed_subaccount_fetch_future_asset_get( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ManagedSubaccountFetchFutureAssetGet200Response: + """Query Managed Sub-account Futures Asset Details (For Investor Master Account) + + Investor can use this api to query managed sub account futures asset details + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_fetch_future_asset_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountFetchFutureAssetGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_managed_subaccount_fetch_future_asset_get_with_http_info( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ManagedSubaccountFetchFutureAssetGet200Response]: + """Query Managed Sub-account Futures Asset Details (For Investor Master Account) + + Investor can use this api to query managed sub account futures asset details + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_fetch_future_asset_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountFetchFutureAssetGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_managed_subaccount_fetch_future_asset_get_without_preload_content( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Managed Sub-account Futures Asset Details (For Investor Master Account) + + Investor can use this api to query managed sub account futures asset details + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_fetch_future_asset_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountFetchFutureAssetGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_managed_subaccount_fetch_future_asset_get_serialize( + self, + email, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/managed-subaccount/fetch-future-asset', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_managed_subaccount_info_get( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ManagedSubaccountInfoGet200Response: + """Query Managed Sub-account List (For Investor) + + Get investor's managed sub-account list. Weight(UID): 60 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page: Default 1 + :type page: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_info_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountInfoGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_managed_subaccount_info_get_with_http_info( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ManagedSubaccountInfoGet200Response]: + """Query Managed Sub-account List (For Investor) + + Get investor's managed sub-account list. Weight(UID): 60 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page: Default 1 + :type page: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_info_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountInfoGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_managed_subaccount_info_get_without_preload_content( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Managed Sub-account List (For Investor) + + Get investor's managed sub-account list. Weight(UID): 60 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page: Default 1 + :type page: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_info_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountInfoGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_managed_subaccount_info_get_serialize( + self, + email, + timestamp, + signature, + page, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if page is not None: + + _query_params.append(('page', page)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/managed-subaccount/info', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_managed_subaccount_margin_asset_get( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ManagedSubaccountMarginAssetGet200Response: + """Query Managed Sub-account Margin Asset Details (For Investor Master Account) + + Investor can use this api to query managed sub account margin asset details + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_margin_asset_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountMarginAssetGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_managed_subaccount_margin_asset_get_with_http_info( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ManagedSubaccountMarginAssetGet200Response]: + """Query Managed Sub-account Margin Asset Details (For Investor Master Account) + + Investor can use this api to query managed sub account margin asset details + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_margin_asset_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountMarginAssetGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_managed_subaccount_margin_asset_get_without_preload_content( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Managed Sub-account Margin Asset Details (For Investor Master Account) + + Investor can use this api to query managed sub account margin asset details + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_margin_asset_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountMarginAssetGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_managed_subaccount_margin_asset_get_serialize( + self, + email, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/managed-subaccount/marginAsset', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_managed_subaccount_query_trans_log_for_investor_get( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + transfers: Annotated[Optional[StrictStr], Field(description="Transfer Direction (FROM/TO)")] = None, + transfer_function_account_type: Annotated[Optional[StrictStr], Field(description="Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE)")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response: + """Query Managed Sub Account Transfer Log (For Investor Master Account) + + Investor can use this api to query managed sub account transfer log. This endpoint is available for investor of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Weight(IP): 1 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 500; max 1000. + :type limit: int + :param transfers: Transfer Direction (FROM/TO) + :type transfers: str + :param transfer_function_account_type: Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) + :type transfer_function_account_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_query_trans_log_for_investor_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + transfers=transfers, + transfer_function_account_type=transfer_function_account_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_managed_subaccount_query_trans_log_for_investor_get_with_http_info( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + transfers: Annotated[Optional[StrictStr], Field(description="Transfer Direction (FROM/TO)")] = None, + transfer_function_account_type: Annotated[Optional[StrictStr], Field(description="Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE)")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response]: + """Query Managed Sub Account Transfer Log (For Investor Master Account) + + Investor can use this api to query managed sub account transfer log. This endpoint is available for investor of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Weight(IP): 1 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 500; max 1000. + :type limit: int + :param transfers: Transfer Direction (FROM/TO) + :type transfers: str + :param transfer_function_account_type: Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) + :type transfer_function_account_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_query_trans_log_for_investor_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + transfers=transfers, + transfer_function_account_type=transfer_function_account_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_managed_subaccount_query_trans_log_for_investor_get_without_preload_content( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + transfers: Annotated[Optional[StrictStr], Field(description="Transfer Direction (FROM/TO)")] = None, + transfer_function_account_type: Annotated[Optional[StrictStr], Field(description="Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE)")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Managed Sub Account Transfer Log (For Investor Master Account) + + Investor can use this api to query managed sub account transfer log. This endpoint is available for investor of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Weight(IP): 1 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 500; max 1000. + :type limit: int + :param transfers: Transfer Direction (FROM/TO) + :type transfers: str + :param transfer_function_account_type: Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) + :type transfer_function_account_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_query_trans_log_for_investor_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + transfers=transfers, + transfer_function_account_type=transfer_function_account_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_managed_subaccount_query_trans_log_for_investor_get_serialize( + self, + email, + timestamp, + signature, + start_time, + end_time, + page, + limit, + transfers, + transfer_function_account_type, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if page is not None: + + _query_params.append(('page', page)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if transfers is not None: + + _query_params.append(('transfers', transfers)) + + if transfer_function_account_type is not None: + + _query_params.append(('transferFunctionAccountType', transfer_function_account_type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/managed-subaccount/queryTransLogForInvestor', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + transfers: Annotated[Optional[StrictStr], Field(description="Transfer Direction (FROM/TO)")] = None, + transfer_function_account_type: Annotated[Optional[StrictStr], Field(description="Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE)")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response: + """Query Managed Sub Account Transfer Log (For Trading Team Master Account) + + Trading team can use this api to query managed sub account transfer log. This endpoint is available for trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team Weight(IP): 60 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 500; max 1000. + :type limit: int + :param transfers: Transfer Direction (FROM/TO) + :type transfers: str + :param transfer_function_account_type: Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) + :type transfer_function_account_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + transfers=transfers, + transfer_function_account_type=transfer_function_account_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get_with_http_info( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + transfers: Annotated[Optional[StrictStr], Field(description="Transfer Direction (FROM/TO)")] = None, + transfer_function_account_type: Annotated[Optional[StrictStr], Field(description="Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE)")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response]: + """Query Managed Sub Account Transfer Log (For Trading Team Master Account) + + Trading team can use this api to query managed sub account transfer log. This endpoint is available for trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team Weight(IP): 60 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 500; max 1000. + :type limit: int + :param transfers: Transfer Direction (FROM/TO) + :type transfers: str + :param transfer_function_account_type: Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) + :type transfer_function_account_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + transfers=transfers, + transfer_function_account_type=transfer_function_account_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get_without_preload_content( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + transfers: Annotated[Optional[StrictStr], Field(description="Transfer Direction (FROM/TO)")] = None, + transfer_function_account_type: Annotated[Optional[StrictStr], Field(description="Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE)")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Managed Sub Account Transfer Log (For Trading Team Master Account) + + Trading team can use this api to query managed sub account transfer log. This endpoint is available for trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team Weight(IP): 60 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 500; max 1000. + :type limit: int + :param transfers: Transfer Direction (FROM/TO) + :type transfers: str + :param transfer_function_account_type: Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) + :type transfer_function_account_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + transfers=transfers, + transfer_function_account_type=transfer_function_account_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get_serialize( + self, + email, + timestamp, + signature, + start_time, + end_time, + page, + limit, + transfers, + transfer_function_account_type, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if page is not None: + + _query_params.append(('page', page)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if transfers is not None: + + _query_params.append(('transfers', transfers)) + + if transfer_function_account_type is not None: + + _query_params.append(('transferFunctionAccountType', transfer_function_account_type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/managed-subaccount/queryTransLogForTradeParent', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_managed_subaccount_query_trans_log_get( + self, + transfers: Annotated[StrictStr, Field(description="Transfer Direction")], + transfer_function_account_type: Annotated[StrictStr, Field(description="Transfer function account type")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ManagedSubaccountQueryTransLogGet200Response: + """Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA) + + Query Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight(UID): 60 + + :param transfers: Transfer Direction (required) + :type transfers: str + :param transfer_function_account_type: Transfer function account type (required) + :type transfer_function_account_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_query_trans_log_get_serialize( + transfers=transfers, + transfer_function_account_type=transfer_function_account_type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountQueryTransLogGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_managed_subaccount_query_trans_log_get_with_http_info( + self, + transfers: Annotated[StrictStr, Field(description="Transfer Direction")], + transfer_function_account_type: Annotated[StrictStr, Field(description="Transfer function account type")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ManagedSubaccountQueryTransLogGet200Response]: + """Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA) + + Query Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight(UID): 60 + + :param transfers: Transfer Direction (required) + :type transfers: str + :param transfer_function_account_type: Transfer function account type (required) + :type transfer_function_account_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_query_trans_log_get_serialize( + transfers=transfers, + transfer_function_account_type=transfer_function_account_type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountQueryTransLogGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_managed_subaccount_query_trans_log_get_without_preload_content( + self, + transfers: Annotated[StrictStr, Field(description="Transfer Direction")], + transfer_function_account_type: Annotated[StrictStr, Field(description="Transfer function account type")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA) + + Query Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight(UID): 60 + + :param transfers: Transfer Direction (required) + :type transfers: str + :param transfer_function_account_type: Transfer function account type (required) + :type transfer_function_account_type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_query_trans_log_get_serialize( + transfers=transfers, + transfer_function_account_type=transfer_function_account_type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountQueryTransLogGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_managed_subaccount_query_trans_log_get_serialize( + self, + transfers, + transfer_function_account_type, + timestamp, + signature, + start_time, + end_time, + page, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if page is not None: + + _query_params.append(('page', page)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if transfers is not None: + + _query_params.append(('transfers', transfers)) + + if transfer_function_account_type is not None: + + _query_params.append(('transferFunctionAccountType', transfer_function_account_type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/managed-subaccount/query-trans-log', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_managed_subaccount_withdraw_post( + self, + from_email: Annotated[StrictStr, Field(description="Sender email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + transfer_date: Annotated[Optional[StrictInt], Field(description="Withdrawals is automatically occur on the transfer date(UTC0). If a date is not selected, the withdrawal occurs right now")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1ManagedSubaccountDepositPost200Response: + """Withdrawl assets from the managed sub-account(For Investor Master Account) + + Weight(IP): 1 + + :param from_email: Sender email (required) + :type from_email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param transfer_date: Withdrawals is automatically occur on the transfer date(UTC0). If a date is not selected, the withdrawal occurs right now + :type transfer_date: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_withdraw_post_serialize( + from_email=from_email, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + transfer_date=transfer_date, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountDepositPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_managed_subaccount_withdraw_post_with_http_info( + self, + from_email: Annotated[StrictStr, Field(description="Sender email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + transfer_date: Annotated[Optional[StrictInt], Field(description="Withdrawals is automatically occur on the transfer date(UTC0). If a date is not selected, the withdrawal occurs right now")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1ManagedSubaccountDepositPost200Response]: + """Withdrawl assets from the managed sub-account(For Investor Master Account) + + Weight(IP): 1 + + :param from_email: Sender email (required) + :type from_email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param transfer_date: Withdrawals is automatically occur on the transfer date(UTC0). If a date is not selected, the withdrawal occurs right now + :type transfer_date: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_withdraw_post_serialize( + from_email=from_email, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + transfer_date=transfer_date, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountDepositPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_managed_subaccount_withdraw_post_without_preload_content( + self, + from_email: Annotated[StrictStr, Field(description="Sender email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + transfer_date: Annotated[Optional[StrictInt], Field(description="Withdrawals is automatically occur on the transfer date(UTC0). If a date is not selected, the withdrawal occurs right now")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Withdrawl assets from the managed sub-account(For Investor Master Account) + + Weight(IP): 1 + + :param from_email: Sender email (required) + :type from_email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param transfer_date: Withdrawals is automatically occur on the transfer date(UTC0). If a date is not selected, the withdrawal occurs right now + :type transfer_date: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_managed_subaccount_withdraw_post_serialize( + from_email=from_email, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + transfer_date=transfer_date, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1ManagedSubaccountDepositPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_managed_subaccount_withdraw_post_serialize( + self, + from_email, + asset, + amount, + timestamp, + signature, + transfer_date, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if from_email is not None: + + _query_params.append(('fromEmail', from_email)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if transfer_date is not None: + + _query_params.append(('transferDate', transfer_date)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/managed-subaccount/withdraw', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_blvt_enable_post( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + enable_blvt: Annotated[StrictBool, Field(description="Only true for now")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountBlvtEnablePost200Response: + """Enable Leverage Token for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param enable_blvt: Only true for now (required) + :type enable_blvt: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_blvt_enable_post_serialize( + email=email, + enable_blvt=enable_blvt, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountBlvtEnablePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_blvt_enable_post_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + enable_blvt: Annotated[StrictBool, Field(description="Only true for now")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountBlvtEnablePost200Response]: + """Enable Leverage Token for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param enable_blvt: Only true for now (required) + :type enable_blvt: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_blvt_enable_post_serialize( + email=email, + enable_blvt=enable_blvt, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountBlvtEnablePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_blvt_enable_post_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + enable_blvt: Annotated[StrictBool, Field(description="Only true for now")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Enable Leverage Token for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param enable_blvt: Only true for now (required) + :type enable_blvt: bool + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_blvt_enable_post_serialize( + email=email, + enable_blvt=enable_blvt, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountBlvtEnablePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_blvt_enable_post_serialize( + self, + email, + enable_blvt, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if enable_blvt is not None: + + _query_params.append(('enableBlvt', enable_blvt)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/sub-account/blvt/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_eoptions_enable_post( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountEoptionsEnablePost200Response: + """Enable Options for Sub-account (For Master Account)(USER_DATA) + + Enable Options for Sub-account (For Master Account). Weight(IP): 1 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_eoptions_enable_post_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountEoptionsEnablePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_eoptions_enable_post_with_http_info( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountEoptionsEnablePost200Response]: + """Enable Options for Sub-account (For Master Account)(USER_DATA) + + Enable Options for Sub-account (For Master Account). Weight(IP): 1 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_eoptions_enable_post_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountEoptionsEnablePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_eoptions_enable_post_without_preload_content( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Enable Options for Sub-account (For Master Account)(USER_DATA) + + Enable Options for Sub-account (For Master Account). Weight(IP): 1 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_eoptions_enable_post_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountEoptionsEnablePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_eoptions_enable_post_serialize( + self, + email, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/sub-account/eoptions/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_futures_account_get( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountFuturesAccountGet200Response: + """Detail on Sub-account's Futures Account (For Master Account) + + Weight(IP): 10 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_account_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_futures_account_get_with_http_info( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountFuturesAccountGet200Response]: + """Detail on Sub-account's Futures Account (For Master Account) + + Weight(IP): 10 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_account_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_futures_account_get_without_preload_content( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Detail on Sub-account's Futures Account (For Master Account) + + Weight(IP): 10 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_account_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_futures_account_get_serialize( + self, + email, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/sub-account/futures/account', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_futures_account_summary_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountFuturesAccountSummaryGet200Response: + """Summary of Sub-account's Futures Account (For Master Account) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_account_summary_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesAccountSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_futures_account_summary_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountFuturesAccountSummaryGet200Response]: + """Summary of Sub-account's Futures Account (For Master Account) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_account_summary_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesAccountSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_futures_account_summary_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Summary of Sub-account's Futures Account (For Master Account) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_account_summary_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesAccountSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_futures_account_summary_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/sub-account/futures/accountSummary', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_futures_enable_post( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountFuturesEnablePost200Response: + """Enable Futures for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_enable_post_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesEnablePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_futures_enable_post_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountFuturesEnablePost200Response]: + """Enable Futures for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_enable_post_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesEnablePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_futures_enable_post_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Enable Futures for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_enable_post_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesEnablePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_futures_enable_post_serialize( + self, + email, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/sub-account/futures/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_futures_internal_transfer_get( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + futures_type: Annotated[StrictInt, Field(description="1:USDT-margined Futures, 2: Coin-margined Futures")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default value: 50, Max value: 500")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountFuturesInternalTransferGet200Response: + """Sub-account Futures Asset Transfer History (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param futures_type: 1:USDT-margined Futures, 2: Coin-margined Futures (required) + :type futures_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default value: 50, Max value: 500 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_internal_transfer_get_serialize( + email=email, + futures_type=futures_type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesInternalTransferGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_futures_internal_transfer_get_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + futures_type: Annotated[StrictInt, Field(description="1:USDT-margined Futures, 2: Coin-margined Futures")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default value: 50, Max value: 500")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountFuturesInternalTransferGet200Response]: + """Sub-account Futures Asset Transfer History (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param futures_type: 1:USDT-margined Futures, 2: Coin-margined Futures (required) + :type futures_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default value: 50, Max value: 500 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_internal_transfer_get_serialize( + email=email, + futures_type=futures_type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesInternalTransferGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_futures_internal_transfer_get_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + futures_type: Annotated[StrictInt, Field(description="1:USDT-margined Futures, 2: Coin-margined Futures")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default value: 50, Max value: 500")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Sub-account Futures Asset Transfer History (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param futures_type: 1:USDT-margined Futures, 2: Coin-margined Futures (required) + :type futures_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default value: 50, Max value: 500 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_internal_transfer_get_serialize( + email=email, + futures_type=futures_type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesInternalTransferGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_futures_internal_transfer_get_serialize( + self, + email, + futures_type, + timestamp, + signature, + start_time, + end_time, + page, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if futures_type is not None: + + _query_params.append(('futuresType', futures_type)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if page is not None: + + _query_params.append(('page', page)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/sub-account/futures/internalTransfer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_futures_internal_transfer_post( + self, + from_email: Annotated[StrictStr, Field(description="Sender email")], + to_email: Annotated[StrictStr, Field(description="Recipient email")], + futures_type: Annotated[StrictInt, Field(description="1:USDT-margined Futures,2: Coin-margined Futures")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountFuturesInternalTransferPost200Response: + """Sub-account Futures Asset Transfer (For Master Account) + + - Master account can transfer max 2000 times a minute Weight(IP): 1 + + :param from_email: Sender email (required) + :type from_email: str + :param to_email: Recipient email (required) + :type to_email: str + :param futures_type: 1:USDT-margined Futures,2: Coin-margined Futures (required) + :type futures_type: int + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_internal_transfer_post_serialize( + from_email=from_email, + to_email=to_email, + futures_type=futures_type, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesInternalTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_futures_internal_transfer_post_with_http_info( + self, + from_email: Annotated[StrictStr, Field(description="Sender email")], + to_email: Annotated[StrictStr, Field(description="Recipient email")], + futures_type: Annotated[StrictInt, Field(description="1:USDT-margined Futures,2: Coin-margined Futures")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountFuturesInternalTransferPost200Response]: + """Sub-account Futures Asset Transfer (For Master Account) + + - Master account can transfer max 2000 times a minute Weight(IP): 1 + + :param from_email: Sender email (required) + :type from_email: str + :param to_email: Recipient email (required) + :type to_email: str + :param futures_type: 1:USDT-margined Futures,2: Coin-margined Futures (required) + :type futures_type: int + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_internal_transfer_post_serialize( + from_email=from_email, + to_email=to_email, + futures_type=futures_type, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesInternalTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_futures_internal_transfer_post_without_preload_content( + self, + from_email: Annotated[StrictStr, Field(description="Sender email")], + to_email: Annotated[StrictStr, Field(description="Recipient email")], + futures_type: Annotated[StrictInt, Field(description="1:USDT-margined Futures,2: Coin-margined Futures")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Sub-account Futures Asset Transfer (For Master Account) + + - Master account can transfer max 2000 times a minute Weight(IP): 1 + + :param from_email: Sender email (required) + :type from_email: str + :param to_email: Recipient email (required) + :type to_email: str + :param futures_type: 1:USDT-margined Futures,2: Coin-margined Futures (required) + :type futures_type: int + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_internal_transfer_post_serialize( + from_email=from_email, + to_email=to_email, + futures_type=futures_type, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesInternalTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_futures_internal_transfer_post_serialize( + self, + from_email, + to_email, + futures_type, + asset, + amount, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if from_email is not None: + + _query_params.append(('fromEmail', from_email)) + + if to_email is not None: + + _query_params.append(('toEmail', to_email)) + + if futures_type is not None: + + _query_params.append(('futuresType', futures_type)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/sub-account/futures/internalTransfer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_futures_position_risk_get( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1SubAccountFuturesPositionRiskGet200ResponseInner]: + """Futures Position-Risk of Sub-account (For Master Account) + + Weight(IP): 10 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_position_risk_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountFuturesPositionRiskGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_futures_position_risk_get_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1SubAccountFuturesPositionRiskGet200ResponseInner]]: + """Futures Position-Risk of Sub-account (For Master Account) + + Weight(IP): 10 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_position_risk_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountFuturesPositionRiskGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_futures_position_risk_get_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Futures Position-Risk of Sub-account (For Master Account) + + Weight(IP): 10 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_position_risk_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountFuturesPositionRiskGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_futures_position_risk_get_serialize( + self, + email, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/sub-account/futures/positionRisk', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_futures_transfer_post( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + type: Annotated[int, Field(le=4, strict=True, ge=1, description="* `1` - transfer from subaccount's spot account to its USDT-margined futures account * `2` - transfer from subaccount's USDT-margined futures account to its spot account * `3` - transfer from subaccount's spot account to its COIN-margined futures account * `4` - transfer from subaccount's COIN-margined futures account to its spot account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountFuturesTransferPost200Response: + """Transfer for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param type: * `1` - transfer from subaccount's spot account to its USDT-margined futures account * `2` - transfer from subaccount's USDT-margined futures account to its spot account * `3` - transfer from subaccount's spot account to its COIN-margined futures account * `4` - transfer from subaccount's COIN-margined futures account to its spot account (required) + :type type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_transfer_post_serialize( + email=email, + asset=asset, + amount=amount, + type=type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_futures_transfer_post_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + type: Annotated[int, Field(le=4, strict=True, ge=1, description="* `1` - transfer from subaccount's spot account to its USDT-margined futures account * `2` - transfer from subaccount's USDT-margined futures account to its spot account * `3` - transfer from subaccount's spot account to its COIN-margined futures account * `4` - transfer from subaccount's COIN-margined futures account to its spot account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountFuturesTransferPost200Response]: + """Transfer for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param type: * `1` - transfer from subaccount's spot account to its USDT-margined futures account * `2` - transfer from subaccount's USDT-margined futures account to its spot account * `3` - transfer from subaccount's spot account to its COIN-margined futures account * `4` - transfer from subaccount's COIN-margined futures account to its spot account (required) + :type type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_transfer_post_serialize( + email=email, + asset=asset, + amount=amount, + type=type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_futures_transfer_post_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + type: Annotated[int, Field(le=4, strict=True, ge=1, description="* `1` - transfer from subaccount's spot account to its USDT-margined futures account * `2` - transfer from subaccount's USDT-margined futures account to its spot account * `3` - transfer from subaccount's spot account to its COIN-margined futures account * `4` - transfer from subaccount's COIN-margined futures account to its spot account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Transfer for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param type: * `1` - transfer from subaccount's spot account to its USDT-margined futures account * `2` - transfer from subaccount's USDT-margined futures account to its spot account * `3` - transfer from subaccount's spot account to its COIN-margined futures account * `4` - transfer from subaccount's COIN-margined futures account to its spot account (required) + :type type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_futures_transfer_post_serialize( + email=email, + asset=asset, + amount=amount, + type=type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_futures_transfer_post_serialize( + self, + email, + asset, + amount, + type, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if type is not None: + + _query_params.append(('type', type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/sub-account/futures/transfer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_list_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + is_freeze: Optional[StrictStr] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 1; max 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountListGet200Response: + """Query Sub-account List (For Master Account) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param email: Sub-account email + :type email: str + :param is_freeze: + :type is_freeze: str + :param page: Default 1 + :type page: int + :param limit: Default 1; max 200 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_list_get_serialize( + timestamp=timestamp, + signature=signature, + email=email, + is_freeze=is_freeze, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_list_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + is_freeze: Optional[StrictStr] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 1; max 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountListGet200Response]: + """Query Sub-account List (For Master Account) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param email: Sub-account email + :type email: str + :param is_freeze: + :type is_freeze: str + :param page: Default 1 + :type page: int + :param limit: Default 1; max 200 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_list_get_serialize( + timestamp=timestamp, + signature=signature, + email=email, + is_freeze=is_freeze, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_list_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + is_freeze: Optional[StrictStr] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 1; max 200")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Sub-account List (For Master Account) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param email: Sub-account email + :type email: str + :param is_freeze: + :type is_freeze: str + :param page: Default 1 + :type page: int + :param limit: Default 1; max 200 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_list_get_serialize( + timestamp=timestamp, + signature=signature, + email=email, + is_freeze=is_freeze, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_list_get_serialize( + self, + timestamp, + signature, + email, + is_freeze, + page, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if is_freeze is not None: + + _query_params.append(('isFreeze', is_freeze)) + + if page is not None: + + _query_params.append(('page', page)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/sub-account/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_margin_account_get( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountMarginAccountGet200Response: + """Detail on Sub-account's Margin Account (For Master Account) + + Weight(IP): 10 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_margin_account_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountMarginAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_margin_account_get_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountMarginAccountGet200Response]: + """Detail on Sub-account's Margin Account (For Master Account) + + Weight(IP): 10 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_margin_account_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountMarginAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_margin_account_get_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Detail on Sub-account's Margin Account (For Master Account) + + Weight(IP): 10 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_margin_account_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountMarginAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_margin_account_get_serialize( + self, + email, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/sub-account/margin/account', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_margin_account_summary_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountMarginAccountSummaryGet200Response: + """Summary of Sub-account's Margin Account (For Master Account) + + Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_margin_account_summary_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountMarginAccountSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_margin_account_summary_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountMarginAccountSummaryGet200Response]: + """Summary of Sub-account's Margin Account (For Master Account) + + Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_margin_account_summary_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountMarginAccountSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_margin_account_summary_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Summary of Sub-account's Margin Account (For Master Account) + + Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_margin_account_summary_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountMarginAccountSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_margin_account_summary_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/sub-account/margin/accountSummary', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_margin_enable_post( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountMarginEnablePost200Response: + """Enable Margin for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_margin_enable_post_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountMarginEnablePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_margin_enable_post_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountMarginEnablePost200Response]: + """Enable Margin for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_margin_enable_post_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountMarginEnablePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_margin_enable_post_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Enable Margin for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_margin_enable_post_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountMarginEnablePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_margin_enable_post_serialize( + self, + email, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/sub-account/margin/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_margin_transfer_post( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + type: Annotated[int, Field(le=2, strict=True, ge=1, description="* `1` - transfer from subaccount's spot account to margin account * `2` - transfer from subaccount's margin account to its spot account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountFuturesTransferPost200Response: + """Margin Transfer for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param type: * `1` - transfer from subaccount's spot account to margin account * `2` - transfer from subaccount's margin account to its spot account (required) + :type type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_margin_transfer_post_serialize( + email=email, + asset=asset, + amount=amount, + type=type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_margin_transfer_post_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + type: Annotated[int, Field(le=2, strict=True, ge=1, description="* `1` - transfer from subaccount's spot account to margin account * `2` - transfer from subaccount's margin account to its spot account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountFuturesTransferPost200Response]: + """Margin Transfer for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param type: * `1` - transfer from subaccount's spot account to margin account * `2` - transfer from subaccount's margin account to its spot account (required) + :type type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_margin_transfer_post_serialize( + email=email, + asset=asset, + amount=amount, + type=type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_margin_transfer_post_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + type: Annotated[int, Field(le=2, strict=True, ge=1, description="* `1` - transfer from subaccount's spot account to margin account * `2` - transfer from subaccount's margin account to its spot account")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Margin Transfer for Sub-account (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param type: * `1` - transfer from subaccount's spot account to margin account * `2` - transfer from subaccount's margin account to its spot account (required) + :type type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_margin_transfer_post_serialize( + email=email, + asset=asset, + amount=amount, + type=type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_margin_transfer_post_serialize( + self, + email, + asset, + amount, + type, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if type is not None: + + _query_params.append(('type', type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/sub-account/margin/transfer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_spot_summary_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:20")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountSpotSummaryGet200Response: + """Sub-account Spot Assets Summary (For Master Account) + + Get BTC valued asset summary of subaccounts. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param email: Sub-account email + :type email: str + :param page: Default 1 + :type page: int + :param size: Default:10 Max:20 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_spot_summary_get_serialize( + timestamp=timestamp, + signature=signature, + email=email, + page=page, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountSpotSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_spot_summary_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:20")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountSpotSummaryGet200Response]: + """Sub-account Spot Assets Summary (For Master Account) + + Get BTC valued asset summary of subaccounts. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param email: Sub-account email + :type email: str + :param page: Default 1 + :type page: int + :param size: Default:10 Max:20 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_spot_summary_get_serialize( + timestamp=timestamp, + signature=signature, + email=email, + page=page, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountSpotSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_spot_summary_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:20")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Sub-account Spot Assets Summary (For Master Account) + + Get BTC valued asset summary of subaccounts. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param email: Sub-account email + :type email: str + :param page: Default 1 + :type page: int + :param size: Default:10 Max:20 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_spot_summary_get_serialize( + timestamp=timestamp, + signature=signature, + email=email, + page=page, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountSpotSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_spot_summary_get_serialize( + self, + timestamp, + signature, + email, + page, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/sub-account/spotSummary', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_status_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1SubAccountStatusGet200ResponseInner]: + """Sub-account's Status on Margin/Futures (For Master Account) + + - If no `email` sent, all sub-accounts' information will be returned. Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param email: Sub-account email + :type email: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_status_get_serialize( + timestamp=timestamp, + signature=signature, + email=email, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountStatusGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_status_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1SubAccountStatusGet200ResponseInner]]: + """Sub-account's Status on Margin/Futures (For Master Account) + + - If no `email` sent, all sub-accounts' information will be returned. Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param email: Sub-account email + :type email: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_status_get_serialize( + timestamp=timestamp, + signature=signature, + email=email, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountStatusGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_status_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Sub-account's Status on Margin/Futures (For Master Account) + + - If no `email` sent, all sub-accounts' information will be returned. Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param email: Sub-account email + :type email: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_status_get_serialize( + timestamp=timestamp, + signature=signature, + email=email, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountStatusGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_status_get_serialize( + self, + timestamp, + signature, + email, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/sub-account/status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_sub_account_api_ip_restriction_get( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + sub_account_api_key: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountSubAccountApiIpRestrictionGet200Response: + """Get IP Restriction for a Sub-account API Key (For Master Account) + + Weight(UID): 3000 + + :param email: Sub-account email (required) + :type email: str + :param sub_account_api_key: (required) + :type sub_account_api_key: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_sub_account_api_ip_restriction_get_serialize( + email=email, + sub_account_api_key=sub_account_api_key, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountSubAccountApiIpRestrictionGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_sub_account_api_ip_restriction_get_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + sub_account_api_key: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountSubAccountApiIpRestrictionGet200Response]: + """Get IP Restriction for a Sub-account API Key (For Master Account) + + Weight(UID): 3000 + + :param email: Sub-account email (required) + :type email: str + :param sub_account_api_key: (required) + :type sub_account_api_key: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_sub_account_api_ip_restriction_get_serialize( + email=email, + sub_account_api_key=sub_account_api_key, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountSubAccountApiIpRestrictionGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_sub_account_api_ip_restriction_get_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + sub_account_api_key: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get IP Restriction for a Sub-account API Key (For Master Account) + + Weight(UID): 3000 + + :param email: Sub-account email (required) + :type email: str + :param sub_account_api_key: (required) + :type sub_account_api_key: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_sub_account_api_ip_restriction_get_serialize( + email=email, + sub_account_api_key=sub_account_api_key, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountSubAccountApiIpRestrictionGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_sub_account_api_ip_restriction_get_serialize( + self, + email, + sub_account_api_key, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if sub_account_api_key is not None: + + _query_params.append(('subAccountApiKey', sub_account_api_key)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/sub-account/subAccountApi/ipRestriction', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + sub_account_api_key: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + ip_address: Annotated[Optional[StrictStr], Field(description="Can be added in batches, separated by commas")] = None, + third_party_name: Annotated[Optional[StrictStr], Field(description="third party IP list name")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response: + """Delete IP List for a Sub-account API Key (For Master Account) + + Weight(UID): 3000 + + :param email: Sub-account email (required) + :type email: str + :param sub_account_api_key: (required) + :type sub_account_api_key: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param ip_address: Can be added in batches, separated by commas + :type ip_address: str + :param third_party_name: third party IP list name + :type third_party_name: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete_serialize( + email=email, + sub_account_api_key=sub_account_api_key, + timestamp=timestamp, + signature=signature, + ip_address=ip_address, + third_party_name=third_party_name, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + sub_account_api_key: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + ip_address: Annotated[Optional[StrictStr], Field(description="Can be added in batches, separated by commas")] = None, + third_party_name: Annotated[Optional[StrictStr], Field(description="third party IP list name")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response]: + """Delete IP List for a Sub-account API Key (For Master Account) + + Weight(UID): 3000 + + :param email: Sub-account email (required) + :type email: str + :param sub_account_api_key: (required) + :type sub_account_api_key: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param ip_address: Can be added in batches, separated by commas + :type ip_address: str + :param third_party_name: third party IP list name + :type third_party_name: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete_serialize( + email=email, + sub_account_api_key=sub_account_api_key, + timestamp=timestamp, + signature=signature, + ip_address=ip_address, + third_party_name=third_party_name, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + sub_account_api_key: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + ip_address: Annotated[Optional[StrictStr], Field(description="Can be added in batches, separated by commas")] = None, + third_party_name: Annotated[Optional[StrictStr], Field(description="third party IP list name")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete IP List for a Sub-account API Key (For Master Account) + + Weight(UID): 3000 + + :param email: Sub-account email (required) + :type email: str + :param sub_account_api_key: (required) + :type sub_account_api_key: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param ip_address: Can be added in batches, separated by commas + :type ip_address: str + :param third_party_name: third party IP list name + :type third_party_name: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete_serialize( + email=email, + sub_account_api_key=sub_account_api_key, + timestamp=timestamp, + signature=signature, + ip_address=ip_address, + third_party_name=third_party_name, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete_serialize( + self, + email, + sub_account_api_key, + timestamp, + signature, + ip_address, + third_party_name, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if sub_account_api_key is not None: + + _query_params.append(('subAccountApiKey', sub_account_api_key)) + + if ip_address is not None: + + _query_params.append(('ipAddress', ip_address)) + + if third_party_name is not None: + + _query_params.append(('thirdPartyName', third_party_name)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/sapi/v1/sub-account/subAccountApi/ipRestriction/ipList', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_sub_transfer_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + to_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1SubAccountSubTransferHistoryGet200ResponseInner]: + """Sub-account Spot Asset Transfer History (For Master Account) + + - fromEmail and toEmail cannot be sent at the same time. - Return fromEmail equal master account email by default. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_email: Sub-account email + :type from_email: str + :param to_email: Sub-account email + :type to_email: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 1 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_sub_transfer_history_get_serialize( + timestamp=timestamp, + signature=signature, + from_email=from_email, + to_email=to_email, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountSubTransferHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_sub_transfer_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + to_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1SubAccountSubTransferHistoryGet200ResponseInner]]: + """Sub-account Spot Asset Transfer History (For Master Account) + + - fromEmail and toEmail cannot be sent at the same time. - Return fromEmail equal master account email by default. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_email: Sub-account email + :type from_email: str + :param to_email: Sub-account email + :type to_email: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 1 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_sub_transfer_history_get_serialize( + timestamp=timestamp, + signature=signature, + from_email=from_email, + to_email=to_email, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountSubTransferHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_sub_transfer_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + to_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Sub-account Spot Asset Transfer History (For Master Account) + + - fromEmail and toEmail cannot be sent at the same time. - Return fromEmail equal master account email by default. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_email: Sub-account email + :type from_email: str + :param to_email: Sub-account email + :type to_email: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 1 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_sub_transfer_history_get_serialize( + timestamp=timestamp, + signature=signature, + from_email=from_email, + to_email=to_email, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountSubTransferHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_sub_transfer_history_get_serialize( + self, + timestamp, + signature, + from_email, + to_email, + start_time, + end_time, + page, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if from_email is not None: + + _query_params.append(('fromEmail', from_email)) + + if to_email is not None: + + _query_params.append(('toEmail', to_email)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if page is not None: + + _query_params.append(('page', page)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/sub-account/sub/transfer/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_transaction_statistics_get( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountTransactionStatisticsGet200Response: + """Query Sub-account Transaction Statistics (For Master Account) + + Query Sub-account Transaction statistics (For Master Account). Weight(UID): 60 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_transaction_statistics_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountTransactionStatisticsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_transaction_statistics_get_with_http_info( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountTransactionStatisticsGet200Response]: + """Query Sub-account Transaction Statistics (For Master Account) + + Query Sub-account Transaction statistics (For Master Account). Weight(UID): 60 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_transaction_statistics_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountTransactionStatisticsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_transaction_statistics_get_without_preload_content( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Sub-account Transaction Statistics (For Master Account) + + Query Sub-account Transaction statistics (For Master Account). Weight(UID): 60 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_transaction_statistics_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountTransactionStatisticsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_transaction_statistics_get_serialize( + self, + email, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/sub-account/transaction-statistics', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_transfer_sub_to_master_post( + self, + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountFuturesTransferPost200Response: + """Transfer to Master (For Sub-account) + + Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_transfer_sub_to_master_post_serialize( + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_transfer_sub_to_master_post_with_http_info( + self, + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountFuturesTransferPost200Response]: + """Transfer to Master (For Sub-account) + + Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_transfer_sub_to_master_post_serialize( + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_transfer_sub_to_master_post_without_preload_content( + self, + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Transfer to Master (For Sub-account) + + Weight(IP): 1 + + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_transfer_sub_to_master_post_serialize( + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_transfer_sub_to_master_post_serialize( + self, + asset, + amount, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/sub-account/transfer/subToMaster', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_transfer_sub_to_sub_post( + self, + to_email: Annotated[StrictStr, Field(description="Recipient email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountFuturesTransferPost200Response: + """Transfer to Sub-account of Same Master (For Sub-account) + + Weight(IP): 1 + + :param to_email: Recipient email (required) + :type to_email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_transfer_sub_to_sub_post_serialize( + to_email=to_email, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_transfer_sub_to_sub_post_with_http_info( + self, + to_email: Annotated[StrictStr, Field(description="Recipient email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountFuturesTransferPost200Response]: + """Transfer to Sub-account of Same Master (For Sub-account) + + Weight(IP): 1 + + :param to_email: Recipient email (required) + :type to_email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_transfer_sub_to_sub_post_serialize( + to_email=to_email, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_transfer_sub_to_sub_post_without_preload_content( + self, + to_email: Annotated[StrictStr, Field(description="Recipient email")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Transfer to Sub-account of Same Master (For Sub-account) + + Weight(IP): 1 + + :param to_email: Recipient email (required) + :type to_email: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_transfer_sub_to_sub_post_serialize( + to_email=to_email, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountFuturesTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_transfer_sub_to_sub_post_serialize( + self, + to_email, + asset, + amount, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if to_email is not None: + + _query_params.append(('toEmail', to_email)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/sub-account/transfer/subToSub', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_transfer_sub_user_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + type: Annotated[Optional[StrictInt], Field(description="* `1` - transfer in * `2` - transfer out")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner]: + """Sub-account Transfer History (For Sub-account) + + - If `type` is not sent, the records of type 2: transfer out will be returned by default. - If `startTime` and `endTime` are not sent, the recent 30-day data will be returned. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param type: * `1` - transfer in * `2` - transfer out + :type type: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_transfer_sub_user_history_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + type=type, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_transfer_sub_user_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + type: Annotated[Optional[StrictInt], Field(description="* `1` - transfer in * `2` - transfer out")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner]]: + """Sub-account Transfer History (For Sub-account) + + - If `type` is not sent, the records of type 2: transfer out will be returned by default. - If `startTime` and `endTime` are not sent, the recent 30-day data will be returned. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param type: * `1` - transfer in * `2` - transfer out + :type type: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_transfer_sub_user_history_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + type=type, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_transfer_sub_user_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + type: Annotated[Optional[StrictInt], Field(description="* `1` - transfer in * `2` - transfer out")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Sub-account Transfer History (For Sub-account) + + - If `type` is not sent, the records of type 2: transfer out will be returned by default. - If `startTime` and `endTime` are not sent, the recent 30-day data will be returned. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param type: * `1` - transfer in * `2` - transfer out + :type type: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_transfer_sub_user_history_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + type=type, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_transfer_sub_user_history_get_serialize( + self, + timestamp, + signature, + asset, + type, + start_time, + end_time, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if type is not None: + + _query_params.append(('type', type)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/sub-account/transfer/subUserHistory', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_universal_transfer_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + to_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + client_tran_id: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500, Max 500")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1SubAccountUniversalTransferGet200ResponseInner]: + """Universal Transfer History (For Master Account) + + - `fromEmail` and `toEmail` cannot be sent at the same time. - Return `fromEmail` equal master account email by default. - The query time period must be less then 30 days. - If startTime and endTime not sent, return records of the last 30 days by default. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_email: Sub-account email + :type from_email: str + :param to_email: Sub-account email + :type to_email: str + :param client_tran_id: + :type client_tran_id: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 500, Max 500 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_universal_transfer_get_serialize( + timestamp=timestamp, + signature=signature, + from_email=from_email, + to_email=to_email, + client_tran_id=client_tran_id, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountUniversalTransferGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_universal_transfer_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + to_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + client_tran_id: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500, Max 500")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1SubAccountUniversalTransferGet200ResponseInner]]: + """Universal Transfer History (For Master Account) + + - `fromEmail` and `toEmail` cannot be sent at the same time. - Return `fromEmail` equal master account email by default. - The query time period must be less then 30 days. - If startTime and endTime not sent, return records of the last 30 days by default. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_email: Sub-account email + :type from_email: str + :param to_email: Sub-account email + :type to_email: str + :param client_tran_id: + :type client_tran_id: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 500, Max 500 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_universal_transfer_get_serialize( + timestamp=timestamp, + signature=signature, + from_email=from_email, + to_email=to_email, + client_tran_id=client_tran_id, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountUniversalTransferGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_universal_transfer_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + to_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + client_tran_id: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500, Max 500")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Universal Transfer History (For Master Account) + + - `fromEmail` and `toEmail` cannot be sent at the same time. - Return `fromEmail` equal master account email by default. - The query time period must be less then 30 days. - If startTime and endTime not sent, return records of the last 30 days by default. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_email: Sub-account email + :type from_email: str + :param to_email: Sub-account email + :type to_email: str + :param client_tran_id: + :type client_tran_id: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param page: Default 1 + :type page: int + :param limit: Default 500, Max 500 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_universal_transfer_get_serialize( + timestamp=timestamp, + signature=signature, + from_email=from_email, + to_email=to_email, + client_tran_id=client_tran_id, + start_time=start_time, + end_time=end_time, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SubAccountUniversalTransferGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_universal_transfer_get_serialize( + self, + timestamp, + signature, + from_email, + to_email, + client_tran_id, + start_time, + end_time, + page, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if from_email is not None: + + _query_params.append(('fromEmail', from_email)) + + if to_email is not None: + + _query_params.append(('toEmail', to_email)) + + if client_tran_id is not None: + + _query_params.append(('clientTranId', client_tran_id)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if page is not None: + + _query_params.append(('page', page)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/sub-account/universalTransfer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_universal_transfer_post( + self, + from_account_type: StrictStr, + to_account_type: StrictStr, + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + to_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + client_tran_id: Optional[StrictStr] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Only supported under ISOLATED_MARGIN type")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountUniversalTransferPost200Response: + """Universal Transfer (For Master Account) + + - You need to enable \"internal transfer\" option for the api key which requests this endpoint. - Transfer from master account by default if fromEmail is not sent. - Transfer to master account by default if toEmail is not sent. - Supported transfer scenarios: - Master account SPOT transfer to sub-account SPOT,USDT_FUTURE,COIN_FUTURE,MARGIN(Cross),ISOLATED_MARGIN - Sub-account SPOT,USDT_FUTURE,COIN_FUTURE,MARGIN(Cross),ISOLATED_MARGIN transfer to master account SPOT - Transfer between two sub-account SPOT accounts Weight(IP): 1 + + :param from_account_type: (required) + :type from_account_type: str + :param to_account_type: (required) + :type to_account_type: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_email: Sub-account email + :type from_email: str + :param to_email: Sub-account email + :type to_email: str + :param client_tran_id: + :type client_tran_id: str + :param symbol: Only supported under ISOLATED_MARGIN type + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_universal_transfer_post_serialize( + from_account_type=from_account_type, + to_account_type=to_account_type, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + from_email=from_email, + to_email=to_email, + client_tran_id=client_tran_id, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountUniversalTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_universal_transfer_post_with_http_info( + self, + from_account_type: StrictStr, + to_account_type: StrictStr, + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + to_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + client_tran_id: Optional[StrictStr] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Only supported under ISOLATED_MARGIN type")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountUniversalTransferPost200Response]: + """Universal Transfer (For Master Account) + + - You need to enable \"internal transfer\" option for the api key which requests this endpoint. - Transfer from master account by default if fromEmail is not sent. - Transfer to master account by default if toEmail is not sent. - Supported transfer scenarios: - Master account SPOT transfer to sub-account SPOT,USDT_FUTURE,COIN_FUTURE,MARGIN(Cross),ISOLATED_MARGIN - Sub-account SPOT,USDT_FUTURE,COIN_FUTURE,MARGIN(Cross),ISOLATED_MARGIN transfer to master account SPOT - Transfer between two sub-account SPOT accounts Weight(IP): 1 + + :param from_account_type: (required) + :type from_account_type: str + :param to_account_type: (required) + :type to_account_type: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_email: Sub-account email + :type from_email: str + :param to_email: Sub-account email + :type to_email: str + :param client_tran_id: + :type client_tran_id: str + :param symbol: Only supported under ISOLATED_MARGIN type + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_universal_transfer_post_serialize( + from_account_type=from_account_type, + to_account_type=to_account_type, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + from_email=from_email, + to_email=to_email, + client_tran_id=client_tran_id, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountUniversalTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_universal_transfer_post_without_preload_content( + self, + from_account_type: StrictStr, + to_account_type: StrictStr, + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + to_email: Annotated[Optional[StrictStr], Field(description="Sub-account email")] = None, + client_tran_id: Optional[StrictStr] = None, + symbol: Annotated[Optional[StrictStr], Field(description="Only supported under ISOLATED_MARGIN type")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Universal Transfer (For Master Account) + + - You need to enable \"internal transfer\" option for the api key which requests this endpoint. - Transfer from master account by default if fromEmail is not sent. - Transfer to master account by default if toEmail is not sent. - Supported transfer scenarios: - Master account SPOT transfer to sub-account SPOT,USDT_FUTURE,COIN_FUTURE,MARGIN(Cross),ISOLATED_MARGIN - Sub-account SPOT,USDT_FUTURE,COIN_FUTURE,MARGIN(Cross),ISOLATED_MARGIN transfer to master account SPOT - Transfer between two sub-account SPOT accounts Weight(IP): 1 + + :param from_account_type: (required) + :type from_account_type: str + :param to_account_type: (required) + :type to_account_type: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_email: Sub-account email + :type from_email: str + :param to_email: Sub-account email + :type to_email: str + :param client_tran_id: + :type client_tran_id: str + :param symbol: Only supported under ISOLATED_MARGIN type + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_universal_transfer_post_serialize( + from_account_type=from_account_type, + to_account_type=to_account_type, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + from_email=from_email, + to_email=to_email, + client_tran_id=client_tran_id, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountUniversalTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_universal_transfer_post_serialize( + self, + from_account_type, + to_account_type, + asset, + amount, + timestamp, + signature, + from_email, + to_email, + client_tran_id, + symbol, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if from_email is not None: + + _query_params.append(('fromEmail', from_email)) + + if to_email is not None: + + _query_params.append(('toEmail', to_email)) + + if from_account_type is not None: + + _query_params.append(('fromAccountType', from_account_type)) + + if to_account_type is not None: + + _query_params.append(('toAccountType', to_account_type)) + + if client_tran_id is not None: + + _query_params.append(('clientTranId', client_tran_id)) + + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/sub-account/universalTransfer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_sub_account_virtual_sub_account_post( + self, + sub_account_string: Annotated[StrictStr, Field(description="Please input a string. We will create a virtual email using that string for you to register")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SubAccountVirtualSubAccountPost200Response: + """Create a Virtual Sub-account(For Master Account) + + - This request will generate a virtual sub account under your master account. - You need to enable \"trade\" option for the api key which requests this endpoint. Weight(IP): 1 + + :param sub_account_string: Please input a string. We will create a virtual email using that string for you to register (required) + :type sub_account_string: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_virtual_sub_account_post_serialize( + sub_account_string=sub_account_string, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountVirtualSubAccountPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_sub_account_virtual_sub_account_post_with_http_info( + self, + sub_account_string: Annotated[StrictStr, Field(description="Please input a string. We will create a virtual email using that string for you to register")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SubAccountVirtualSubAccountPost200Response]: + """Create a Virtual Sub-account(For Master Account) + + - This request will generate a virtual sub account under your master account. - You need to enable \"trade\" option for the api key which requests this endpoint. Weight(IP): 1 + + :param sub_account_string: Please input a string. We will create a virtual email using that string for you to register (required) + :type sub_account_string: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_virtual_sub_account_post_serialize( + sub_account_string=sub_account_string, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountVirtualSubAccountPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_sub_account_virtual_sub_account_post_without_preload_content( + self, + sub_account_string: Annotated[StrictStr, Field(description="Please input a string. We will create a virtual email using that string for you to register")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a Virtual Sub-account(For Master Account) + + - This request will generate a virtual sub account under your master account. - You need to enable \"trade\" option for the api key which requests this endpoint. Weight(IP): 1 + + :param sub_account_string: Please input a string. We will create a virtual email using that string for you to register (required) + :type sub_account_string: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_sub_account_virtual_sub_account_post_serialize( + sub_account_string=sub_account_string, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SubAccountVirtualSubAccountPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_sub_account_virtual_sub_account_post_serialize( + self, + sub_account_string, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if sub_account_string is not None: + + _query_params.append(('subAccountString', sub_account_string)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/sub-account/virtualSubAccount', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_sub_account_futures_account_get( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + futures_type: Annotated[StrictInt, Field(description="* `1` - USDT Margined Futures * `2` - COIN Margined Futures")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2SubAccountFuturesAccountGet200Response: + """Detail on Sub-account's Futures Account V2 (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param futures_type: * `1` - USDT Margined Futures * `2` - COIN Margined Futures (required) + :type futures_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_sub_account_futures_account_get_serialize( + email=email, + futures_type=futures_type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2SubAccountFuturesAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_sub_account_futures_account_get_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + futures_type: Annotated[StrictInt, Field(description="* `1` - USDT Margined Futures * `2` - COIN Margined Futures")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2SubAccountFuturesAccountGet200Response]: + """Detail on Sub-account's Futures Account V2 (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param futures_type: * `1` - USDT Margined Futures * `2` - COIN Margined Futures (required) + :type futures_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_sub_account_futures_account_get_serialize( + email=email, + futures_type=futures_type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2SubAccountFuturesAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_sub_account_futures_account_get_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + futures_type: Annotated[StrictInt, Field(description="* `1` - USDT Margined Futures * `2` - COIN Margined Futures")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Detail on Sub-account's Futures Account V2 (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param futures_type: * `1` - USDT Margined Futures * `2` - COIN Margined Futures (required) + :type futures_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_sub_account_futures_account_get_serialize( + email=email, + futures_type=futures_type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2SubAccountFuturesAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_sub_account_futures_account_get_serialize( + self, + email, + futures_type, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if futures_type is not None: + + _query_params.append(('futuresType', futures_type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v2/sub-account/futures/account', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_sub_account_futures_account_summary_get( + self, + futures_type: Annotated[StrictInt, Field(description="* `1` - USDT Margined Futures * `2` - COIN Margined Futures")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 10, Max 20")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2SubAccountFuturesAccountSummaryGet200Response: + """Summary of Sub-account's Futures Account V2 (For Master Account) + + Weight(IP): 10 + + :param futures_type: * `1` - USDT Margined Futures * `2` - COIN Margined Futures (required) + :type futures_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page: Default 1 + :type page: int + :param limit: Default 10, Max 20 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_sub_account_futures_account_summary_get_serialize( + futures_type=futures_type, + timestamp=timestamp, + signature=signature, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2SubAccountFuturesAccountSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_sub_account_futures_account_summary_get_with_http_info( + self, + futures_type: Annotated[StrictInt, Field(description="* `1` - USDT Margined Futures * `2` - COIN Margined Futures")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 10, Max 20")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2SubAccountFuturesAccountSummaryGet200Response]: + """Summary of Sub-account's Futures Account V2 (For Master Account) + + Weight(IP): 10 + + :param futures_type: * `1` - USDT Margined Futures * `2` - COIN Margined Futures (required) + :type futures_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page: Default 1 + :type page: int + :param limit: Default 10, Max 20 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_sub_account_futures_account_summary_get_serialize( + futures_type=futures_type, + timestamp=timestamp, + signature=signature, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2SubAccountFuturesAccountSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_sub_account_futures_account_summary_get_without_preload_content( + self, + futures_type: Annotated[StrictInt, Field(description="* `1` - USDT Margined Futures * `2` - COIN Margined Futures")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + page: Annotated[Optional[StrictInt], Field(description="Default 1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 10, Max 20")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Summary of Sub-account's Futures Account V2 (For Master Account) + + Weight(IP): 10 + + :param futures_type: * `1` - USDT Margined Futures * `2` - COIN Margined Futures (required) + :type futures_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param page: Default 1 + :type page: int + :param limit: Default 10, Max 20 + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_sub_account_futures_account_summary_get_serialize( + futures_type=futures_type, + timestamp=timestamp, + signature=signature, + page=page, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2SubAccountFuturesAccountSummaryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_sub_account_futures_account_summary_get_serialize( + self, + futures_type, + timestamp, + signature, + page, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if futures_type is not None: + + _query_params.append(('futuresType', futures_type)) + + if page is not None: + + _query_params.append(('page', page)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v2/sub-account/futures/accountSummary', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_sub_account_futures_position_risk_get( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + futures_type: Annotated[StrictInt, Field(description="* `1` - USDT Margined Futures * `2` - COIN Margined Futures")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2SubAccountFuturesPositionRiskGet200Response: + """Futures Position-Risk of Sub-account V2 (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param futures_type: * `1` - USDT Margined Futures * `2` - COIN Margined Futures (required) + :type futures_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_sub_account_futures_position_risk_get_serialize( + email=email, + futures_type=futures_type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2SubAccountFuturesPositionRiskGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_sub_account_futures_position_risk_get_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + futures_type: Annotated[StrictInt, Field(description="* `1` - USDT Margined Futures * `2` - COIN Margined Futures")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2SubAccountFuturesPositionRiskGet200Response]: + """Futures Position-Risk of Sub-account V2 (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param futures_type: * `1` - USDT Margined Futures * `2` - COIN Margined Futures (required) + :type futures_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_sub_account_futures_position_risk_get_serialize( + email=email, + futures_type=futures_type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2SubAccountFuturesPositionRiskGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_sub_account_futures_position_risk_get_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + futures_type: Annotated[StrictInt, Field(description="* `1` - USDT Margined Futures * `2` - COIN Margined Futures")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Futures Position-Risk of Sub-account V2 (For Master Account) + + Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param futures_type: * `1` - USDT Margined Futures * `2` - COIN Margined Futures (required) + :type futures_type: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_sub_account_futures_position_risk_get_serialize( + email=email, + futures_type=futures_type, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2SubAccountFuturesPositionRiskGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_sub_account_futures_position_risk_get_serialize( + self, + email, + futures_type, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if futures_type is not None: + + _query_params.append(('futuresType', futures_type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v2/sub-account/futures/positionRisk', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v2_sub_account_sub_account_api_ip_restriction_post( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + sub_account_api_key: StrictStr, + status: Annotated[StrictStr, Field(description="IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. 3 = Restrict access to users' trusted third party IPs only")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + third_party_name: Annotated[Optional[StrictStr], Field(description="third party IP list name")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV2SubAccountSubAccountApiIpRestrictionPost200Response: + """Update IP Restriction for Sub-Account API key (For Master Account) + + Update IP Restriction for Sub-Account API key Weight(UID): 3000 + + :param email: Sub-account email (required) + :type email: str + :param sub_account_api_key: (required) + :type sub_account_api_key: str + :param status: IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. 3 = Restrict access to users' trusted third party IPs only (required) + :type status: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param third_party_name: third party IP list name + :type third_party_name: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_sub_account_sub_account_api_ip_restriction_post_serialize( + email=email, + sub_account_api_key=sub_account_api_key, + status=status, + timestamp=timestamp, + signature=signature, + third_party_name=third_party_name, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2SubAccountSubAccountApiIpRestrictionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v2_sub_account_sub_account_api_ip_restriction_post_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + sub_account_api_key: StrictStr, + status: Annotated[StrictStr, Field(description="IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. 3 = Restrict access to users' trusted third party IPs only")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + third_party_name: Annotated[Optional[StrictStr], Field(description="third party IP list name")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV2SubAccountSubAccountApiIpRestrictionPost200Response]: + """Update IP Restriction for Sub-Account API key (For Master Account) + + Update IP Restriction for Sub-Account API key Weight(UID): 3000 + + :param email: Sub-account email (required) + :type email: str + :param sub_account_api_key: (required) + :type sub_account_api_key: str + :param status: IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. 3 = Restrict access to users' trusted third party IPs only (required) + :type status: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param third_party_name: third party IP list name + :type third_party_name: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_sub_account_sub_account_api_ip_restriction_post_serialize( + email=email, + sub_account_api_key=sub_account_api_key, + status=status, + timestamp=timestamp, + signature=signature, + third_party_name=third_party_name, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2SubAccountSubAccountApiIpRestrictionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v2_sub_account_sub_account_api_ip_restriction_post_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + sub_account_api_key: StrictStr, + status: Annotated[StrictStr, Field(description="IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. 3 = Restrict access to users' trusted third party IPs only")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + third_party_name: Annotated[Optional[StrictStr], Field(description="third party IP list name")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update IP Restriction for Sub-Account API key (For Master Account) + + Update IP Restriction for Sub-Account API key Weight(UID): 3000 + + :param email: Sub-account email (required) + :type email: str + :param sub_account_api_key: (required) + :type sub_account_api_key: str + :param status: IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. 3 = Restrict access to users' trusted third party IPs only (required) + :type status: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param third_party_name: third party IP list name + :type third_party_name: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v2_sub_account_sub_account_api_ip_restriction_post_serialize( + email=email, + sub_account_api_key=sub_account_api_key, + status=status, + timestamp=timestamp, + signature=signature, + third_party_name=third_party_name, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV2SubAccountSubAccountApiIpRestrictionPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v2_sub_account_sub_account_api_ip_restriction_post_serialize( + self, + email, + sub_account_api_key, + status, + timestamp, + signature, + third_party_name, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if sub_account_api_key is not None: + + _query_params.append(('subAccountApiKey', sub_account_api_key)) + + if status is not None: + + _query_params.append(('status', status)) + + if third_party_name is not None: + + _query_params.append(('thirdPartyName', third_party_name)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v2/sub-account/subAccountApi/ipRestriction', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v3_sub_account_assets_get( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV3SubAccountAssetsGet200Response: + """Sub-account Assets (For Master Account) + + Fetch sub-account assets Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v3_sub_account_assets_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV3SubAccountAssetsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v3_sub_account_assets_get_with_http_info( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV3SubAccountAssetsGet200Response]: + """Sub-account Assets (For Master Account) + + Fetch sub-account assets Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v3_sub_account_assets_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV3SubAccountAssetsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v3_sub_account_assets_get_without_preload_content( + self, + email: Annotated[StrictStr, Field(description="Sub-account email")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Sub-account Assets (For Master Account) + + Fetch sub-account assets Weight(IP): 1 + + :param email: Sub-account email (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v3_sub_account_assets_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV3SubAccountAssetsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v3_sub_account_assets_get_serialize( + self, + email, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v3/sub-account/assets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v4_sub_account_assets_get( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV4SubAccountAssetsGet200Response: + """Query Sub-account Assets (For Master Account) + + Fetch sub-account assets Weight(UID): 60 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v4_sub_account_assets_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV4SubAccountAssetsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v4_sub_account_assets_get_with_http_info( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV4SubAccountAssetsGet200Response]: + """Query Sub-account Assets (For Master Account) + + Fetch sub-account assets Weight(UID): 60 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v4_sub_account_assets_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV4SubAccountAssetsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v4_sub_account_assets_get_without_preload_content( + self, + email: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Sub-account Assets (For Master Account) + + Fetch sub-account assets Weight(UID): 60 + + :param email: (required) + :type email: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v4_sub_account_assets_get_serialize( + email=email, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV4SubAccountAssetsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v4_sub_account_assets_get_serialize( + self, + email, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v4/sub-account/assets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/trade_api.py b/target/python/binance_openapi/openapi_client/api/trade_api.py new file mode 100644 index 0000000..1e1607e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/trade_api.py @@ -0,0 +1,8688 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.account import Account +from openapi_client.models.api_v3_account_commission_get200_response import ApiV3AccountCommissionGet200Response +from openapi_client.models.api_v3_all_order_list_get200_response_inner import ApiV3AllOrderListGet200ResponseInner +from openapi_client.models.api_v3_my_allocations_get200_response_inner import ApiV3MyAllocationsGet200ResponseInner +from openapi_client.models.api_v3_my_prevented_matches_get200_response_inner import ApiV3MyPreventedMatchesGet200ResponseInner +from openapi_client.models.api_v3_open_order_list_get200_response_inner import ApiV3OpenOrderListGet200ResponseInner +from openapi_client.models.api_v3_open_orders_delete200_response_inner import ApiV3OpenOrdersDelete200ResponseInner +from openapi_client.models.api_v3_order_cancel_replace_post200_response import ApiV3OrderCancelReplacePost200Response +from openapi_client.models.api_v3_order_list_get200_response import ApiV3OrderListGet200Response +from openapi_client.models.api_v3_order_oco_post200_response import ApiV3OrderOcoPost200Response +from openapi_client.models.api_v3_order_post200_response import ApiV3OrderPost200Response +from openapi_client.models.api_v3_rate_limit_order_get200_response_inner import ApiV3RateLimitOrderGet200ResponseInner +from openapi_client.models.api_v3_sor_order_post200_response import ApiV3SorOrderPost200Response +from openapi_client.models.my_trade import MyTrade +from openapi_client.models.oco_order import OcoOrder +from openapi_client.models.order import Order +from openapi_client.models.order_details import OrderDetails + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class TradeApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def api_v3_account_commission_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3AccountCommissionGet200Response: + """Query Commission Rates (USER_DATA) + + Get current account commission rates. Weight: 20 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_account_commission_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3AccountCommissionGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_account_commission_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3AccountCommissionGet200Response]: + """Query Commission Rates (USER_DATA) + + Get current account commission rates. Weight: 20 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_account_commission_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3AccountCommissionGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_account_commission_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Commission Rates (USER_DATA) + + Get current account commission rates. Weight: 20 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_account_commission_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3AccountCommissionGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_account_commission_get_serialize( + self, + symbol, + timestamp, + signature, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/account/commission', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_account_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Account: + """Account Information (USER_DATA) + + Get current account information. Weight(IP): 20 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Account", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_account_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Account]: + """Account Information (USER_DATA) + + Get current account information. Weight(IP): 20 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Account", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_account_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Account Information (USER_DATA) + + Get current account information. Weight(IP): 20 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_account_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Account", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_account_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/account', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_all_order_list_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApiV3AllOrderListGet200ResponseInner]: + """Query all OCO (USER_DATA) + + Retrieves all OCO based on provided optional parameters Weight(IP): 20 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_all_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + from_id=from_id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3AllOrderListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_all_order_list_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApiV3AllOrderListGet200ResponseInner]]: + """Query all OCO (USER_DATA) + + Retrieves all OCO based on provided optional parameters Weight(IP): 20 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_all_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + from_id=from_id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3AllOrderListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_all_order_list_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query all OCO (USER_DATA) + + Retrieves all OCO based on provided optional parameters Weight(IP): 20 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_all_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + from_id=from_id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3AllOrderListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_all_order_list_get_serialize( + self, + timestamp, + signature, + from_id, + start_time, + end_time, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if from_id is not None: + + _query_params.append(('fromId', from_id)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/allOrderList', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_all_orders_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[OrderDetails]: + """All Orders (USER_DATA) + + Get all account orders; active, canceled, or filled.. - If `orderId` is set, it will get orders >= that `orderId`. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. - If `startTime` and/or `endTime` provided, `orderId` is not required Weight(IP): 20 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_all_orders_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_id=order_id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OrderDetails]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_all_orders_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[OrderDetails]]: + """All Orders (USER_DATA) + + Get all account orders; active, canceled, or filled.. - If `orderId` is set, it will get orders >= that `orderId`. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. - If `startTime` and/or `endTime` provided, `orderId` is not required Weight(IP): 20 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_all_orders_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_id=order_id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OrderDetails]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_all_orders_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """All Orders (USER_DATA) + + Get all account orders; active, canceled, or filled.. - If `orderId` is set, it will get orders >= that `orderId`. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. - If `startTime` and/or `endTime` provided, `orderId` is not required Weight(IP): 20 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_all_orders_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_id=order_id, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OrderDetails]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_all_orders_get_serialize( + self, + symbol, + timestamp, + signature, + order_id, + start_time, + end_time, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/allOrders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_my_allocations_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + from_allocation_id: Optional[StrictInt] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApiV3MyAllocationsGet200ResponseInner]: + """Query Allocations (USER_DATA) + + Retrieves allocations resulting from SOR order placement. Weight: 20 Supported parameter combinations: Parameters Response symbol allocations from oldest to newest symbol + startTime oldest allocations since startTime symbol + endTime newest allocations until endTime symbol + startTime + endTime allocations within the time range symbol + fromAllocationId allocations by allocation ID symbol + orderId allocations related to an order starting with oldest symbol + orderId + fromAllocationId allocations related to an order by allocation ID Note: The time between startTime and endTime can't be longer than 24 hours. + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param from_allocation_id: + :type from_allocation_id: int + :param limit: Default 500; max 1000. + :type limit: int + :param order_id: Order id + :type order_id: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_my_allocations_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + from_allocation_id=from_allocation_id, + limit=limit, + order_id=order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3MyAllocationsGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_my_allocations_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + from_allocation_id: Optional[StrictInt] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApiV3MyAllocationsGet200ResponseInner]]: + """Query Allocations (USER_DATA) + + Retrieves allocations resulting from SOR order placement. Weight: 20 Supported parameter combinations: Parameters Response symbol allocations from oldest to newest symbol + startTime oldest allocations since startTime symbol + endTime newest allocations until endTime symbol + startTime + endTime allocations within the time range symbol + fromAllocationId allocations by allocation ID symbol + orderId allocations related to an order starting with oldest symbol + orderId + fromAllocationId allocations related to an order by allocation ID Note: The time between startTime and endTime can't be longer than 24 hours. + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param from_allocation_id: + :type from_allocation_id: int + :param limit: Default 500; max 1000. + :type limit: int + :param order_id: Order id + :type order_id: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_my_allocations_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + from_allocation_id=from_allocation_id, + limit=limit, + order_id=order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3MyAllocationsGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_my_allocations_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + from_allocation_id: Optional[StrictInt] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Allocations (USER_DATA) + + Retrieves allocations resulting from SOR order placement. Weight: 20 Supported parameter combinations: Parameters Response symbol allocations from oldest to newest symbol + startTime oldest allocations since startTime symbol + endTime newest allocations until endTime symbol + startTime + endTime allocations within the time range symbol + fromAllocationId allocations by allocation ID symbol + orderId allocations related to an order starting with oldest symbol + orderId + fromAllocationId allocations related to an order by allocation ID Note: The time between startTime and endTime can't be longer than 24 hours. + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param from_allocation_id: + :type from_allocation_id: int + :param limit: Default 500; max 1000. + :type limit: int + :param order_id: Order id + :type order_id: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_my_allocations_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + from_allocation_id=from_allocation_id, + limit=limit, + order_id=order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3MyAllocationsGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_my_allocations_get_serialize( + self, + symbol, + timestamp, + signature, + start_time, + end_time, + from_allocation_id, + limit, + order_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if from_allocation_id is not None: + + _query_params.append(('fromAllocationId', from_allocation_id)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/myAllocations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_my_prevented_matches_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + prevented_match_id: Optional[StrictInt] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + from_prevented_match_id: Optional[StrictInt] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApiV3MyPreventedMatchesGet200ResponseInner]: + """Query Prevented Matches + + Displays the list of orders that were expired because of STP. For additional information on what a Prevented match is, as well as Self Trade Prevention (STP), please refer to our STP FAQ page. These are the combinations supported: * symbol + preventedMatchId * symbol + orderId * symbol + orderId + fromPreventedMatchId (limit will default to 500) * symbol + orderId + fromPreventedMatchId + limit Weight(IP): Case Weight If symbol is invalid: 2 Querying by preventedMatchId: 2 Querying by orderId: 20 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param prevented_match_id: + :type prevented_match_id: int + :param order_id: Order id + :type order_id: int + :param from_prevented_match_id: + :type from_prevented_match_id: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_my_prevented_matches_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + prevented_match_id=prevented_match_id, + order_id=order_id, + from_prevented_match_id=from_prevented_match_id, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3MyPreventedMatchesGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_my_prevented_matches_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + prevented_match_id: Optional[StrictInt] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + from_prevented_match_id: Optional[StrictInt] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApiV3MyPreventedMatchesGet200ResponseInner]]: + """Query Prevented Matches + + Displays the list of orders that were expired because of STP. For additional information on what a Prevented match is, as well as Self Trade Prevention (STP), please refer to our STP FAQ page. These are the combinations supported: * symbol + preventedMatchId * symbol + orderId * symbol + orderId + fromPreventedMatchId (limit will default to 500) * symbol + orderId + fromPreventedMatchId + limit Weight(IP): Case Weight If symbol is invalid: 2 Querying by preventedMatchId: 2 Querying by orderId: 20 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param prevented_match_id: + :type prevented_match_id: int + :param order_id: Order id + :type order_id: int + :param from_prevented_match_id: + :type from_prevented_match_id: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_my_prevented_matches_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + prevented_match_id=prevented_match_id, + order_id=order_id, + from_prevented_match_id=from_prevented_match_id, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3MyPreventedMatchesGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_my_prevented_matches_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + prevented_match_id: Optional[StrictInt] = None, + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + from_prevented_match_id: Optional[StrictInt] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Prevented Matches + + Displays the list of orders that were expired because of STP. For additional information on what a Prevented match is, as well as Self Trade Prevention (STP), please refer to our STP FAQ page. These are the combinations supported: * symbol + preventedMatchId * symbol + orderId * symbol + orderId + fromPreventedMatchId (limit will default to 500) * symbol + orderId + fromPreventedMatchId + limit Weight(IP): Case Weight If symbol is invalid: 2 Querying by preventedMatchId: 2 Querying by orderId: 20 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param prevented_match_id: + :type prevented_match_id: int + :param order_id: Order id + :type order_id: int + :param from_prevented_match_id: + :type from_prevented_match_id: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_my_prevented_matches_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + prevented_match_id=prevented_match_id, + order_id=order_id, + from_prevented_match_id=from_prevented_match_id, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3MyPreventedMatchesGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_my_prevented_matches_get_serialize( + self, + symbol, + timestamp, + signature, + prevented_match_id, + order_id, + from_prevented_match_id, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if prevented_match_id is not None: + + _query_params.append(('preventedMatchId', prevented_match_id)) + + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if from_prevented_match_id is not None: + + _query_params.append(('fromPreventedMatchId', from_prevented_match_id)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/myPreventedMatches', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_my_trades_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="This can only be used in combination with symbol.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[MyTrade]: + """Account Trade List (USER_DATA) + + Get trades for a specific account and symbol. If `fromId` is set, it will get id >= that `fromId`. Otherwise most recent orders are returned. The time between startTime and endTime can't be longer than 24 hours. These are the supported combinations of all parameters: symbol symbol + orderId symbol + startTime symbol + endTime symbol + fromId symbol + startTime + endTime symbol+ orderId + fromId Weight(IP): 20 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: This can only be used in combination with symbol. + :type order_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_my_trades_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_id=order_id, + start_time=start_time, + end_time=end_time, + from_id=from_id, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MyTrade]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_my_trades_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="This can only be used in combination with symbol.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[MyTrade]]: + """Account Trade List (USER_DATA) + + Get trades for a specific account and symbol. If `fromId` is set, it will get id >= that `fromId`. Otherwise most recent orders are returned. The time between startTime and endTime can't be longer than 24 hours. These are the supported combinations of all parameters: symbol symbol + orderId symbol + startTime symbol + endTime symbol + fromId symbol + startTime + endTime symbol+ orderId + fromId Weight(IP): 20 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: This can only be used in combination with symbol. + :type order_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_my_trades_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_id=order_id, + start_time=start_time, + end_time=end_time, + from_id=from_id, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MyTrade]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_my_trades_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="This can only be used in combination with symbol.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + from_id: Annotated[Optional[StrictInt], Field(description="Trade id to fetch from. Default gets most recent trades.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Account Trade List (USER_DATA) + + Get trades for a specific account and symbol. If `fromId` is set, it will get id >= that `fromId`. Otherwise most recent orders are returned. The time between startTime and endTime can't be longer than 24 hours. These are the supported combinations of all parameters: symbol symbol + orderId symbol + startTime symbol + endTime symbol + fromId symbol + startTime + endTime symbol+ orderId + fromId Weight(IP): 20 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: This can only be used in combination with symbol. + :type order_id: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param from_id: Trade id to fetch from. Default gets most recent trades. + :type from_id: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_my_trades_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_id=order_id, + start_time=start_time, + end_time=end_time, + from_id=from_id, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[MyTrade]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_my_trades_get_serialize( + self, + symbol, + timestamp, + signature, + order_id, + start_time, + end_time, + from_id, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if from_id is not None: + + _query_params.append(('fromId', from_id)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/myTrades', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_open_order_list_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApiV3OpenOrderListGet200ResponseInner]: + """Query Open OCO (USER_DATA) + + Weight(IP): 6 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_open_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3OpenOrderListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_open_order_list_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApiV3OpenOrderListGet200ResponseInner]]: + """Query Open OCO (USER_DATA) + + Weight(IP): 6 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_open_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3OpenOrderListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_open_order_list_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Open OCO (USER_DATA) + + Weight(IP): 6 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_open_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3OpenOrderListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_open_order_list_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/openOrderList', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_open_orders_delete( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApiV3OpenOrdersDelete200ResponseInner]: + """Cancel all Open Orders on a Symbol (TRADE) + + Cancels all active orders on a symbol. This includes OCO orders. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_open_orders_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3OpenOrdersDelete200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_open_orders_delete_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApiV3OpenOrdersDelete200ResponseInner]]: + """Cancel all Open Orders on a Symbol (TRADE) + + Cancels all active orders on a symbol. This includes OCO orders. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_open_orders_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3OpenOrdersDelete200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_open_orders_delete_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel all Open Orders on a Symbol (TRADE) + + Cancels all active orders on a symbol. This includes OCO orders. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_open_orders_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3OpenOrdersDelete200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_open_orders_delete_serialize( + self, + symbol, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/v3/openOrders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_open_orders_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[OrderDetails]: + """Current Open Orders (USER_DATA) + + Get all open orders on a symbol. Careful when accessing this with no symbol. Weight(IP): - `6` for a single symbol; - `80` when the symbol parameter is omitted; + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OrderDetails]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_open_orders_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[OrderDetails]]: + """Current Open Orders (USER_DATA) + + Get all open orders on a symbol. Careful when accessing this with no symbol. Weight(IP): - `6` for a single symbol; - `80` when the symbol parameter is omitted; + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OrderDetails]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_open_orders_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Current Open Orders (USER_DATA) + + Get all open orders on a symbol. Careful when accessing this with no symbol. Weight(IP): - `6` for a single symbol; - `80` when the symbol parameter is omitted; + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_open_orders_get_serialize( + timestamp=timestamp, + signature=signature, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[OrderDetails]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_open_orders_get_serialize( + self, + timestamp, + signature, + symbol, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/openOrders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_order_cancel_replace_post( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + cancel_replace_mode: Annotated[StrictStr, Field(description="- `STOP_ON_FAILURE` If the cancel request fails, the new order placement will not be attempted. - `ALLOW_FAILURES` If new order placement will be attempted even if cancel request fails.")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + cancel_restrictions: Optional[StrictStr] = None, + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + quantity: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order quantity")] = None, + quote_order_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote quantity")] = None, + price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order price")] = None, + cancel_new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + cancel_orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence.")] = None, + cancel_order_id: Annotated[Optional[StrictInt], Field(description="Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence.")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + stop_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + trailing_delta: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3OrderCancelReplacePost200Response: + """Cancel an Existing Order and Send a New Order (Trade) + + Cancels an existing order and places a new order on the same symbol. Filters and Order Count are evaluated before the processing of the cancellation and order placement occurs. A new order that was not attempted (i.e. when newOrderResult: NOT_ATTEMPTED), will still increase the order count by 1. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param cancel_replace_mode: - `STOP_ON_FAILURE` If the cancel request fails, the new order placement will not be attempted. - `ALLOW_FAILURES` If new order placement will be attempted even if cancel request fails. (required) + :type cancel_replace_mode: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param cancel_restrictions: + :type cancel_restrictions: str + :param time_in_force: Order time in force + :type time_in_force: str + :param quantity: Order quantity + :type quantity: float + :param quote_order_qty: Quote quantity + :type quote_order_qty: float + :param price: Order price + :type price: float + :param cancel_new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type cancel_new_client_order_id: str + :param cancel_orig_client_order_id: Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. + :type cancel_orig_client_order_id: str + :param cancel_order_id: Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. + :type cancel_order_id: int + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param stop_price: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type stop_price: float + :param trailing_delta: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type trailing_delta: float + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_cancel_replace_post_serialize( + symbol=symbol, + side=side, + type=type, + cancel_replace_mode=cancel_replace_mode, + timestamp=timestamp, + signature=signature, + cancel_restrictions=cancel_restrictions, + time_in_force=time_in_force, + quantity=quantity, + quote_order_qty=quote_order_qty, + price=price, + cancel_new_client_order_id=cancel_new_client_order_id, + cancel_orig_client_order_id=cancel_orig_client_order_id, + cancel_order_id=cancel_order_id, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + stop_price=stop_price, + trailing_delta=trailing_delta, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3OrderCancelReplacePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_order_cancel_replace_post_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + cancel_replace_mode: Annotated[StrictStr, Field(description="- `STOP_ON_FAILURE` If the cancel request fails, the new order placement will not be attempted. - `ALLOW_FAILURES` If new order placement will be attempted even if cancel request fails.")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + cancel_restrictions: Optional[StrictStr] = None, + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + quantity: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order quantity")] = None, + quote_order_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote quantity")] = None, + price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order price")] = None, + cancel_new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + cancel_orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence.")] = None, + cancel_order_id: Annotated[Optional[StrictInt], Field(description="Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence.")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + stop_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + trailing_delta: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3OrderCancelReplacePost200Response]: + """Cancel an Existing Order and Send a New Order (Trade) + + Cancels an existing order and places a new order on the same symbol. Filters and Order Count are evaluated before the processing of the cancellation and order placement occurs. A new order that was not attempted (i.e. when newOrderResult: NOT_ATTEMPTED), will still increase the order count by 1. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param cancel_replace_mode: - `STOP_ON_FAILURE` If the cancel request fails, the new order placement will not be attempted. - `ALLOW_FAILURES` If new order placement will be attempted even if cancel request fails. (required) + :type cancel_replace_mode: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param cancel_restrictions: + :type cancel_restrictions: str + :param time_in_force: Order time in force + :type time_in_force: str + :param quantity: Order quantity + :type quantity: float + :param quote_order_qty: Quote quantity + :type quote_order_qty: float + :param price: Order price + :type price: float + :param cancel_new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type cancel_new_client_order_id: str + :param cancel_orig_client_order_id: Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. + :type cancel_orig_client_order_id: str + :param cancel_order_id: Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. + :type cancel_order_id: int + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param stop_price: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type stop_price: float + :param trailing_delta: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type trailing_delta: float + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_cancel_replace_post_serialize( + symbol=symbol, + side=side, + type=type, + cancel_replace_mode=cancel_replace_mode, + timestamp=timestamp, + signature=signature, + cancel_restrictions=cancel_restrictions, + time_in_force=time_in_force, + quantity=quantity, + quote_order_qty=quote_order_qty, + price=price, + cancel_new_client_order_id=cancel_new_client_order_id, + cancel_orig_client_order_id=cancel_orig_client_order_id, + cancel_order_id=cancel_order_id, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + stop_price=stop_price, + trailing_delta=trailing_delta, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3OrderCancelReplacePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_order_cancel_replace_post_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + cancel_replace_mode: Annotated[StrictStr, Field(description="- `STOP_ON_FAILURE` If the cancel request fails, the new order placement will not be attempted. - `ALLOW_FAILURES` If new order placement will be attempted even if cancel request fails.")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + cancel_restrictions: Optional[StrictStr] = None, + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + quantity: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order quantity")] = None, + quote_order_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote quantity")] = None, + price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order price")] = None, + cancel_new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + cancel_orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence.")] = None, + cancel_order_id: Annotated[Optional[StrictInt], Field(description="Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence.")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + stop_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + trailing_delta: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel an Existing Order and Send a New Order (Trade) + + Cancels an existing order and places a new order on the same symbol. Filters and Order Count are evaluated before the processing of the cancellation and order placement occurs. A new order that was not attempted (i.e. when newOrderResult: NOT_ATTEMPTED), will still increase the order count by 1. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param cancel_replace_mode: - `STOP_ON_FAILURE` If the cancel request fails, the new order placement will not be attempted. - `ALLOW_FAILURES` If new order placement will be attempted even if cancel request fails. (required) + :type cancel_replace_mode: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param cancel_restrictions: + :type cancel_restrictions: str + :param time_in_force: Order time in force + :type time_in_force: str + :param quantity: Order quantity + :type quantity: float + :param quote_order_qty: Quote quantity + :type quote_order_qty: float + :param price: Order price + :type price: float + :param cancel_new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type cancel_new_client_order_id: str + :param cancel_orig_client_order_id: Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. + :type cancel_orig_client_order_id: str + :param cancel_order_id: Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. + :type cancel_order_id: int + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param stop_price: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type stop_price: float + :param trailing_delta: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type trailing_delta: float + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_cancel_replace_post_serialize( + symbol=symbol, + side=side, + type=type, + cancel_replace_mode=cancel_replace_mode, + timestamp=timestamp, + signature=signature, + cancel_restrictions=cancel_restrictions, + time_in_force=time_in_force, + quantity=quantity, + quote_order_qty=quote_order_qty, + price=price, + cancel_new_client_order_id=cancel_new_client_order_id, + cancel_orig_client_order_id=cancel_orig_client_order_id, + cancel_order_id=cancel_order_id, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + stop_price=stop_price, + trailing_delta=trailing_delta, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3OrderCancelReplacePost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_order_cancel_replace_post_serialize( + self, + symbol, + side, + type, + cancel_replace_mode, + timestamp, + signature, + cancel_restrictions, + time_in_force, + quantity, + quote_order_qty, + price, + cancel_new_client_order_id, + cancel_orig_client_order_id, + cancel_order_id, + new_client_order_id, + strategy_id, + strategy_type, + stop_price, + trailing_delta, + iceberg_qty, + new_order_resp_type, + self_trade_prevention_mode, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if side is not None: + + _query_params.append(('side', side)) + + if type is not None: + + _query_params.append(('type', type)) + + if cancel_replace_mode is not None: + + _query_params.append(('cancelReplaceMode', cancel_replace_mode)) + + if cancel_restrictions is not None: + + _query_params.append(('cancelRestrictions', cancel_restrictions)) + + if time_in_force is not None: + + _query_params.append(('timeInForce', time_in_force)) + + if quantity is not None: + + _query_params.append(('quantity', quantity)) + + if quote_order_qty is not None: + + _query_params.append(('quoteOrderQty', quote_order_qty)) + + if price is not None: + + _query_params.append(('price', price)) + + if cancel_new_client_order_id is not None: + + _query_params.append(('cancelNewClientOrderId', cancel_new_client_order_id)) + + if cancel_orig_client_order_id is not None: + + _query_params.append(('cancelOrigClientOrderId', cancel_orig_client_order_id)) + + if cancel_order_id is not None: + + _query_params.append(('cancelOrderId', cancel_order_id)) + + if new_client_order_id is not None: + + _query_params.append(('newClientOrderId', new_client_order_id)) + + if strategy_id is not None: + + _query_params.append(('strategyId', strategy_id)) + + if strategy_type is not None: + + _query_params.append(('strategyType', strategy_type)) + + if stop_price is not None: + + _query_params.append(('stopPrice', stop_price)) + + if trailing_delta is not None: + + _query_params.append(('trailingDelta', trailing_delta)) + + if iceberg_qty is not None: + + _query_params.append(('icebergQty', iceberg_qty)) + + if new_order_resp_type is not None: + + _query_params.append(('newOrderRespType', new_order_resp_type)) + + if self_trade_prevention_mode is not None: + + _query_params.append(('selfTradePreventionMode', self_trade_prevention_mode)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v3/order/cancelReplace', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_order_delete( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + cancel_restrictions: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Order: + """Cancel Order (TRADE) + + Cancel an active order. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param cancel_restrictions: + :type cancel_restrictions: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_id=order_id, + orig_client_order_id=orig_client_order_id, + new_client_order_id=new_client_order_id, + cancel_restrictions=cancel_restrictions, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Order", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_order_delete_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + cancel_restrictions: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Order]: + """Cancel Order (TRADE) + + Cancel an active order. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param cancel_restrictions: + :type cancel_restrictions: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_id=order_id, + orig_client_order_id=orig_client_order_id, + new_client_order_id=new_client_order_id, + cancel_restrictions=cancel_restrictions, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Order", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_order_delete_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + cancel_restrictions: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel Order (TRADE) + + Cancel an active order. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param cancel_restrictions: + :type cancel_restrictions: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_id=order_id, + orig_client_order_id=orig_client_order_id, + new_client_order_id=new_client_order_id, + cancel_restrictions=cancel_restrictions, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Order", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_order_delete_serialize( + self, + symbol, + timestamp, + signature, + order_id, + orig_client_order_id, + new_client_order_id, + cancel_restrictions, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if orig_client_order_id is not None: + + _query_params.append(('origClientOrderId', orig_client_order_id)) + + if new_client_order_id is not None: + + _query_params.append(('newClientOrderId', new_client_order_id)) + + if cancel_restrictions is not None: + + _query_params.append(('cancelRestrictions', cancel_restrictions)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/v3/order', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_order_get( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OrderDetails: + """Query Order (USER_DATA) + + Check an order's status. - Either `orderId` or `origClientOrderId` must be sent. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 4 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_id=order_id, + orig_client_order_id=orig_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrderDetails", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_order_get_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OrderDetails]: + """Query Order (USER_DATA) + + Check an order's status. - Either `orderId` or `origClientOrderId` must be sent. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 4 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_id=order_id, + orig_client_order_id=orig_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrderDetails", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_order_get_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Order (USER_DATA) + + Check an order's status. - Either `orderId` or `origClientOrderId` must be sent. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 4 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_get_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_id=order_id, + orig_client_order_id=orig_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrderDetails", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_order_get_serialize( + self, + symbol, + timestamp, + signature, + order_id, + orig_client_order_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if orig_client_order_id is not None: + + _query_params.append(('origClientOrderId', orig_client_order_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/order', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_order_list_delete( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_list_id: Annotated[Optional[StrictInt], Field(description="Order list id")] = None, + list_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the entire orderList")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OcoOrder: + """Cancel OCO (TRADE) + + Cancel an entire Order List Canceling an individual leg will cancel the entire OCO Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_list_id: Order list id + :type order_list_id: int + :param list_client_order_id: A unique Id for the entire orderList + :type list_client_order_id: str + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_list_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_list_id=order_list_id, + list_client_order_id=list_client_order_id, + new_client_order_id=new_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OcoOrder", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_order_list_delete_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_list_id: Annotated[Optional[StrictInt], Field(description="Order list id")] = None, + list_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the entire orderList")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OcoOrder]: + """Cancel OCO (TRADE) + + Cancel an entire Order List Canceling an individual leg will cancel the entire OCO Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_list_id: Order list id + :type order_list_id: int + :param list_client_order_id: A unique Id for the entire orderList + :type list_client_order_id: str + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_list_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_list_id=order_list_id, + list_client_order_id=list_client_order_id, + new_client_order_id=new_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OcoOrder", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_order_list_delete_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_list_id: Annotated[Optional[StrictInt], Field(description="Order list id")] = None, + list_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the entire orderList")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel OCO (TRADE) + + Cancel an entire Order List Canceling an individual leg will cancel the entire OCO Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_list_id: Order list id + :type order_list_id: int + :param list_client_order_id: A unique Id for the entire orderList + :type list_client_order_id: str + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_list_delete_serialize( + symbol=symbol, + timestamp=timestamp, + signature=signature, + order_list_id=order_list_id, + list_client_order_id=list_client_order_id, + new_client_order_id=new_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OcoOrder", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_order_list_delete_serialize( + self, + symbol, + timestamp, + signature, + order_list_id, + list_client_order_id, + new_client_order_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if order_list_id is not None: + + _query_params.append(('orderListId', order_list_id)) + + if list_client_order_id is not None: + + _query_params.append(('listClientOrderId', list_client_order_id)) + + if new_client_order_id is not None: + + _query_params.append(('newClientOrderId', new_client_order_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/v3/orderList', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_order_list_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_list_id: Annotated[Optional[StrictInt], Field(description="Order list id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3OrderListGet200Response: + """Query OCO (USER_DATA) + + Retrieves a specific OCO based on provided optional parameters Weight(IP): 4 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_list_id: Order list id + :type order_list_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + order_list_id=order_list_id, + orig_client_order_id=orig_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3OrderListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_order_list_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_list_id: Annotated[Optional[StrictInt], Field(description="Order list id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3OrderListGet200Response]: + """Query OCO (USER_DATA) + + Retrieves a specific OCO based on provided optional parameters Weight(IP): 4 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_list_id: Order list id + :type order_list_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + order_list_id=order_list_id, + orig_client_order_id=orig_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3OrderListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_order_list_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_list_id: Annotated[Optional[StrictInt], Field(description="Order list id")] = None, + orig_client_order_id: Annotated[Optional[StrictStr], Field(description="Order id from client")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query OCO (USER_DATA) + + Retrieves a specific OCO based on provided optional parameters Weight(IP): 4 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_list_id: Order list id + :type order_list_id: int + :param orig_client_order_id: Order id from client + :type orig_client_order_id: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_list_get_serialize( + timestamp=timestamp, + signature=signature, + order_list_id=order_list_id, + orig_client_order_id=orig_client_order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3OrderListGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_order_list_get_serialize( + self, + timestamp, + signature, + order_list_id, + orig_client_order_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_list_id is not None: + + _query_params.append(('orderListId', order_list_id)) + + if orig_client_order_id is not None: + + _query_params.append(('origClientOrderId', orig_client_order_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/orderList', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_order_oco_post( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Union[StrictFloat, StrictInt], + price: Annotated[Union[StrictFloat, StrictInt], Field(description="Order price")], + stop_price: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + list_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the entire orderList")] = None, + limit_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the limit order")] = None, + limit_strategy_id: Optional[StrictInt] = None, + limit_strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + limit_iceberg_qty: Optional[Union[StrictFloat, StrictInt]] = None, + trailing_delta: Optional[Union[StrictFloat, StrictInt]] = None, + stop_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the stop loss/stop loss limit leg")] = None, + stop_strategy_id: Optional[StrictInt] = None, + stop_strategy_type: Optional[StrictInt] = None, + stop_limit_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="If provided, stopLimitTimeInForce is required.")] = None, + stop_iceberg_qty: Optional[Union[StrictFloat, StrictInt]] = None, + stop_limit_time_in_force: Optional[StrictStr] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3OrderOcoPost200Response: + """New OCO (TRADE) + + Send in a new OCO - Price Restrictions: - `SELL`: Limit Price > Last Price > Stop Price - `BUY`: Limit Price < Last Price < Stop Price - Quantity Restrictions: - Both legs must have the same quantity - `ICEBERG` quantities however do not have to be the same - Order Rate Limit - `OCO` counts as 2 orders against the order rate limit. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: (required) + :type quantity: float + :param price: Order price (required) + :type price: float + :param stop_price: (required) + :type stop_price: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param list_client_order_id: A unique Id for the entire orderList + :type list_client_order_id: str + :param limit_client_order_id: A unique Id for the limit order + :type limit_client_order_id: str + :param limit_strategy_id: + :type limit_strategy_id: int + :param limit_strategy_type: The value cannot be less than 1000000. + :type limit_strategy_type: int + :param limit_iceberg_qty: + :type limit_iceberg_qty: float + :param trailing_delta: + :type trailing_delta: float + :param stop_client_order_id: A unique Id for the stop loss/stop loss limit leg + :type stop_client_order_id: str + :param stop_strategy_id: + :type stop_strategy_id: int + :param stop_strategy_type: + :type stop_strategy_type: int + :param stop_limit_price: If provided, stopLimitTimeInForce is required. + :type stop_limit_price: float + :param stop_iceberg_qty: + :type stop_iceberg_qty: float + :param stop_limit_time_in_force: + :type stop_limit_time_in_force: str + :param new_order_resp_type: Set the response JSON. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_oco_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + price=price, + stop_price=stop_price, + timestamp=timestamp, + signature=signature, + list_client_order_id=list_client_order_id, + limit_client_order_id=limit_client_order_id, + limit_strategy_id=limit_strategy_id, + limit_strategy_type=limit_strategy_type, + limit_iceberg_qty=limit_iceberg_qty, + trailing_delta=trailing_delta, + stop_client_order_id=stop_client_order_id, + stop_strategy_id=stop_strategy_id, + stop_strategy_type=stop_strategy_type, + stop_limit_price=stop_limit_price, + stop_iceberg_qty=stop_iceberg_qty, + stop_limit_time_in_force=stop_limit_time_in_force, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3OrderOcoPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_order_oco_post_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Union[StrictFloat, StrictInt], + price: Annotated[Union[StrictFloat, StrictInt], Field(description="Order price")], + stop_price: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + list_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the entire orderList")] = None, + limit_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the limit order")] = None, + limit_strategy_id: Optional[StrictInt] = None, + limit_strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + limit_iceberg_qty: Optional[Union[StrictFloat, StrictInt]] = None, + trailing_delta: Optional[Union[StrictFloat, StrictInt]] = None, + stop_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the stop loss/stop loss limit leg")] = None, + stop_strategy_id: Optional[StrictInt] = None, + stop_strategy_type: Optional[StrictInt] = None, + stop_limit_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="If provided, stopLimitTimeInForce is required.")] = None, + stop_iceberg_qty: Optional[Union[StrictFloat, StrictInt]] = None, + stop_limit_time_in_force: Optional[StrictStr] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3OrderOcoPost200Response]: + """New OCO (TRADE) + + Send in a new OCO - Price Restrictions: - `SELL`: Limit Price > Last Price > Stop Price - `BUY`: Limit Price < Last Price < Stop Price - Quantity Restrictions: - Both legs must have the same quantity - `ICEBERG` quantities however do not have to be the same - Order Rate Limit - `OCO` counts as 2 orders against the order rate limit. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: (required) + :type quantity: float + :param price: Order price (required) + :type price: float + :param stop_price: (required) + :type stop_price: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param list_client_order_id: A unique Id for the entire orderList + :type list_client_order_id: str + :param limit_client_order_id: A unique Id for the limit order + :type limit_client_order_id: str + :param limit_strategy_id: + :type limit_strategy_id: int + :param limit_strategy_type: The value cannot be less than 1000000. + :type limit_strategy_type: int + :param limit_iceberg_qty: + :type limit_iceberg_qty: float + :param trailing_delta: + :type trailing_delta: float + :param stop_client_order_id: A unique Id for the stop loss/stop loss limit leg + :type stop_client_order_id: str + :param stop_strategy_id: + :type stop_strategy_id: int + :param stop_strategy_type: + :type stop_strategy_type: int + :param stop_limit_price: If provided, stopLimitTimeInForce is required. + :type stop_limit_price: float + :param stop_iceberg_qty: + :type stop_iceberg_qty: float + :param stop_limit_time_in_force: + :type stop_limit_time_in_force: str + :param new_order_resp_type: Set the response JSON. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_oco_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + price=price, + stop_price=stop_price, + timestamp=timestamp, + signature=signature, + list_client_order_id=list_client_order_id, + limit_client_order_id=limit_client_order_id, + limit_strategy_id=limit_strategy_id, + limit_strategy_type=limit_strategy_type, + limit_iceberg_qty=limit_iceberg_qty, + trailing_delta=trailing_delta, + stop_client_order_id=stop_client_order_id, + stop_strategy_id=stop_strategy_id, + stop_strategy_type=stop_strategy_type, + stop_limit_price=stop_limit_price, + stop_iceberg_qty=stop_iceberg_qty, + stop_limit_time_in_force=stop_limit_time_in_force, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3OrderOcoPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_order_oco_post_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + quantity: Union[StrictFloat, StrictInt], + price: Annotated[Union[StrictFloat, StrictInt], Field(description="Order price")], + stop_price: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + list_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the entire orderList")] = None, + limit_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the limit order")] = None, + limit_strategy_id: Optional[StrictInt] = None, + limit_strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + limit_iceberg_qty: Optional[Union[StrictFloat, StrictInt]] = None, + trailing_delta: Optional[Union[StrictFloat, StrictInt]] = None, + stop_client_order_id: Annotated[Optional[StrictStr], Field(description="A unique Id for the stop loss/stop loss limit leg")] = None, + stop_strategy_id: Optional[StrictInt] = None, + stop_strategy_type: Optional[StrictInt] = None, + stop_limit_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="If provided, stopLimitTimeInForce is required.")] = None, + stop_iceberg_qty: Optional[Union[StrictFloat, StrictInt]] = None, + stop_limit_time_in_force: Optional[StrictStr] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """New OCO (TRADE) + + Send in a new OCO - Price Restrictions: - `SELL`: Limit Price > Last Price > Stop Price - `BUY`: Limit Price < Last Price < Stop Price - Quantity Restrictions: - Both legs must have the same quantity - `ICEBERG` quantities however do not have to be the same - Order Rate Limit - `OCO` counts as 2 orders against the order rate limit. Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param quantity: (required) + :type quantity: float + :param price: Order price (required) + :type price: float + :param stop_price: (required) + :type stop_price: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param list_client_order_id: A unique Id for the entire orderList + :type list_client_order_id: str + :param limit_client_order_id: A unique Id for the limit order + :type limit_client_order_id: str + :param limit_strategy_id: + :type limit_strategy_id: int + :param limit_strategy_type: The value cannot be less than 1000000. + :type limit_strategy_type: int + :param limit_iceberg_qty: + :type limit_iceberg_qty: float + :param trailing_delta: + :type trailing_delta: float + :param stop_client_order_id: A unique Id for the stop loss/stop loss limit leg + :type stop_client_order_id: str + :param stop_strategy_id: + :type stop_strategy_id: int + :param stop_strategy_type: + :type stop_strategy_type: int + :param stop_limit_price: If provided, stopLimitTimeInForce is required. + :type stop_limit_price: float + :param stop_iceberg_qty: + :type stop_iceberg_qty: float + :param stop_limit_time_in_force: + :type stop_limit_time_in_force: str + :param new_order_resp_type: Set the response JSON. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_oco_post_serialize( + symbol=symbol, + side=side, + quantity=quantity, + price=price, + stop_price=stop_price, + timestamp=timestamp, + signature=signature, + list_client_order_id=list_client_order_id, + limit_client_order_id=limit_client_order_id, + limit_strategy_id=limit_strategy_id, + limit_strategy_type=limit_strategy_type, + limit_iceberg_qty=limit_iceberg_qty, + trailing_delta=trailing_delta, + stop_client_order_id=stop_client_order_id, + stop_strategy_id=stop_strategy_id, + stop_strategy_type=stop_strategy_type, + stop_limit_price=stop_limit_price, + stop_iceberg_qty=stop_iceberg_qty, + stop_limit_time_in_force=stop_limit_time_in_force, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3OrderOcoPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_order_oco_post_serialize( + self, + symbol, + side, + quantity, + price, + stop_price, + timestamp, + signature, + list_client_order_id, + limit_client_order_id, + limit_strategy_id, + limit_strategy_type, + limit_iceberg_qty, + trailing_delta, + stop_client_order_id, + stop_strategy_id, + stop_strategy_type, + stop_limit_price, + stop_iceberg_qty, + stop_limit_time_in_force, + new_order_resp_type, + self_trade_prevention_mode, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if list_client_order_id is not None: + + _query_params.append(('listClientOrderId', list_client_order_id)) + + if side is not None: + + _query_params.append(('side', side)) + + if quantity is not None: + + _query_params.append(('quantity', quantity)) + + if limit_client_order_id is not None: + + _query_params.append(('limitClientOrderId', limit_client_order_id)) + + if limit_strategy_id is not None: + + _query_params.append(('limitStrategyId', limit_strategy_id)) + + if limit_strategy_type is not None: + + _query_params.append(('limitStrategyType', limit_strategy_type)) + + if price is not None: + + _query_params.append(('price', price)) + + if limit_iceberg_qty is not None: + + _query_params.append(('limitIcebergQty', limit_iceberg_qty)) + + if trailing_delta is not None: + + _query_params.append(('trailingDelta', trailing_delta)) + + if stop_client_order_id is not None: + + _query_params.append(('stopClientOrderId', stop_client_order_id)) + + if stop_price is not None: + + _query_params.append(('stopPrice', stop_price)) + + if stop_strategy_id is not None: + + _query_params.append(('stopStrategyId', stop_strategy_id)) + + if stop_strategy_type is not None: + + _query_params.append(('stopStrategyType', stop_strategy_type)) + + if stop_limit_price is not None: + + _query_params.append(('stopLimitPrice', stop_limit_price)) + + if stop_iceberg_qty is not None: + + _query_params.append(('stopIcebergQty', stop_iceberg_qty)) + + if stop_limit_time_in_force is not None: + + _query_params.append(('stopLimitTimeInForce', stop_limit_time_in_force)) + + if new_order_resp_type is not None: + + _query_params.append(('newOrderRespType', new_order_resp_type)) + + if self_trade_prevention_mode is not None: + + _query_params.append(('selfTradePreventionMode', self_trade_prevention_mode)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v3/order/oco', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_order_post( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + quantity: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order quantity")] = None, + quote_order_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote quantity")] = None, + price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order price")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + stop_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + trailing_delta: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3OrderPost200Response: + """New Order (TRADE) + + Send in a new order. - `LIMIT_MAKER` are `LIMIT` orders that will be rejected if they would immediately match and trade as a taker. - `STOP_LOSS` and `TAKE_PROFIT` will execute a `MARKET` order when the `stopPrice` is reached. - Any `LIMIT` or `LIMIT_MAKER` type order can be made an iceberg order by sending an `icebergQty`. - Any order with an `icebergQty` MUST have `timeInForce` set to `GTC`. - `MARKET` orders using `quantity` specifies how much a user wants to buy or sell based on the market price. - `MARKET` orders using `quoteOrderQty` specifies the amount the user wants to spend (when buying) or receive (when selling) of the quote asset; the correct quantity will be determined based on the market liquidity and `quoteOrderQty`. - `MARKET` orders using `quoteOrderQty` will not break `LOT_SIZE` filter rules; the order will execute a quantity that will have the notional value as close as possible to `quoteOrderQty`. - same `newClientOrderId` can be accepted only when the previous one is filled, otherwise the order will be rejected. Trigger order price rules against market price for both `MARKET` and `LIMIT` versions: - Price above market price: `STOP_LOSS` `BUY`, `TAKE_PROFIT` `SELL` - Price below market price: `STOP_LOSS` `SELL`, `TAKE_PROFIT` `BUY` Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param time_in_force: Order time in force + :type time_in_force: str + :param quantity: Order quantity + :type quantity: float + :param quote_order_qty: Quote quantity + :type quote_order_qty: float + :param price: Order price + :type price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param stop_price: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type stop_price: float + :param trailing_delta: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type trailing_delta: float + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_post_serialize( + symbol=symbol, + side=side, + type=type, + timestamp=timestamp, + signature=signature, + time_in_force=time_in_force, + quantity=quantity, + quote_order_qty=quote_order_qty, + price=price, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + stop_price=stop_price, + trailing_delta=trailing_delta, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3OrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_order_post_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + quantity: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order quantity")] = None, + quote_order_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote quantity")] = None, + price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order price")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + stop_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + trailing_delta: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3OrderPost200Response]: + """New Order (TRADE) + + Send in a new order. - `LIMIT_MAKER` are `LIMIT` orders that will be rejected if they would immediately match and trade as a taker. - `STOP_LOSS` and `TAKE_PROFIT` will execute a `MARKET` order when the `stopPrice` is reached. - Any `LIMIT` or `LIMIT_MAKER` type order can be made an iceberg order by sending an `icebergQty`. - Any order with an `icebergQty` MUST have `timeInForce` set to `GTC`. - `MARKET` orders using `quantity` specifies how much a user wants to buy or sell based on the market price. - `MARKET` orders using `quoteOrderQty` specifies the amount the user wants to spend (when buying) or receive (when selling) of the quote asset; the correct quantity will be determined based on the market liquidity and `quoteOrderQty`. - `MARKET` orders using `quoteOrderQty` will not break `LOT_SIZE` filter rules; the order will execute a quantity that will have the notional value as close as possible to `quoteOrderQty`. - same `newClientOrderId` can be accepted only when the previous one is filled, otherwise the order will be rejected. Trigger order price rules against market price for both `MARKET` and `LIMIT` versions: - Price above market price: `STOP_LOSS` `BUY`, `TAKE_PROFIT` `SELL` - Price below market price: `STOP_LOSS` `SELL`, `TAKE_PROFIT` `BUY` Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param time_in_force: Order time in force + :type time_in_force: str + :param quantity: Order quantity + :type quantity: float + :param quote_order_qty: Quote quantity + :type quote_order_qty: float + :param price: Order price + :type price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param stop_price: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type stop_price: float + :param trailing_delta: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type trailing_delta: float + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_post_serialize( + symbol=symbol, + side=side, + type=type, + timestamp=timestamp, + signature=signature, + time_in_force=time_in_force, + quantity=quantity, + quote_order_qty=quote_order_qty, + price=price, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + stop_price=stop_price, + trailing_delta=trailing_delta, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3OrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_order_post_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + quantity: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order quantity")] = None, + quote_order_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote quantity")] = None, + price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order price")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + stop_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + trailing_delta: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """New Order (TRADE) + + Send in a new order. - `LIMIT_MAKER` are `LIMIT` orders that will be rejected if they would immediately match and trade as a taker. - `STOP_LOSS` and `TAKE_PROFIT` will execute a `MARKET` order when the `stopPrice` is reached. - Any `LIMIT` or `LIMIT_MAKER` type order can be made an iceberg order by sending an `icebergQty`. - Any order with an `icebergQty` MUST have `timeInForce` set to `GTC`. - `MARKET` orders using `quantity` specifies how much a user wants to buy or sell based on the market price. - `MARKET` orders using `quoteOrderQty` specifies the amount the user wants to spend (when buying) or receive (when selling) of the quote asset; the correct quantity will be determined based on the market liquidity and `quoteOrderQty`. - `MARKET` orders using `quoteOrderQty` will not break `LOT_SIZE` filter rules; the order will execute a quantity that will have the notional value as close as possible to `quoteOrderQty`. - same `newClientOrderId` can be accepted only when the previous one is filled, otherwise the order will be rejected. Trigger order price rules against market price for both `MARKET` and `LIMIT` versions: - Price above market price: `STOP_LOSS` `BUY`, `TAKE_PROFIT` `SELL` - Price below market price: `STOP_LOSS` `SELL`, `TAKE_PROFIT` `BUY` Weight(IP): 1 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param time_in_force: Order time in force + :type time_in_force: str + :param quantity: Order quantity + :type quantity: float + :param quote_order_qty: Quote quantity + :type quote_order_qty: float + :param price: Order price + :type price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param stop_price: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type stop_price: float + :param trailing_delta: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type trailing_delta: float + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_post_serialize( + symbol=symbol, + side=side, + type=type, + timestamp=timestamp, + signature=signature, + time_in_force=time_in_force, + quantity=quantity, + quote_order_qty=quote_order_qty, + price=price, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + stop_price=stop_price, + trailing_delta=trailing_delta, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3OrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_order_post_serialize( + self, + symbol, + side, + type, + timestamp, + signature, + time_in_force, + quantity, + quote_order_qty, + price, + new_client_order_id, + strategy_id, + strategy_type, + stop_price, + trailing_delta, + iceberg_qty, + new_order_resp_type, + self_trade_prevention_mode, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if side is not None: + + _query_params.append(('side', side)) + + if type is not None: + + _query_params.append(('type', type)) + + if time_in_force is not None: + + _query_params.append(('timeInForce', time_in_force)) + + if quantity is not None: + + _query_params.append(('quantity', quantity)) + + if quote_order_qty is not None: + + _query_params.append(('quoteOrderQty', quote_order_qty)) + + if price is not None: + + _query_params.append(('price', price)) + + if new_client_order_id is not None: + + _query_params.append(('newClientOrderId', new_client_order_id)) + + if strategy_id is not None: + + _query_params.append(('strategyId', strategy_id)) + + if strategy_type is not None: + + _query_params.append(('strategyType', strategy_type)) + + if stop_price is not None: + + _query_params.append(('stopPrice', stop_price)) + + if trailing_delta is not None: + + _query_params.append(('trailingDelta', trailing_delta)) + + if iceberg_qty is not None: + + _query_params.append(('icebergQty', iceberg_qty)) + + if new_order_resp_type is not None: + + _query_params.append(('newOrderRespType', new_order_resp_type)) + + if self_trade_prevention_mode is not None: + + _query_params.append(('selfTradePreventionMode', self_trade_prevention_mode)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v3/order', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_order_test_post( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + quantity: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order quantity")] = None, + quote_order_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote quantity")] = None, + price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order price")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + stop_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + trailing_delta: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + compute_commission_rates: Annotated[Optional[StrictBool], Field(description="Default: false")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Test New Order (TRADE) + + Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine. Weight(IP): - Without computeCommissionRates: `1` - With computeCommissionRates: `20` + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param time_in_force: Order time in force + :type time_in_force: str + :param quantity: Order quantity + :type quantity: float + :param quote_order_qty: Quote quantity + :type quote_order_qty: float + :param price: Order price + :type price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param stop_price: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type stop_price: float + :param trailing_delta: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type trailing_delta: float + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param compute_commission_rates: Default: false + :type compute_commission_rates: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_test_post_serialize( + symbol=symbol, + side=side, + type=type, + timestamp=timestamp, + signature=signature, + time_in_force=time_in_force, + quantity=quantity, + quote_order_qty=quote_order_qty, + price=price, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + stop_price=stop_price, + trailing_delta=trailing_delta, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + recv_window=recv_window, + compute_commission_rates=compute_commission_rates, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_order_test_post_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + quantity: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order quantity")] = None, + quote_order_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote quantity")] = None, + price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order price")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + stop_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + trailing_delta: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + compute_commission_rates: Annotated[Optional[StrictBool], Field(description="Default: false")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Test New Order (TRADE) + + Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine. Weight(IP): - Without computeCommissionRates: `1` - With computeCommissionRates: `20` + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param time_in_force: Order time in force + :type time_in_force: str + :param quantity: Order quantity + :type quantity: float + :param quote_order_qty: Quote quantity + :type quote_order_qty: float + :param price: Order price + :type price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param stop_price: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type stop_price: float + :param trailing_delta: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type trailing_delta: float + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param compute_commission_rates: Default: false + :type compute_commission_rates: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_test_post_serialize( + symbol=symbol, + side=side, + type=type, + timestamp=timestamp, + signature=signature, + time_in_force=time_in_force, + quantity=quantity, + quote_order_qty=quote_order_qty, + price=price, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + stop_price=stop_price, + trailing_delta=trailing_delta, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + recv_window=recv_window, + compute_commission_rates=compute_commission_rates, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_order_test_post_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + quantity: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order quantity")] = None, + quote_order_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Quote quantity")] = None, + price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Order price")] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + stop_price: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + trailing_delta: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + compute_commission_rates: Annotated[Optional[StrictBool], Field(description="Default: false")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Test New Order (TRADE) + + Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine. Weight(IP): - Without computeCommissionRates: `1` - With computeCommissionRates: `20` + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param time_in_force: Order time in force + :type time_in_force: str + :param quantity: Order quantity + :type quantity: float + :param quote_order_qty: Quote quantity + :type quote_order_qty: float + :param price: Order price + :type price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param stop_price: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type stop_price: float + :param trailing_delta: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. + :type trailing_delta: float + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param compute_commission_rates: Default: false + :type compute_commission_rates: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_order_test_post_serialize( + symbol=symbol, + side=side, + type=type, + timestamp=timestamp, + signature=signature, + time_in_force=time_in_force, + quantity=quantity, + quote_order_qty=quote_order_qty, + price=price, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + stop_price=stop_price, + trailing_delta=trailing_delta, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + recv_window=recv_window, + compute_commission_rates=compute_commission_rates, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_order_test_post_serialize( + self, + symbol, + side, + type, + timestamp, + signature, + time_in_force, + quantity, + quote_order_qty, + price, + new_client_order_id, + strategy_id, + strategy_type, + stop_price, + trailing_delta, + iceberg_qty, + new_order_resp_type, + recv_window, + compute_commission_rates, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if side is not None: + + _query_params.append(('side', side)) + + if type is not None: + + _query_params.append(('type', type)) + + if time_in_force is not None: + + _query_params.append(('timeInForce', time_in_force)) + + if quantity is not None: + + _query_params.append(('quantity', quantity)) + + if quote_order_qty is not None: + + _query_params.append(('quoteOrderQty', quote_order_qty)) + + if price is not None: + + _query_params.append(('price', price)) + + if new_client_order_id is not None: + + _query_params.append(('newClientOrderId', new_client_order_id)) + + if strategy_id is not None: + + _query_params.append(('strategyId', strategy_id)) + + if strategy_type is not None: + + _query_params.append(('strategyType', strategy_type)) + + if stop_price is not None: + + _query_params.append(('stopPrice', stop_price)) + + if trailing_delta is not None: + + _query_params.append(('trailingDelta', trailing_delta)) + + if iceberg_qty is not None: + + _query_params.append(('icebergQty', iceberg_qty)) + + if new_order_resp_type is not None: + + _query_params.append(('newOrderRespType', new_order_resp_type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if compute_commission_rates is not None: + + _query_params.append(('computeCommissionRates', compute_commission_rates)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v3/order/test', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_rate_limit_order_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApiV3RateLimitOrderGet200ResponseInner]: + """Query Current Order Count Usage (TRADE) + + Displays the user's current order count usage for all intervals. Weight(IP): 40 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_rate_limit_order_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3RateLimitOrderGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_rate_limit_order_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApiV3RateLimitOrderGet200ResponseInner]]: + """Query Current Order Count Usage (TRADE) + + Displays the user's current order count usage for all intervals. Weight(IP): 40 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_rate_limit_order_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3RateLimitOrderGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_rate_limit_order_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Current Order Count Usage (TRADE) + + Displays the user's current order count usage for all intervals. Weight(IP): 40 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_rate_limit_order_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiV3RateLimitOrderGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_rate_limit_order_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v3/rateLimit/order', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_sor_order_post( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + quantity: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + price: Optional[Union[StrictFloat, StrictInt]] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiV3SorOrderPost200Response: + """New order using SOR (TRADE) + + Weight(IP): 6 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param quantity: (required) + :type quantity: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param time_in_force: Order time in force + :type time_in_force: str + :param price: + :type price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_sor_order_post_serialize( + symbol=symbol, + side=side, + type=type, + quantity=quantity, + timestamp=timestamp, + signature=signature, + time_in_force=time_in_force, + price=price, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3SorOrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_sor_order_post_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + quantity: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + price: Optional[Union[StrictFloat, StrictInt]] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiV3SorOrderPost200Response]: + """New order using SOR (TRADE) + + Weight(IP): 6 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param quantity: (required) + :type quantity: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param time_in_force: Order time in force + :type time_in_force: str + :param price: + :type price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_sor_order_post_serialize( + symbol=symbol, + side=side, + type=type, + quantity=quantity, + timestamp=timestamp, + signature=signature, + time_in_force=time_in_force, + price=price, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3SorOrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_sor_order_post_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + quantity: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + price: Optional[Union[StrictFloat, StrictInt]] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """New order using SOR (TRADE) + + Weight(IP): 6 + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param quantity: (required) + :type quantity: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param time_in_force: Order time in force + :type time_in_force: str + :param price: + :type price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_sor_order_post_serialize( + symbol=symbol, + side=side, + type=type, + quantity=quantity, + timestamp=timestamp, + signature=signature, + time_in_force=time_in_force, + price=price, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiV3SorOrderPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_sor_order_post_serialize( + self, + symbol, + side, + type, + quantity, + timestamp, + signature, + time_in_force, + price, + new_client_order_id, + strategy_id, + strategy_type, + iceberg_qty, + new_order_resp_type, + self_trade_prevention_mode, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if side is not None: + + _query_params.append(('side', side)) + + if type is not None: + + _query_params.append(('type', type)) + + if time_in_force is not None: + + _query_params.append(('timeInForce', time_in_force)) + + if quantity is not None: + + _query_params.append(('quantity', quantity)) + + if price is not None: + + _query_params.append(('price', price)) + + if new_client_order_id is not None: + + _query_params.append(('newClientOrderId', new_client_order_id)) + + if strategy_id is not None: + + _query_params.append(('strategyId', strategy_id)) + + if strategy_type is not None: + + _query_params.append(('strategyType', strategy_type)) + + if iceberg_qty is not None: + + _query_params.append(('icebergQty', iceberg_qty)) + + if new_order_resp_type is not None: + + _query_params.append(('newOrderRespType', new_order_resp_type)) + + if self_trade_prevention_mode is not None: + + _query_params.append(('selfTradePreventionMode', self_trade_prevention_mode)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v3/sor/order', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def api_v3_sor_order_test_post( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + quantity: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + price: Optional[Union[StrictFloat, StrictInt]] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + compute_commission_rates: Annotated[Optional[StrictBool], Field(description="Default: false")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Test new order using SOR (TRADE) + + Test new order creation and signature/recvWindow using smart order routing (SOR). Creates and validates a new order but does not send it into the matching engine. Weight(IP): - Without computeCommissionRates: `1` - With computeCommissionRates: `20` + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param quantity: (required) + :type quantity: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param time_in_force: Order time in force + :type time_in_force: str + :param price: + :type price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param compute_commission_rates: Default: false + :type compute_commission_rates: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_sor_order_test_post_serialize( + symbol=symbol, + side=side, + type=type, + quantity=quantity, + timestamp=timestamp, + signature=signature, + time_in_force=time_in_force, + price=price, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + compute_commission_rates=compute_commission_rates, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def api_v3_sor_order_test_post_with_http_info( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + quantity: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + price: Optional[Union[StrictFloat, StrictInt]] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + compute_commission_rates: Annotated[Optional[StrictBool], Field(description="Default: false")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Test new order using SOR (TRADE) + + Test new order creation and signature/recvWindow using smart order routing (SOR). Creates and validates a new order but does not send it into the matching engine. Weight(IP): - Without computeCommissionRates: `1` - With computeCommissionRates: `20` + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param quantity: (required) + :type quantity: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param time_in_force: Order time in force + :type time_in_force: str + :param price: + :type price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param compute_commission_rates: Default: false + :type compute_commission_rates: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_sor_order_test_post_serialize( + symbol=symbol, + side=side, + type=type, + quantity=quantity, + timestamp=timestamp, + signature=signature, + time_in_force=time_in_force, + price=price, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + compute_commission_rates=compute_commission_rates, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def api_v3_sor_order_test_post_without_preload_content( + self, + symbol: Annotated[StrictStr, Field(description="Trading symbol, e.g. BNBUSDT")], + side: StrictStr, + type: Annotated[StrictStr, Field(description="Order type")], + quantity: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + time_in_force: Annotated[Optional[StrictStr], Field(description="Order time in force")] = None, + price: Optional[Union[StrictFloat, StrictInt]] = None, + new_client_order_id: Annotated[Optional[StrictStr], Field(description="Used to uniquely identify this cancel. Automatically generated by default")] = None, + strategy_id: Optional[StrictInt] = None, + strategy_type: Annotated[Optional[StrictInt], Field(description="The value cannot be less than 1000000.")] = None, + iceberg_qty: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.")] = None, + new_order_resp_type: Annotated[Optional[StrictStr], Field(description="Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.")] = None, + self_trade_prevention_mode: Annotated[Optional[StrictStr], Field(description="The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.")] = None, + compute_commission_rates: Annotated[Optional[StrictBool], Field(description="Default: false")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Test new order using SOR (TRADE) + + Test new order creation and signature/recvWindow using smart order routing (SOR). Creates and validates a new order but does not send it into the matching engine. Weight(IP): - Without computeCommissionRates: `1` - With computeCommissionRates: `20` + + :param symbol: Trading symbol, e.g. BNBUSDT (required) + :type symbol: str + :param side: (required) + :type side: str + :param type: Order type (required) + :type type: str + :param quantity: (required) + :type quantity: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param time_in_force: Order time in force + :type time_in_force: str + :param price: + :type price: float + :param new_client_order_id: Used to uniquely identify this cancel. Automatically generated by default + :type new_client_order_id: str + :param strategy_id: + :type strategy_id: int + :param strategy_type: The value cannot be less than 1000000. + :type strategy_type: int + :param iceberg_qty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. + :type iceberg_qty: float + :param new_order_resp_type: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. + :type new_order_resp_type: str + :param self_trade_prevention_mode: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. + :type self_trade_prevention_mode: str + :param compute_commission_rates: Default: false + :type compute_commission_rates: bool + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._api_v3_sor_order_test_post_serialize( + symbol=symbol, + side=side, + type=type, + quantity=quantity, + timestamp=timestamp, + signature=signature, + time_in_force=time_in_force, + price=price, + new_client_order_id=new_client_order_id, + strategy_id=strategy_id, + strategy_type=strategy_type, + iceberg_qty=iceberg_qty, + new_order_resp_type=new_order_resp_type, + self_trade_prevention_mode=self_trade_prevention_mode, + compute_commission_rates=compute_commission_rates, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _api_v3_sor_order_test_post_serialize( + self, + symbol, + side, + type, + quantity, + timestamp, + signature, + time_in_force, + price, + new_client_order_id, + strategy_id, + strategy_type, + iceberg_qty, + new_order_resp_type, + self_trade_prevention_mode, + compute_commission_rates, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if side is not None: + + _query_params.append(('side', side)) + + if type is not None: + + _query_params.append(('type', type)) + + if time_in_force is not None: + + _query_params.append(('timeInForce', time_in_force)) + + if quantity is not None: + + _query_params.append(('quantity', quantity)) + + if price is not None: + + _query_params.append(('price', price)) + + if new_client_order_id is not None: + + _query_params.append(('newClientOrderId', new_client_order_id)) + + if strategy_id is not None: + + _query_params.append(('strategyId', strategy_id)) + + if strategy_type is not None: + + _query_params.append(('strategyType', strategy_type)) + + if iceberg_qty is not None: + + _query_params.append(('icebergQty', iceberg_qty)) + + if new_order_resp_type is not None: + + _query_params.append(('newOrderRespType', new_order_resp_type)) + + if self_trade_prevention_mode is not None: + + _query_params.append(('selfTradePreventionMode', self_trade_prevention_mode)) + + if compute_commission_rates is not None: + + _query_params.append(('computeCommissionRates', compute_commission_rates)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v3/sor/order/test', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/vip_loans_api.py b/target/python/binance_openapi/openapi_client/api/vip_loans_api.py new file mode 100644 index 0000000..f678434 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/vip_loans_api.py @@ -0,0 +1,3585 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_loan_vip_borrow_post200_response import SapiV1LoanVipBorrowPost200Response +from openapi_client.models.sapi_v1_loan_vip_collateral_account_get200_response import SapiV1LoanVipCollateralAccountGet200Response +from openapi_client.models.sapi_v1_loan_vip_collateral_data_get200_response import SapiV1LoanVipCollateralDataGet200Response +from openapi_client.models.sapi_v1_loan_vip_loanable_data_get200_response import SapiV1LoanVipLoanableDataGet200Response +from openapi_client.models.sapi_v1_loan_vip_ongoing_orders_get200_response import SapiV1LoanVipOngoingOrdersGet200Response +from openapi_client.models.sapi_v1_loan_vip_renew_post200_response import SapiV1LoanVipRenewPost200Response +from openapi_client.models.sapi_v1_loan_vip_repay_history_get200_response import SapiV1LoanVipRepayHistoryGet200Response +from openapi_client.models.sapi_v1_loan_vip_repay_post200_response import SapiV1LoanVipRepayPost200Response +from openapi_client.models.sapi_v1_loan_vip_request_data_get200_response import SapiV1LoanVipRequestDataGet200Response +from openapi_client.models.sapi_v1_loan_vip_request_interest_rate_get200_response_inner import SapiV1LoanVipRequestInterestRateGet200ResponseInner + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class VIPLoansApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_loan_vip_borrow_post( + self, + loan_account_id: StrictInt, + loan_amount: Union[StrictFloat, StrictInt], + collateral_account_id: StrictStr, + collateral_coin: StrictStr, + is_flexible_rate: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + loan_term: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanVipBorrowPost200Response: + """VIP Loan Borrow + + VIP loan is available for VIP users only. Weight(UID): 6000 + + :param loan_account_id: (required) + :type loan_account_id: int + :param loan_amount: (required) + :type loan_amount: float + :param collateral_account_id: (required) + :type collateral_account_id: str + :param collateral_coin: (required) + :type collateral_coin: str + :param is_flexible_rate: (required) + :type is_flexible_rate: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param loan_term: + :type loan_term: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_borrow_post_serialize( + loan_account_id=loan_account_id, + loan_amount=loan_amount, + collateral_account_id=collateral_account_id, + collateral_coin=collateral_coin, + is_flexible_rate=is_flexible_rate, + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + loan_term=loan_term, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipBorrowPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_vip_borrow_post_with_http_info( + self, + loan_account_id: StrictInt, + loan_amount: Union[StrictFloat, StrictInt], + collateral_account_id: StrictStr, + collateral_coin: StrictStr, + is_flexible_rate: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + loan_term: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanVipBorrowPost200Response]: + """VIP Loan Borrow + + VIP loan is available for VIP users only. Weight(UID): 6000 + + :param loan_account_id: (required) + :type loan_account_id: int + :param loan_amount: (required) + :type loan_amount: float + :param collateral_account_id: (required) + :type collateral_account_id: str + :param collateral_coin: (required) + :type collateral_coin: str + :param is_flexible_rate: (required) + :type is_flexible_rate: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param loan_term: + :type loan_term: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_borrow_post_serialize( + loan_account_id=loan_account_id, + loan_amount=loan_amount, + collateral_account_id=collateral_account_id, + collateral_coin=collateral_coin, + is_flexible_rate=is_flexible_rate, + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + loan_term=loan_term, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipBorrowPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_vip_borrow_post_without_preload_content( + self, + loan_account_id: StrictInt, + loan_amount: Union[StrictFloat, StrictInt], + collateral_account_id: StrictStr, + collateral_coin: StrictStr, + is_flexible_rate: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + loan_term: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """VIP Loan Borrow + + VIP loan is available for VIP users only. Weight(UID): 6000 + + :param loan_account_id: (required) + :type loan_account_id: int + :param loan_amount: (required) + :type loan_amount: float + :param collateral_account_id: (required) + :type collateral_account_id: str + :param collateral_coin: (required) + :type collateral_coin: str + :param is_flexible_rate: (required) + :type is_flexible_rate: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param loan_term: + :type loan_term: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_borrow_post_serialize( + loan_account_id=loan_account_id, + loan_amount=loan_amount, + collateral_account_id=collateral_account_id, + collateral_coin=collateral_coin, + is_flexible_rate=is_flexible_rate, + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + loan_term=loan_term, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipBorrowPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_vip_borrow_post_serialize( + self, + loan_account_id, + loan_amount, + collateral_account_id, + collateral_coin, + is_flexible_rate, + timestamp, + signature, + loan_coin, + loan_term, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if loan_account_id is not None: + + _query_params.append(('loanAccountId', loan_account_id)) + + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if loan_amount is not None: + + _query_params.append(('loanAmount', loan_amount)) + + if collateral_account_id is not None: + + _query_params.append(('collateralAccountId', collateral_account_id)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if is_flexible_rate is not None: + + _query_params.append(('isFlexibleRate', is_flexible_rate)) + + if loan_term is not None: + + _query_params.append(('loanTerm', loan_term)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/loan/vip/borrow', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_vip_collateral_account_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + collateral_account_id: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanVipCollateralAccountGet200Response: + """Check Locked Value of VIP Collateral Account (USER_DATA) + + VIP loan is available for VIP users only. Weight(IP): 6000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param collateral_account_id: + :type collateral_account_id: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_collateral_account_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + collateral_account_id=collateral_account_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipCollateralAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_vip_collateral_account_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + collateral_account_id: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanVipCollateralAccountGet200Response]: + """Check Locked Value of VIP Collateral Account (USER_DATA) + + VIP loan is available for VIP users only. Weight(IP): 6000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param collateral_account_id: + :type collateral_account_id: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_collateral_account_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + collateral_account_id=collateral_account_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipCollateralAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_vip_collateral_account_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + collateral_account_id: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Check Locked Value of VIP Collateral Account (USER_DATA) + + VIP loan is available for VIP users only. Weight(IP): 6000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param collateral_account_id: + :type collateral_account_id: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_collateral_account_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + collateral_account_id=collateral_account_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipCollateralAccountGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_vip_collateral_account_get_serialize( + self, + timestamp, + signature, + order_id, + collateral_account_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if collateral_account_id is not None: + + _query_params.append(('collateralAccountId', collateral_account_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/vip/collateral/account', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_vip_collateral_data_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanVipCollateralDataGet200Response: + """Get Collateral Asset Data (USER_DATA) + + Get collateral asset data. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_collateral_data_get_serialize( + timestamp=timestamp, + signature=signature, + collateral_coin=collateral_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipCollateralDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_vip_collateral_data_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanVipCollateralDataGet200Response]: + """Get Collateral Asset Data (USER_DATA) + + Get collateral asset data. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_collateral_data_get_serialize( + timestamp=timestamp, + signature=signature, + collateral_coin=collateral_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipCollateralDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_vip_collateral_data_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Collateral Asset Data (USER_DATA) + + Get collateral asset data. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_collateral_data_get_serialize( + timestamp=timestamp, + signature=signature, + collateral_coin=collateral_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipCollateralDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_vip_collateral_data_get_serialize( + self, + timestamp, + signature, + collateral_coin, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/vip/collateral/data', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_vip_loanable_data_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanVipLoanableDataGet200Response: + """Get Loanable Assets Data + + Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_loanable_data_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + vip_level=vip_level, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipLoanableDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_vip_loanable_data_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanVipLoanableDataGet200Response]: + """Get Loanable Assets Data + + Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_loanable_data_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + vip_level=vip_level, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipLoanableDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_vip_loanable_data_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + vip_level: Annotated[Optional[StrictInt], Field(description="Defaults to user's vip level")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Loanable Assets Data + + Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Coin loaned + :type loan_coin: str + :param vip_level: Defaults to user's vip level + :type vip_level: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_loanable_data_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + vip_level=vip_level, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipLoanableDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_vip_loanable_data_get_serialize( + self, + timestamp, + signature, + loan_coin, + vip_level, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if vip_level is not None: + + _query_params.append(('vipLevel', vip_level)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/vip/loanable/data', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_vip_ongoing_orders_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + collateral_account_id: Optional[StrictInt] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 10; max 100.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanVipOngoingOrdersGet200Response: + """Get VIP Loan Ongoing Orders (USER_DATA) + + VIP loan is available for VIP users only. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param collateral_account_id: + :type collateral_account_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 10; max 100. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_ongoing_orders_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + collateral_account_id=collateral_account_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipOngoingOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_vip_ongoing_orders_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + collateral_account_id: Optional[StrictInt] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 10; max 100.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanVipOngoingOrdersGet200Response]: + """Get VIP Loan Ongoing Orders (USER_DATA) + + VIP loan is available for VIP users only. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param collateral_account_id: + :type collateral_account_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 10; max 100. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_ongoing_orders_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + collateral_account_id=collateral_account_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipOngoingOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_vip_ongoing_orders_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + collateral_account_id: Optional[StrictInt] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + collateral_coin: Annotated[Optional[StrictStr], Field(description="Coin used as collateral")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 10; max 100.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get VIP Loan Ongoing Orders (USER_DATA) + + VIP loan is available for VIP users only. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param collateral_account_id: + :type collateral_account_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param collateral_coin: Coin used as collateral + :type collateral_coin: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 10; max 100. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_ongoing_orders_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + collateral_account_id=collateral_account_id, + loan_coin=loan_coin, + collateral_coin=collateral_coin, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipOngoingOrdersGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_vip_ongoing_orders_get_serialize( + self, + timestamp, + signature, + order_id, + collateral_account_id, + loan_coin, + collateral_coin, + current, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if collateral_account_id is not None: + + _query_params.append(('collateralAccountId', collateral_account_id)) + + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if collateral_coin is not None: + + _query_params.append(('collateralCoin', collateral_coin)) + + if current is not None: + + _query_params.append(('current', current)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/vip/ongoing/orders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_vip_renew_post( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + loan_term: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanVipRenewPost200Response: + """VIP Loan Renew + + VIP loan is available for VIP users only. Weight(UID): 6000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param loan_term: + :type loan_term: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_renew_post_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_term=loan_term, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipRenewPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_vip_renew_post_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + loan_term: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanVipRenewPost200Response]: + """VIP Loan Renew + + VIP loan is available for VIP users only. Weight(UID): 6000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param loan_term: + :type loan_term: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_renew_post_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_term=loan_term, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipRenewPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_vip_renew_post_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + loan_term: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """VIP Loan Renew + + VIP loan is available for VIP users only. Weight(UID): 6000 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param loan_term: + :type loan_term: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_renew_post_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_term=loan_term, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipRenewPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_vip_renew_post_serialize( + self, + timestamp, + signature, + order_id, + loan_term, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if loan_term is not None: + + _query_params.append(('loanTerm', loan_term)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/loan/vip/renew', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_vip_repay_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 10; max 100.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanVipRepayHistoryGet200Response: + """Get VIP Loan Repayment History (USER_DATA) + + VIP loan is available for VIP users only. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 10; max 100. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_repay_history_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipRepayHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_vip_repay_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 10; max 100.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanVipRepayHistoryGet200Response]: + """Get VIP Loan Repayment History (USER_DATA) + + VIP loan is available for VIP users only. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 10; max 100. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_repay_history_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipRepayHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_vip_repay_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + loan_coin: Annotated[Optional[StrictStr], Field(description="Coin loaned")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 10; max 100.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get VIP Loan Repayment History (USER_DATA) + + VIP loan is available for VIP users only. Weight(IP): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param loan_coin: Coin loaned + :type loan_coin: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 10; max 100. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_repay_history_get_serialize( + timestamp=timestamp, + signature=signature, + order_id=order_id, + loan_coin=loan_coin, + start_time=start_time, + end_time=end_time, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipRepayHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_vip_repay_history_get_serialize( + self, + timestamp, + signature, + order_id, + loan_coin, + start_time, + end_time, + current, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/vip/repay/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_vip_repay_post( + self, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanVipRepayPost200Response: + """VIP Loan Repay (TRADE) + + VIP loan is available for VIP users only. Weight(UID): 6000 + + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_repay_post_serialize( + amount=amount, + timestamp=timestamp, + signature=signature, + order_id=order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_vip_repay_post_with_http_info( + self, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanVipRepayPost200Response]: + """VIP Loan Repay (TRADE) + + VIP loan is available for VIP users only. Weight(UID): 6000 + + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_repay_post_serialize( + amount=amount, + timestamp=timestamp, + signature=signature, + order_id=order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_vip_repay_post_without_preload_content( + self, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + order_id: Annotated[Optional[StrictInt], Field(description="Order id")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """VIP Loan Repay (TRADE) + + VIP loan is available for VIP users only. Weight(UID): 6000 + + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param order_id: Order id + :type order_id: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_repay_post_serialize( + amount=amount, + timestamp=timestamp, + signature=signature, + order_id=order_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipRepayPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_vip_repay_post_serialize( + self, + amount, + timestamp, + signature, + order_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if order_id is not None: + + _query_params.append(('orderId', order_id)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/loan/vip/repay', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_vip_request_data_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1LoanVipRequestDataGet200Response: + """Query Application Status (USER_DATA) + + Get Application Status Weight(UID): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_request_data_get_serialize( + timestamp=timestamp, + signature=signature, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipRequestDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_vip_request_data_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1LoanVipRequestDataGet200Response]: + """Query Application Status (USER_DATA) + + Get Application Status Weight(UID): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_request_data_get_serialize( + timestamp=timestamp, + signature=signature, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipRequestDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_vip_request_data_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Application Status (USER_DATA) + + Get Application Status Weight(UID): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_request_data_get_serialize( + timestamp=timestamp, + signature=signature, + current=current, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1LoanVipRequestDataGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_vip_request_data_get_serialize( + self, + timestamp, + signature, + current, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if current is not None: + + _query_params.append(('current', current)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/vip/request/data', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_loan_vip_request_interest_rate_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Max 10 assets, Multiple split by \",\"")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1LoanVipRequestInterestRateGet200ResponseInner]: + """Get Borrow Interest Rate (USER_DATA) + + Get borrow interest rate. Weight(UID): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Max 10 assets, Multiple split by \",\" + :type loan_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_request_interest_rate_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LoanVipRequestInterestRateGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_loan_vip_request_interest_rate_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Max 10 assets, Multiple split by \",\"")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1LoanVipRequestInterestRateGet200ResponseInner]]: + """Get Borrow Interest Rate (USER_DATA) + + Get borrow interest rate. Weight(UID): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Max 10 assets, Multiple split by \",\" + :type loan_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_request_interest_rate_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LoanVipRequestInterestRateGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_loan_vip_request_interest_rate_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + loan_coin: Annotated[Optional[StrictStr], Field(description="Max 10 assets, Multiple split by \",\"")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Borrow Interest Rate (USER_DATA) + + Get borrow interest rate. Weight(UID): 400 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param loan_coin: Max 10 assets, Multiple split by \",\" + :type loan_coin: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_loan_vip_request_interest_rate_get_serialize( + timestamp=timestamp, + signature=signature, + loan_coin=loan_coin, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1LoanVipRequestInterestRateGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_loan_vip_request_interest_rate_get_serialize( + self, + timestamp, + signature, + loan_coin, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if loan_coin is not None: + + _query_params.append(('loanCoin', loan_coin)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/loan/vip/request/interestRate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api/wallet_api.py b/target/python/binance_openapi/openapi_client/api/wallet_api.py new file mode 100644 index 0000000..8e263c7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api/wallet_api.py @@ -0,0 +1,11606 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, Dict, List, Optional, Union +from typing_extensions import Annotated +from openapi_client.models.sapi_v1_account_api_restrictions_get200_response import SapiV1AccountApiRestrictionsGet200Response +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response import SapiV1AccountApiTradingStatusGet200Response +from openapi_client.models.sapi_v1_account_info_get200_response import SapiV1AccountInfoGet200Response +from openapi_client.models.sapi_v1_account_snapshot_get200_response import SapiV1AccountSnapshotGet200Response +from openapi_client.models.sapi_v1_account_status_get200_response import SapiV1AccountStatusGet200Response +from openapi_client.models.sapi_v1_asset_asset_detail_get200_response import SapiV1AssetAssetDetailGet200Response +from openapi_client.models.sapi_v1_asset_asset_dividend_get200_response import SapiV1AssetAssetDividendGet200Response +from openapi_client.models.sapi_v1_asset_convert_transfer_post200_response import SapiV1AssetConvertTransferPost200Response +from openapi_client.models.sapi_v1_asset_convert_transfer_query_by_page_get200_response import SapiV1AssetConvertTransferQueryByPageGet200Response +from openapi_client.models.sapi_v1_asset_custody_transfer_history_get200_response import SapiV1AssetCustodyTransferHistoryGet200Response +from openapi_client.models.sapi_v1_asset_dribblet_get200_response import SapiV1AssetDribbletGet200Response +from openapi_client.models.sapi_v1_asset_dust_btc_post200_response import SapiV1AssetDustBtcPost200Response +from openapi_client.models.sapi_v1_asset_dust_post200_response import SapiV1AssetDustPost200Response +from openapi_client.models.sapi_v1_asset_get_funding_asset_post200_response_inner import SapiV1AssetGetFundingAssetPost200ResponseInner +from openapi_client.models.sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response import SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response +from openapi_client.models.sapi_v1_asset_trade_fee_get200_response_inner import SapiV1AssetTradeFeeGet200ResponseInner +from openapi_client.models.sapi_v1_asset_transfer_get200_response import SapiV1AssetTransferGet200Response +from openapi_client.models.sapi_v1_asset_transfer_post200_response import SapiV1AssetTransferPost200Response +from openapi_client.models.sapi_v1_asset_wallet_balance_get200_response_inner import SapiV1AssetWalletBalanceGet200ResponseInner +from openapi_client.models.sapi_v1_capital_config_getall_get200_response_inner import SapiV1CapitalConfigGetallGet200ResponseInner +from openapi_client.models.sapi_v1_capital_contract_convertible_coins_get200_response import SapiV1CapitalContractConvertibleCoinsGet200Response +from openapi_client.models.sapi_v1_capital_deposit_address_get200_response import SapiV1CapitalDepositAddressGet200Response +from openapi_client.models.sapi_v1_capital_deposit_address_list_get200_response_inner import SapiV1CapitalDepositAddressListGet200ResponseInner +from openapi_client.models.sapi_v1_capital_deposit_credit_apply_post200_response import SapiV1CapitalDepositCreditApplyPost200Response +from openapi_client.models.sapi_v1_capital_deposit_hisrec_get200_response_inner import SapiV1CapitalDepositHisrecGet200ResponseInner +from openapi_client.models.sapi_v1_capital_withdraw_address_list_get200_response_inner import SapiV1CapitalWithdrawAddressListGet200ResponseInner +from openapi_client.models.sapi_v1_capital_withdraw_apply_post200_response import SapiV1CapitalWithdrawApplyPost200Response +from openapi_client.models.sapi_v1_capital_withdraw_history_get200_response_inner import SapiV1CapitalWithdrawHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_spot_delist_schedule_get200_response_inner import SapiV1SpotDelistScheduleGet200ResponseInner +from openapi_client.models.sapi_v1_system_status_get200_response import SapiV1SystemStatusGet200Response +from openapi_client.models.sapi_v3_asset_get_user_asset_post200_response_inner import SapiV3AssetGetUserAssetPost200ResponseInner + +from openapi_client.api_client import ApiClient, RequestSerialized +from openapi_client.api_response import ApiResponse +from openapi_client.rest import RESTResponseType + + +class WalletApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def sapi_v1_account_api_restrictions_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AccountApiRestrictionsGet200Response: + """Get API Key Permission (USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_api_restrictions_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountApiRestrictionsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_account_api_restrictions_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AccountApiRestrictionsGet200Response]: + """Get API Key Permission (USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_api_restrictions_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountApiRestrictionsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_account_api_restrictions_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get API Key Permission (USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_api_restrictions_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountApiRestrictionsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_account_api_restrictions_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/account/apiRestrictions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_account_api_trading_status_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AccountApiTradingStatusGet200Response: + """Account API Trading Status (USER_DATA) + + Fetch account API trading status with details. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_api_trading_status_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountApiTradingStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_account_api_trading_status_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AccountApiTradingStatusGet200Response]: + """Account API Trading Status (USER_DATA) + + Fetch account API trading status with details. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_api_trading_status_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountApiTradingStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_account_api_trading_status_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Account API Trading Status (USER_DATA) + + Fetch account API trading status with details. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_api_trading_status_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountApiTradingStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_account_api_trading_status_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/account/apiTradingStatus', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_account_disable_fast_withdraw_switch_post( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Disable Fast Withdraw Switch (USER_DATA) + + - This request will disable fastwithdraw switch under your account. - You need to enable \"trade\" option for the api key which requests this endpoint. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_disable_fast_withdraw_switch_post_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_account_disable_fast_withdraw_switch_post_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Disable Fast Withdraw Switch (USER_DATA) + + - This request will disable fastwithdraw switch under your account. - You need to enable \"trade\" option for the api key which requests this endpoint. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_disable_fast_withdraw_switch_post_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_account_disable_fast_withdraw_switch_post_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Disable Fast Withdraw Switch (USER_DATA) + + - This request will disable fastwithdraw switch under your account. - You need to enable \"trade\" option for the api key which requests this endpoint. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_disable_fast_withdraw_switch_post_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_account_disable_fast_withdraw_switch_post_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/account/disableFastWithdrawSwitch', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_account_enable_fast_withdraw_switch_post( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Enable Fast Withdraw Switch (USER_DATA) + + - This request will enable fastwithdraw switch under your account. You need to enable \"trade\" option for the api key which requests this endpoint. - When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_enable_fast_withdraw_switch_post_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_account_enable_fast_withdraw_switch_post_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Enable Fast Withdraw Switch (USER_DATA) + + - This request will enable fastwithdraw switch under your account. You need to enable \"trade\" option for the api key which requests this endpoint. - When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_enable_fast_withdraw_switch_post_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_account_enable_fast_withdraw_switch_post_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Enable Fast Withdraw Switch (USER_DATA) + + - This request will enable fastwithdraw switch under your account. You need to enable \"trade\" option for the api key which requests this endpoint. - When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_enable_fast_withdraw_switch_post_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_account_enable_fast_withdraw_switch_post_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/account/enableFastWithdrawSwitch', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_account_info_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AccountInfoGet200Response: + """Account info (USER_DATA) + + Fetch account info detail. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_info_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountInfoGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_account_info_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AccountInfoGet200Response]: + """Account info (USER_DATA) + + Fetch account info detail. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_info_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountInfoGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_account_info_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Account info (USER_DATA) + + Fetch account info detail. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_info_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountInfoGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_account_info_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/account/info', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_account_snapshot_get( + self, + type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Optional[Annotated[int, Field(le=30, strict=True, ge=7)]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AccountSnapshotGet200Response: + """Daily Account Snapshot (USER_DATA) + + - The query time period must be less than 30 days - Support query within the last one month only - If startTimeand endTime not sent, return records of the last 7 days by default Weight(IP): 2400 + + :param type: (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_snapshot_get_serialize( + type=type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountSnapshotGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_account_snapshot_get_with_http_info( + self, + type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Optional[Annotated[int, Field(le=30, strict=True, ge=7)]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AccountSnapshotGet200Response]: + """Daily Account Snapshot (USER_DATA) + + - The query time period must be less than 30 days - Support query within the last one month only - If startTimeand endTime not sent, return records of the last 7 days by default Weight(IP): 2400 + + :param type: (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_snapshot_get_serialize( + type=type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountSnapshotGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_account_snapshot_get_without_preload_content( + self, + type: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Optional[Annotated[int, Field(le=30, strict=True, ge=7)]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Daily Account Snapshot (USER_DATA) + + - The query time period must be less than 30 days - Support query within the last one month only - If startTimeand endTime not sent, return records of the last 7 days by default Weight(IP): 2400 + + :param type: (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_snapshot_get_serialize( + type=type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountSnapshotGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_account_snapshot_get_serialize( + self, + type, + timestamp, + signature, + start_time, + end_time, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if type is not None: + + _query_params.append(('type', type)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/accountSnapshot', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_account_status_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AccountStatusGet200Response: + """Account Status (USER_DATA) + + Fetch account status detail. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_status_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_account_status_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AccountStatusGet200Response]: + """Account Status (USER_DATA) + + Fetch account status detail. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_status_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_account_status_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Account Status (USER_DATA) + + Fetch account status detail. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_account_status_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AccountStatusGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_account_status_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/account/status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_asset_asset_detail_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AssetAssetDetailGet200Response: + """Asset Detail (USER_DATA) + + Fetch details of assets supported on Binance. - Please get network and other deposit or withdraw details from `GET /sapi/v1/capital/config/getall`. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_asset_detail_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetAssetDetailGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_asset_asset_detail_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AssetAssetDetailGet200Response]: + """Asset Detail (USER_DATA) + + Fetch details of assets supported on Binance. - Please get network and other deposit or withdraw details from `GET /sapi/v1/capital/config/getall`. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_asset_detail_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetAssetDetailGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_asset_asset_detail_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Asset Detail (USER_DATA) + + Fetch details of assets supported on Binance. - Please get network and other deposit or withdraw details from `GET /sapi/v1/capital/config/getall`. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_asset_detail_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetAssetDetailGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_asset_asset_detail_get_serialize( + self, + timestamp, + signature, + asset, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/asset/assetDetail', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_asset_asset_dividend_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Optional[Annotated[int, Field(le=500, strict=True)]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AssetAssetDividendGet200Response: + """Asset Dividend Record (USER_DATA) + + Query asset Dividend Record Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_asset_dividend_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetAssetDividendGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_asset_asset_dividend_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Optional[Annotated[int, Field(le=500, strict=True)]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AssetAssetDividendGet200Response]: + """Asset Dividend Record (USER_DATA) + + Query asset Dividend Record Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_asset_dividend_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetAssetDividendGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_asset_asset_dividend_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + limit: Optional[Annotated[int, Field(le=500, strict=True)]] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Asset Dividend Record (USER_DATA) + + Query asset Dividend Record Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param limit: + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_asset_dividend_get_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + start_time=start_time, + end_time=end_time, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetAssetDividendGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_asset_asset_dividend_get_serialize( + self, + timestamp, + signature, + asset, + start_time, + end_time, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/asset/assetDividend', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_asset_convert_transfer_post( + self, + client_tran_id: Annotated[StrictStr, Field(description="The unique flag, the min length is 20")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + target_asset: Annotated[StrictStr, Field(description="Target asset you want to convert")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AssetConvertTransferPost200Response: + """Convert Transfer (USER_DATA) + + Convert transfer, convert between BUSD and stablecoins. If the clientId has been used before, will not do the convert transfer, the original transfer will be returned. Weight(UID): 5 + + :param client_tran_id: The unique flag, the min length is 20 (required) + :type client_tran_id: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param target_asset: Target asset you want to convert (required) + :type target_asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_convert_transfer_post_serialize( + client_tran_id=client_tran_id, + asset=asset, + amount=amount, + target_asset=target_asset, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetConvertTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_asset_convert_transfer_post_with_http_info( + self, + client_tran_id: Annotated[StrictStr, Field(description="The unique flag, the min length is 20")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + target_asset: Annotated[StrictStr, Field(description="Target asset you want to convert")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AssetConvertTransferPost200Response]: + """Convert Transfer (USER_DATA) + + Convert transfer, convert between BUSD and stablecoins. If the clientId has been used before, will not do the convert transfer, the original transfer will be returned. Weight(UID): 5 + + :param client_tran_id: The unique flag, the min length is 20 (required) + :type client_tran_id: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param target_asset: Target asset you want to convert (required) + :type target_asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_convert_transfer_post_serialize( + client_tran_id=client_tran_id, + asset=asset, + amount=amount, + target_asset=target_asset, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetConvertTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_asset_convert_transfer_post_without_preload_content( + self, + client_tran_id: Annotated[StrictStr, Field(description="The unique flag, the min length is 20")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + target_asset: Annotated[StrictStr, Field(description="Target asset you want to convert")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Convert Transfer (USER_DATA) + + Convert transfer, convert between BUSD and stablecoins. If the clientId has been used before, will not do the convert transfer, the original transfer will be returned. Weight(UID): 5 + + :param client_tran_id: The unique flag, the min length is 20 (required) + :type client_tran_id: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param target_asset: Target asset you want to convert (required) + :type target_asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_convert_transfer_post_serialize( + client_tran_id=client_tran_id, + asset=asset, + amount=amount, + target_asset=target_asset, + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetConvertTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_asset_convert_transfer_post_serialize( + self, + client_tran_id, + asset, + amount, + target_asset, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if client_tran_id is not None: + + _query_params.append(('clientTranId', client_tran_id)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if target_asset is not None: + + _query_params.append(('targetAsset', target_asset)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/asset/convert-transfer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_asset_convert_transfer_query_by_page_get( + self, + start_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + end_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + tran_id: Annotated[Optional[StrictInt], Field(description="The transaction id")] = None, + asset: Annotated[Optional[StrictStr], Field(description="If it is blank, we will match deducted asset and target asset.")] = None, + account_type: Annotated[Optional[StrictStr], Field(description="MAIN: main account. CARD: funding account. If it is blank, we will query spot and card wallet, otherwise, we just query the corresponding wallet")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AssetConvertTransferQueryByPageGet200Response: + """Query Convert Transfer (USER_DATA) + + Weight(UID): 5 + + :param start_time: UTC timestamp in ms (required) + :type start_time: int + :param end_time: UTC timestamp in ms (required) + :type end_time: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param tran_id: The transaction id + :type tran_id: int + :param asset: If it is blank, we will match deducted asset and target asset. + :type asset: str + :param account_type: MAIN: main account. CARD: funding account. If it is blank, we will query spot and card wallet, otherwise, we just query the corresponding wallet + :type account_type: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_convert_transfer_query_by_page_get_serialize( + start_time=start_time, + end_time=end_time, + timestamp=timestamp, + signature=signature, + tran_id=tran_id, + asset=asset, + account_type=account_type, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetConvertTransferQueryByPageGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_asset_convert_transfer_query_by_page_get_with_http_info( + self, + start_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + end_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + tran_id: Annotated[Optional[StrictInt], Field(description="The transaction id")] = None, + asset: Annotated[Optional[StrictStr], Field(description="If it is blank, we will match deducted asset and target asset.")] = None, + account_type: Annotated[Optional[StrictStr], Field(description="MAIN: main account. CARD: funding account. If it is blank, we will query spot and card wallet, otherwise, we just query the corresponding wallet")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AssetConvertTransferQueryByPageGet200Response]: + """Query Convert Transfer (USER_DATA) + + Weight(UID): 5 + + :param start_time: UTC timestamp in ms (required) + :type start_time: int + :param end_time: UTC timestamp in ms (required) + :type end_time: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param tran_id: The transaction id + :type tran_id: int + :param asset: If it is blank, we will match deducted asset and target asset. + :type asset: str + :param account_type: MAIN: main account. CARD: funding account. If it is blank, we will query spot and card wallet, otherwise, we just query the corresponding wallet + :type account_type: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_convert_transfer_query_by_page_get_serialize( + start_time=start_time, + end_time=end_time, + timestamp=timestamp, + signature=signature, + tran_id=tran_id, + asset=asset, + account_type=account_type, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetConvertTransferQueryByPageGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_asset_convert_transfer_query_by_page_get_without_preload_content( + self, + start_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + end_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + tran_id: Annotated[Optional[StrictInt], Field(description="The transaction id")] = None, + asset: Annotated[Optional[StrictStr], Field(description="If it is blank, we will match deducted asset and target asset.")] = None, + account_type: Annotated[Optional[StrictStr], Field(description="MAIN: main account. CARD: funding account. If it is blank, we will query spot and card wallet, otherwise, we just query the corresponding wallet")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query Convert Transfer (USER_DATA) + + Weight(UID): 5 + + :param start_time: UTC timestamp in ms (required) + :type start_time: int + :param end_time: UTC timestamp in ms (required) + :type end_time: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param tran_id: The transaction id + :type tran_id: int + :param asset: If it is blank, we will match deducted asset and target asset. + :type asset: str + :param account_type: MAIN: main account. CARD: funding account. If it is blank, we will query spot and card wallet, otherwise, we just query the corresponding wallet + :type account_type: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_convert_transfer_query_by_page_get_serialize( + start_time=start_time, + end_time=end_time, + timestamp=timestamp, + signature=signature, + tran_id=tran_id, + asset=asset, + account_type=account_type, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetConvertTransferQueryByPageGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_asset_convert_transfer_query_by_page_get_serialize( + self, + start_time, + end_time, + timestamp, + signature, + tran_id, + asset, + account_type, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if tran_id is not None: + + _query_params.append(('tranId', tran_id)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if account_type is not None: + + _query_params.append(('accountType', account_type)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/asset/convert-transfer/queryByPage', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_asset_custody_transfer_history_get( + self, + email: StrictStr, + start_time: StrictInt, + end_time: StrictInt, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + type: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AssetCustodyTransferHistoryGet200Response: + """Query User Delegation History(For Master Account) (USER_DATA) + + Query User Delegation History Weight(IP): 60 + + :param email: (required) + :type email: str + :param start_time: (required) + :type start_time: int + :param end_time: (required) + :type end_time: int + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param type: + :type type: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_custody_transfer_history_get_serialize( + email=email, + start_time=start_time, + end_time=end_time, + asset=asset, + timestamp=timestamp, + signature=signature, + type=type, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetCustodyTransferHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_asset_custody_transfer_history_get_with_http_info( + self, + email: StrictStr, + start_time: StrictInt, + end_time: StrictInt, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + type: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AssetCustodyTransferHistoryGet200Response]: + """Query User Delegation History(For Master Account) (USER_DATA) + + Query User Delegation History Weight(IP): 60 + + :param email: (required) + :type email: str + :param start_time: (required) + :type start_time: int + :param end_time: (required) + :type end_time: int + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param type: + :type type: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_custody_transfer_history_get_serialize( + email=email, + start_time=start_time, + end_time=end_time, + asset=asset, + timestamp=timestamp, + signature=signature, + type=type, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetCustodyTransferHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_asset_custody_transfer_history_get_without_preload_content( + self, + email: StrictStr, + start_time: StrictInt, + end_time: StrictInt, + asset: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + type: Optional[StrictStr] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query User Delegation History(For Master Account) (USER_DATA) + + Query User Delegation History Weight(IP): 60 + + :param email: (required) + :type email: str + :param start_time: (required) + :type start_time: int + :param end_time: (required) + :type end_time: int + :param asset: (required) + :type asset: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param type: + :type type: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_custody_transfer_history_get_serialize( + email=email, + start_time=start_time, + end_time=end_time, + asset=asset, + timestamp=timestamp, + signature=signature, + type=type, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetCustodyTransferHistoryGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_asset_custody_transfer_history_get_serialize( + self, + email, + start_time, + end_time, + asset, + timestamp, + signature, + type, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if email is not None: + + _query_params.append(('email', email)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if type is not None: + + _query_params.append(('type', type)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/asset/custody/transfer-history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_asset_dribblet_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + account_type: Annotated[Optional[StrictStr], Field(description="SPOT or MARGIN, default SPOT")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AssetDribbletGet200Response: + """DustLog(USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param account_type: SPOT or MARGIN, default SPOT + :type account_type: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_dribblet_get_serialize( + timestamp=timestamp, + signature=signature, + account_type=account_type, + start_time=start_time, + end_time=end_time, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetDribbletGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_asset_dribblet_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + account_type: Annotated[Optional[StrictStr], Field(description="SPOT or MARGIN, default SPOT")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AssetDribbletGet200Response]: + """DustLog(USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param account_type: SPOT or MARGIN, default SPOT + :type account_type: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_dribblet_get_serialize( + timestamp=timestamp, + signature=signature, + account_type=account_type, + start_time=start_time, + end_time=end_time, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetDribbletGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_asset_dribblet_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + account_type: Annotated[Optional[StrictStr], Field(description="SPOT or MARGIN, default SPOT")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """DustLog(USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param account_type: SPOT or MARGIN, default SPOT + :type account_type: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_dribblet_get_serialize( + timestamp=timestamp, + signature=signature, + account_type=account_type, + start_time=start_time, + end_time=end_time, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetDribbletGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_asset_dribblet_get_serialize( + self, + timestamp, + signature, + account_type, + start_time, + end_time, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if account_type is not None: + + _query_params.append(('accountType', account_type)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/asset/dribblet', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_asset_dust_btc_post( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + account_type: Annotated[Optional[StrictStr], Field(description="SPOT or MARGIN, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AssetDustBtcPost200Response: + """Get Assets That Can Be Converted Into BNB (USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param account_type: SPOT or MARGIN, default SPOT + :type account_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_dust_btc_post_serialize( + timestamp=timestamp, + signature=signature, + account_type=account_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetDustBtcPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_asset_dust_btc_post_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + account_type: Annotated[Optional[StrictStr], Field(description="SPOT or MARGIN, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AssetDustBtcPost200Response]: + """Get Assets That Can Be Converted Into BNB (USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param account_type: SPOT or MARGIN, default SPOT + :type account_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_dust_btc_post_serialize( + timestamp=timestamp, + signature=signature, + account_type=account_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetDustBtcPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_asset_dust_btc_post_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + account_type: Annotated[Optional[StrictStr], Field(description="SPOT or MARGIN, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Assets That Can Be Converted Into BNB (USER_DATA) + + Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param account_type: SPOT or MARGIN, default SPOT + :type account_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_dust_btc_post_serialize( + timestamp=timestamp, + signature=signature, + account_type=account_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetDustBtcPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_asset_dust_btc_post_serialize( + self, + timestamp, + signature, + account_type, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if account_type is not None: + + _query_params.append(('accountType', account_type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/asset/dust-btc', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_asset_dust_post( + self, + asset: Annotated[List[StrictStr], Field(description="The asset being converted. For example, asset=BTC&asset=USDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + account_type: Annotated[Optional[StrictStr], Field(description="SPOT or MARGIN, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AssetDustPost200Response: + """Dust Transfer (USER_DATA) + + Convert dust assets to BNB. Weight(UID): 10 + + :param asset: The asset being converted. For example, asset=BTC&asset=USDT (required) + :type asset: List[str] + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param account_type: SPOT or MARGIN, default SPOT + :type account_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_dust_post_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + account_type=account_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetDustPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_asset_dust_post_with_http_info( + self, + asset: Annotated[List[StrictStr], Field(description="The asset being converted. For example, asset=BTC&asset=USDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + account_type: Annotated[Optional[StrictStr], Field(description="SPOT or MARGIN, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AssetDustPost200Response]: + """Dust Transfer (USER_DATA) + + Convert dust assets to BNB. Weight(UID): 10 + + :param asset: The asset being converted. For example, asset=BTC&asset=USDT (required) + :type asset: List[str] + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param account_type: SPOT or MARGIN, default SPOT + :type account_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_dust_post_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + account_type=account_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetDustPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_asset_dust_post_without_preload_content( + self, + asset: Annotated[List[StrictStr], Field(description="The asset being converted. For example, asset=BTC&asset=USDT")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + account_type: Annotated[Optional[StrictStr], Field(description="SPOT or MARGIN, default SPOT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Dust Transfer (USER_DATA) + + Convert dust assets to BNB. Weight(UID): 10 + + :param asset: The asset being converted. For example, asset=BTC&asset=USDT (required) + :type asset: List[str] + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param account_type: SPOT or MARGIN, default SPOT + :type account_type: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_dust_post_serialize( + asset=asset, + timestamp=timestamp, + signature=signature, + account_type=account_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetDustPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_asset_dust_post_serialize( + self, + asset, + timestamp, + signature, + account_type, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'asset': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if account_type is not None: + + _query_params.append(('accountType', account_type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/asset/dust', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_asset_get_funding_asset_post( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + need_btc_valuation: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1AssetGetFundingAssetPost200ResponseInner]: + """Funding Wallet (USER_DATA) + + - Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param need_btc_valuation: + :type need_btc_valuation: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_get_funding_asset_post_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + need_btc_valuation=need_btc_valuation, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1AssetGetFundingAssetPost200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_asset_get_funding_asset_post_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + need_btc_valuation: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1AssetGetFundingAssetPost200ResponseInner]]: + """Funding Wallet (USER_DATA) + + - Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param need_btc_valuation: + :type need_btc_valuation: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_get_funding_asset_post_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + need_btc_valuation=need_btc_valuation, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1AssetGetFundingAssetPost200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_asset_get_funding_asset_post_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + need_btc_valuation: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Funding Wallet (USER_DATA) + + - Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param need_btc_valuation: + :type need_btc_valuation: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_get_funding_asset_post_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + need_btc_valuation=need_btc_valuation, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1AssetGetFundingAssetPost200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_asset_get_funding_asset_post_serialize( + self, + timestamp, + signature, + asset, + need_btc_valuation, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if need_btc_valuation is not None: + + _query_params.append(('needBtcValuation', need_btc_valuation)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/asset/get-funding-asset', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get( + self, + start_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + end_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + tran_id: Annotated[Optional[StrictInt], Field(description="The transaction id")] = None, + client_tran_id: Annotated[Optional[StrictStr], Field(description="The unique flag")] = None, + asset: Annotated[Optional[StrictStr], Field(description="If it is blank, we will query all assets")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response: + """Get Cloud-Mining payment and refund history (USER_DATA) + + The query of Cloud-Mining payment and refund history Weight(UID): 600 + + :param start_time: UTC timestamp in ms (required) + :type start_time: int + :param end_time: UTC timestamp in ms (required) + :type end_time: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param tran_id: The transaction id + :type tran_id: int + :param client_tran_id: The unique flag + :type client_tran_id: str + :param asset: If it is blank, we will query all assets + :type asset: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_serialize( + start_time=start_time, + end_time=end_time, + timestamp=timestamp, + signature=signature, + tran_id=tran_id, + client_tran_id=client_tran_id, + asset=asset, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_with_http_info( + self, + start_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + end_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + tran_id: Annotated[Optional[StrictInt], Field(description="The transaction id")] = None, + client_tran_id: Annotated[Optional[StrictStr], Field(description="The unique flag")] = None, + asset: Annotated[Optional[StrictStr], Field(description="If it is blank, we will query all assets")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response]: + """Get Cloud-Mining payment and refund history (USER_DATA) + + The query of Cloud-Mining payment and refund history Weight(UID): 600 + + :param start_time: UTC timestamp in ms (required) + :type start_time: int + :param end_time: UTC timestamp in ms (required) + :type end_time: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param tran_id: The transaction id + :type tran_id: int + :param client_tran_id: The unique flag + :type client_tran_id: str + :param asset: If it is blank, we will query all assets + :type asset: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_serialize( + start_time=start_time, + end_time=end_time, + timestamp=timestamp, + signature=signature, + tran_id=tran_id, + client_tran_id=client_tran_id, + asset=asset, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_without_preload_content( + self, + start_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + end_time: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + tran_id: Annotated[Optional[StrictInt], Field(description="The transaction id")] = None, + client_tran_id: Annotated[Optional[StrictStr], Field(description="The unique flag")] = None, + asset: Annotated[Optional[StrictStr], Field(description="If it is blank, we will query all assets")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Cloud-Mining payment and refund history (USER_DATA) + + The query of Cloud-Mining payment and refund history Weight(UID): 600 + + :param start_time: UTC timestamp in ms (required) + :type start_time: int + :param end_time: UTC timestamp in ms (required) + :type end_time: int + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param tran_id: The transaction id + :type tran_id: int + :param client_tran_id: The unique flag + :type client_tran_id: str + :param asset: If it is blank, we will query all assets + :type asset: str + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_serialize( + start_time=start_time, + end_time=end_time, + timestamp=timestamp, + signature=signature, + tran_id=tran_id, + client_tran_id=client_tran_id, + asset=asset, + current=current, + size=size, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_serialize( + self, + start_time, + end_time, + timestamp, + signature, + tran_id, + client_tran_id, + asset, + current, + size, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if tran_id is not None: + + _query_params.append(('tranId', tran_id)) + + if client_tran_id is not None: + + _query_params.append(('clientTranId', client_tran_id)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_asset_trade_fee_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1AssetTradeFeeGet200ResponseInner]: + """Trade Fee (USER_DATA) + + Fetch trade fee Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_trade_fee_get_serialize( + timestamp=timestamp, + signature=signature, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1AssetTradeFeeGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_asset_trade_fee_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1AssetTradeFeeGet200ResponseInner]]: + """Trade Fee (USER_DATA) + + Fetch trade fee Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_trade_fee_get_serialize( + timestamp=timestamp, + signature=signature, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1AssetTradeFeeGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_asset_trade_fee_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + symbol: Annotated[Optional[StrictStr], Field(description="Trading symbol, e.g. BNBUSDT")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Trade Fee (USER_DATA) + + Fetch trade fee Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param symbol: Trading symbol, e.g. BNBUSDT + :type symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_trade_fee_get_serialize( + timestamp=timestamp, + signature=signature, + symbol=symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1AssetTradeFeeGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_asset_trade_fee_get_serialize( + self, + timestamp, + signature, + symbol, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/asset/tradeFee', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_asset_transfer_get( + self, + type: Annotated[StrictStr, Field(description="Universal transfer type")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + from_symbol: Annotated[Optional[StrictStr], Field(description="Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN")] = None, + to_symbol: Annotated[Optional[StrictStr], Field(description="Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AssetTransferGet200Response: + """Query User Universal Transfer History (USER_DATA) + + - `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - Support query within the last 6 months only - If `startTime` and `endTime` not sent, return records of the last 7 days by default Weight(IP): 1 + + :param type: Universal transfer type (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param from_symbol: Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN + :type from_symbol: str + :param to_symbol: Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN + :type to_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_transfer_get_serialize( + type=type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + from_symbol=from_symbol, + to_symbol=to_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetTransferGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_asset_transfer_get_with_http_info( + self, + type: Annotated[StrictStr, Field(description="Universal transfer type")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + from_symbol: Annotated[Optional[StrictStr], Field(description="Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN")] = None, + to_symbol: Annotated[Optional[StrictStr], Field(description="Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AssetTransferGet200Response]: + """Query User Universal Transfer History (USER_DATA) + + - `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - Support query within the last 6 months only - If `startTime` and `endTime` not sent, return records of the last 7 days by default Weight(IP): 1 + + :param type: Universal transfer type (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param from_symbol: Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN + :type from_symbol: str + :param to_symbol: Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN + :type to_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_transfer_get_serialize( + type=type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + from_symbol=from_symbol, + to_symbol=to_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetTransferGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_asset_transfer_get_without_preload_content( + self, + type: Annotated[StrictStr, Field(description="Universal transfer type")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + current: Annotated[Optional[StrictInt], Field(description="Current querying page. Start from 1. Default:1")] = None, + size: Annotated[Optional[StrictInt], Field(description="Default:10 Max:100")] = None, + from_symbol: Annotated[Optional[StrictStr], Field(description="Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN")] = None, + to_symbol: Annotated[Optional[StrictStr], Field(description="Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query User Universal Transfer History (USER_DATA) + + - `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - Support query within the last 6 months only - If `startTime` and `endTime` not sent, return records of the last 7 days by default Weight(IP): 1 + + :param type: Universal transfer type (required) + :type type: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param current: Current querying page. Start from 1. Default:1 + :type current: int + :param size: Default:10 Max:100 + :type size: int + :param from_symbol: Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN + :type from_symbol: str + :param to_symbol: Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN + :type to_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_transfer_get_serialize( + type=type, + timestamp=timestamp, + signature=signature, + start_time=start_time, + end_time=end_time, + current=current, + size=size, + from_symbol=from_symbol, + to_symbol=to_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetTransferGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_asset_transfer_get_serialize( + self, + type, + timestamp, + signature, + start_time, + end_time, + current, + size, + from_symbol, + to_symbol, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if type is not None: + + _query_params.append(('type', type)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if current is not None: + + _query_params.append(('current', current)) + + if size is not None: + + _query_params.append(('size', size)) + + if from_symbol is not None: + + _query_params.append(('fromSymbol', from_symbol)) + + if to_symbol is not None: + + _query_params.append(('toSymbol', to_symbol)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/asset/transfer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_asset_transfer_post( + self, + type: Annotated[StrictStr, Field(description="Universal transfer type")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_symbol: Annotated[Optional[StrictStr], Field(description="Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN")] = None, + to_symbol: Annotated[Optional[StrictStr], Field(description="Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1AssetTransferPost200Response: + """User Universal Transfer (USER_DATA) + + You need to enable `Permits Universal Transfer` option for the api key which requests this endpoint. - `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN ENUM of transfer types: - MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account - MAIN_CMFUTURE Spot account transfer to COIN-M Futures account - MAIN_MARGIN Spot account transfer to Margin(cross)account - UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account - UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account - CMFUTURE_MAIN COIN-M Futures account transfer to Spot account - CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account - MARGIN_MAIN Margin(cross)account transfer to Spot account - MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures - MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures - ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account - MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account - ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account - MAIN_FUNDING Spot account transfer to Funding account - FUNDING_MAIN Funding account transfer to Spot account - FUNDING_UMFUTURE Funding account transfer to UMFUTURE account - UMFUTURE_FUNDING UMFUTURE account transfer to Funding account - MARGIN_FUNDING MARGIN account transfer to Funding account - FUNDING_MARGIN Funding account transfer to Margin account - FUNDING_CMFUTURE Funding account transfer to CMFUTURE account - CMFUTURE_FUNDING CMFUTURE account transfer to Funding account - MAIN_OPTION Spot account transfer to Options account - OPTION_MAIN Options account transfer to Spot account - UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account - OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures account - MARGIN_OPTION Margin(cross)account transfer to Options account - OPTION_MARGIN Options account transfer to Margin(cross)account - FUNDING_OPTION Funding account transfer to Options account - OPTION_FUNDING Options account transfer to Funding account - MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin account - PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account - MAIN_ISOLATED_MARGIN Spot account transfer to Isolated margin account - ISOLATED_MARGIN_MAIN Isolated margin account transfer to Spot account Weight(IP): 1 + + :param type: Universal transfer type (required) + :type type: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_symbol: Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN + :type from_symbol: str + :param to_symbol: Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN + :type to_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_transfer_post_serialize( + type=type, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + from_symbol=from_symbol, + to_symbol=to_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_asset_transfer_post_with_http_info( + self, + type: Annotated[StrictStr, Field(description="Universal transfer type")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_symbol: Annotated[Optional[StrictStr], Field(description="Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN")] = None, + to_symbol: Annotated[Optional[StrictStr], Field(description="Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1AssetTransferPost200Response]: + """User Universal Transfer (USER_DATA) + + You need to enable `Permits Universal Transfer` option for the api key which requests this endpoint. - `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN ENUM of transfer types: - MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account - MAIN_CMFUTURE Spot account transfer to COIN-M Futures account - MAIN_MARGIN Spot account transfer to Margin(cross)account - UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account - UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account - CMFUTURE_MAIN COIN-M Futures account transfer to Spot account - CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account - MARGIN_MAIN Margin(cross)account transfer to Spot account - MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures - MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures - ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account - MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account - ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account - MAIN_FUNDING Spot account transfer to Funding account - FUNDING_MAIN Funding account transfer to Spot account - FUNDING_UMFUTURE Funding account transfer to UMFUTURE account - UMFUTURE_FUNDING UMFUTURE account transfer to Funding account - MARGIN_FUNDING MARGIN account transfer to Funding account - FUNDING_MARGIN Funding account transfer to Margin account - FUNDING_CMFUTURE Funding account transfer to CMFUTURE account - CMFUTURE_FUNDING CMFUTURE account transfer to Funding account - MAIN_OPTION Spot account transfer to Options account - OPTION_MAIN Options account transfer to Spot account - UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account - OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures account - MARGIN_OPTION Margin(cross)account transfer to Options account - OPTION_MARGIN Options account transfer to Margin(cross)account - FUNDING_OPTION Funding account transfer to Options account - OPTION_FUNDING Options account transfer to Funding account - MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin account - PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account - MAIN_ISOLATED_MARGIN Spot account transfer to Isolated margin account - ISOLATED_MARGIN_MAIN Isolated margin account transfer to Spot account Weight(IP): 1 + + :param type: Universal transfer type (required) + :type type: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_symbol: Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN + :type from_symbol: str + :param to_symbol: Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN + :type to_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_transfer_post_serialize( + type=type, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + from_symbol=from_symbol, + to_symbol=to_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_asset_transfer_post_without_preload_content( + self, + type: Annotated[StrictStr, Field(description="Universal transfer type")], + asset: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + from_symbol: Annotated[Optional[StrictStr], Field(description="Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN")] = None, + to_symbol: Annotated[Optional[StrictStr], Field(description="Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """User Universal Transfer (USER_DATA) + + You need to enable `Permits Universal Transfer` option for the api key which requests this endpoint. - `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN ENUM of transfer types: - MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account - MAIN_CMFUTURE Spot account transfer to COIN-M Futures account - MAIN_MARGIN Spot account transfer to Margin(cross)account - UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account - UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account - CMFUTURE_MAIN COIN-M Futures account transfer to Spot account - CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account - MARGIN_MAIN Margin(cross)account transfer to Spot account - MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures - MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures - ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account - MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account - ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account - MAIN_FUNDING Spot account transfer to Funding account - FUNDING_MAIN Funding account transfer to Spot account - FUNDING_UMFUTURE Funding account transfer to UMFUTURE account - UMFUTURE_FUNDING UMFUTURE account transfer to Funding account - MARGIN_FUNDING MARGIN account transfer to Funding account - FUNDING_MARGIN Funding account transfer to Margin account - FUNDING_CMFUTURE Funding account transfer to CMFUTURE account - CMFUTURE_FUNDING CMFUTURE account transfer to Funding account - MAIN_OPTION Spot account transfer to Options account - OPTION_MAIN Options account transfer to Spot account - UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account - OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures account - MARGIN_OPTION Margin(cross)account transfer to Options account - OPTION_MARGIN Options account transfer to Margin(cross)account - FUNDING_OPTION Funding account transfer to Options account - OPTION_FUNDING Options account transfer to Funding account - MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin account - PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account - MAIN_ISOLATED_MARGIN Spot account transfer to Isolated margin account - ISOLATED_MARGIN_MAIN Isolated margin account transfer to Spot account Weight(IP): 1 + + :param type: Universal transfer type (required) + :type type: str + :param asset: (required) + :type asset: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param from_symbol: Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN + :type from_symbol: str + :param to_symbol: Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN + :type to_symbol: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_transfer_post_serialize( + type=type, + asset=asset, + amount=amount, + timestamp=timestamp, + signature=signature, + from_symbol=from_symbol, + to_symbol=to_symbol, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1AssetTransferPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_asset_transfer_post_serialize( + self, + type, + asset, + amount, + timestamp, + signature, + from_symbol, + to_symbol, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if type is not None: + + _query_params.append(('type', type)) + + if asset is not None: + + _query_params.append(('asset', asset)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if from_symbol is not None: + + _query_params.append(('fromSymbol', from_symbol)) + + if to_symbol is not None: + + _query_params.append(('toSymbol', to_symbol)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/asset/transfer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_asset_wallet_balance_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1AssetWalletBalanceGet200ResponseInner]: + """Query User Wallet Balance (USER_DATA) + + Query User Wallet Balance Weight(IP): 60 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_wallet_balance_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1AssetWalletBalanceGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_asset_wallet_balance_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1AssetWalletBalanceGet200ResponseInner]]: + """Query User Wallet Balance (USER_DATA) + + Query User Wallet Balance Weight(IP): 60 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_wallet_balance_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1AssetWalletBalanceGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_asset_wallet_balance_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query User Wallet Balance (USER_DATA) + + Query User Wallet Balance Weight(IP): 60 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_asset_wallet_balance_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1AssetWalletBalanceGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_asset_wallet_balance_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/asset/wallet/balance', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_capital_config_getall_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1CapitalConfigGetallGet200ResponseInner]: + """All Coins' Information (USER_DATA) + + Get information of coins (available for deposit and withdraw) for user. Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_config_getall_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalConfigGetallGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_capital_config_getall_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1CapitalConfigGetallGet200ResponseInner]]: + """All Coins' Information (USER_DATA) + + Get information of coins (available for deposit and withdraw) for user. Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_config_getall_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalConfigGetallGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_capital_config_getall_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """All Coins' Information (USER_DATA) + + Get information of coins (available for deposit and withdraw) for user. Weight(IP): 10 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_config_getall_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalConfigGetallGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_capital_config_getall_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/capital/config/getall', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_capital_contract_convertible_coins_get( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1CapitalContractConvertibleCoinsGet200Response: + """Query auto-converting stable coins (USER_DATA) + + Get a user's auto-conversion settings in deposit/withdrawal Weight(UID): 600' + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_contract_convertible_coins_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalContractConvertibleCoinsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_capital_contract_convertible_coins_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1CapitalContractConvertibleCoinsGet200Response]: + """Query auto-converting stable coins (USER_DATA) + + Get a user's auto-conversion settings in deposit/withdrawal Weight(UID): 600' + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_contract_convertible_coins_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalContractConvertibleCoinsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_capital_contract_convertible_coins_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query auto-converting stable coins (USER_DATA) + + Get a user's auto-conversion settings in deposit/withdrawal Weight(UID): 600' + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_contract_convertible_coins_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalContractConvertibleCoinsGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_capital_contract_convertible_coins_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/capital/contract/convertible-coins', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_capital_contract_convertible_coins_post( + self, + coin: Annotated[StrictStr, Field(description="Must be USDC, USDP or TUSD")], + enable: Annotated[StrictBool, Field(description="true: turn on the auto-conversion. false: turn off the auto-conversion")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Switch on/off BUSD and stable coins conversion (USER_DATA) (USER_DATA) + + User can use it to turn on or turn off the BUSD auto-conversion from/to a specific stable coin. Weight(UID): 600' + + :param coin: Must be USDC, USDP or TUSD (required) + :type coin: str + :param enable: true: turn on the auto-conversion. false: turn off the auto-conversion (required) + :type enable: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_contract_convertible_coins_post_serialize( + coin=coin, + enable=enable, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_capital_contract_convertible_coins_post_with_http_info( + self, + coin: Annotated[StrictStr, Field(description="Must be USDC, USDP or TUSD")], + enable: Annotated[StrictBool, Field(description="true: turn on the auto-conversion. false: turn off the auto-conversion")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Switch on/off BUSD and stable coins conversion (USER_DATA) (USER_DATA) + + User can use it to turn on or turn off the BUSD auto-conversion from/to a specific stable coin. Weight(UID): 600' + + :param coin: Must be USDC, USDP or TUSD (required) + :type coin: str + :param enable: true: turn on the auto-conversion. false: turn off the auto-conversion (required) + :type enable: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_contract_convertible_coins_post_serialize( + coin=coin, + enable=enable, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_capital_contract_convertible_coins_post_without_preload_content( + self, + coin: Annotated[StrictStr, Field(description="Must be USDC, USDP or TUSD")], + enable: Annotated[StrictBool, Field(description="true: turn on the auto-conversion. false: turn off the auto-conversion")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Switch on/off BUSD and stable coins conversion (USER_DATA) (USER_DATA) + + User can use it to turn on or turn off the BUSD auto-conversion from/to a specific stable coin. Weight(UID): 600' + + :param coin: Must be USDC, USDP or TUSD (required) + :type coin: str + :param enable: true: turn on the auto-conversion. false: turn off the auto-conversion (required) + :type enable: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_contract_convertible_coins_post_serialize( + coin=coin, + enable=enable, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_capital_contract_convertible_coins_post_serialize( + self, + coin, + enable, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if coin is not None: + + _query_params.append(('coin', coin)) + + if enable is not None: + + _query_params.append(('enable', enable)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/capital/contract/convertible-coins', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_capital_deposit_address_get( + self, + coin: Annotated[StrictStr, Field(description="Coin name")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + network: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1CapitalDepositAddressGet200Response: + """Deposit Address (supporting network) (USER_DATA) + + Fetch deposit address with network. - If network is not send, return with default network of the coin. - You can get network and isDefault in networkList in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256). Weight(IP): 10 + + :param coin: Coin name (required) + :type coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param network: + :type network: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_address_get_serialize( + coin=coin, + timestamp=timestamp, + signature=signature, + network=network, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalDepositAddressGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_capital_deposit_address_get_with_http_info( + self, + coin: Annotated[StrictStr, Field(description="Coin name")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + network: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1CapitalDepositAddressGet200Response]: + """Deposit Address (supporting network) (USER_DATA) + + Fetch deposit address with network. - If network is not send, return with default network of the coin. - You can get network and isDefault in networkList in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256). Weight(IP): 10 + + :param coin: Coin name (required) + :type coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param network: + :type network: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_address_get_serialize( + coin=coin, + timestamp=timestamp, + signature=signature, + network=network, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalDepositAddressGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_capital_deposit_address_get_without_preload_content( + self, + coin: Annotated[StrictStr, Field(description="Coin name")], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + network: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Deposit Address (supporting network) (USER_DATA) + + Fetch deposit address with network. - If network is not send, return with default network of the coin. - You can get network and isDefault in networkList in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256). Weight(IP): 10 + + :param coin: Coin name (required) + :type coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param network: + :type network: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_address_get_serialize( + coin=coin, + timestamp=timestamp, + signature=signature, + network=network, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalDepositAddressGet200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_capital_deposit_address_get_serialize( + self, + coin, + timestamp, + signature, + network, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if coin is not None: + + _query_params.append(('coin', coin)) + + if network is not None: + + _query_params.append(('network', network)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/capital/deposit/address', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_capital_deposit_address_list_get( + self, + coin: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + network: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1CapitalDepositAddressListGet200ResponseInner]: + """Fetch deposit address list with network (USER_DATA) + + Fetch deposit address list with network. Weight(IP): 10 + + :param coin: (required) + :type coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param network: + :type network: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_address_list_get_serialize( + coin=coin, + timestamp=timestamp, + signature=signature, + network=network, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalDepositAddressListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_capital_deposit_address_list_get_with_http_info( + self, + coin: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + network: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1CapitalDepositAddressListGet200ResponseInner]]: + """Fetch deposit address list with network (USER_DATA) + + Fetch deposit address list with network. Weight(IP): 10 + + :param coin: (required) + :type coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param network: + :type network: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_address_list_get_serialize( + coin=coin, + timestamp=timestamp, + signature=signature, + network=network, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalDepositAddressListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_capital_deposit_address_list_get_without_preload_content( + self, + coin: StrictStr, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + network: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Fetch deposit address list with network (USER_DATA) + + Fetch deposit address list with network. Weight(IP): 10 + + :param coin: (required) + :type coin: str + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param network: + :type network: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_address_list_get_serialize( + coin=coin, + timestamp=timestamp, + signature=signature, + network=network, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalDepositAddressListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_capital_deposit_address_list_get_serialize( + self, + coin, + timestamp, + signature, + network, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if coin is not None: + + _query_params.append(('coin', coin)) + + if network is not None: + + _query_params.append(('network', network)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/capital/deposit/address/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_capital_deposit_credit_apply_post( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + deposit_id: Annotated[Optional[StrictInt], Field(description="Deposit record Id, priority use")] = None, + tx_id: Annotated[Optional[StrictStr], Field(description="Deposit txId, used when depositId is not specified")] = None, + sub_account_id: Optional[StrictInt] = None, + sub_user_id: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1CapitalDepositCreditApplyPost200Response: + """One click arrival deposit apply (USER_DATA) + + Apply deposit credit for expired address (One click arrival) Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param deposit_id: Deposit record Id, priority use + :type deposit_id: int + :param tx_id: Deposit txId, used when depositId is not specified + :type tx_id: str + :param sub_account_id: + :type sub_account_id: int + :param sub_user_id: + :type sub_user_id: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_credit_apply_post_serialize( + timestamp=timestamp, + signature=signature, + deposit_id=deposit_id, + tx_id=tx_id, + sub_account_id=sub_account_id, + sub_user_id=sub_user_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalDepositCreditApplyPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_capital_deposit_credit_apply_post_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + deposit_id: Annotated[Optional[StrictInt], Field(description="Deposit record Id, priority use")] = None, + tx_id: Annotated[Optional[StrictStr], Field(description="Deposit txId, used when depositId is not specified")] = None, + sub_account_id: Optional[StrictInt] = None, + sub_user_id: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1CapitalDepositCreditApplyPost200Response]: + """One click arrival deposit apply (USER_DATA) + + Apply deposit credit for expired address (One click arrival) Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param deposit_id: Deposit record Id, priority use + :type deposit_id: int + :param tx_id: Deposit txId, used when depositId is not specified + :type tx_id: str + :param sub_account_id: + :type sub_account_id: int + :param sub_user_id: + :type sub_user_id: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_credit_apply_post_serialize( + timestamp=timestamp, + signature=signature, + deposit_id=deposit_id, + tx_id=tx_id, + sub_account_id=sub_account_id, + sub_user_id=sub_user_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalDepositCreditApplyPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_capital_deposit_credit_apply_post_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + deposit_id: Annotated[Optional[StrictInt], Field(description="Deposit record Id, priority use")] = None, + tx_id: Annotated[Optional[StrictStr], Field(description="Deposit txId, used when depositId is not specified")] = None, + sub_account_id: Optional[StrictInt] = None, + sub_user_id: Optional[StrictInt] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """One click arrival deposit apply (USER_DATA) + + Apply deposit credit for expired address (One click arrival) Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param deposit_id: Deposit record Id, priority use + :type deposit_id: int + :param tx_id: Deposit txId, used when depositId is not specified + :type tx_id: str + :param sub_account_id: + :type sub_account_id: int + :param sub_user_id: + :type sub_user_id: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_credit_apply_post_serialize( + timestamp=timestamp, + signature=signature, + deposit_id=deposit_id, + tx_id=tx_id, + sub_account_id=sub_account_id, + sub_user_id=sub_user_id, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalDepositCreditApplyPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_capital_deposit_credit_apply_post_serialize( + self, + timestamp, + signature, + deposit_id, + tx_id, + sub_account_id, + sub_user_id, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if deposit_id is not None: + + _query_params.append(('depositId', deposit_id)) + + if tx_id is not None: + + _query_params.append(('txId', tx_id)) + + if sub_account_id is not None: + + _query_params.append(('subAccountId', sub_account_id)) + + if sub_user_id is not None: + + _query_params.append(('subUserId', sub_user_id)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/capital/deposit/credit-apply', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_capital_deposit_hisrec_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + status: Annotated[Optional[StrictInt], Field(description="* `0` - pending * `6` - credited but cannot withdraw * `1` - success")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + offset: Optional[StrictInt] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1CapitalDepositHisrecGet200ResponseInner]: + """Deposit History(supporting network) (USER_DATA) + + Fetch deposit history. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param status: * `0` - pending * `6` - credited but cannot withdraw * `1` - success + :type status: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param offset: + :type offset: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_hisrec_get_serialize( + timestamp=timestamp, + signature=signature, + coin=coin, + status=status, + start_time=start_time, + end_time=end_time, + offset=offset, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalDepositHisrecGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_capital_deposit_hisrec_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + status: Annotated[Optional[StrictInt], Field(description="* `0` - pending * `6` - credited but cannot withdraw * `1` - success")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + offset: Optional[StrictInt] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1CapitalDepositHisrecGet200ResponseInner]]: + """Deposit History(supporting network) (USER_DATA) + + Fetch deposit history. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param status: * `0` - pending * `6` - credited but cannot withdraw * `1` - success + :type status: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param offset: + :type offset: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_hisrec_get_serialize( + timestamp=timestamp, + signature=signature, + coin=coin, + status=status, + start_time=start_time, + end_time=end_time, + offset=offset, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalDepositHisrecGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_capital_deposit_hisrec_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + status: Annotated[Optional[StrictInt], Field(description="* `0` - pending * `6` - credited but cannot withdraw * `1` - success")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + offset: Optional[StrictInt] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Deposit History(supporting network) (USER_DATA) + + Fetch deposit history. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days. Weight(IP): 1 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param status: * `0` - pending * `6` - credited but cannot withdraw * `1` - success + :type status: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param offset: + :type offset: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_deposit_hisrec_get_serialize( + timestamp=timestamp, + signature=signature, + coin=coin, + status=status, + start_time=start_time, + end_time=end_time, + offset=offset, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalDepositHisrecGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_capital_deposit_hisrec_get_serialize( + self, + timestamp, + signature, + coin, + status, + start_time, + end_time, + offset, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if coin is not None: + + _query_params.append(('coin', coin)) + + if status is not None: + + _query_params.append(('status', status)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/capital/deposit/hisrec', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_capital_withdraw_address_list_get( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1CapitalWithdrawAddressListGet200ResponseInner]: + """Fetch withdraw address list (USER_DATA) + + Fetch withdraw address list Weight(IP): 10 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_withdraw_address_list_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalWithdrawAddressListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_capital_withdraw_address_list_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1CapitalWithdrawAddressListGet200ResponseInner]]: + """Fetch withdraw address list (USER_DATA) + + Fetch withdraw address list Weight(IP): 10 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_withdraw_address_list_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalWithdrawAddressListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_capital_withdraw_address_list_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Fetch withdraw address list (USER_DATA) + + Fetch withdraw address list Weight(IP): 10 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_withdraw_address_list_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalWithdrawAddressListGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_capital_withdraw_address_list_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/capital/withdraw/address/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_capital_withdraw_apply_post( + self, + coin: Annotated[StrictStr, Field(description="Coin name")], + address: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + withdraw_order_id: Annotated[Optional[StrictStr], Field(description="Client id for withdraw")] = None, + network: Optional[StrictStr] = None, + address_tag: Annotated[Optional[StrictStr], Field(description="Secondary address identifier for coins like XRP,XMR etc.")] = None, + transaction_fee_flag: Annotated[Optional[StrictBool], Field(description="When making internal transfer - `true` -> returning the fee to the destination account; - `false` -> returning the fee back to the departure account.")] = None, + name: Optional[StrictStr] = None, + wallet_type: Annotated[Optional[StrictInt], Field(description="The wallet type for withdraw,0-Spot wallet, 1- Funding wallet. Default is Spot wallet")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1CapitalWithdrawApplyPost200Response: + """Withdraw (USER_DATA) + + Submit a withdraw request. - If `network` not send, return with default network of the coin. - You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. Weight(IP): 1 + + :param coin: Coin name (required) + :type coin: str + :param address: (required) + :type address: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param withdraw_order_id: Client id for withdraw + :type withdraw_order_id: str + :param network: + :type network: str + :param address_tag: Secondary address identifier for coins like XRP,XMR etc. + :type address_tag: str + :param transaction_fee_flag: When making internal transfer - `true` -> returning the fee to the destination account; - `false` -> returning the fee back to the departure account. + :type transaction_fee_flag: bool + :param name: + :type name: str + :param wallet_type: The wallet type for withdraw,0-Spot wallet, 1- Funding wallet. Default is Spot wallet + :type wallet_type: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_withdraw_apply_post_serialize( + coin=coin, + address=address, + amount=amount, + timestamp=timestamp, + signature=signature, + withdraw_order_id=withdraw_order_id, + network=network, + address_tag=address_tag, + transaction_fee_flag=transaction_fee_flag, + name=name, + wallet_type=wallet_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalWithdrawApplyPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_capital_withdraw_apply_post_with_http_info( + self, + coin: Annotated[StrictStr, Field(description="Coin name")], + address: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + withdraw_order_id: Annotated[Optional[StrictStr], Field(description="Client id for withdraw")] = None, + network: Optional[StrictStr] = None, + address_tag: Annotated[Optional[StrictStr], Field(description="Secondary address identifier for coins like XRP,XMR etc.")] = None, + transaction_fee_flag: Annotated[Optional[StrictBool], Field(description="When making internal transfer - `true` -> returning the fee to the destination account; - `false` -> returning the fee back to the departure account.")] = None, + name: Optional[StrictStr] = None, + wallet_type: Annotated[Optional[StrictInt], Field(description="The wallet type for withdraw,0-Spot wallet, 1- Funding wallet. Default is Spot wallet")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1CapitalWithdrawApplyPost200Response]: + """Withdraw (USER_DATA) + + Submit a withdraw request. - If `network` not send, return with default network of the coin. - You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. Weight(IP): 1 + + :param coin: Coin name (required) + :type coin: str + :param address: (required) + :type address: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param withdraw_order_id: Client id for withdraw + :type withdraw_order_id: str + :param network: + :type network: str + :param address_tag: Secondary address identifier for coins like XRP,XMR etc. + :type address_tag: str + :param transaction_fee_flag: When making internal transfer - `true` -> returning the fee to the destination account; - `false` -> returning the fee back to the departure account. + :type transaction_fee_flag: bool + :param name: + :type name: str + :param wallet_type: The wallet type for withdraw,0-Spot wallet, 1- Funding wallet. Default is Spot wallet + :type wallet_type: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_withdraw_apply_post_serialize( + coin=coin, + address=address, + amount=amount, + timestamp=timestamp, + signature=signature, + withdraw_order_id=withdraw_order_id, + network=network, + address_tag=address_tag, + transaction_fee_flag=transaction_fee_flag, + name=name, + wallet_type=wallet_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalWithdrawApplyPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_capital_withdraw_apply_post_without_preload_content( + self, + coin: Annotated[StrictStr, Field(description="Coin name")], + address: StrictStr, + amount: Union[StrictFloat, StrictInt], + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + withdraw_order_id: Annotated[Optional[StrictStr], Field(description="Client id for withdraw")] = None, + network: Optional[StrictStr] = None, + address_tag: Annotated[Optional[StrictStr], Field(description="Secondary address identifier for coins like XRP,XMR etc.")] = None, + transaction_fee_flag: Annotated[Optional[StrictBool], Field(description="When making internal transfer - `true` -> returning the fee to the destination account; - `false` -> returning the fee back to the departure account.")] = None, + name: Optional[StrictStr] = None, + wallet_type: Annotated[Optional[StrictInt], Field(description="The wallet type for withdraw,0-Spot wallet, 1- Funding wallet. Default is Spot wallet")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Withdraw (USER_DATA) + + Submit a withdraw request. - If `network` not send, return with default network of the coin. - You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. Weight(IP): 1 + + :param coin: Coin name (required) + :type coin: str + :param address: (required) + :type address: str + :param amount: (required) + :type amount: float + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param withdraw_order_id: Client id for withdraw + :type withdraw_order_id: str + :param network: + :type network: str + :param address_tag: Secondary address identifier for coins like XRP,XMR etc. + :type address_tag: str + :param transaction_fee_flag: When making internal transfer - `true` -> returning the fee to the destination account; - `false` -> returning the fee back to the departure account. + :type transaction_fee_flag: bool + :param name: + :type name: str + :param wallet_type: The wallet type for withdraw,0-Spot wallet, 1- Funding wallet. Default is Spot wallet + :type wallet_type: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_withdraw_apply_post_serialize( + coin=coin, + address=address, + amount=amount, + timestamp=timestamp, + signature=signature, + withdraw_order_id=withdraw_order_id, + network=network, + address_tag=address_tag, + transaction_fee_flag=transaction_fee_flag, + name=name, + wallet_type=wallet_type, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1CapitalWithdrawApplyPost200Response", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_capital_withdraw_apply_post_serialize( + self, + coin, + address, + amount, + timestamp, + signature, + withdraw_order_id, + network, + address_tag, + transaction_fee_flag, + name, + wallet_type, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if coin is not None: + + _query_params.append(('coin', coin)) + + if withdraw_order_id is not None: + + _query_params.append(('withdrawOrderId', withdraw_order_id)) + + if network is not None: + + _query_params.append(('network', network)) + + if address is not None: + + _query_params.append(('address', address)) + + if address_tag is not None: + + _query_params.append(('addressTag', address_tag)) + + if amount is not None: + + _query_params.append(('amount', amount)) + + if transaction_fee_flag is not None: + + _query_params.append(('transactionFeeFlag', transaction_fee_flag)) + + if name is not None: + + _query_params.append(('name', name)) + + if wallet_type is not None: + + _query_params.append(('walletType', wallet_type)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v1/capital/withdraw/apply', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_capital_withdraw_history_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + withdraw_order_id: Optional[StrictStr] = None, + status: Annotated[Optional[Annotated[int, Field(le=6, strict=True, ge=0)]], Field(description="* `0` - Email Sent * `1` - Cancelled * `2` - Awaiting Approval * `3` - Rejected * `4` - Processing * `5` - Failure * `6` - Completed")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + offset: Optional[StrictInt] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1CapitalWithdrawHistoryGet200ResponseInner]: + """Withdraw History (supporting network) (USER_DATA) + + Fetch withdraw history. This endpoint specifically uses per second UID rate limit, user's total second level IP rate limit is 180000/second. Response from the endpoint contains header key X-SAPI-USED-UID-WEIGHT-1S, which defines weight used by the current IP. - `network` may not be in the response for old withdraw. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days - If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days. - If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default. Weight(UID): 18000 Request Limit: 10 requests per second + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param withdraw_order_id: + :type withdraw_order_id: str + :param status: * `0` - Email Sent * `1` - Cancelled * `2` - Awaiting Approval * `3` - Rejected * `4` - Processing * `5` - Failure * `6` - Completed + :type status: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param offset: + :type offset: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_withdraw_history_get_serialize( + timestamp=timestamp, + signature=signature, + coin=coin, + withdraw_order_id=withdraw_order_id, + status=status, + start_time=start_time, + end_time=end_time, + offset=offset, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalWithdrawHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_capital_withdraw_history_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + withdraw_order_id: Optional[StrictStr] = None, + status: Annotated[Optional[Annotated[int, Field(le=6, strict=True, ge=0)]], Field(description="* `0` - Email Sent * `1` - Cancelled * `2` - Awaiting Approval * `3` - Rejected * `4` - Processing * `5` - Failure * `6` - Completed")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + offset: Optional[StrictInt] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1CapitalWithdrawHistoryGet200ResponseInner]]: + """Withdraw History (supporting network) (USER_DATA) + + Fetch withdraw history. This endpoint specifically uses per second UID rate limit, user's total second level IP rate limit is 180000/second. Response from the endpoint contains header key X-SAPI-USED-UID-WEIGHT-1S, which defines weight used by the current IP. - `network` may not be in the response for old withdraw. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days - If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days. - If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default. Weight(UID): 18000 Request Limit: 10 requests per second + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param withdraw_order_id: + :type withdraw_order_id: str + :param status: * `0` - Email Sent * `1` - Cancelled * `2` - Awaiting Approval * `3` - Rejected * `4` - Processing * `5` - Failure * `6` - Completed + :type status: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param offset: + :type offset: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_withdraw_history_get_serialize( + timestamp=timestamp, + signature=signature, + coin=coin, + withdraw_order_id=withdraw_order_id, + status=status, + start_time=start_time, + end_time=end_time, + offset=offset, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalWithdrawHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_capital_withdraw_history_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + coin: Annotated[Optional[StrictStr], Field(description="Coin name")] = None, + withdraw_order_id: Optional[StrictStr] = None, + status: Annotated[Optional[Annotated[int, Field(le=6, strict=True, ge=0)]], Field(description="* `0` - Email Sent * `1` - Cancelled * `2` - Awaiting Approval * `3` - Rejected * `4` - Processing * `5` - Failure * `6` - Completed")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="UTC timestamp in ms")] = None, + offset: Optional[StrictInt] = None, + limit: Annotated[Optional[StrictInt], Field(description="Default 500; max 1000.")] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Withdraw History (supporting network) (USER_DATA) + + Fetch withdraw history. This endpoint specifically uses per second UID rate limit, user's total second level IP rate limit is 180000/second. Response from the endpoint contains header key X-SAPI-USED-UID-WEIGHT-1S, which defines weight used by the current IP. - `network` may not be in the response for old withdraw. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days - If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days. - If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default. Weight(UID): 18000 Request Limit: 10 requests per second + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param coin: Coin name + :type coin: str + :param withdraw_order_id: + :type withdraw_order_id: str + :param status: * `0` - Email Sent * `1` - Cancelled * `2` - Awaiting Approval * `3` - Rejected * `4` - Processing * `5` - Failure * `6` - Completed + :type status: int + :param start_time: UTC timestamp in ms + :type start_time: int + :param end_time: UTC timestamp in ms + :type end_time: int + :param offset: + :type offset: int + :param limit: Default 500; max 1000. + :type limit: int + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_capital_withdraw_history_get_serialize( + timestamp=timestamp, + signature=signature, + coin=coin, + withdraw_order_id=withdraw_order_id, + status=status, + start_time=start_time, + end_time=end_time, + offset=offset, + limit=limit, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1CapitalWithdrawHistoryGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_capital_withdraw_history_get_serialize( + self, + timestamp, + signature, + coin, + withdraw_order_id, + status, + start_time, + end_time, + offset, + limit, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if coin is not None: + + _query_params.append(('coin', coin)) + + if withdraw_order_id is not None: + + _query_params.append(('withdrawOrderId', withdraw_order_id)) + + if status is not None: + + _query_params.append(('status', status)) + + if start_time is not None: + + _query_params.append(('startTime', start_time)) + + if end_time is not None: + + _query_params.append(('endTime', end_time)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/capital/withdraw/history', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_spot_delist_schedule_get( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV1SpotDelistScheduleGet200ResponseInner]: + """Get symbols delist schedule for spot (MARKET_DATA) + + Get symbols delist schedule for spot Weight(IP): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_spot_delist_schedule_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SpotDelistScheduleGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_spot_delist_schedule_get_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV1SpotDelistScheduleGet200ResponseInner]]: + """Get symbols delist schedule for spot (MARKET_DATA) + + Get symbols delist schedule for spot Weight(IP): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_spot_delist_schedule_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SpotDelistScheduleGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_spot_delist_schedule_get_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get symbols delist schedule for spot (MARKET_DATA) + + Get symbols delist schedule for spot Weight(IP): 100 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_spot_delist_schedule_get_serialize( + timestamp=timestamp, + signature=signature, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV1SpotDelistScheduleGet200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_spot_delist_schedule_get_serialize( + self, + timestamp, + signature, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/spot/delist-schedule', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v1_system_status_get( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SapiV1SystemStatusGet200Response: + """System Status (System) + + Fetch system status. Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_system_status_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SystemStatusGet200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v1_system_status_get_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SapiV1SystemStatusGet200Response]: + """System Status (System) + + Fetch system status. Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_system_status_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SystemStatusGet200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v1_system_status_get_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """System Status (System) + + Fetch system status. Weight(IP): 1 + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v1_system_status_get_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SapiV1SystemStatusGet200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v1_system_status_get_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/sapi/v1/system/status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def sapi_v3_asset_get_user_asset_post( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + need_btc_valuation: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SapiV3AssetGetUserAssetPost200ResponseInner]: + """User Asset (USER_DATA) + + Get user assets, just for positive data. Weight(IP): 5 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param need_btc_valuation: + :type need_btc_valuation: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v3_asset_get_user_asset_post_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + need_btc_valuation=need_btc_valuation, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV3AssetGetUserAssetPost200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def sapi_v3_asset_get_user_asset_post_with_http_info( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + need_btc_valuation: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SapiV3AssetGetUserAssetPost200ResponseInner]]: + """User Asset (USER_DATA) + + Get user assets, just for positive data. Weight(IP): 5 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param need_btc_valuation: + :type need_btc_valuation: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v3_asset_get_user_asset_post_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + need_btc_valuation=need_btc_valuation, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV3AssetGetUserAssetPost200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def sapi_v3_asset_get_user_asset_post_without_preload_content( + self, + timestamp: Annotated[StrictInt, Field(description="UTC timestamp in ms")], + signature: Annotated[StrictStr, Field(description="Signature")], + asset: Optional[StrictStr] = None, + need_btc_valuation: Optional[StrictStr] = None, + recv_window: Annotated[Optional[StrictInt], Field(description="The value cannot be greater than 60000")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """User Asset (USER_DATA) + + Get user assets, just for positive data. Weight(IP): 5 + + :param timestamp: UTC timestamp in ms (required) + :type timestamp: int + :param signature: Signature (required) + :type signature: str + :param asset: + :type asset: str + :param need_btc_valuation: + :type need_btc_valuation: str + :param recv_window: The value cannot be greater than 60000 + :type recv_window: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._sapi_v3_asset_get_user_asset_post_serialize( + timestamp=timestamp, + signature=signature, + asset=asset, + need_btc_valuation=need_btc_valuation, + recv_window=recv_window, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SapiV3AssetGetUserAssetPost200ResponseInner]", + '400': "Error", + '401': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _sapi_v3_asset_get_user_asset_post_serialize( + self, + timestamp, + signature, + asset, + need_btc_valuation, + recv_window, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if asset is not None: + + _query_params.append(('asset', asset)) + + if need_btc_valuation is not None: + + _query_params.append(('needBtcValuation', need_btc_valuation)) + + if recv_window is not None: + + _query_params.append(('recvWindow', recv_window)) + + if timestamp is not None: + + _query_params.append(('timestamp', timestamp)) + + if signature is not None: + + _query_params.append(('signature', signature)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sapi/v3/asset/getUserAsset', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/target/python/binance_openapi/openapi_client/api_client.py b/target/python/binance_openapi/openapi_client/api_client.py new file mode 100644 index 0000000..f9f3ffd --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api_client.py @@ -0,0 +1,781 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from openapi_client.configuration import Configuration +from openapi_client.api_response import ApiResponse, T as ApiResponseT +import openapi_client.models +from openapi_client import rest +from openapi_client.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None or self.configuration.ignore_operation_servers: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. + + :return: deserialized object. + """ + + # fetch data from response object + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif content_type.startswith("application/json"): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif content_type.startswith("text/plain"): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(openapi_client.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/target/python/binance_openapi/openapi_client/api_response.py b/target/python/binance_openapi/openapi_client/api_response.py new file mode 100644 index 0000000..9bc7c11 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/target/python/binance_openapi/openapi_client/configuration.py b/target/python/binance_openapi/openapi_client/configuration.py new file mode 100644 index 0000000..7402c10 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/configuration.py @@ -0,0 +1,483 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: Number of retries for API requests. + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + +conf = openapi_client.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ignore_operation_servers=False, + ssl_ca_cert=None, + retries=None, + *, + debug: Optional[bool] = None + ) -> None: + """Constructor + """ + self._base_path = "https://api.binance.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("openapi_client") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + if debug is not None: + self.debug = debug + else: + self.__debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = retries + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if 'ApiKeyAuth' in self.api_key: + auth['ApiKeyAuth'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'X-MBX-APIKEY', + 'value': self.get_api_key_with_prefix( + 'ApiKeyAuth', + ), + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.binance.com", + 'description': "No description provided", + }, + { + 'url': "https://testnet.binance.vision", + 'description': "No description provided", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/target/python/binance_openapi/openapi_client/exceptions.py b/target/python/binance_openapi/openapi_client/exceptions.py new file mode 100644 index 0000000..7e5ec0e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/exceptions.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/target/python/binance_openapi/openapi_client/models/__init__.py b/target/python/binance_openapi/openapi_client/models/__init__.py new file mode 100644 index 0000000..6bed190 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/__init__.py @@ -0,0 +1,530 @@ +# coding: utf-8 + +# flake8: noqa +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from openapi_client.models.account import Account +from openapi_client.models.account_balances_inner import AccountBalancesInner +from openapi_client.models.account_commission_rates import AccountCommissionRates +from openapi_client.models.agg_trade import AggTrade +from openapi_client.models.api_v3_account_commission_get200_response import ApiV3AccountCommissionGet200Response +from openapi_client.models.api_v3_account_commission_get200_response_discount import ApiV3AccountCommissionGet200ResponseDiscount +from openapi_client.models.api_v3_account_commission_get200_response_standard_commission import ApiV3AccountCommissionGet200ResponseStandardCommission +from openapi_client.models.api_v3_account_commission_get200_response_tax_commission import ApiV3AccountCommissionGet200ResponseTaxCommission +from openapi_client.models.api_v3_all_order_list_get200_response_inner import ApiV3AllOrderListGet200ResponseInner +from openapi_client.models.api_v3_all_order_list_get200_response_inner_orders_inner import ApiV3AllOrderListGet200ResponseInnerOrdersInner +from openapi_client.models.api_v3_avg_price_get200_response import ApiV3AvgPriceGet200Response +from openapi_client.models.api_v3_depth_get200_response import ApiV3DepthGet200Response +from openapi_client.models.api_v3_exchange_info_get200_response import ApiV3ExchangeInfoGet200Response +from openapi_client.models.api_v3_exchange_info_get200_response_rate_limits_inner import ApiV3ExchangeInfoGet200ResponseRateLimitsInner +from openapi_client.models.api_v3_exchange_info_get200_response_symbols_inner import ApiV3ExchangeInfoGet200ResponseSymbolsInner +from openapi_client.models.api_v3_exchange_info_get200_response_symbols_inner_filters_inner import ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner +from openapi_client.models.api_v3_klines_get200_response_inner_inner import ApiV3KlinesGet200ResponseInnerInner +from openapi_client.models.api_v3_my_allocations_get200_response_inner import ApiV3MyAllocationsGet200ResponseInner +from openapi_client.models.api_v3_my_prevented_matches_get200_response_inner import ApiV3MyPreventedMatchesGet200ResponseInner +from openapi_client.models.api_v3_open_order_list_get200_response_inner import ApiV3OpenOrderListGet200ResponseInner +from openapi_client.models.api_v3_open_order_list_get200_response_inner_orders_inner import ApiV3OpenOrderListGet200ResponseInnerOrdersInner +from openapi_client.models.api_v3_open_orders_delete200_response_inner import ApiV3OpenOrdersDelete200ResponseInner +from openapi_client.models.api_v3_order_cancel_replace_post200_response import ApiV3OrderCancelReplacePost200Response +from openapi_client.models.api_v3_order_cancel_replace_post200_response_cancel_response import ApiV3OrderCancelReplacePost200ResponseCancelResponse +from openapi_client.models.api_v3_order_cancel_replace_post200_response_new_order_response import ApiV3OrderCancelReplacePost200ResponseNewOrderResponse +from openapi_client.models.api_v3_order_list_get200_response import ApiV3OrderListGet200Response +from openapi_client.models.api_v3_order_list_get200_response_orders_inner import ApiV3OrderListGet200ResponseOrdersInner +from openapi_client.models.api_v3_order_oco_post200_response import ApiV3OrderOcoPost200Response +from openapi_client.models.api_v3_order_oco_post200_response_order_reports_inner import ApiV3OrderOcoPost200ResponseOrderReportsInner +from openapi_client.models.api_v3_order_oco_post200_response_orders_inner import ApiV3OrderOcoPost200ResponseOrdersInner +from openapi_client.models.api_v3_order_post200_response import ApiV3OrderPost200Response +from openapi_client.models.api_v3_rate_limit_order_get200_response_inner import ApiV3RateLimitOrderGet200ResponseInner +from openapi_client.models.api_v3_sor_order_post200_response import ApiV3SorOrderPost200Response +from openapi_client.models.api_v3_sor_order_post200_response_fills_inner import ApiV3SorOrderPost200ResponseFillsInner +from openapi_client.models.api_v3_ticker24hr_get200_response import ApiV3Ticker24hrGet200Response +from openapi_client.models.api_v3_ticker_book_ticker_get200_response import ApiV3TickerBookTickerGet200Response +from openapi_client.models.api_v3_ticker_get200_response import ApiV3TickerGet200Response +from openapi_client.models.api_v3_ticker_price_get200_response import ApiV3TickerPriceGet200Response +from openapi_client.models.api_v3_ticker_trading_day_get200_response import ApiV3TickerTradingDayGet200Response +from openapi_client.models.api_v3_time_get200_response import ApiV3TimeGet200Response +from openapi_client.models.api_v3_user_data_stream_post200_response import ApiV3UserDataStreamPost200Response +from openapi_client.models.bnb_burn_status import BnbBurnStatus +from openapi_client.models.book_ticker import BookTicker +from openapi_client.models.canceled_margin_order_detail import CanceledMarginOrderDetail +from openapi_client.models.day_ticker import DayTicker +from openapi_client.models.error import Error +from openapi_client.models.isolated_margin_account_info import IsolatedMarginAccountInfo +from openapi_client.models.isolated_margin_account_info_assets_inner import IsolatedMarginAccountInfoAssetsInner +from openapi_client.models.isolated_margin_account_info_assets_inner_base_asset import IsolatedMarginAccountInfoAssetsInnerBaseAsset +from openapi_client.models.isolated_margin_account_info_assets_inner_quote_asset import IsolatedMarginAccountInfoAssetsInnerQuoteAsset +from openapi_client.models.margin_oco_order import MarginOcoOrder +from openapi_client.models.margin_oco_order_order_reports_inner import MarginOcoOrderOrderReportsInner +from openapi_client.models.margin_oco_order_orders_inner import MarginOcoOrderOrdersInner +from openapi_client.models.margin_order import MarginOrder +from openapi_client.models.margin_order_detail import MarginOrderDetail +from openapi_client.models.margin_order_response_ack import MarginOrderResponseAck +from openapi_client.models.margin_order_response_full import MarginOrderResponseFull +from openapi_client.models.margin_order_response_result import MarginOrderResponseResult +from openapi_client.models.margin_trade import MarginTrade +from openapi_client.models.margin_transfer_details import MarginTransferDetails +from openapi_client.models.margin_transfer_details_rows_inner import MarginTransferDetailsRowsInner +from openapi_client.models.my_trade import MyTrade +from openapi_client.models.oco_order import OcoOrder +from openapi_client.models.oco_order_order_reports_inner import OcoOrderOrderReportsInner +from openapi_client.models.order import Order +from openapi_client.models.order_details import OrderDetails +from openapi_client.models.order_response_ack import OrderResponseAck +from openapi_client.models.order_response_full import OrderResponseFull +from openapi_client.models.order_response_full_fills_inner import OrderResponseFullFillsInner +from openapi_client.models.order_response_result import OrderResponseResult +from openapi_client.models.price_ticker import PriceTicker +from openapi_client.models.repayment_info import RepaymentInfo +from openapi_client.models.repayment_info2 import RepaymentInfo2 +from openapi_client.models.sapi_v1_account_api_restrictions_get200_response import SapiV1AccountApiRestrictionsGet200Response +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response import SapiV1AccountApiTradingStatusGet200Response +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data import SapiV1AccountApiTradingStatusGet200ResponseData +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_indicators import SapiV1AccountApiTradingStatusGet200ResponseDataIndicators +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner import SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_trigger_condition import SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition +from openapi_client.models.sapi_v1_account_info_get200_response import SapiV1AccountInfoGet200Response +from openapi_client.models.sapi_v1_account_snapshot_get200_response import SapiV1AccountSnapshotGet200Response +from openapi_client.models.sapi_v1_account_status_get200_response import SapiV1AccountStatusGet200Response +from openapi_client.models.sapi_v1_algo_futures_historical_orders_get200_response import SapiV1AlgoFuturesHistoricalOrdersGet200Response +from openapi_client.models.sapi_v1_algo_futures_historical_orders_get200_response_orders_inner import SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner +from openapi_client.models.sapi_v1_algo_futures_new_order_vp_post200_response import SapiV1AlgoFuturesNewOrderVpPost200Response +from openapi_client.models.sapi_v1_algo_futures_open_orders_get200_response import SapiV1AlgoFuturesOpenOrdersGet200Response +from openapi_client.models.sapi_v1_algo_futures_open_orders_get200_response_orders_inner import SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner +from openapi_client.models.sapi_v1_algo_futures_order_delete200_response import SapiV1AlgoFuturesOrderDelete200Response +from openapi_client.models.sapi_v1_algo_futures_sub_orders_get200_response import SapiV1AlgoFuturesSubOrdersGet200Response +from openapi_client.models.sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner import SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner +from openapi_client.models.sapi_v1_algo_spot_historical_orders_get200_response import SapiV1AlgoSpotHistoricalOrdersGet200Response +from openapi_client.models.sapi_v1_algo_spot_historical_orders_get200_response_orders_inner import SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner +from openapi_client.models.sapi_v1_algo_spot_new_order_twap_post200_response import SapiV1AlgoSpotNewOrderTwapPost200Response +from openapi_client.models.sapi_v1_algo_spot_open_orders_get200_response import SapiV1AlgoSpotOpenOrdersGet200Response +from openapi_client.models.sapi_v1_algo_spot_open_orders_get200_response_orders_inner import SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner +from openapi_client.models.sapi_v1_algo_spot_order_delete200_response import SapiV1AlgoSpotOrderDelete200Response +from openapi_client.models.sapi_v1_algo_spot_sub_orders_get200_response import SapiV1AlgoSpotSubOrdersGet200Response +from openapi_client.models.sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner import SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner +from openapi_client.models.sapi_v1_asset_asset_detail_get200_response import SapiV1AssetAssetDetailGet200Response +from openapi_client.models.sapi_v1_asset_asset_detail_get200_response_ctr import SapiV1AssetAssetDetailGet200ResponseCTR +from openapi_client.models.sapi_v1_asset_asset_dividend_get200_response import SapiV1AssetAssetDividendGet200Response +from openapi_client.models.sapi_v1_asset_asset_dividend_get200_response_rows_inner import SapiV1AssetAssetDividendGet200ResponseRowsInner +from openapi_client.models.sapi_v1_asset_convert_transfer_post200_response import SapiV1AssetConvertTransferPost200Response +from openapi_client.models.sapi_v1_asset_convert_transfer_query_by_page_get200_response import SapiV1AssetConvertTransferQueryByPageGet200Response +from openapi_client.models.sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner import SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner +from openapi_client.models.sapi_v1_asset_custody_transfer_history_get200_response import SapiV1AssetCustodyTransferHistoryGet200Response +from openapi_client.models.sapi_v1_asset_custody_transfer_history_get200_response_rows_inner import SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_asset_dribblet_get200_response import SapiV1AssetDribbletGet200Response +from openapi_client.models.sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner import SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner +from openapi_client.models.sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner import SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner +from openapi_client.models.sapi_v1_asset_dust_btc_post200_response import SapiV1AssetDustBtcPost200Response +from openapi_client.models.sapi_v1_asset_dust_btc_post200_response_details_inner import SapiV1AssetDustBtcPost200ResponseDetailsInner +from openapi_client.models.sapi_v1_asset_dust_post200_response import SapiV1AssetDustPost200Response +from openapi_client.models.sapi_v1_asset_dust_post200_response_transfer_result_inner import SapiV1AssetDustPost200ResponseTransferResultInner +from openapi_client.models.sapi_v1_asset_get_funding_asset_post200_response_inner import SapiV1AssetGetFundingAssetPost200ResponseInner +from openapi_client.models.sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response import SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response +from openapi_client.models.sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner import SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner +from openapi_client.models.sapi_v1_asset_trade_fee_get200_response_inner import SapiV1AssetTradeFeeGet200ResponseInner +from openapi_client.models.sapi_v1_asset_transfer_get200_response import SapiV1AssetTransferGet200Response +from openapi_client.models.sapi_v1_asset_transfer_get200_response_rows_inner import SapiV1AssetTransferGet200ResponseRowsInner +from openapi_client.models.sapi_v1_asset_transfer_post200_response import SapiV1AssetTransferPost200Response +from openapi_client.models.sapi_v1_asset_wallet_balance_get200_response_inner import SapiV1AssetWalletBalanceGet200ResponseInner +from openapi_client.models.sapi_v1_blvt_redeem_post200_response import SapiV1BlvtRedeemPost200Response +from openapi_client.models.sapi_v1_blvt_redeem_record_get200_response_inner import SapiV1BlvtRedeemRecordGet200ResponseInner +from openapi_client.models.sapi_v1_blvt_subscribe_post200_response import SapiV1BlvtSubscribePost200Response +from openapi_client.models.sapi_v1_blvt_subscribe_record_get200_response import SapiV1BlvtSubscribeRecordGet200Response +from openapi_client.models.sapi_v1_blvt_token_info_get200_response_inner import SapiV1BlvtTokenInfoGet200ResponseInner +from openapi_client.models.sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner import SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner +from openapi_client.models.sapi_v1_blvt_user_limit_get200_response_inner import SapiV1BlvtUserLimitGet200ResponseInner +from openapi_client.models.sapi_v1_c2c_order_match_list_user_order_history_get200_response import SapiV1C2cOrderMatchListUserOrderHistoryGet200Response +from openapi_client.models.sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner import SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner +from openapi_client.models.sapi_v1_capital_config_getall_get200_response_inner import SapiV1CapitalConfigGetallGet200ResponseInner +from openapi_client.models.sapi_v1_capital_config_getall_get200_response_inner_network_list_inner import SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner +from openapi_client.models.sapi_v1_capital_contract_convertible_coins_get200_response import SapiV1CapitalContractConvertibleCoinsGet200Response +from openapi_client.models.sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates import SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates +from openapi_client.models.sapi_v1_capital_deposit_address_get200_response import SapiV1CapitalDepositAddressGet200Response +from openapi_client.models.sapi_v1_capital_deposit_address_list_get200_response_inner import SapiV1CapitalDepositAddressListGet200ResponseInner +from openapi_client.models.sapi_v1_capital_deposit_credit_apply_post200_response import SapiV1CapitalDepositCreditApplyPost200Response +from openapi_client.models.sapi_v1_capital_deposit_hisrec_get200_response_inner import SapiV1CapitalDepositHisrecGet200ResponseInner +from openapi_client.models.sapi_v1_capital_deposit_sub_address_get200_response import SapiV1CapitalDepositSubAddressGet200Response +from openapi_client.models.sapi_v1_capital_deposit_sub_hisrec_get200_response_inner import SapiV1CapitalDepositSubHisrecGet200ResponseInner +from openapi_client.models.sapi_v1_capital_withdraw_address_list_get200_response_inner import SapiV1CapitalWithdrawAddressListGet200ResponseInner +from openapi_client.models.sapi_v1_capital_withdraw_apply_post200_response import SapiV1CapitalWithdrawApplyPost200Response +from openapi_client.models.sapi_v1_capital_withdraw_history_get200_response_inner import SapiV1CapitalWithdrawHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_convert_accept_quote_post200_response import SapiV1ConvertAcceptQuotePost200Response +from openapi_client.models.sapi_v1_convert_asset_info_get200_response_inner import SapiV1ConvertAssetInfoGet200ResponseInner +from openapi_client.models.sapi_v1_convert_exchange_info_get200_response_inner import SapiV1ConvertExchangeInfoGet200ResponseInner +from openapi_client.models.sapi_v1_convert_get_quote_post200_response import SapiV1ConvertGetQuotePost200Response +from openapi_client.models.sapi_v1_convert_limit_cancel_order_post200_response import SapiV1ConvertLimitCancelOrderPost200Response +from openapi_client.models.sapi_v1_convert_limit_place_order_post200_response import SapiV1ConvertLimitPlaceOrderPost200Response +from openapi_client.models.sapi_v1_convert_limit_query_open_orders_get200_response import SapiV1ConvertLimitQueryOpenOrdersGet200Response +from openapi_client.models.sapi_v1_convert_limit_query_open_orders_get200_response_list_inner import SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner +from openapi_client.models.sapi_v1_convert_order_status_get200_response import SapiV1ConvertOrderStatusGet200Response +from openapi_client.models.sapi_v1_convert_trade_flow_get200_response import SapiV1ConvertTradeFlowGet200Response +from openapi_client.models.sapi_v1_convert_trade_flow_get200_response_list_inner import SapiV1ConvertTradeFlowGet200ResponseListInner +from openapi_client.models.sapi_v1_dci_product_accounts_get200_response import SapiV1DciProductAccountsGet200Response +from openapi_client.models.sapi_v1_dci_product_auto_compound_edit_status_post200_response import SapiV1DciProductAutoCompoundEditStatusPost200Response +from openapi_client.models.sapi_v1_dci_product_list_get200_response import SapiV1DciProductListGet200Response +from openapi_client.models.sapi_v1_dci_product_list_get200_response_list_inner import SapiV1DciProductListGet200ResponseListInner +from openapi_client.models.sapi_v1_dci_product_positions_get200_response import SapiV1DciProductPositionsGet200Response +from openapi_client.models.sapi_v1_dci_product_positions_get200_response_list_inner import SapiV1DciProductPositionsGet200ResponseListInner +from openapi_client.models.sapi_v1_dci_product_subscribe_post200_response import SapiV1DciProductSubscribePost200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_rate_history_get200_response import SapiV1EthStakingEthHistoryRateHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_eth_staking_eth_history_redemption_history_get200_response import SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_eth_staking_eth_history_rewards_history_get200_response import SapiV1EthStakingEthHistoryRewardsHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_eth_staking_eth_history_staking_history_get200_response import SapiV1EthStakingEthHistoryStakingHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response import SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_eth_staking_eth_quota_get200_response import SapiV1EthStakingEthQuotaGet200Response +from openapi_client.models.sapi_v1_eth_staking_eth_redeem_post200_response import SapiV1EthStakingEthRedeemPost200Response +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response import SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner import SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response import SapiV1EthStakingWbethHistoryWrapHistoryGet200Response +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner import SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_eth_staking_wbeth_wrap_post200_response import SapiV1EthStakingWbethWrapPost200Response +from openapi_client.models.sapi_v1_fiat_orders_get200_response import SapiV1FiatOrdersGet200Response +from openapi_client.models.sapi_v1_fiat_orders_get200_response_data_inner import SapiV1FiatOrdersGet200ResponseDataInner +from openapi_client.models.sapi_v1_fiat_payments_get200_response import SapiV1FiatPaymentsGet200Response +from openapi_client.models.sapi_v1_fiat_payments_get200_response_data_inner import SapiV1FiatPaymentsGet200ResponseDataInner +from openapi_client.models.sapi_v1_futures_hist_data_link_get200_response import SapiV1FuturesHistDataLinkGet200Response +from openapi_client.models.sapi_v1_futures_hist_data_link_get200_response_data_inner import SapiV1FuturesHistDataLinkGet200ResponseDataInner +from openapi_client.models.sapi_v1_futures_transfer_get200_response import SapiV1FuturesTransferGet200Response +from openapi_client.models.sapi_v1_futures_transfer_get200_response_rows_inner import SapiV1FuturesTransferGet200ResponseRowsInner +from openapi_client.models.sapi_v1_giftcard_buy_code_token_limit_get200_response import SapiV1GiftcardBuyCodeTokenLimitGet200Response +from openapi_client.models.sapi_v1_giftcard_buy_code_token_limit_get200_response_data import SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData +from openapi_client.models.sapi_v1_giftcard_create_code_post200_response import SapiV1GiftcardCreateCodePost200Response +from openapi_client.models.sapi_v1_giftcard_create_code_post200_response_data import SapiV1GiftcardCreateCodePost200ResponseData +from openapi_client.models.sapi_v1_giftcard_cryptography_rsa_public_key_get200_response import SapiV1GiftcardCryptographyRsaPublicKeyGet200Response +from openapi_client.models.sapi_v1_giftcard_redeem_code_post200_response import SapiV1GiftcardRedeemCodePost200Response +from openapi_client.models.sapi_v1_giftcard_redeem_code_post200_response_data import SapiV1GiftcardRedeemCodePost200ResponseData +from openapi_client.models.sapi_v1_giftcard_verify_get200_response import SapiV1GiftcardVerifyGet200Response +from openapi_client.models.sapi_v1_giftcard_verify_get200_response_data import SapiV1GiftcardVerifyGet200ResponseData +from openapi_client.models.sapi_v1_lending_auto_invest_all_asset_get200_response import SapiV1LendingAutoInvestAllAssetGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_history_list_get200_response_inner import SapiV1LendingAutoInvestHistoryListGet200ResponseInner +from openapi_client.models.sapi_v1_lending_auto_invest_index_info_get200_response import SapiV1LendingAutoInvestIndexInfoGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner import SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response import SapiV1LendingAutoInvestIndexUserSummaryGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner import SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner import SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_post200_response import SapiV1LendingAutoInvestOneOffPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner import SapiV1LendingAutoInvestOneOffPostDetailsParameterInner +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_status_get200_response import SapiV1LendingAutoInvestOneOffStatusGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_add_post200_response import SapiV1LendingAutoInvestPlanAddPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner import SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner +from openapi_client.models.sapi_v1_lending_auto_invest_plan_edit_status_post200_response import SapiV1LendingAutoInvestPlanEditStatusPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response import SapiV1LendingAutoInvestPlanIdGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner import SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner import SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner +from openapi_client.models.sapi_v1_lending_auto_invest_plan_list_get200_response import SapiV1LendingAutoInvestPlanListGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner import SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner +from openapi_client.models.sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner import SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner import SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner +from openapi_client.models.sapi_v1_lending_auto_invest_redeem_history_get200_response_inner import SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_lending_auto_invest_redeem_post200_response import SapiV1LendingAutoInvestRedeemPost200Response +from openapi_client.models.sapi_v1_lending_auto_invest_source_asset_list_get200_response import SapiV1LendingAutoInvestSourceAssetListGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner import SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response import SapiV1LendingAutoInvestTargetAssetListGet200Response +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner import SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner import SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner import SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner +from openapi_client.models.sapi_v1_lending_customized_fixed_purchase_post200_response import SapiV1LendingCustomizedFixedPurchasePost200Response +from openapi_client.models.sapi_v1_lending_position_changed_post200_response import SapiV1LendingPositionChangedPost200Response +from openapi_client.models.sapi_v1_lending_project_list_get200_response_inner import SapiV1LendingProjectListGet200ResponseInner +from openapi_client.models.sapi_v1_lending_project_position_list_get200_response_inner import SapiV1LendingProjectPositionListGet200ResponseInner +from openapi_client.models.sapi_v1_loan_adjust_ltv_post200_response import SapiV1LoanAdjustLtvPost200Response +from openapi_client.models.sapi_v1_loan_borrow_history_get200_response import SapiV1LoanBorrowHistoryGet200Response +from openapi_client.models.sapi_v1_loan_borrow_history_get200_response_rows_inner import SapiV1LoanBorrowHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_borrow_post200_response import SapiV1LoanBorrowPost200Response +from openapi_client.models.sapi_v1_loan_collateral_data_get200_response import SapiV1LoanCollateralDataGet200Response +from openapi_client.models.sapi_v1_loan_collateral_data_get200_response_rows_inner import SapiV1LoanCollateralDataGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_customize_margin_call_post200_response import SapiV1LoanCustomizeMarginCallPost200Response +from openapi_client.models.sapi_v1_loan_customize_margin_call_post200_response_rows_inner import SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_income_get200_response_inner import SapiV1LoanIncomeGet200ResponseInner +from openapi_client.models.sapi_v1_loan_loanable_data_get200_response import SapiV1LoanLoanableDataGet200Response +from openapi_client.models.sapi_v1_loan_loanable_data_get200_response_rows_inner import SapiV1LoanLoanableDataGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_ltv_adjustment_history_get200_response import SapiV1LoanLtvAdjustmentHistoryGet200Response +from openapi_client.models.sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner import SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_ongoing_orders_get200_response import SapiV1LoanOngoingOrdersGet200Response +from openapi_client.models.sapi_v1_loan_ongoing_orders_get200_response_rows_inner import SapiV1LoanOngoingOrdersGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_repay_collateral_rate_get200_response import SapiV1LoanRepayCollateralRateGet200Response +from openapi_client.models.sapi_v1_loan_repay_history_get200_response import SapiV1LoanRepayHistoryGet200Response +from openapi_client.models.sapi_v1_loan_repay_history_get200_response_rows_inner import SapiV1LoanRepayHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_repay_post200_response import SapiV1LoanRepayPost200Response +from openapi_client.models.sapi_v1_loan_vip_borrow_post200_response import SapiV1LoanVipBorrowPost200Response +from openapi_client.models.sapi_v1_loan_vip_collateral_account_get200_response import SapiV1LoanVipCollateralAccountGet200Response +from openapi_client.models.sapi_v1_loan_vip_collateral_account_get200_response_rows_inner import SapiV1LoanVipCollateralAccountGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_vip_collateral_data_get200_response import SapiV1LoanVipCollateralDataGet200Response +from openapi_client.models.sapi_v1_loan_vip_collateral_data_get200_response_rows_inner import SapiV1LoanVipCollateralDataGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_vip_loanable_data_get200_response import SapiV1LoanVipLoanableDataGet200Response +from openapi_client.models.sapi_v1_loan_vip_loanable_data_get200_response_rows_inner import SapiV1LoanVipLoanableDataGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_vip_ongoing_orders_get200_response import SapiV1LoanVipOngoingOrdersGet200Response +from openapi_client.models.sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner import SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_vip_renew_post200_response import SapiV1LoanVipRenewPost200Response +from openapi_client.models.sapi_v1_loan_vip_repay_history_get200_response import SapiV1LoanVipRepayHistoryGet200Response +from openapi_client.models.sapi_v1_loan_vip_repay_history_get200_response_rows_inner import SapiV1LoanVipRepayHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_vip_repay_post200_response import SapiV1LoanVipRepayPost200Response +from openapi_client.models.sapi_v1_loan_vip_request_data_get200_response import SapiV1LoanVipRequestDataGet200Response +from openapi_client.models.sapi_v1_loan_vip_request_data_get200_response_rows_inner import SapiV1LoanVipRequestDataGet200ResponseRowsInner +from openapi_client.models.sapi_v1_loan_vip_request_interest_rate_get200_response_inner import SapiV1LoanVipRequestInterestRateGet200ResponseInner +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response import SapiV1ManagedSubaccountAccountSnapshotGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner +from openapi_client.models.sapi_v1_managed_subaccount_asset_get200_response_inner import SapiV1ManagedSubaccountAssetGet200ResponseInner +from openapi_client.models.sapi_v1_managed_subaccount_deposit_address_get200_response import SapiV1ManagedSubaccountDepositAddressGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_deposit_post200_response import SapiV1ManagedSubaccountDepositPost200Response +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response import SapiV1ManagedSubaccountFetchFutureAssetGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner +from openapi_client.models.sapi_v1_managed_subaccount_info_get200_response import SapiV1ManagedSubaccountInfoGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner import SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner +from openapi_client.models.sapi_v1_managed_subaccount_margin_asset_get200_response import SapiV1ManagedSubaccountMarginAssetGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner import SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response import SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner import SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_get200_response import SapiV1ManagedSubaccountQueryTransLogGet200Response +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner import SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner +from openapi_client.models.sapi_v1_margin_account_get200_response import SapiV1MarginAccountGet200Response +from openapi_client.models.sapi_v1_margin_account_get200_response_user_assets_inner import SapiV1MarginAccountGet200ResponseUserAssetsInner +from openapi_client.models.sapi_v1_margin_all_assets_get200_response_inner import SapiV1MarginAllAssetsGet200ResponseInner +from openapi_client.models.sapi_v1_margin_all_pairs_get200_response_inner import SapiV1MarginAllPairsGet200ResponseInner +from openapi_client.models.sapi_v1_margin_available_inventory_get200_response import SapiV1MarginAvailableInventoryGet200Response +from openapi_client.models.sapi_v1_margin_available_inventory_get200_response_assets import SapiV1MarginAvailableInventoryGet200ResponseAssets +from openapi_client.models.sapi_v1_margin_borrow_repay_get200_response import SapiV1MarginBorrowRepayGet200Response +from openapi_client.models.sapi_v1_margin_borrow_repay_get200_response_rows_inner import SapiV1MarginBorrowRepayGet200ResponseRowsInner +from openapi_client.models.sapi_v1_margin_borrow_repay_post200_response import SapiV1MarginBorrowRepayPost200Response +from openapi_client.models.sapi_v1_margin_capital_flow_get200_response_inner import SapiV1MarginCapitalFlowGet200ResponseInner +from openapi_client.models.sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner import SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner +from openapi_client.models.sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner import SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner +from openapi_client.models.sapi_v1_margin_cross_margin_data_get200_response_inner import SapiV1MarginCrossMarginDataGet200ResponseInner +from openapi_client.models.sapi_v1_margin_delist_schedule_get200_response_inner import SapiV1MarginDelistScheduleGet200ResponseInner +from openapi_client.models.sapi_v1_margin_exchange_small_liability_get200_response_inner import SapiV1MarginExchangeSmallLiabilityGet200ResponseInner +from openapi_client.models.sapi_v1_margin_exchange_small_liability_history_get200_response import SapiV1MarginExchangeSmallLiabilityHistoryGet200Response +from openapi_client.models.sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner import SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_margin_force_liquidation_rec_get200_response import SapiV1MarginForceLiquidationRecGet200Response +from openapi_client.models.sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner import SapiV1MarginForceLiquidationRecGet200ResponseRowsInner +from openapi_client.models.sapi_v1_margin_interest_history_get200_response import SapiV1MarginInterestHistoryGet200Response +from openapi_client.models.sapi_v1_margin_interest_history_get200_response_rows_inner import SapiV1MarginInterestHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_margin_interest_rate_history_get200_response_inner import SapiV1MarginInterestRateHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_margin_isolated_account_limit_get200_response import SapiV1MarginIsolatedAccountLimitGet200Response +from openapi_client.models.sapi_v1_margin_isolated_account_post200_response import SapiV1MarginIsolatedAccountPost200Response +from openapi_client.models.sapi_v1_margin_isolated_all_pairs_get200_response_inner import SapiV1MarginIsolatedAllPairsGet200ResponseInner +from openapi_client.models.sapi_v1_margin_isolated_margin_data_get200_response_inner import SapiV1MarginIsolatedMarginDataGet200ResponseInner +from openapi_client.models.sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner import SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner +from openapi_client.models.sapi_v1_margin_isolated_margin_tier_get200_response_inner import SapiV1MarginIsolatedMarginTierGet200ResponseInner +from openapi_client.models.sapi_v1_margin_leverage_bracket_get200_response_inner import SapiV1MarginLeverageBracketGet200ResponseInner +from openapi_client.models.sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner import SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner +from openapi_client.models.sapi_v1_margin_max_borrowable_get200_response import SapiV1MarginMaxBorrowableGet200Response +from openapi_client.models.sapi_v1_margin_max_leverage_post200_response import SapiV1MarginMaxLeveragePost200Response +from openapi_client.models.sapi_v1_margin_max_transferable_get200_response import SapiV1MarginMaxTransferableGet200Response +from openapi_client.models.sapi_v1_margin_next_hourly_interest_rate_get200_response_inner import SapiV1MarginNextHourlyInterestRateGet200ResponseInner +from openapi_client.models.sapi_v1_margin_open_order_list_get200_response_inner import SapiV1MarginOpenOrderListGet200ResponseInner +from openapi_client.models.sapi_v1_margin_open_orders_delete200_response_inner import SapiV1MarginOpenOrdersDelete200ResponseInner +from openapi_client.models.sapi_v1_margin_order_list_get200_response import SapiV1MarginOrderListGet200Response +from openapi_client.models.sapi_v1_margin_order_oco_post200_response import SapiV1MarginOrderOcoPost200Response +from openapi_client.models.sapi_v1_margin_order_oco_post200_response_order_reports_inner import SapiV1MarginOrderOcoPost200ResponseOrderReportsInner +from openapi_client.models.sapi_v1_margin_order_oco_post200_response_orders_inner import SapiV1MarginOrderOcoPost200ResponseOrdersInner +from openapi_client.models.sapi_v1_margin_order_post200_response import SapiV1MarginOrderPost200Response +from openapi_client.models.sapi_v1_margin_price_index_get200_response import SapiV1MarginPriceIndexGet200Response +from openapi_client.models.sapi_v1_margin_rate_limit_order_get200_response_inner import SapiV1MarginRateLimitOrderGet200ResponseInner +from openapi_client.models.sapi_v1_margin_trade_coeff_get200_response import SapiV1MarginTradeCoeffGet200Response +from openapi_client.models.sapi_v1_margin_transfer_get200_response import SapiV1MarginTransferGet200Response +from openapi_client.models.sapi_v1_margin_transfer_get200_response_rows_inner import SapiV1MarginTransferGet200ResponseRowsInner +from openapi_client.models.sapi_v1_mining_hash_transfer_config_cancel_post200_response import SapiV1MiningHashTransferConfigCancelPost200Response +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response import SapiV1MiningHashTransferConfigDetailsListGet200Response +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response_data import SapiV1MiningHashTransferConfigDetailsListGet200ResponseData +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner import SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner +from openapi_client.models.sapi_v1_mining_hash_transfer_config_post200_response import SapiV1MiningHashTransferConfigPost200Response +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response import SapiV1MiningHashTransferProfitDetailsGet200Response +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response_data import SapiV1MiningHashTransferProfitDetailsGet200ResponseData +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner import SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner +from openapi_client.models.sapi_v1_mining_payment_list_get200_response import SapiV1MiningPaymentListGet200Response +from openapi_client.models.sapi_v1_mining_payment_list_get200_response_data import SapiV1MiningPaymentListGet200ResponseData +from openapi_client.models.sapi_v1_mining_payment_list_get200_response_data_account_profits_inner import SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner +from openapi_client.models.sapi_v1_mining_payment_other_get200_response import SapiV1MiningPaymentOtherGet200Response +from openapi_client.models.sapi_v1_mining_payment_other_get200_response_data import SapiV1MiningPaymentOtherGet200ResponseData +from openapi_client.models.sapi_v1_mining_payment_other_get200_response_data_other_profits_inner import SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response import SapiV1MiningPaymentUidGet200Response +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response_data import SapiV1MiningPaymentUidGet200ResponseData +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner import SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner +from openapi_client.models.sapi_v1_mining_pub_algo_list_get200_response import SapiV1MiningPubAlgoListGet200Response +from openapi_client.models.sapi_v1_mining_pub_algo_list_get200_response_data_inner import SapiV1MiningPubAlgoListGet200ResponseDataInner +from openapi_client.models.sapi_v1_mining_pub_coin_list_get200_response import SapiV1MiningPubCoinListGet200Response +from openapi_client.models.sapi_v1_mining_pub_coin_list_get200_response_data_inner import SapiV1MiningPubCoinListGet200ResponseDataInner +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response import SapiV1MiningStatisticsUserListGet200Response +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response_data_inner import SapiV1MiningStatisticsUserListGet200ResponseDataInner +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner import SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response import SapiV1MiningStatisticsUserStatusGet200Response +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response_data import SapiV1MiningStatisticsUserStatusGet200ResponseData +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response_data_profit_today import SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response import SapiV1MiningWorkerDetailGet200Response +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response_data_inner import SapiV1MiningWorkerDetailGet200ResponseDataInner +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner import SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner +from openapi_client.models.sapi_v1_mining_worker_list_get200_response import SapiV1MiningWorkerListGet200Response +from openapi_client.models.sapi_v1_mining_worker_list_get200_response_data import SapiV1MiningWorkerListGet200ResponseData +from openapi_client.models.sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner import SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner +from openapi_client.models.sapi_v1_nft_history_deposit_get200_response import SapiV1NftHistoryDepositGet200Response +from openapi_client.models.sapi_v1_nft_history_deposit_get200_response_list_inner import SapiV1NftHistoryDepositGet200ResponseListInner +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response import SapiV1NftHistoryTransactionsGet200Response +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response_list_inner import SapiV1NftHistoryTransactionsGet200ResponseListInner +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner import SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner +from openapi_client.models.sapi_v1_nft_history_withdraw_get200_response import SapiV1NftHistoryWithdrawGet200Response +from openapi_client.models.sapi_v1_nft_history_withdraw_get200_response_list_inner import SapiV1NftHistoryWithdrawGet200ResponseListInner +from openapi_client.models.sapi_v1_nft_user_get_asset_get200_response import SapiV1NftUserGetAssetGet200Response +from openapi_client.models.sapi_v1_nft_user_get_asset_get200_response_list_inner import SapiV1NftUserGetAssetGet200ResponseListInner +from openapi_client.models.sapi_v1_pay_transactions_get200_response import SapiV1PayTransactionsGet200Response +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner import SapiV1PayTransactionsGet200ResponseDataInner +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner import SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_payer_info import SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_receiver_info import SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner import SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner +from openapi_client.models.sapi_v1_portfolio_account_get200_response import SapiV1PortfolioAccountGet200Response +from openapi_client.models.sapi_v1_portfolio_asset_index_price_get200_response_inner import SapiV1PortfolioAssetIndexPriceGet200ResponseInner +from openapi_client.models.sapi_v1_portfolio_auto_collection_post200_response import SapiV1PortfolioAutoCollectionPost200Response +from openapi_client.models.sapi_v1_portfolio_collateral_rate_get200_response_inner import SapiV1PortfolioCollateralRateGet200ResponseInner +from openapi_client.models.sapi_v1_portfolio_interest_history_get200_response_inner import SapiV1PortfolioInterestHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_portfolio_margin_asset_leverage_get200_response_inner import SapiV1PortfolioMarginAssetLeverageGet200ResponseInner +from openapi_client.models.sapi_v1_portfolio_pm_loan_get200_response import SapiV1PortfolioPmLoanGet200Response +from openapi_client.models.sapi_v1_portfolio_repay_futures_switch_get200_response import SapiV1PortfolioRepayFuturesSwitchGet200Response +from openapi_client.models.sapi_v1_portfolio_repay_post200_response import SapiV1PortfolioRepayPost200Response +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response import SapiV1RebateTaxQueryGet200Response +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response_data import SapiV1RebateTaxQueryGet200ResponseData +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response_data_data_inner import SapiV1RebateTaxQueryGet200ResponseDataDataInner +from openapi_client.models.sapi_v1_simple_earn_account_get200_response import SapiV1SimpleEarnAccountGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_collateral_record_get200_response import SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rate_history_get200_response import SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_flexible_history_redemption_record_get200_response import SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rewards_record_get200_response import SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_flexible_history_subscription_record_get200_response import SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response import SapiV1SimpleEarnFlexibleListGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response_rows_inner import SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate import SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate +from openapi_client.models.sapi_v1_simple_earn_flexible_personal_left_quota_get200_response import SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_position_get200_response import SapiV1SimpleEarnFlexiblePositionGet200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_position_get200_response_rows_inner import SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_flexible_redeem_post200_response import SapiV1SimpleEarnFlexibleRedeemPost200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_subscribe_post200_response import SapiV1SimpleEarnFlexibleSubscribePost200Response +from openapi_client.models.sapi_v1_simple_earn_flexible_subscription_preview_get200_response import SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_history_redemption_record_get200_response import SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_locked_history_rewards_record_get200_response import SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_locked_history_subscription_record_get200_response import SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response import SapiV1SimpleEarnLockedListGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner import SapiV1SimpleEarnLockedListGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail import SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota import SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota +from openapi_client.models.sapi_v1_simple_earn_locked_position_get200_response import SapiV1SimpleEarnLockedPositionGet200Response +from openapi_client.models.sapi_v1_simple_earn_locked_position_get200_response_rows_inner import SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner +from openapi_client.models.sapi_v1_simple_earn_locked_subscribe_post200_response import SapiV1SimpleEarnLockedSubscribePost200Response +from openapi_client.models.sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner import SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner +from openapi_client.models.sapi_v1_spot_delist_schedule_get200_response_inner import SapiV1SpotDelistScheduleGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_blvt_enable_post200_response import SapiV1SubAccountBlvtEnablePost200Response +from openapi_client.models.sapi_v1_sub_account_eoptions_enable_post200_response import SapiV1SubAccountEoptionsEnablePost200Response +from openapi_client.models.sapi_v1_sub_account_futures_account_get200_response import SapiV1SubAccountFuturesAccountGet200Response +from openapi_client.models.sapi_v1_sub_account_futures_account_get200_response_assets_inner import SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner +from openapi_client.models.sapi_v1_sub_account_futures_account_summary_get200_response import SapiV1SubAccountFuturesAccountSummaryGet200Response +from openapi_client.models.sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner import SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner +from openapi_client.models.sapi_v1_sub_account_futures_enable_post200_response import SapiV1SubAccountFuturesEnablePost200Response +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_get200_response import SapiV1SubAccountFuturesInternalTransferGet200Response +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner import SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_post200_response import SapiV1SubAccountFuturesInternalTransferPost200Response +from openapi_client.models.sapi_v1_sub_account_futures_position_risk_get200_response_inner import SapiV1SubAccountFuturesPositionRiskGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_futures_transfer_post200_response import SapiV1SubAccountFuturesTransferPost200Response +from openapi_client.models.sapi_v1_sub_account_list_get200_response import SapiV1SubAccountListGet200Response +from openapi_client.models.sapi_v1_sub_account_list_get200_response_sub_accounts_inner import SapiV1SubAccountListGet200ResponseSubAccountsInner +from openapi_client.models.sapi_v1_sub_account_margin_account_get200_response import SapiV1SubAccountMarginAccountGet200Response +from openapi_client.models.sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo import SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo +from openapi_client.models.sapi_v1_sub_account_margin_account_summary_get200_response import SapiV1SubAccountMarginAccountSummaryGet200Response +from openapi_client.models.sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner import SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner +from openapi_client.models.sapi_v1_sub_account_margin_enable_post200_response import SapiV1SubAccountMarginEnablePost200Response +from openapi_client.models.sapi_v1_sub_account_spot_summary_get200_response import SapiV1SubAccountSpotSummaryGet200Response +from openapi_client.models.sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner import SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner +from openapi_client.models.sapi_v1_sub_account_status_get200_response_inner import SapiV1SubAccountStatusGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response import SapiV1SubAccountSubAccountApiIpRestrictionGet200Response +from openapi_client.models.sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response import SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response +from openapi_client.models.sapi_v1_sub_account_sub_transfer_history_get200_response_inner import SapiV1SubAccountSubTransferHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_transaction_statistics_get200_response import SapiV1SubAccountTransactionStatisticsGet200Response +from openapi_client.models.sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner import SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner +from openapi_client.models.sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner import SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_universal_transfer_get200_response_inner import SapiV1SubAccountUniversalTransferGet200ResponseInner +from openapi_client.models.sapi_v1_sub_account_universal_transfer_post200_response import SapiV1SubAccountUniversalTransferPost200Response +from openapi_client.models.sapi_v1_sub_account_virtual_sub_account_post200_response import SapiV1SubAccountVirtualSubAccountPost200Response +from openapi_client.models.sapi_v1_system_status_get200_response import SapiV1SystemStatusGet200Response +from openapi_client.models.sapi_v1_user_data_stream_isolated_post200_response import SapiV1UserDataStreamIsolatedPost200Response +from openapi_client.models.sapi_v2_eth_staking_account_get200_response import SapiV2EthStakingAccountGet200Response +from openapi_client.models.sapi_v2_eth_staking_account_get200_response_holdings import SapiV2EthStakingAccountGet200ResponseHoldings +from openapi_client.models.sapi_v2_eth_staking_account_get200_response_profit import SapiV2EthStakingAccountGet200ResponseProfit +from openapi_client.models.sapi_v2_eth_staking_eth_stake_post200_response import SapiV2EthStakingEthStakePost200Response +from openapi_client.models.sapi_v2_loan_flexible_adjust_ltv_post200_response import SapiV2LoanFlexibleAdjustLtvPost200Response +from openapi_client.models.sapi_v2_loan_flexible_borrow_history_get200_response import SapiV2LoanFlexibleBorrowHistoryGet200Response +from openapi_client.models.sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner import SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v2_loan_flexible_borrow_post200_response import SapiV2LoanFlexibleBorrowPost200Response +from openapi_client.models.sapi_v2_loan_flexible_collateral_data_get200_response import SapiV2LoanFlexibleCollateralDataGet200Response +from openapi_client.models.sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner import SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner +from openapi_client.models.sapi_v2_loan_flexible_loanable_data_get200_response import SapiV2LoanFlexibleLoanableDataGet200Response +from openapi_client.models.sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner import SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner +from openapi_client.models.sapi_v2_loan_flexible_ltv_adjustment_history_get200_response import SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response +from openapi_client.models.sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner import SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v2_loan_flexible_ongoing_orders_get200_response import SapiV2LoanFlexibleOngoingOrdersGet200Response +from openapi_client.models.sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner import SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner +from openapi_client.models.sapi_v2_loan_flexible_repay_history_get200_response import SapiV2LoanFlexibleRepayHistoryGet200Response +from openapi_client.models.sapi_v2_loan_flexible_repay_history_get200_response_rows_inner import SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner +from openapi_client.models.sapi_v2_loan_flexible_repay_post200_response import SapiV2LoanFlexibleRepayPost200Response +from openapi_client.models.sapi_v2_sub_account_futures_account_get200_response import SapiV2SubAccountFuturesAccountGet200Response +from openapi_client.models.sapi_v2_sub_account_futures_account_summary_get200_response import SapiV2SubAccountFuturesAccountSummaryGet200Response +from openapi_client.models.sapi_v2_sub_account_futures_position_risk_get200_response import SapiV2SubAccountFuturesPositionRiskGet200Response +from openapi_client.models.sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response import SapiV2SubAccountSubAccountApiIpRestrictionPost200Response +from openapi_client.models.sapi_v3_asset_get_user_asset_post200_response_inner import SapiV3AssetGetUserAssetPost200ResponseInner +from openapi_client.models.sapi_v3_sub_account_assets_get200_response import SapiV3SubAccountAssetsGet200Response +from openapi_client.models.sapi_v3_sub_account_assets_get200_response_balances_inner import SapiV3SubAccountAssetsGet200ResponseBalancesInner +from openapi_client.models.sapi_v4_sub_account_assets_get200_response import SapiV4SubAccountAssetsGet200Response +from openapi_client.models.sapi_v4_sub_account_assets_get200_response_balances_inner import SapiV4SubAccountAssetsGet200ResponseBalancesInner +from openapi_client.models.snapshot_futures import SnapshotFutures +from openapi_client.models.snapshot_futures_snapshot_vos_inner import SnapshotFuturesSnapshotVosInner +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data import SnapshotFuturesSnapshotVosInnerData +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data_assets_inner import SnapshotFuturesSnapshotVosInnerDataAssetsInner +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data_position_inner import SnapshotFuturesSnapshotVosInnerDataPositionInner +from openapi_client.models.snapshot_margin import SnapshotMargin +from openapi_client.models.snapshot_margin_snapshot_vos_inner import SnapshotMarginSnapshotVosInner +from openapi_client.models.snapshot_margin_snapshot_vos_inner_data import SnapshotMarginSnapshotVosInnerData +from openapi_client.models.snapshot_margin_snapshot_vos_inner_data_user_assets_inner import SnapshotMarginSnapshotVosInnerDataUserAssetsInner +from openapi_client.models.snapshot_spot import SnapshotSpot +from openapi_client.models.snapshot_spot_snapshot_vos_inner import SnapshotSpotSnapshotVosInner +from openapi_client.models.snapshot_spot_snapshot_vos_inner_data import SnapshotSpotSnapshotVosInnerData +from openapi_client.models.snapshot_spot_snapshot_vos_inner_data_balances_inner import SnapshotSpotSnapshotVosInnerDataBalancesInner +from openapi_client.models.sub_account_coin_futures_details import SubAccountCOINFuturesDetails +from openapi_client.models.sub_account_coin_futures_details_assets_inner import SubAccountCOINFuturesDetailsAssetsInner +from openapi_client.models.sub_account_coin_futures_position_risk import SubAccountCOINFuturesPositionRisk +from openapi_client.models.sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner import SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner +from openapi_client.models.sub_account_coin_futures_summary import SubAccountCOINFuturesSummary +from openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp import SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp +from openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner import SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner +from openapi_client.models.sub_account_usdt_futures_details import SubAccountUSDTFuturesDetails +from openapi_client.models.sub_account_usdt_futures_details_future_account_resp import SubAccountUSDTFuturesDetailsFutureAccountResp +from openapi_client.models.sub_account_usdt_futures_position_risk import SubAccountUSDTFuturesPositionRisk +from openapi_client.models.sub_account_usdt_futures_summary import SubAccountUSDTFuturesSummary +from openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp import SubAccountUSDTFuturesSummaryFutureAccountSummaryResp +from openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner import SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner +from openapi_client.models.ticker import Ticker +from openapi_client.models.trade import Trade +from openapi_client.models.transaction import Transaction diff --git a/target/python/binance_openapi/openapi_client/models/account.py b/target/python/binance_openapi/openapi_client/models/account.py new file mode 100644 index 0000000..a755279 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/account.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.account_balances_inner import AccountBalancesInner +from openapi_client.models.account_commission_rates import AccountCommissionRates +from typing import Optional, Set +from typing_extensions import Self + +class Account(BaseModel): + """ + Account + """ # noqa: E501 + maker_commission: StrictInt = Field(alias="makerCommission") + taker_commission: StrictInt = Field(alias="takerCommission") + buyer_commission: StrictInt = Field(alias="buyerCommission") + seller_commission: StrictInt = Field(alias="sellerCommission") + commission_rates: AccountCommissionRates = Field(alias="commissionRates") + can_trade: StrictBool = Field(alias="canTrade") + can_withdraw: StrictBool = Field(alias="canWithdraw") + can_deposit: StrictBool = Field(alias="canDeposit") + brokered: StrictBool + require_self_trade_prevention: StrictBool = Field(alias="requireSelfTradePrevention") + prevent_sor: StrictBool = Field(alias="preventSor") + update_time: StrictInt = Field(alias="updateTime") + account_type: StrictStr = Field(alias="accountType") + balances: List[AccountBalancesInner] + permissions: List[StrictStr] + uid: StrictInt + __properties: ClassVar[List[str]] = ["makerCommission", "takerCommission", "buyerCommission", "sellerCommission", "commissionRates", "canTrade", "canWithdraw", "canDeposit", "brokered", "requireSelfTradePrevention", "preventSor", "updateTime", "accountType", "balances", "permissions", "uid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Account from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of commission_rates + if self.commission_rates: + _dict['commissionRates'] = self.commission_rates.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in balances (list) + _items = [] + if self.balances: + for _item in self.balances: + if _item: + _items.append(_item.to_dict()) + _dict['balances'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Account from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "makerCommission": obj.get("makerCommission"), + "takerCommission": obj.get("takerCommission"), + "buyerCommission": obj.get("buyerCommission"), + "sellerCommission": obj.get("sellerCommission"), + "commissionRates": AccountCommissionRates.from_dict(obj["commissionRates"]) if obj.get("commissionRates") is not None else None, + "canTrade": obj.get("canTrade"), + "canWithdraw": obj.get("canWithdraw"), + "canDeposit": obj.get("canDeposit"), + "brokered": obj.get("brokered"), + "requireSelfTradePrevention": obj.get("requireSelfTradePrevention"), + "preventSor": obj.get("preventSor"), + "updateTime": obj.get("updateTime"), + "accountType": obj.get("accountType"), + "balances": [AccountBalancesInner.from_dict(_item) for _item in obj["balances"]] if obj.get("balances") is not None else None, + "permissions": obj.get("permissions"), + "uid": obj.get("uid") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/account_balances_inner.py b/target/python/binance_openapi/openapi_client/models/account_balances_inner.py new file mode 100644 index 0000000..629d321 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/account_balances_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AccountBalancesInner(BaseModel): + """ + AccountBalancesInner + """ # noqa: E501 + asset: StrictStr + free: StrictStr + locked: StrictStr + __properties: ClassVar[List[str]] = ["asset", "free", "locked"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountBalancesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountBalancesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "free": obj.get("free"), + "locked": obj.get("locked") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/account_commission_rates.py b/target/python/binance_openapi/openapi_client/models/account_commission_rates.py new file mode 100644 index 0000000..10177f8 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/account_commission_rates.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AccountCommissionRates(BaseModel): + """ + AccountCommissionRates + """ # noqa: E501 + maker: StrictStr + taker: StrictStr + buyer: StrictStr + seller: StrictStr + __properties: ClassVar[List[str]] = ["maker", "taker", "buyer", "seller"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountCommissionRates from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountCommissionRates from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "maker": obj.get("maker"), + "taker": obj.get("taker"), + "buyer": obj.get("buyer"), + "seller": obj.get("seller") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/agg_trade.py b/target/python/binance_openapi/openapi_client/models/agg_trade.py new file mode 100644 index 0000000..6a7fd67 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/agg_trade.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AggTrade(BaseModel): + """ + AggTrade + """ # noqa: E501 + a: StrictInt = Field(description="Aggregate tradeId") + p: StrictStr = Field(description="Price") + q: StrictStr = Field(description="Quantity") + f: StrictInt = Field(description="First tradeId") + l: StrictInt = Field(description="Last tradeId") + t: StrictBool = Field(description="Timestamp", alias="T") + m: StrictBool = Field(description="Was the buyer the maker?") + m: StrictBool = Field(description="Was the trade the best price match?", alias="M") + __properties: ClassVar[List[str]] = ["a", "p", "q", "f", "l", "T", "m", "M"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AggTrade from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AggTrade from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "a": obj.get("a"), + "p": obj.get("p"), + "q": obj.get("q"), + "f": obj.get("f"), + "l": obj.get("l"), + "T": obj.get("T"), + "m": obj.get("m"), + "M": obj.get("M") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response.py new file mode 100644 index 0000000..ab38ec8 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.api_v3_account_commission_get200_response_discount import ApiV3AccountCommissionGet200ResponseDiscount +from openapi_client.models.api_v3_account_commission_get200_response_standard_commission import ApiV3AccountCommissionGet200ResponseStandardCommission +from openapi_client.models.api_v3_account_commission_get200_response_tax_commission import ApiV3AccountCommissionGet200ResponseTaxCommission +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3AccountCommissionGet200Response(BaseModel): + """ + ApiV3AccountCommissionGet200Response + """ # noqa: E501 + symbol: StrictStr + standard_commission: ApiV3AccountCommissionGet200ResponseStandardCommission = Field(alias="standardCommission") + tax_commission: ApiV3AccountCommissionGet200ResponseTaxCommission = Field(alias="taxCommission") + discount: ApiV3AccountCommissionGet200ResponseDiscount + __properties: ClassVar[List[str]] = ["symbol", "standardCommission", "taxCommission", "discount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3AccountCommissionGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of standard_commission + if self.standard_commission: + _dict['standardCommission'] = self.standard_commission.to_dict() + # override the default output from pydantic by calling `to_dict()` of tax_commission + if self.tax_commission: + _dict['taxCommission'] = self.tax_commission.to_dict() + # override the default output from pydantic by calling `to_dict()` of discount + if self.discount: + _dict['discount'] = self.discount.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3AccountCommissionGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "standardCommission": ApiV3AccountCommissionGet200ResponseStandardCommission.from_dict(obj["standardCommission"]) if obj.get("standardCommission") is not None else None, + "taxCommission": ApiV3AccountCommissionGet200ResponseTaxCommission.from_dict(obj["taxCommission"]) if obj.get("taxCommission") is not None else None, + "discount": ApiV3AccountCommissionGet200ResponseDiscount.from_dict(obj["discount"]) if obj.get("discount") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response_discount.py b/target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response_discount.py new file mode 100644 index 0000000..2576b88 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response_discount.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3AccountCommissionGet200ResponseDiscount(BaseModel): + """ + Discount commission when paying in BNB. + """ # noqa: E501 + enabled_for_account: Optional[StrictBool] = Field(default=None, alias="enabledForAccount") + enabled_for_symbol: Optional[StrictBool] = Field(default=None, alias="enabledForSymbol") + discount_asset: Optional[StrictStr] = Field(default=None, alias="discountAsset") + discount: Optional[StrictStr] = Field(default=None, description="Standard commission is reduced by this rate when paying commission in BNB.") + __properties: ClassVar[List[str]] = ["enabledForAccount", "enabledForSymbol", "discountAsset", "discount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3AccountCommissionGet200ResponseDiscount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3AccountCommissionGet200ResponseDiscount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabledForAccount": obj.get("enabledForAccount"), + "enabledForSymbol": obj.get("enabledForSymbol"), + "discountAsset": obj.get("discountAsset"), + "discount": obj.get("discount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response_standard_commission.py b/target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response_standard_commission.py new file mode 100644 index 0000000..dd11cd7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response_standard_commission.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3AccountCommissionGet200ResponseStandardCommission(BaseModel): + """ + Standard commission rates on trades from the order. + """ # noqa: E501 + maker: StrictStr + taker: StrictStr + buyer: StrictStr + seller: StrictStr + __properties: ClassVar[List[str]] = ["maker", "taker", "buyer", "seller"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3AccountCommissionGet200ResponseStandardCommission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3AccountCommissionGet200ResponseStandardCommission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "maker": obj.get("maker"), + "taker": obj.get("taker"), + "buyer": obj.get("buyer"), + "seller": obj.get("seller") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response_tax_commission.py b/target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response_tax_commission.py new file mode 100644 index 0000000..e33af42 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_account_commission_get200_response_tax_commission.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3AccountCommissionGet200ResponseTaxCommission(BaseModel): + """ + Tax commission rates for trades from the order. + """ # noqa: E501 + maker: StrictStr + taker: StrictStr + buyer: StrictStr + seller: StrictStr + __properties: ClassVar[List[str]] = ["maker", "taker", "buyer", "seller"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3AccountCommissionGet200ResponseTaxCommission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3AccountCommissionGet200ResponseTaxCommission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "maker": obj.get("maker"), + "taker": obj.get("taker"), + "buyer": obj.get("buyer"), + "seller": obj.get("seller") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_all_order_list_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_all_order_list_get200_response_inner.py new file mode 100644 index 0000000..15719e9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_all_order_list_get200_response_inner.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.api_v3_all_order_list_get200_response_inner_orders_inner import ApiV3AllOrderListGet200ResponseInnerOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3AllOrderListGet200ResponseInner(BaseModel): + """ + ApiV3AllOrderListGet200ResponseInner + """ # noqa: E501 + order_list_id: StrictInt = Field(alias="orderListId") + contingency_type: StrictStr = Field(alias="contingencyType") + list_status_type: StrictStr = Field(alias="listStatusType") + list_order_status: StrictStr = Field(alias="listOrderStatus") + list_client_order_id: StrictStr = Field(alias="listClientOrderId") + transaction_time: StrictInt = Field(alias="transactionTime") + symbol: StrictStr + is_isolated: StrictBool = Field(alias="isIsolated") + orders: List[ApiV3AllOrderListGet200ResponseInnerOrdersInner] + __properties: ClassVar[List[str]] = ["orderListId", "contingencyType", "listStatusType", "listOrderStatus", "listClientOrderId", "transactionTime", "symbol", "isIsolated", "orders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3AllOrderListGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in orders (list) + _items = [] + if self.orders: + for _item in self.orders: + if _item: + _items.append(_item.to_dict()) + _dict['orders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3AllOrderListGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderListId": obj.get("orderListId"), + "contingencyType": obj.get("contingencyType"), + "listStatusType": obj.get("listStatusType"), + "listOrderStatus": obj.get("listOrderStatus"), + "listClientOrderId": obj.get("listClientOrderId"), + "transactionTime": obj.get("transactionTime"), + "symbol": obj.get("symbol"), + "isIsolated": obj.get("isIsolated"), + "orders": [ApiV3AllOrderListGet200ResponseInnerOrdersInner.from_dict(_item) for _item in obj["orders"]] if obj.get("orders") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_all_order_list_get200_response_inner_orders_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_all_order_list_get200_response_inner_orders_inner.py new file mode 100644 index 0000000..7ae5689 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_all_order_list_get200_response_inner_orders_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3AllOrderListGet200ResponseInnerOrdersInner(BaseModel): + """ + ApiV3AllOrderListGet200ResponseInnerOrdersInner + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + client_order_id: StrictStr = Field(alias="clientOrderId") + __properties: ClassVar[List[str]] = ["symbol", "orderId", "clientOrderId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3AllOrderListGet200ResponseInnerOrdersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3AllOrderListGet200ResponseInnerOrdersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "clientOrderId": obj.get("clientOrderId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_avg_price_get200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_avg_price_get200_response.py new file mode 100644 index 0000000..9e45d48 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_avg_price_get200_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3AvgPriceGet200Response(BaseModel): + """ + ApiV3AvgPriceGet200Response + """ # noqa: E501 + mins: StrictInt = Field(description="Average price interval (in minutes)") + price: StrictStr = Field(description="Average price") + close_time: StrictInt = Field(description="Last trade time", alias="closeTime") + __properties: ClassVar[List[str]] = ["mins", "price", "closeTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3AvgPriceGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3AvgPriceGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mins": obj.get("mins"), + "price": obj.get("price"), + "closeTime": obj.get("closeTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_depth_get200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_depth_get200_response.py new file mode 100644 index 0000000..a26153a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_depth_get200_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3DepthGet200Response(BaseModel): + """ + ApiV3DepthGet200Response + """ # noqa: E501 + last_update_id: StrictInt = Field(alias="lastUpdateId") + bids: List[List[Annotated[str, Field(strict=True)]]] + asks: List[List[Annotated[str, Field(strict=True)]]] + __properties: ClassVar[List[str]] = ["lastUpdateId", "bids", "asks"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3DepthGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3DepthGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "lastUpdateId": obj.get("lastUpdateId"), + "bids": obj.get("bids"), + "asks": obj.get("asks") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response.py new file mode 100644 index 0000000..5c32b7f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.api_v3_exchange_info_get200_response_rate_limits_inner import ApiV3ExchangeInfoGet200ResponseRateLimitsInner +from openapi_client.models.api_v3_exchange_info_get200_response_symbols_inner import ApiV3ExchangeInfoGet200ResponseSymbolsInner +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3ExchangeInfoGet200Response(BaseModel): + """ + ApiV3ExchangeInfoGet200Response + """ # noqa: E501 + timezone: StrictStr + server_time: StrictInt = Field(alias="serverTime") + rate_limits: List[ApiV3ExchangeInfoGet200ResponseRateLimitsInner] = Field(alias="rateLimits") + exchange_filters: List[Dict[str, Any]] = Field(alias="exchangeFilters") + symbols: List[ApiV3ExchangeInfoGet200ResponseSymbolsInner] + __properties: ClassVar[List[str]] = ["timezone", "serverTime", "rateLimits", "exchangeFilters", "symbols"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3ExchangeInfoGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rate_limits (list) + _items = [] + if self.rate_limits: + for _item in self.rate_limits: + if _item: + _items.append(_item.to_dict()) + _dict['rateLimits'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in symbols (list) + _items = [] + if self.symbols: + for _item in self.symbols: + if _item: + _items.append(_item.to_dict()) + _dict['symbols'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3ExchangeInfoGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "timezone": obj.get("timezone"), + "serverTime": obj.get("serverTime"), + "rateLimits": [ApiV3ExchangeInfoGet200ResponseRateLimitsInner.from_dict(_item) for _item in obj["rateLimits"]] if obj.get("rateLimits") is not None else None, + "exchangeFilters": obj.get("exchangeFilters"), + "symbols": [ApiV3ExchangeInfoGet200ResponseSymbolsInner.from_dict(_item) for _item in obj["symbols"]] if obj.get("symbols") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response_rate_limits_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response_rate_limits_inner.py new file mode 100644 index 0000000..55b8943 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response_rate_limits_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3ExchangeInfoGet200ResponseRateLimitsInner(BaseModel): + """ + ApiV3ExchangeInfoGet200ResponseRateLimitsInner + """ # noqa: E501 + rate_limit_type: StrictStr = Field(alias="rateLimitType") + interval: StrictStr + interval_num: StrictInt = Field(alias="intervalNum") + limit: StrictInt + __properties: ClassVar[List[str]] = ["rateLimitType", "interval", "intervalNum", "limit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3ExchangeInfoGet200ResponseRateLimitsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3ExchangeInfoGet200ResponseRateLimitsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rateLimitType": obj.get("rateLimitType"), + "interval": obj.get("interval"), + "intervalNum": obj.get("intervalNum"), + "limit": obj.get("limit") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response_symbols_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response_symbols_inner.py new file mode 100644 index 0000000..ecd05bf --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response_symbols_inner.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.api_v3_exchange_info_get200_response_symbols_inner_filters_inner import ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3ExchangeInfoGet200ResponseSymbolsInner(BaseModel): + """ + ApiV3ExchangeInfoGet200ResponseSymbolsInner + """ # noqa: E501 + symbol: StrictStr + status: StrictStr + base_asset: StrictStr = Field(alias="baseAsset") + base_asset_precision: StrictInt = Field(alias="baseAssetPrecision") + quote_asset: StrictStr = Field(alias="quoteAsset") + quote_asset_precision: StrictInt = Field(alias="quoteAssetPrecision") + base_commission_precision: StrictInt = Field(alias="baseCommissionPrecision") + quote_commission_precision: StrictInt = Field(alias="quoteCommissionPrecision") + order_types: List[StrictStr] = Field(alias="orderTypes") + iceberg_allowed: StrictBool = Field(alias="icebergAllowed") + oco_allowed: StrictBool = Field(alias="ocoAllowed") + oto_allowed: StrictBool = Field(alias="otoAllowed") + quote_order_qty_market_allowed: StrictBool = Field(alias="quoteOrderQtyMarketAllowed") + allow_trailing_stop: StrictBool = Field(alias="allowTrailingStop") + cancel_replace_allowed: StrictBool = Field(alias="cancelReplaceAllowed") + is_spot_trading_allowed: StrictBool = Field(alias="isSpotTradingAllowed") + is_margin_trading_allowed: StrictBool = Field(alias="isMarginTradingAllowed") + filters: List[ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner] + permissions: List[StrictStr] + permission_sets: List[List[StrictStr]] = Field(alias="permissionSets") + default_self_trade_prevention_mode: StrictStr = Field(alias="defaultSelfTradePreventionMode") + allowed_self_trade_prevention_modes: List[StrictStr] = Field(alias="allowedSelfTradePreventionModes") + __properties: ClassVar[List[str]] = ["symbol", "status", "baseAsset", "baseAssetPrecision", "quoteAsset", "quoteAssetPrecision", "baseCommissionPrecision", "quoteCommissionPrecision", "orderTypes", "icebergAllowed", "ocoAllowed", "otoAllowed", "quoteOrderQtyMarketAllowed", "allowTrailingStop", "cancelReplaceAllowed", "isSpotTradingAllowed", "isMarginTradingAllowed", "filters", "permissions", "permissionSets", "defaultSelfTradePreventionMode", "allowedSelfTradePreventionModes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3ExchangeInfoGet200ResponseSymbolsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item in self.filters: + if _item: + _items.append(_item.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3ExchangeInfoGet200ResponseSymbolsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "status": obj.get("status"), + "baseAsset": obj.get("baseAsset"), + "baseAssetPrecision": obj.get("baseAssetPrecision"), + "quoteAsset": obj.get("quoteAsset"), + "quoteAssetPrecision": obj.get("quoteAssetPrecision"), + "baseCommissionPrecision": obj.get("baseCommissionPrecision"), + "quoteCommissionPrecision": obj.get("quoteCommissionPrecision"), + "orderTypes": obj.get("orderTypes"), + "icebergAllowed": obj.get("icebergAllowed"), + "ocoAllowed": obj.get("ocoAllowed"), + "otoAllowed": obj.get("otoAllowed"), + "quoteOrderQtyMarketAllowed": obj.get("quoteOrderQtyMarketAllowed"), + "allowTrailingStop": obj.get("allowTrailingStop"), + "cancelReplaceAllowed": obj.get("cancelReplaceAllowed"), + "isSpotTradingAllowed": obj.get("isSpotTradingAllowed"), + "isMarginTradingAllowed": obj.get("isMarginTradingAllowed"), + "filters": [ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "permissions": obj.get("permissions"), + "permissionSets": obj.get("permissionSets"), + "defaultSelfTradePreventionMode": obj.get("defaultSelfTradePreventionMode"), + "allowedSelfTradePreventionModes": obj.get("allowedSelfTradePreventionModes") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response_symbols_inner_filters_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response_symbols_inner_filters_inner.py new file mode 100644 index 0000000..72defc4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_exchange_info_get200_response_symbols_inner_filters_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner(BaseModel): + """ + ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner + """ # noqa: E501 + filter_type: StrictStr = Field(alias="filterType") + min_price: StrictStr = Field(alias="minPrice") + max_price: StrictStr = Field(alias="maxPrice") + tick_size: StrictStr = Field(alias="tickSize") + __properties: ClassVar[List[str]] = ["filterType", "minPrice", "maxPrice", "tickSize"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filterType": obj.get("filterType"), + "minPrice": obj.get("minPrice"), + "maxPrice": obj.get("maxPrice"), + "tickSize": obj.get("tickSize") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_klines_get200_response_inner_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_klines_get200_response_inner_inner.py new file mode 100644 index 0000000..33a1893 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_klines_get200_response_inner_inner.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +APIV3KLINESGET200RESPONSEINNERINNER_ONE_OF_SCHEMAS = ["int", "str"] + +class ApiV3KlinesGet200ResponseInnerInner(BaseModel): + """ + ApiV3KlinesGet200ResponseInnerInner + """ + # data type: int + oneof_schema_1_validator: Optional[StrictInt] = None + # data type: str + oneof_schema_2_validator: Optional[StrictStr] = None + actual_instance: Optional[Union[int, str]] = None + one_of_schemas: Set[str] = { "int", "str" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ApiV3KlinesGet200ResponseInnerInner.model_construct() + error_messages = [] + match = 0 + # validate data type: int + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: str + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ApiV3KlinesGet200ResponseInnerInner with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ApiV3KlinesGet200ResponseInnerInner with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into int + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into str + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ApiV3KlinesGet200ResponseInnerInner with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ApiV3KlinesGet200ResponseInnerInner with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_my_allocations_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_my_allocations_get200_response_inner.py new file mode 100644 index 0000000..66ca451 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_my_allocations_get200_response_inner.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3MyAllocationsGet200ResponseInner(BaseModel): + """ + ApiV3MyAllocationsGet200ResponseInner + """ # noqa: E501 + symbol: StrictStr + allocation_id: StrictInt = Field(alias="allocationId") + allocation_type: StrictStr = Field(alias="allocationType") + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(alias="orderListId") + price: StrictStr + qty: StrictStr + quote_qty: StrictStr = Field(alias="quoteQty") + commission: StrictStr + commission_asset: StrictStr = Field(alias="commissionAsset") + time: StrictInt + is_buyer: StrictBool = Field(alias="isBuyer") + is_maker: StrictBool = Field(alias="isMaker") + is_allocator: StrictBool = Field(alias="isAllocator") + __properties: ClassVar[List[str]] = ["symbol", "allocationId", "allocationType", "orderId", "orderListId", "price", "qty", "quoteQty", "commission", "commissionAsset", "time", "isBuyer", "isMaker", "isAllocator"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3MyAllocationsGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3MyAllocationsGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "allocationId": obj.get("allocationId"), + "allocationType": obj.get("allocationType"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "price": obj.get("price"), + "qty": obj.get("qty"), + "quoteQty": obj.get("quoteQty"), + "commission": obj.get("commission"), + "commissionAsset": obj.get("commissionAsset"), + "time": obj.get("time"), + "isBuyer": obj.get("isBuyer"), + "isMaker": obj.get("isMaker"), + "isAllocator": obj.get("isAllocator") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_my_prevented_matches_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_my_prevented_matches_get200_response_inner.py new file mode 100644 index 0000000..afb6550 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_my_prevented_matches_get200_response_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3MyPreventedMatchesGet200ResponseInner(BaseModel): + """ + ApiV3MyPreventedMatchesGet200ResponseInner + """ # noqa: E501 + symbol: StrictStr + prevented_match_id: StrictInt = Field(alias="preventedMatchId") + taker_order_id: StrictInt = Field(alias="takerOrderId") + maker_order_id: StrictInt = Field(alias="makerOrderId") + trade_group_id: StrictInt = Field(alias="tradeGroupId") + self_trade_prevention_mode: StrictStr = Field(alias="selfTradePreventionMode") + price: StrictStr + maker_prevented_quantity: StrictStr = Field(alias="makerPreventedQuantity") + transact_time: StrictInt = Field(alias="transactTime") + __properties: ClassVar[List[str]] = ["symbol", "preventedMatchId", "takerOrderId", "makerOrderId", "tradeGroupId", "selfTradePreventionMode", "price", "makerPreventedQuantity", "transactTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3MyPreventedMatchesGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3MyPreventedMatchesGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "preventedMatchId": obj.get("preventedMatchId"), + "takerOrderId": obj.get("takerOrderId"), + "makerOrderId": obj.get("makerOrderId"), + "tradeGroupId": obj.get("tradeGroupId"), + "selfTradePreventionMode": obj.get("selfTradePreventionMode"), + "price": obj.get("price"), + "makerPreventedQuantity": obj.get("makerPreventedQuantity"), + "transactTime": obj.get("transactTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_open_order_list_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_open_order_list_get200_response_inner.py new file mode 100644 index 0000000..a8bd8c6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_open_order_list_get200_response_inner.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.api_v3_open_order_list_get200_response_inner_orders_inner import ApiV3OpenOrderListGet200ResponseInnerOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3OpenOrderListGet200ResponseInner(BaseModel): + """ + ApiV3OpenOrderListGet200ResponseInner + """ # noqa: E501 + order_list_id: StrictInt = Field(alias="orderListId") + contingency_type: StrictStr = Field(alias="contingencyType") + list_status_type: StrictStr = Field(alias="listStatusType") + list_order_status: StrictStr = Field(alias="listOrderStatus") + list_client_order_id: StrictStr = Field(alias="listClientOrderId") + transaction_time: StrictInt = Field(alias="transactionTime") + symbol: StrictStr + orders: List[ApiV3OpenOrderListGet200ResponseInnerOrdersInner] + __properties: ClassVar[List[str]] = ["orderListId", "contingencyType", "listStatusType", "listOrderStatus", "listClientOrderId", "transactionTime", "symbol", "orders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3OpenOrderListGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in orders (list) + _items = [] + if self.orders: + for _item in self.orders: + if _item: + _items.append(_item.to_dict()) + _dict['orders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3OpenOrderListGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderListId": obj.get("orderListId"), + "contingencyType": obj.get("contingencyType"), + "listStatusType": obj.get("listStatusType"), + "listOrderStatus": obj.get("listOrderStatus"), + "listClientOrderId": obj.get("listClientOrderId"), + "transactionTime": obj.get("transactionTime"), + "symbol": obj.get("symbol"), + "orders": [ApiV3OpenOrderListGet200ResponseInnerOrdersInner.from_dict(_item) for _item in obj["orders"]] if obj.get("orders") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_open_order_list_get200_response_inner_orders_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_open_order_list_get200_response_inner_orders_inner.py new file mode 100644 index 0000000..3a067fb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_open_order_list_get200_response_inner_orders_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3OpenOrderListGet200ResponseInnerOrdersInner(BaseModel): + """ + ApiV3OpenOrderListGet200ResponseInnerOrdersInner + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + client_order_id: StrictStr = Field(alias="clientOrderId") + __properties: ClassVar[List[str]] = ["symbol", "orderId", "clientOrderId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3OpenOrderListGet200ResponseInnerOrdersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3OpenOrderListGet200ResponseInnerOrdersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "clientOrderId": obj.get("clientOrderId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_open_orders_delete200_response_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_open_orders_delete200_response_inner.py new file mode 100644 index 0000000..4cfd97e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_open_orders_delete200_response_inner.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from openapi_client.models.oco_order import OcoOrder +from openapi_client.models.order import Order +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +APIV3OPENORDERSDELETE200RESPONSEINNER_ANY_OF_SCHEMAS = ["OcoOrder", "Order"] + +class ApiV3OpenOrdersDelete200ResponseInner(BaseModel): + """ + ApiV3OpenOrdersDelete200ResponseInner + """ + + # data type: Order + anyof_schema_1_validator: Optional[Order] = None + # data type: OcoOrder + anyof_schema_2_validator: Optional[OcoOrder] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[OcoOrder, Order]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "OcoOrder", "Order" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = ApiV3OpenOrdersDelete200ResponseInner.model_construct() + error_messages = [] + # validate data type: Order + if not isinstance(v, Order): + error_messages.append(f"Error! Input type `{type(v)}` is not `Order`") + else: + return v + + # validate data type: OcoOrder + if not isinstance(v, OcoOrder): + error_messages.append(f"Error! Input type `{type(v)}` is not `OcoOrder`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in ApiV3OpenOrdersDelete200ResponseInner with anyOf schemas: OcoOrder, Order. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[Order] = None + try: + instance.actual_instance = Order.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[OcoOrder] = None + try: + instance.actual_instance = OcoOrder.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into ApiV3OpenOrdersDelete200ResponseInner with anyOf schemas: OcoOrder, Order. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], OcoOrder, Order]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_order_cancel_replace_post200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_order_cancel_replace_post200_response.py new file mode 100644 index 0000000..1ad33bd --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_order_cancel_replace_post200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.api_v3_order_cancel_replace_post200_response_cancel_response import ApiV3OrderCancelReplacePost200ResponseCancelResponse +from openapi_client.models.api_v3_order_cancel_replace_post200_response_new_order_response import ApiV3OrderCancelReplacePost200ResponseNewOrderResponse +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3OrderCancelReplacePost200Response(BaseModel): + """ + ApiV3OrderCancelReplacePost200Response + """ # noqa: E501 + cancel_result: StrictStr = Field(alias="cancelResult") + new_order_result: StrictStr = Field(alias="newOrderResult") + cancel_response: ApiV3OrderCancelReplacePost200ResponseCancelResponse = Field(alias="cancelResponse") + new_order_response: ApiV3OrderCancelReplacePost200ResponseNewOrderResponse = Field(alias="newOrderResponse") + __properties: ClassVar[List[str]] = ["cancelResult", "newOrderResult", "cancelResponse", "newOrderResponse"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3OrderCancelReplacePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of cancel_response + if self.cancel_response: + _dict['cancelResponse'] = self.cancel_response.to_dict() + # override the default output from pydantic by calling `to_dict()` of new_order_response + if self.new_order_response: + _dict['newOrderResponse'] = self.new_order_response.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3OrderCancelReplacePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cancelResult": obj.get("cancelResult"), + "newOrderResult": obj.get("newOrderResult"), + "cancelResponse": ApiV3OrderCancelReplacePost200ResponseCancelResponse.from_dict(obj["cancelResponse"]) if obj.get("cancelResponse") is not None else None, + "newOrderResponse": ApiV3OrderCancelReplacePost200ResponseNewOrderResponse.from_dict(obj["newOrderResponse"]) if obj.get("newOrderResponse") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_order_cancel_replace_post200_response_cancel_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_order_cancel_replace_post200_response_cancel_response.py new file mode 100644 index 0000000..874dca3 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_order_cancel_replace_post200_response_cancel_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3OrderCancelReplacePost200ResponseCancelResponse(BaseModel): + """ + ApiV3OrderCancelReplacePost200ResponseCancelResponse + """ # noqa: E501 + symbol: StrictStr + orig_client_order_id: StrictStr = Field(alias="origClientOrderId") + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(alias="orderListId") + client_order_id: StrictStr = Field(alias="clientOrderId") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + side: StrictStr + self_trade_prevention_mode: StrictStr = Field(alias="selfTradePreventionMode") + transact_time: Optional[StrictInt] = Field(default=None, alias="transactTime") + __properties: ClassVar[List[str]] = ["symbol", "origClientOrderId", "orderId", "orderListId", "clientOrderId", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "side", "selfTradePreventionMode", "transactTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3OrderCancelReplacePost200ResponseCancelResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3OrderCancelReplacePost200ResponseCancelResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "origClientOrderId": obj.get("origClientOrderId"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "clientOrderId": obj.get("clientOrderId"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "side": obj.get("side"), + "selfTradePreventionMode": obj.get("selfTradePreventionMode"), + "transactTime": obj.get("transactTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_order_cancel_replace_post200_response_new_order_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_order_cancel_replace_post200_response_new_order_response.py new file mode 100644 index 0000000..9fd0f22 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_order_cancel_replace_post200_response_new_order_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3OrderCancelReplacePost200ResponseNewOrderResponse(BaseModel): + """ + ApiV3OrderCancelReplacePost200ResponseNewOrderResponse + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(alias="orderListId") + client_order_id: StrictStr = Field(alias="clientOrderId") + transact_time: StrictInt = Field(alias="transactTime") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + side: StrictStr + working_time: StrictInt = Field(alias="workingTime") + fills: Annotated[List[StrictStr], Field(max_length=0)] + self_trade_prevention_mode: StrictStr = Field(alias="selfTradePreventionMode") + __properties: ClassVar[List[str]] = ["symbol", "orderId", "orderListId", "clientOrderId", "transactTime", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "side", "workingTime", "fills", "selfTradePreventionMode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3OrderCancelReplacePost200ResponseNewOrderResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3OrderCancelReplacePost200ResponseNewOrderResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "clientOrderId": obj.get("clientOrderId"), + "transactTime": obj.get("transactTime"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "side": obj.get("side"), + "workingTime": obj.get("workingTime"), + "fills": obj.get("fills"), + "selfTradePreventionMode": obj.get("selfTradePreventionMode") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_order_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_order_list_get200_response.py new file mode 100644 index 0000000..f1fc732 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_order_list_get200_response.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.api_v3_order_list_get200_response_orders_inner import ApiV3OrderListGet200ResponseOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3OrderListGet200Response(BaseModel): + """ + ApiV3OrderListGet200Response + """ # noqa: E501 + order_list_id: StrictInt = Field(alias="orderListId") + contingency_type: StrictStr = Field(alias="contingencyType") + list_status_type: StrictStr = Field(alias="listStatusType") + list_order_status: StrictStr = Field(alias="listOrderStatus") + list_client_order_id: StrictStr = Field(alias="listClientOrderId") + transaction_time: StrictInt = Field(alias="transactionTime") + symbol: StrictStr + orders: List[ApiV3OrderListGet200ResponseOrdersInner] + __properties: ClassVar[List[str]] = ["orderListId", "contingencyType", "listStatusType", "listOrderStatus", "listClientOrderId", "transactionTime", "symbol", "orders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3OrderListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in orders (list) + _items = [] + if self.orders: + for _item in self.orders: + if _item: + _items.append(_item.to_dict()) + _dict['orders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3OrderListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderListId": obj.get("orderListId"), + "contingencyType": obj.get("contingencyType"), + "listStatusType": obj.get("listStatusType"), + "listOrderStatus": obj.get("listOrderStatus"), + "listClientOrderId": obj.get("listClientOrderId"), + "transactionTime": obj.get("transactionTime"), + "symbol": obj.get("symbol"), + "orders": [ApiV3OrderListGet200ResponseOrdersInner.from_dict(_item) for _item in obj["orders"]] if obj.get("orders") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_order_list_get200_response_orders_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_order_list_get200_response_orders_inner.py new file mode 100644 index 0000000..41def0d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_order_list_get200_response_orders_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3OrderListGet200ResponseOrdersInner(BaseModel): + """ + ApiV3OrderListGet200ResponseOrdersInner + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + client_order_id: StrictStr = Field(alias="clientOrderId") + __properties: ClassVar[List[str]] = ["symbol", "orderId", "clientOrderId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3OrderListGet200ResponseOrdersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3OrderListGet200ResponseOrdersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "clientOrderId": obj.get("clientOrderId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_order_oco_post200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_order_oco_post200_response.py new file mode 100644 index 0000000..61c844d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_order_oco_post200_response.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.api_v3_order_oco_post200_response_order_reports_inner import ApiV3OrderOcoPost200ResponseOrderReportsInner +from openapi_client.models.api_v3_order_oco_post200_response_orders_inner import ApiV3OrderOcoPost200ResponseOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3OrderOcoPost200Response(BaseModel): + """ + ApiV3OrderOcoPost200Response + """ # noqa: E501 + order_list_id: StrictInt = Field(alias="orderListId") + contingency_type: StrictStr = Field(alias="contingencyType") + list_status_type: StrictStr = Field(alias="listStatusType") + list_order_status: StrictStr = Field(alias="listOrderStatus") + list_client_order_id: StrictStr = Field(alias="listClientOrderId") + transaction_time: StrictInt = Field(alias="transactionTime") + symbol: StrictStr + orders: List[ApiV3OrderOcoPost200ResponseOrdersInner] + order_reports: List[ApiV3OrderOcoPost200ResponseOrderReportsInner] = Field(alias="orderReports") + __properties: ClassVar[List[str]] = ["orderListId", "contingencyType", "listStatusType", "listOrderStatus", "listClientOrderId", "transactionTime", "symbol", "orders", "orderReports"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3OrderOcoPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in orders (list) + _items = [] + if self.orders: + for _item in self.orders: + if _item: + _items.append(_item.to_dict()) + _dict['orders'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in order_reports (list) + _items = [] + if self.order_reports: + for _item in self.order_reports: + if _item: + _items.append(_item.to_dict()) + _dict['orderReports'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3OrderOcoPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderListId": obj.get("orderListId"), + "contingencyType": obj.get("contingencyType"), + "listStatusType": obj.get("listStatusType"), + "listOrderStatus": obj.get("listOrderStatus"), + "listClientOrderId": obj.get("listClientOrderId"), + "transactionTime": obj.get("transactionTime"), + "symbol": obj.get("symbol"), + "orders": [ApiV3OrderOcoPost200ResponseOrdersInner.from_dict(_item) for _item in obj["orders"]] if obj.get("orders") is not None else None, + "orderReports": [ApiV3OrderOcoPost200ResponseOrderReportsInner.from_dict(_item) for _item in obj["orderReports"]] if obj.get("orderReports") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_order_oco_post200_response_order_reports_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_order_oco_post200_response_order_reports_inner.py new file mode 100644 index 0000000..8fbdd39 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_order_oco_post200_response_order_reports_inner.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3OrderOcoPost200ResponseOrderReportsInner(BaseModel): + """ + ApiV3OrderOcoPost200ResponseOrderReportsInner + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(alias="orderListId") + client_order_id: StrictStr = Field(alias="clientOrderId") + transact_time: StrictInt = Field(alias="transactTime") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + side: StrictStr + stop_price: StrictStr = Field(alias="stopPrice") + working_time: StrictStr = Field(alias="workingTime") + self_trade_prevention_mode: StrictStr = Field(alias="selfTradePreventionMode") + __properties: ClassVar[List[str]] = ["symbol", "orderId", "orderListId", "clientOrderId", "transactTime", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "side", "stopPrice", "workingTime", "selfTradePreventionMode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3OrderOcoPost200ResponseOrderReportsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3OrderOcoPost200ResponseOrderReportsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "clientOrderId": obj.get("clientOrderId"), + "transactTime": obj.get("transactTime"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "side": obj.get("side"), + "stopPrice": obj.get("stopPrice"), + "workingTime": obj.get("workingTime"), + "selfTradePreventionMode": obj.get("selfTradePreventionMode") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_order_oco_post200_response_orders_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_order_oco_post200_response_orders_inner.py new file mode 100644 index 0000000..9da971e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_order_oco_post200_response_orders_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3OrderOcoPost200ResponseOrdersInner(BaseModel): + """ + ApiV3OrderOcoPost200ResponseOrdersInner + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + client_order_id: StrictStr = Field(alias="clientOrderId") + __properties: ClassVar[List[str]] = ["symbol", "orderId", "clientOrderId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3OrderOcoPost200ResponseOrdersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3OrderOcoPost200ResponseOrdersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "clientOrderId": obj.get("clientOrderId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_order_post200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_order_post200_response.py new file mode 100644 index 0000000..da41964 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_order_post200_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from openapi_client.models.order_response_ack import OrderResponseAck +from openapi_client.models.order_response_full import OrderResponseFull +from openapi_client.models.order_response_result import OrderResponseResult +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +APIV3ORDERPOST200RESPONSE_ONE_OF_SCHEMAS = ["OrderResponseAck", "OrderResponseFull", "OrderResponseResult"] + +class ApiV3OrderPost200Response(BaseModel): + """ + ApiV3OrderPost200Response + """ + # data type: OrderResponseAck + oneof_schema_1_validator: Optional[OrderResponseAck] = None + # data type: OrderResponseResult + oneof_schema_2_validator: Optional[OrderResponseResult] = None + # data type: OrderResponseFull + oneof_schema_3_validator: Optional[OrderResponseFull] = None + actual_instance: Optional[Union[OrderResponseAck, OrderResponseFull, OrderResponseResult]] = None + one_of_schemas: Set[str] = { "OrderResponseAck", "OrderResponseFull", "OrderResponseResult" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ApiV3OrderPost200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: OrderResponseAck + if not isinstance(v, OrderResponseAck): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrderResponseAck`") + else: + match += 1 + # validate data type: OrderResponseResult + if not isinstance(v, OrderResponseResult): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrderResponseResult`") + else: + match += 1 + # validate data type: OrderResponseFull + if not isinstance(v, OrderResponseFull): + error_messages.append(f"Error! Input type `{type(v)}` is not `OrderResponseFull`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ApiV3OrderPost200Response with oneOf schemas: OrderResponseAck, OrderResponseFull, OrderResponseResult. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ApiV3OrderPost200Response with oneOf schemas: OrderResponseAck, OrderResponseFull, OrderResponseResult. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into OrderResponseAck + try: + instance.actual_instance = OrderResponseAck.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OrderResponseResult + try: + instance.actual_instance = OrderResponseResult.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OrderResponseFull + try: + instance.actual_instance = OrderResponseFull.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ApiV3OrderPost200Response with oneOf schemas: OrderResponseAck, OrderResponseFull, OrderResponseResult. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ApiV3OrderPost200Response with oneOf schemas: OrderResponseAck, OrderResponseFull, OrderResponseResult. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], OrderResponseAck, OrderResponseFull, OrderResponseResult]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_rate_limit_order_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_rate_limit_order_get200_response_inner.py new file mode 100644 index 0000000..cf0057e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_rate_limit_order_get200_response_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3RateLimitOrderGet200ResponseInner(BaseModel): + """ + ApiV3RateLimitOrderGet200ResponseInner + """ # noqa: E501 + rate_limit_type: StrictStr = Field(alias="rateLimitType") + interval: StrictStr + interval_num: StrictInt = Field(alias="intervalNum") + limit: StrictInt + count: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["rateLimitType", "interval", "intervalNum", "limit", "count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3RateLimitOrderGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3RateLimitOrderGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rateLimitType": obj.get("rateLimitType"), + "interval": obj.get("interval"), + "intervalNum": obj.get("intervalNum"), + "limit": obj.get("limit"), + "count": obj.get("count") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_sor_order_post200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_sor_order_post200_response.py new file mode 100644 index 0000000..eefb434 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_sor_order_post200_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.api_v3_sor_order_post200_response_fills_inner import ApiV3SorOrderPost200ResponseFillsInner +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3SorOrderPost200Response(BaseModel): + """ + ApiV3SorOrderPost200Response + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(alias="orderListId") + client_order_id: StrictStr = Field(alias="clientOrderId") + transact_time: StrictInt = Field(alias="transactTime") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + side: StrictStr + working_time: StrictInt = Field(alias="workingTime") + fills: List[ApiV3SorOrderPost200ResponseFillsInner] + working_floor: StrictStr = Field(alias="workingFloor") + self_trade_prevention_mode: StrictStr = Field(alias="selfTradePreventionMode") + used_sor: StrictBool = Field(alias="usedSor") + __properties: ClassVar[List[str]] = ["symbol", "orderId", "orderListId", "clientOrderId", "transactTime", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "side", "workingTime", "fills", "workingFloor", "selfTradePreventionMode", "usedSor"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3SorOrderPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in fills (list) + _items = [] + if self.fills: + for _item in self.fills: + if _item: + _items.append(_item.to_dict()) + _dict['fills'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3SorOrderPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "clientOrderId": obj.get("clientOrderId"), + "transactTime": obj.get("transactTime"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "side": obj.get("side"), + "workingTime": obj.get("workingTime"), + "fills": [ApiV3SorOrderPost200ResponseFillsInner.from_dict(_item) for _item in obj["fills"]] if obj.get("fills") is not None else None, + "workingFloor": obj.get("workingFloor"), + "selfTradePreventionMode": obj.get("selfTradePreventionMode"), + "usedSor": obj.get("usedSor") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_sor_order_post200_response_fills_inner.py b/target/python/binance_openapi/openapi_client/models/api_v3_sor_order_post200_response_fills_inner.py new file mode 100644 index 0000000..08b8457 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_sor_order_post200_response_fills_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3SorOrderPost200ResponseFillsInner(BaseModel): + """ + ApiV3SorOrderPost200ResponseFillsInner + """ # noqa: E501 + match_type: StrictStr = Field(alias="matchType") + price: StrictStr + qty: StrictStr + commission: StrictStr + commission_asset: StrictStr = Field(alias="commissionAsset") + trade_id: StrictInt = Field(alias="tradeId") + alloc_id: StrictInt = Field(alias="allocId") + __properties: ClassVar[List[str]] = ["matchType", "price", "qty", "commission", "commissionAsset", "tradeId", "allocId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3SorOrderPost200ResponseFillsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3SorOrderPost200ResponseFillsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "matchType": obj.get("matchType"), + "price": obj.get("price"), + "qty": obj.get("qty"), + "commission": obj.get("commission"), + "commissionAsset": obj.get("commissionAsset"), + "tradeId": obj.get("tradeId"), + "allocId": obj.get("allocId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_ticker24hr_get200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_ticker24hr_get200_response.py new file mode 100644 index 0000000..d298bda --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_ticker24hr_get200_response.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from openapi_client.models.ticker import Ticker +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +APIV3TICKER24HRGET200RESPONSE_ONE_OF_SCHEMAS = ["List[Ticker]", "Ticker"] + +class ApiV3Ticker24hrGet200Response(BaseModel): + """ + ApiV3Ticker24hrGet200Response + """ + # data type: Ticker + oneof_schema_1_validator: Optional[Ticker] = None + # data type: List[Ticker] + oneof_schema_2_validator: Optional[List[Ticker]] = None + actual_instance: Optional[Union[List[Ticker], Ticker]] = None + one_of_schemas: Set[str] = { "List[Ticker]", "Ticker" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ApiV3Ticker24hrGet200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: Ticker + if not isinstance(v, Ticker): + error_messages.append(f"Error! Input type `{type(v)}` is not `Ticker`") + else: + match += 1 + # validate data type: List[Ticker] + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ApiV3Ticker24hrGet200Response with oneOf schemas: List[Ticker], Ticker. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ApiV3Ticker24hrGet200Response with oneOf schemas: List[Ticker], Ticker. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Ticker + try: + instance.actual_instance = Ticker.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[Ticker] + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ApiV3Ticker24hrGet200Response with oneOf schemas: List[Ticker], Ticker. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ApiV3Ticker24hrGet200Response with oneOf schemas: List[Ticker], Ticker. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], List[Ticker], Ticker]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_ticker_book_ticker_get200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_ticker_book_ticker_get200_response.py new file mode 100644 index 0000000..8d900c0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_ticker_book_ticker_get200_response.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from openapi_client.models.book_ticker import BookTicker +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +APIV3TICKERBOOKTICKERGET200RESPONSE_ONE_OF_SCHEMAS = ["BookTicker", "List[BookTicker]"] + +class ApiV3TickerBookTickerGet200Response(BaseModel): + """ + ApiV3TickerBookTickerGet200Response + """ + # data type: BookTicker + oneof_schema_1_validator: Optional[BookTicker] = None + # data type: List[BookTicker] + oneof_schema_2_validator: Optional[List[BookTicker]] = None + actual_instance: Optional[Union[BookTicker, List[BookTicker]]] = None + one_of_schemas: Set[str] = { "BookTicker", "List[BookTicker]" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ApiV3TickerBookTickerGet200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: BookTicker + if not isinstance(v, BookTicker): + error_messages.append(f"Error! Input type `{type(v)}` is not `BookTicker`") + else: + match += 1 + # validate data type: List[BookTicker] + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ApiV3TickerBookTickerGet200Response with oneOf schemas: BookTicker, List[BookTicker]. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ApiV3TickerBookTickerGet200Response with oneOf schemas: BookTicker, List[BookTicker]. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into BookTicker + try: + instance.actual_instance = BookTicker.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[BookTicker] + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ApiV3TickerBookTickerGet200Response with oneOf schemas: BookTicker, List[BookTicker]. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ApiV3TickerBookTickerGet200Response with oneOf schemas: BookTicker, List[BookTicker]. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], BookTicker, List[BookTicker]]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_ticker_get200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_ticker_get200_response.py new file mode 100644 index 0000000..82d8a83 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_ticker_get200_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3TickerGet200Response(BaseModel): + """ + ApiV3TickerGet200Response + """ # noqa: E501 + symbol: StrictStr + price_change: StrictStr = Field(alias="priceChange") + price_change_percent: StrictStr = Field(alias="priceChangePercent") + weighted_avg_price: StrictStr = Field(alias="weightedAvgPrice") + open_price: StrictStr = Field(alias="openPrice") + high_price: StrictStr = Field(alias="highPrice") + low_price: StrictStr = Field(alias="lowPrice") + last_price: StrictStr = Field(alias="lastPrice") + volume: StrictStr + quote_volume: StrictStr = Field(alias="quoteVolume") + open_time: StrictInt = Field(alias="openTime") + close_time: StrictInt = Field(alias="closeTime") + first_id: StrictInt = Field(alias="firstId") + last_id: StrictInt = Field(alias="lastId") + count: StrictInt + __properties: ClassVar[List[str]] = ["symbol", "priceChange", "priceChangePercent", "weightedAvgPrice", "openPrice", "highPrice", "lowPrice", "lastPrice", "volume", "quoteVolume", "openTime", "closeTime", "firstId", "lastId", "count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3TickerGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3TickerGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "priceChange": obj.get("priceChange"), + "priceChangePercent": obj.get("priceChangePercent"), + "weightedAvgPrice": obj.get("weightedAvgPrice"), + "openPrice": obj.get("openPrice"), + "highPrice": obj.get("highPrice"), + "lowPrice": obj.get("lowPrice"), + "lastPrice": obj.get("lastPrice"), + "volume": obj.get("volume"), + "quoteVolume": obj.get("quoteVolume"), + "openTime": obj.get("openTime"), + "closeTime": obj.get("closeTime"), + "firstId": obj.get("firstId"), + "lastId": obj.get("lastId"), + "count": obj.get("count") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_ticker_price_get200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_ticker_price_get200_response.py new file mode 100644 index 0000000..6790577 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_ticker_price_get200_response.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from openapi_client.models.price_ticker import PriceTicker +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +APIV3TICKERPRICEGET200RESPONSE_ONE_OF_SCHEMAS = ["List[PriceTicker]", "PriceTicker"] + +class ApiV3TickerPriceGet200Response(BaseModel): + """ + ApiV3TickerPriceGet200Response + """ + # data type: PriceTicker + oneof_schema_1_validator: Optional[PriceTicker] = None + # data type: List[PriceTicker] + oneof_schema_2_validator: Optional[List[PriceTicker]] = None + actual_instance: Optional[Union[List[PriceTicker], PriceTicker]] = None + one_of_schemas: Set[str] = { "List[PriceTicker]", "PriceTicker" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ApiV3TickerPriceGet200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: PriceTicker + if not isinstance(v, PriceTicker): + error_messages.append(f"Error! Input type `{type(v)}` is not `PriceTicker`") + else: + match += 1 + # validate data type: List[PriceTicker] + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ApiV3TickerPriceGet200Response with oneOf schemas: List[PriceTicker], PriceTicker. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ApiV3TickerPriceGet200Response with oneOf schemas: List[PriceTicker], PriceTicker. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into PriceTicker + try: + instance.actual_instance = PriceTicker.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[PriceTicker] + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ApiV3TickerPriceGet200Response with oneOf schemas: List[PriceTicker], PriceTicker. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ApiV3TickerPriceGet200Response with oneOf schemas: List[PriceTicker], PriceTicker. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], List[PriceTicker], PriceTicker]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_ticker_trading_day_get200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_ticker_trading_day_get200_response.py new file mode 100644 index 0000000..3d27ae7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_ticker_trading_day_get200_response.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from openapi_client.models.day_ticker import DayTicker +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +APIV3TICKERTRADINGDAYGET200RESPONSE_ONE_OF_SCHEMAS = ["DayTicker", "List[DayTicker]"] + +class ApiV3TickerTradingDayGet200Response(BaseModel): + """ + ApiV3TickerTradingDayGet200Response + """ + # data type: DayTicker + oneof_schema_1_validator: Optional[DayTicker] = None + # data type: List[DayTicker] + oneof_schema_2_validator: Optional[List[DayTicker]] = None + actual_instance: Optional[Union[DayTicker, List[DayTicker]]] = None + one_of_schemas: Set[str] = { "DayTicker", "List[DayTicker]" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ApiV3TickerTradingDayGet200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: DayTicker + if not isinstance(v, DayTicker): + error_messages.append(f"Error! Input type `{type(v)}` is not `DayTicker`") + else: + match += 1 + # validate data type: List[DayTicker] + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ApiV3TickerTradingDayGet200Response with oneOf schemas: DayTicker, List[DayTicker]. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ApiV3TickerTradingDayGet200Response with oneOf schemas: DayTicker, List[DayTicker]. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into DayTicker + try: + instance.actual_instance = DayTicker.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[DayTicker] + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ApiV3TickerTradingDayGet200Response with oneOf schemas: DayTicker, List[DayTicker]. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ApiV3TickerTradingDayGet200Response with oneOf schemas: DayTicker, List[DayTicker]. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], DayTicker, List[DayTicker]]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_time_get200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_time_get200_response.py new file mode 100644 index 0000000..eda03c8 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_time_get200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3TimeGet200Response(BaseModel): + """ + ApiV3TimeGet200Response + """ # noqa: E501 + server_time: StrictInt = Field(alias="serverTime") + __properties: ClassVar[List[str]] = ["serverTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3TimeGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3TimeGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "serverTime": obj.get("serverTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/api_v3_user_data_stream_post200_response.py b/target/python/binance_openapi/openapi_client/models/api_v3_user_data_stream_post200_response.py new file mode 100644 index 0000000..dff0dab --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/api_v3_user_data_stream_post200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiV3UserDataStreamPost200Response(BaseModel): + """ + ApiV3UserDataStreamPost200Response + """ # noqa: E501 + listen_key: StrictStr = Field(alias="listenKey") + __properties: ClassVar[List[str]] = ["listenKey"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiV3UserDataStreamPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiV3UserDataStreamPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "listenKey": obj.get("listenKey") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/bnb_burn_status.py b/target/python/binance_openapi/openapi_client/models/bnb_burn_status.py new file mode 100644 index 0000000..0c8f485 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/bnb_burn_status.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class BnbBurnStatus(BaseModel): + """ + BnbBurnStatus + """ # noqa: E501 + spot_bnb_burn: StrictBool = Field(alias="spotBNBBurn") + interest_bnb_burn: StrictBool = Field(alias="interestBNBBurn") + __properties: ClassVar[List[str]] = ["spotBNBBurn", "interestBNBBurn"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BnbBurnStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BnbBurnStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "spotBNBBurn": obj.get("spotBNBBurn"), + "interestBNBBurn": obj.get("interestBNBBurn") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/book_ticker.py b/target/python/binance_openapi/openapi_client/models/book_ticker.py new file mode 100644 index 0000000..a2b9491 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/book_ticker.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class BookTicker(BaseModel): + """ + BookTicker + """ # noqa: E501 + symbol: StrictStr + bid_price: StrictStr = Field(alias="bidPrice") + bid_qty: StrictStr = Field(alias="bidQty") + ask_price: StrictStr = Field(alias="askPrice") + ask_qty: StrictStr = Field(alias="askQty") + __properties: ClassVar[List[str]] = ["symbol", "bidPrice", "bidQty", "askPrice", "askQty"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BookTicker from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BookTicker from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "bidPrice": obj.get("bidPrice"), + "bidQty": obj.get("bidQty"), + "askPrice": obj.get("askPrice"), + "askQty": obj.get("askQty") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/canceled_margin_order_detail.py b/target/python/binance_openapi/openapi_client/models/canceled_margin_order_detail.py new file mode 100644 index 0000000..f71da40 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/canceled_margin_order_detail.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CanceledMarginOrderDetail(BaseModel): + """ + CanceledMarginOrderDetail + """ # noqa: E501 + symbol: StrictStr + is_isolated: StrictBool = Field(alias="isIsolated") + orig_client_order_id: StrictStr = Field(alias="origClientOrderId") + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(alias="orderListId") + client_order_id: StrictStr = Field(alias="clientOrderId") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + side: StrictStr + __properties: ClassVar[List[str]] = ["symbol", "isIsolated", "origClientOrderId", "orderId", "orderListId", "clientOrderId", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "side"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CanceledMarginOrderDetail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CanceledMarginOrderDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "isIsolated": obj.get("isIsolated"), + "origClientOrderId": obj.get("origClientOrderId"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "clientOrderId": obj.get("clientOrderId"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "side": obj.get("side") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/day_ticker.py b/target/python/binance_openapi/openapi_client/models/day_ticker.py new file mode 100644 index 0000000..f247923 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/day_ticker.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DayTicker(BaseModel): + """ + DayTicker + """ # noqa: E501 + symbol: StrictStr + price_change: StrictStr = Field(description="Absolute price change", alias="priceChange") + price_change_percent: StrictStr = Field(description="Relative price change in percent", alias="priceChangePercent") + weighted_avg_price: StrictStr = Field(description="quoteVolume / volume", alias="weightedAvgPrice") + open_price: StrictStr = Field(alias="openPrice") + high_price: StrictStr = Field(alias="highPrice") + low_price: StrictStr = Field(alias="lowPrice") + last_price: StrictStr = Field(alias="lastPrice") + volume: StrictStr = Field(description="Volume in base asset") + quote_volume: StrictStr = Field(description="Volume in quote asset", alias="quoteVolume") + open_time: StrictInt = Field(alias="openTime") + close_time: StrictInt = Field(alias="closeTime") + first_id: StrictInt = Field(description="Trade ID of the first trade in the interval", alias="firstId") + last_id: StrictInt = Field(description="Trade ID of the last trade in the interval", alias="lastId") + count: StrictInt = Field(description="Number of trades in the interval") + __properties: ClassVar[List[str]] = ["symbol", "priceChange", "priceChangePercent", "weightedAvgPrice", "openPrice", "highPrice", "lowPrice", "lastPrice", "volume", "quoteVolume", "openTime", "closeTime", "firstId", "lastId", "count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DayTicker from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DayTicker from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "priceChange": obj.get("priceChange"), + "priceChangePercent": obj.get("priceChangePercent"), + "weightedAvgPrice": obj.get("weightedAvgPrice"), + "openPrice": obj.get("openPrice"), + "highPrice": obj.get("highPrice"), + "lowPrice": obj.get("lowPrice"), + "lastPrice": obj.get("lastPrice"), + "volume": obj.get("volume"), + "quoteVolume": obj.get("quoteVolume"), + "openTime": obj.get("openTime"), + "closeTime": obj.get("closeTime"), + "firstId": obj.get("firstId"), + "lastId": obj.get("lastId"), + "count": obj.get("count") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/error.py b/target/python/binance_openapi/openapi_client/models/error.py new file mode 100644 index 0000000..b046847 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/error.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Error(BaseModel): + """ + Error + """ # noqa: E501 + code: StrictInt = Field(description="Error code") + msg: StrictStr = Field(description="Error message") + __properties: ClassVar[List[str]] = ["code", "msg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/isolated_margin_account_info.py b/target/python/binance_openapi/openapi_client/models/isolated_margin_account_info.py new file mode 100644 index 0000000..5623397 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/isolated_margin_account_info.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.isolated_margin_account_info_assets_inner import IsolatedMarginAccountInfoAssetsInner +from typing import Optional, Set +from typing_extensions import Self + +class IsolatedMarginAccountInfo(BaseModel): + """ + IsolatedMarginAccountInfo + """ # noqa: E501 + assets: List[IsolatedMarginAccountInfoAssetsInner] + total_asset_of_btc: StrictStr = Field(alias="totalAssetOfBtc") + total_liability_of_btc: StrictStr = Field(alias="totalLiabilityOfBtc") + total_net_asset_of_btc: StrictStr = Field(alias="totalNetAssetOfBtc") + __properties: ClassVar[List[str]] = ["assets", "totalAssetOfBtc", "totalLiabilityOfBtc", "totalNetAssetOfBtc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IsolatedMarginAccountInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in assets (list) + _items = [] + if self.assets: + for _item in self.assets: + if _item: + _items.append(_item.to_dict()) + _dict['assets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IsolatedMarginAccountInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assets": [IsolatedMarginAccountInfoAssetsInner.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None, + "totalAssetOfBtc": obj.get("totalAssetOfBtc"), + "totalLiabilityOfBtc": obj.get("totalLiabilityOfBtc"), + "totalNetAssetOfBtc": obj.get("totalNetAssetOfBtc") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/isolated_margin_account_info_assets_inner.py b/target/python/binance_openapi/openapi_client/models/isolated_margin_account_info_assets_inner.py new file mode 100644 index 0000000..cb7eb46 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/isolated_margin_account_info_assets_inner.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.isolated_margin_account_info_assets_inner_base_asset import IsolatedMarginAccountInfoAssetsInnerBaseAsset +from openapi_client.models.isolated_margin_account_info_assets_inner_quote_asset import IsolatedMarginAccountInfoAssetsInnerQuoteAsset +from typing import Optional, Set +from typing_extensions import Self + +class IsolatedMarginAccountInfoAssetsInner(BaseModel): + """ + IsolatedMarginAccountInfoAssetsInner + """ # noqa: E501 + base_asset: IsolatedMarginAccountInfoAssetsInnerBaseAsset = Field(alias="baseAsset") + quote_asset: IsolatedMarginAccountInfoAssetsInnerQuoteAsset = Field(alias="quoteAsset") + symbol: StrictStr + isolated_created: StrictBool = Field(alias="isolatedCreated") + enabled: StrictBool = Field(description="true-enabled, false-disabled") + margin_level: StrictStr = Field(alias="marginLevel") + margin_level_status: StrictStr = Field(description="\"EXCESSIVE\", \"NORMAL\", \"MARGIN_CALL\", \"PRE_LIQUIDATION\", \"FORCE_LIQUIDATION\"", alias="marginLevelStatus") + margin_ratio: StrictStr = Field(alias="marginRatio") + index_price: StrictStr = Field(alias="indexPrice") + liquidate_price: StrictStr = Field(alias="liquidatePrice") + liquidate_rate: StrictStr = Field(alias="liquidateRate") + trade_enabled: StrictBool = Field(alias="tradeEnabled") + __properties: ClassVar[List[str]] = ["baseAsset", "quoteAsset", "symbol", "isolatedCreated", "enabled", "marginLevel", "marginLevelStatus", "marginRatio", "indexPrice", "liquidatePrice", "liquidateRate", "tradeEnabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IsolatedMarginAccountInfoAssetsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of base_asset + if self.base_asset: + _dict['baseAsset'] = self.base_asset.to_dict() + # override the default output from pydantic by calling `to_dict()` of quote_asset + if self.quote_asset: + _dict['quoteAsset'] = self.quote_asset.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IsolatedMarginAccountInfoAssetsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "baseAsset": IsolatedMarginAccountInfoAssetsInnerBaseAsset.from_dict(obj["baseAsset"]) if obj.get("baseAsset") is not None else None, + "quoteAsset": IsolatedMarginAccountInfoAssetsInnerQuoteAsset.from_dict(obj["quoteAsset"]) if obj.get("quoteAsset") is not None else None, + "symbol": obj.get("symbol"), + "isolatedCreated": obj.get("isolatedCreated"), + "enabled": obj.get("enabled"), + "marginLevel": obj.get("marginLevel"), + "marginLevelStatus": obj.get("marginLevelStatus"), + "marginRatio": obj.get("marginRatio"), + "indexPrice": obj.get("indexPrice"), + "liquidatePrice": obj.get("liquidatePrice"), + "liquidateRate": obj.get("liquidateRate"), + "tradeEnabled": obj.get("tradeEnabled") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/isolated_margin_account_info_assets_inner_base_asset.py b/target/python/binance_openapi/openapi_client/models/isolated_margin_account_info_assets_inner_base_asset.py new file mode 100644 index 0000000..60c4a23 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/isolated_margin_account_info_assets_inner_base_asset.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class IsolatedMarginAccountInfoAssetsInnerBaseAsset(BaseModel): + """ + IsolatedMarginAccountInfoAssetsInnerBaseAsset + """ # noqa: E501 + asset: StrictStr + borrow_enabled: StrictBool = Field(alias="borrowEnabled") + borrowed: StrictStr + free: StrictStr + interest: StrictStr + locked: StrictStr + net_asset: StrictStr = Field(alias="netAsset") + net_asset_of_btc: StrictStr = Field(alias="netAssetOfBtc") + repay_enabled: StrictBool = Field(alias="repayEnabled") + total_asset: StrictStr = Field(alias="totalAsset") + __properties: ClassVar[List[str]] = ["asset", "borrowEnabled", "borrowed", "free", "interest", "locked", "netAsset", "netAssetOfBtc", "repayEnabled", "totalAsset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IsolatedMarginAccountInfoAssetsInnerBaseAsset from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IsolatedMarginAccountInfoAssetsInnerBaseAsset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "borrowEnabled": obj.get("borrowEnabled"), + "borrowed": obj.get("borrowed"), + "free": obj.get("free"), + "interest": obj.get("interest"), + "locked": obj.get("locked"), + "netAsset": obj.get("netAsset"), + "netAssetOfBtc": obj.get("netAssetOfBtc"), + "repayEnabled": obj.get("repayEnabled"), + "totalAsset": obj.get("totalAsset") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/isolated_margin_account_info_assets_inner_quote_asset.py b/target/python/binance_openapi/openapi_client/models/isolated_margin_account_info_assets_inner_quote_asset.py new file mode 100644 index 0000000..d244e2b --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/isolated_margin_account_info_assets_inner_quote_asset.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class IsolatedMarginAccountInfoAssetsInnerQuoteAsset(BaseModel): + """ + IsolatedMarginAccountInfoAssetsInnerQuoteAsset + """ # noqa: E501 + asset: StrictStr + borrow_enabled: StrictBool = Field(alias="borrowEnabled") + borrowed: StrictStr + free: StrictStr + interest: StrictStr + locked: StrictStr + net_asset: StrictStr = Field(alias="netAsset") + net_asset_of_btc: StrictStr = Field(alias="netAssetOfBtc") + repay_enabled: StrictBool = Field(alias="repayEnabled") + total_asset: StrictStr = Field(alias="totalAsset") + __properties: ClassVar[List[str]] = ["asset", "borrowEnabled", "borrowed", "free", "interest", "locked", "netAsset", "netAssetOfBtc", "repayEnabled", "totalAsset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IsolatedMarginAccountInfoAssetsInnerQuoteAsset from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IsolatedMarginAccountInfoAssetsInnerQuoteAsset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "borrowEnabled": obj.get("borrowEnabled"), + "borrowed": obj.get("borrowed"), + "free": obj.get("free"), + "interest": obj.get("interest"), + "locked": obj.get("locked"), + "netAsset": obj.get("netAsset"), + "netAssetOfBtc": obj.get("netAssetOfBtc"), + "repayEnabled": obj.get("repayEnabled"), + "totalAsset": obj.get("totalAsset") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/margin_oco_order.py b/target/python/binance_openapi/openapi_client/models/margin_oco_order.py new file mode 100644 index 0000000..301c9bb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/margin_oco_order.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.margin_oco_order_order_reports_inner import MarginOcoOrderOrderReportsInner +from openapi_client.models.margin_oco_order_orders_inner import MarginOcoOrderOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class MarginOcoOrder(BaseModel): + """ + MarginOcoOrder + """ # noqa: E501 + order_list_id: StrictInt = Field(alias="orderListId") + contingency_type: StrictStr = Field(alias="contingencyType") + list_status_type: StrictStr = Field(alias="listStatusType") + list_order_status: StrictStr = Field(alias="listOrderStatus") + list_client_order_id: StrictStr = Field(alias="listClientOrderId") + transaction_time: StrictInt = Field(alias="transactionTime") + symbol: StrictStr + is_isolated: StrictBool = Field(alias="isIsolated") + orders: List[MarginOcoOrderOrdersInner] + order_reports: List[MarginOcoOrderOrderReportsInner] = Field(alias="orderReports") + __properties: ClassVar[List[str]] = ["orderListId", "contingencyType", "listStatusType", "listOrderStatus", "listClientOrderId", "transactionTime", "symbol", "isIsolated", "orders", "orderReports"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MarginOcoOrder from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in orders (list) + _items = [] + if self.orders: + for _item in self.orders: + if _item: + _items.append(_item.to_dict()) + _dict['orders'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in order_reports (list) + _items = [] + if self.order_reports: + for _item in self.order_reports: + if _item: + _items.append(_item.to_dict()) + _dict['orderReports'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MarginOcoOrder from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderListId": obj.get("orderListId"), + "contingencyType": obj.get("contingencyType"), + "listStatusType": obj.get("listStatusType"), + "listOrderStatus": obj.get("listOrderStatus"), + "listClientOrderId": obj.get("listClientOrderId"), + "transactionTime": obj.get("transactionTime"), + "symbol": obj.get("symbol"), + "isIsolated": obj.get("isIsolated"), + "orders": [MarginOcoOrderOrdersInner.from_dict(_item) for _item in obj["orders"]] if obj.get("orders") is not None else None, + "orderReports": [MarginOcoOrderOrderReportsInner.from_dict(_item) for _item in obj["orderReports"]] if obj.get("orderReports") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/margin_oco_order_order_reports_inner.py b/target/python/binance_openapi/openapi_client/models/margin_oco_order_order_reports_inner.py new file mode 100644 index 0000000..3a5bd6c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/margin_oco_order_order_reports_inner.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MarginOcoOrderOrderReportsInner(BaseModel): + """ + MarginOcoOrderOrderReportsInner + """ # noqa: E501 + symbol: StrictStr + orig_client_order_id: StrictStr = Field(alias="origClientOrderId") + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(alias="orderListId") + client_order_id: StrictStr = Field(alias="clientOrderId") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + side: StrictStr + stop_price: StrictStr = Field(alias="stopPrice") + __properties: ClassVar[List[str]] = ["symbol", "origClientOrderId", "orderId", "orderListId", "clientOrderId", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "side", "stopPrice"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MarginOcoOrderOrderReportsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MarginOcoOrderOrderReportsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "origClientOrderId": obj.get("origClientOrderId"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "clientOrderId": obj.get("clientOrderId"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "side": obj.get("side"), + "stopPrice": obj.get("stopPrice") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/margin_oco_order_orders_inner.py b/target/python/binance_openapi/openapi_client/models/margin_oco_order_orders_inner.py new file mode 100644 index 0000000..3711b36 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/margin_oco_order_orders_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MarginOcoOrderOrdersInner(BaseModel): + """ + MarginOcoOrderOrdersInner + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + client_order_id: StrictStr = Field(alias="clientOrderId") + __properties: ClassVar[List[str]] = ["symbol", "orderId", "clientOrderId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MarginOcoOrderOrdersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MarginOcoOrderOrdersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "clientOrderId": obj.get("clientOrderId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/margin_order.py b/target/python/binance_openapi/openapi_client/models/margin_order.py new file mode 100644 index 0000000..ef67bc2 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/margin_order.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MarginOrder(BaseModel): + """ + MarginOrder + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + orig_client_order_id: StrictStr = Field(alias="origClientOrderId") + client_order_id: StrictStr = Field(alias="clientOrderId") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + side: StrictStr + __properties: ClassVar[List[str]] = ["symbol", "orderId", "origClientOrderId", "clientOrderId", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "side"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MarginOrder from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MarginOrder from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "origClientOrderId": obj.get("origClientOrderId"), + "clientOrderId": obj.get("clientOrderId"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "side": obj.get("side") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/margin_order_detail.py b/target/python/binance_openapi/openapi_client/models/margin_order_detail.py new file mode 100644 index 0000000..6bc5fc2 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/margin_order_detail.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MarginOrderDetail(BaseModel): + """ + MarginOrderDetail + """ # noqa: E501 + client_order_id: StrictStr = Field(alias="clientOrderId") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + executed_qty: StrictStr = Field(alias="executedQty") + iceberg_qty: StrictStr = Field(alias="icebergQty") + is_working: StrictBool = Field(alias="isWorking") + order_id: StrictInt = Field(alias="orderId") + orig_qty: StrictStr = Field(alias="origQty") + price: StrictStr + side: StrictStr + status: StrictStr + stop_price: StrictStr = Field(alias="stopPrice") + symbol: StrictStr + is_isolated: StrictBool = Field(alias="isIsolated") + time: StrictInt + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + update_time: StrictInt = Field(alias="updateTime") + self_trade_prevention_mode: StrictStr = Field(alias="selfTradePreventionMode") + __properties: ClassVar[List[str]] = ["clientOrderId", "cummulativeQuoteQty", "executedQty", "icebergQty", "isWorking", "orderId", "origQty", "price", "side", "status", "stopPrice", "symbol", "isIsolated", "time", "timeInForce", "type", "updateTime", "selfTradePreventionMode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MarginOrderDetail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MarginOrderDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clientOrderId": obj.get("clientOrderId"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "executedQty": obj.get("executedQty"), + "icebergQty": obj.get("icebergQty"), + "isWorking": obj.get("isWorking"), + "orderId": obj.get("orderId"), + "origQty": obj.get("origQty"), + "price": obj.get("price"), + "side": obj.get("side"), + "status": obj.get("status"), + "stopPrice": obj.get("stopPrice"), + "symbol": obj.get("symbol"), + "isIsolated": obj.get("isIsolated"), + "time": obj.get("time"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "updateTime": obj.get("updateTime"), + "selfTradePreventionMode": obj.get("selfTradePreventionMode") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/margin_order_response_ack.py b/target/python/binance_openapi/openapi_client/models/margin_order_response_ack.py new file mode 100644 index 0000000..8ccc218 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/margin_order_response_ack.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MarginOrderResponseAck(BaseModel): + """ + MarginOrderResponseAck + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + client_order_id: StrictStr = Field(alias="clientOrderId") + is_isolated: StrictBool = Field(alias="isIsolated") + transact_time: StrictInt = Field(alias="transactTime") + __properties: ClassVar[List[str]] = ["symbol", "orderId", "clientOrderId", "isIsolated", "transactTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MarginOrderResponseAck from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MarginOrderResponseAck from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "clientOrderId": obj.get("clientOrderId"), + "isIsolated": obj.get("isIsolated"), + "transactTime": obj.get("transactTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/margin_order_response_full.py b/target/python/binance_openapi/openapi_client/models/margin_order_response_full.py new file mode 100644 index 0000000..59c60f8 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/margin_order_response_full.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from openapi_client.models.order_response_full_fills_inner import OrderResponseFullFillsInner +from typing import Optional, Set +from typing_extensions import Self + +class MarginOrderResponseFull(BaseModel): + """ + MarginOrderResponseFull + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + client_order_id: StrictStr = Field(alias="clientOrderId") + transact_time: StrictInt = Field(alias="transactTime") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + side: StrictStr + margin_buy_borrow_amount: Union[StrictFloat, StrictInt] = Field(description="will not return if no margin trade happens", alias="marginBuyBorrowAmount") + margin_buy_borrow_asset: StrictStr = Field(description="will not return if no margin trade happens", alias="marginBuyBorrowAsset") + is_isolated: StrictBool = Field(alias="isIsolated") + fills: List[OrderResponseFullFillsInner] + __properties: ClassVar[List[str]] = ["symbol", "orderId", "clientOrderId", "transactTime", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "side", "marginBuyBorrowAmount", "marginBuyBorrowAsset", "isIsolated", "fills"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MarginOrderResponseFull from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in fills (list) + _items = [] + if self.fills: + for _item in self.fills: + if _item: + _items.append(_item.to_dict()) + _dict['fills'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MarginOrderResponseFull from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "clientOrderId": obj.get("clientOrderId"), + "transactTime": obj.get("transactTime"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "side": obj.get("side"), + "marginBuyBorrowAmount": obj.get("marginBuyBorrowAmount"), + "marginBuyBorrowAsset": obj.get("marginBuyBorrowAsset"), + "isIsolated": obj.get("isIsolated"), + "fills": [OrderResponseFullFillsInner.from_dict(_item) for _item in obj["fills"]] if obj.get("fills") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/margin_order_response_result.py b/target/python/binance_openapi/openapi_client/models/margin_order_response_result.py new file mode 100644 index 0000000..07d6c7b --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/margin_order_response_result.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MarginOrderResponseResult(BaseModel): + """ + MarginOrderResponseResult + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + client_order_id: StrictStr = Field(alias="clientOrderId") + transact_time: StrictInt = Field(alias="transactTime") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + is_isolated: StrictBool = Field(alias="isIsolated") + side: StrictStr + __properties: ClassVar[List[str]] = ["symbol", "orderId", "clientOrderId", "transactTime", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "isIsolated", "side"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MarginOrderResponseResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MarginOrderResponseResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "clientOrderId": obj.get("clientOrderId"), + "transactTime": obj.get("transactTime"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "isIsolated": obj.get("isIsolated"), + "side": obj.get("side") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/margin_trade.py b/target/python/binance_openapi/openapi_client/models/margin_trade.py new file mode 100644 index 0000000..4eee07b --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/margin_trade.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MarginTrade(BaseModel): + """ + MarginTrade + """ # noqa: E501 + commission: StrictStr + commission_asset: StrictStr = Field(alias="commissionAsset") + id: StrictInt + is_best_match: StrictBool = Field(alias="isBestMatch") + is_buyer: StrictBool = Field(alias="isBuyer") + is_maker: StrictBool = Field(alias="isMaker") + order_id: StrictInt = Field(alias="orderId") + price: StrictStr + qty: StrictStr + symbol: StrictStr + is_isolated: StrictBool = Field(alias="isIsolated") + time: StrictInt + __properties: ClassVar[List[str]] = ["commission", "commissionAsset", "id", "isBestMatch", "isBuyer", "isMaker", "orderId", "price", "qty", "symbol", "isIsolated", "time"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MarginTrade from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MarginTrade from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "commission": obj.get("commission"), + "commissionAsset": obj.get("commissionAsset"), + "id": obj.get("id"), + "isBestMatch": obj.get("isBestMatch"), + "isBuyer": obj.get("isBuyer"), + "isMaker": obj.get("isMaker"), + "orderId": obj.get("orderId"), + "price": obj.get("price"), + "qty": obj.get("qty"), + "symbol": obj.get("symbol"), + "isIsolated": obj.get("isIsolated"), + "time": obj.get("time") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/margin_transfer_details.py b/target/python/binance_openapi/openapi_client/models/margin_transfer_details.py new file mode 100644 index 0000000..24a538e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/margin_transfer_details.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.margin_transfer_details_rows_inner import MarginTransferDetailsRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class MarginTransferDetails(BaseModel): + """ + MarginTransferDetails + """ # noqa: E501 + rows: List[MarginTransferDetailsRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MarginTransferDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MarginTransferDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [MarginTransferDetailsRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/margin_transfer_details_rows_inner.py b/target/python/binance_openapi/openapi_client/models/margin_transfer_details_rows_inner.py new file mode 100644 index 0000000..28fe685 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/margin_transfer_details_rows_inner.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class MarginTransferDetailsRowsInner(BaseModel): + """ + MarginTransferDetailsRowsInner + """ # noqa: E501 + amount: StrictStr + asset: StrictStr + status: StrictStr + timestamp: StrictInt + tx_id: StrictInt = Field(alias="txId") + type: Optional[StrictStr] = None + trans_from: StrictStr = Field(alias="transFrom") + trans_to: StrictStr = Field(alias="transTo") + __properties: ClassVar[List[str]] = ["amount", "asset", "status", "timestamp", "txId", "type", "transFrom", "transTo"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MarginTransferDetailsRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MarginTransferDetailsRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "asset": obj.get("asset"), + "status": obj.get("status"), + "timestamp": obj.get("timestamp"), + "txId": obj.get("txId"), + "type": obj.get("type"), + "transFrom": obj.get("transFrom"), + "transTo": obj.get("transTo") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/my_trade.py b/target/python/binance_openapi/openapi_client/models/my_trade.py new file mode 100644 index 0000000..ae8a336 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/my_trade.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MyTrade(BaseModel): + """ + MyTrade + """ # noqa: E501 + symbol: StrictStr + id: StrictInt = Field(description="Trade id") + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(alias="orderListId") + price: StrictStr = Field(description="Price") + qty: StrictStr = Field(description="Amount of base asset") + quote_qty: StrictStr = Field(description="Amount of quote asset", alias="quoteQty") + commission: StrictStr + commission_asset: StrictStr = Field(alias="commissionAsset") + time: StrictInt = Field(description="Trade timestamp") + is_buyer: StrictBool = Field(alias="isBuyer") + is_maker: StrictBool = Field(alias="isMaker") + is_best_match: StrictBool = Field(alias="isBestMatch") + __properties: ClassVar[List[str]] = ["symbol", "id", "orderId", "orderListId", "price", "qty", "quoteQty", "commission", "commissionAsset", "time", "isBuyer", "isMaker", "isBestMatch"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MyTrade from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MyTrade from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "id": obj.get("id"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "price": obj.get("price"), + "qty": obj.get("qty"), + "quoteQty": obj.get("quoteQty"), + "commission": obj.get("commission"), + "commissionAsset": obj.get("commissionAsset"), + "time": obj.get("time"), + "isBuyer": obj.get("isBuyer"), + "isMaker": obj.get("isMaker"), + "isBestMatch": obj.get("isBestMatch") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/oco_order.py b/target/python/binance_openapi/openapi_client/models/oco_order.py new file mode 100644 index 0000000..a458cab --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/oco_order.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.oco_order_order_reports_inner import OcoOrderOrderReportsInner +from openapi_client.models.sapi_v1_margin_order_oco_post200_response_orders_inner import SapiV1MarginOrderOcoPost200ResponseOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class OcoOrder(BaseModel): + """ + OcoOrder + """ # noqa: E501 + order_list_id: StrictInt = Field(alias="orderListId") + contingency_type: StrictStr = Field(alias="contingencyType") + list_status_type: StrictStr = Field(alias="listStatusType") + list_order_status: StrictStr = Field(alias="listOrderStatus") + list_client_order_id: StrictStr = Field(alias="listClientOrderId") + transaction_time: StrictInt = Field(alias="transactionTime") + symbol: StrictStr + orders: List[SapiV1MarginOrderOcoPost200ResponseOrdersInner] + order_reports: List[OcoOrderOrderReportsInner] = Field(alias="orderReports") + __properties: ClassVar[List[str]] = ["orderListId", "contingencyType", "listStatusType", "listOrderStatus", "listClientOrderId", "transactionTime", "symbol", "orders", "orderReports"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OcoOrder from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in orders (list) + _items = [] + if self.orders: + for _item in self.orders: + if _item: + _items.append(_item.to_dict()) + _dict['orders'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in order_reports (list) + _items = [] + if self.order_reports: + for _item in self.order_reports: + if _item: + _items.append(_item.to_dict()) + _dict['orderReports'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OcoOrder from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderListId": obj.get("orderListId"), + "contingencyType": obj.get("contingencyType"), + "listStatusType": obj.get("listStatusType"), + "listOrderStatus": obj.get("listOrderStatus"), + "listClientOrderId": obj.get("listClientOrderId"), + "transactionTime": obj.get("transactionTime"), + "symbol": obj.get("symbol"), + "orders": [SapiV1MarginOrderOcoPost200ResponseOrdersInner.from_dict(_item) for _item in obj["orders"]] if obj.get("orders") is not None else None, + "orderReports": [OcoOrderOrderReportsInner.from_dict(_item) for _item in obj["orderReports"]] if obj.get("orderReports") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/oco_order_order_reports_inner.py b/target/python/binance_openapi/openapi_client/models/oco_order_order_reports_inner.py new file mode 100644 index 0000000..fb3f096 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/oco_order_order_reports_inner.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OcoOrderOrderReportsInner(BaseModel): + """ + OcoOrderOrderReportsInner + """ # noqa: E501 + symbol: StrictStr + orig_client_order_id: StrictStr = Field(alias="origClientOrderId") + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(alias="orderListId") + client_order_id: StrictStr = Field(alias="clientOrderId") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + side: StrictStr + stop_price: StrictStr = Field(alias="stopPrice") + self_trade_prevention_mode: StrictStr = Field(alias="selfTradePreventionMode") + transact_time: StrictInt = Field(alias="transactTime") + __properties: ClassVar[List[str]] = ["symbol", "origClientOrderId", "orderId", "orderListId", "clientOrderId", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "side", "stopPrice", "selfTradePreventionMode", "transactTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OcoOrderOrderReportsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OcoOrderOrderReportsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "origClientOrderId": obj.get("origClientOrderId"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "clientOrderId": obj.get("clientOrderId"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "side": obj.get("side"), + "stopPrice": obj.get("stopPrice"), + "selfTradePreventionMode": obj.get("selfTradePreventionMode"), + "transactTime": obj.get("transactTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/order.py b/target/python/binance_openapi/openapi_client/models/order.py new file mode 100644 index 0000000..b339004 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/order.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Order(BaseModel): + """ + Order + """ # noqa: E501 + symbol: StrictStr + orig_client_order_id: StrictStr = Field(alias="origClientOrderId") + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(description="Unless OCO, value will be -1", alias="orderListId") + client_order_id: StrictStr = Field(alias="clientOrderId") + transact_time: StrictInt = Field(alias="transactTime") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + side: StrictStr + self_trade_prevention_mode: StrictStr = Field(alias="selfTradePreventionMode") + __properties: ClassVar[List[str]] = ["symbol", "origClientOrderId", "orderId", "orderListId", "clientOrderId", "transactTime", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "side", "selfTradePreventionMode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Order from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Order from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "origClientOrderId": obj.get("origClientOrderId"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "clientOrderId": obj.get("clientOrderId"), + "transactTime": obj.get("transactTime"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "side": obj.get("side"), + "selfTradePreventionMode": obj.get("selfTradePreventionMode") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/order_details.py b/target/python/binance_openapi/openapi_client/models/order_details.py new file mode 100644 index 0000000..4f3f64e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/order_details.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OrderDetails(BaseModel): + """ + OrderDetails + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(description="Unless OCO, value will be -1", alias="orderListId") + client_order_id: StrictStr = Field(alias="clientOrderId") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + side: StrictStr + stop_price: StrictStr = Field(alias="stopPrice") + iceberg_qty: StrictStr = Field(alias="icebergQty") + time: StrictInt + update_time: StrictInt = Field(alias="updateTime") + is_working: StrictBool = Field(alias="isWorking") + working_time: StrictInt = Field(alias="workingTime") + orig_quote_order_qty: StrictStr = Field(alias="origQuoteOrderQty") + self_trade_prevention_mode: StrictStr = Field(alias="selfTradePreventionMode") + prevented_match_id: Optional[StrictInt] = Field(default=None, alias="preventedMatchId") + prevented_quantity: Optional[StrictStr] = Field(default=None, alias="preventedQuantity") + __properties: ClassVar[List[str]] = ["symbol", "orderId", "orderListId", "clientOrderId", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "side", "stopPrice", "icebergQty", "time", "updateTime", "isWorking", "workingTime", "origQuoteOrderQty", "selfTradePreventionMode", "preventedMatchId", "preventedQuantity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrderDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrderDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "clientOrderId": obj.get("clientOrderId"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "side": obj.get("side"), + "stopPrice": obj.get("stopPrice"), + "icebergQty": obj.get("icebergQty"), + "time": obj.get("time"), + "updateTime": obj.get("updateTime"), + "isWorking": obj.get("isWorking"), + "workingTime": obj.get("workingTime"), + "origQuoteOrderQty": obj.get("origQuoteOrderQty"), + "selfTradePreventionMode": obj.get("selfTradePreventionMode"), + "preventedMatchId": obj.get("preventedMatchId"), + "preventedQuantity": obj.get("preventedQuantity") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/order_response_ack.py b/target/python/binance_openapi/openapi_client/models/order_response_ack.py new file mode 100644 index 0000000..8de7374 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/order_response_ack.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OrderResponseAck(BaseModel): + """ + OrderResponseAck + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(alias="orderListId") + client_order_id: StrictStr = Field(alias="clientOrderId") + transact_time: StrictInt = Field(alias="transactTime") + __properties: ClassVar[List[str]] = ["symbol", "orderId", "orderListId", "clientOrderId", "transactTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrderResponseAck from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrderResponseAck from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "clientOrderId": obj.get("clientOrderId"), + "transactTime": obj.get("transactTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/order_response_full.py b/target/python/binance_openapi/openapi_client/models/order_response_full.py new file mode 100644 index 0000000..f8ef206 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/order_response_full.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from openapi_client.models.order_response_full_fills_inner import OrderResponseFullFillsInner +from typing import Optional, Set +from typing_extensions import Self + +class OrderResponseFull(BaseModel): + """ + OrderResponseFull + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(alias="orderListId") + client_order_id: StrictStr = Field(alias="clientOrderId") + transact_time: StrictInt = Field(alias="transactTime") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + side: StrictStr + strategy_id: Optional[StrictInt] = Field(default=None, alias="strategyId") + strategy_type: Optional[StrictInt] = Field(default=None, alias="strategyType") + working_time: StrictInt = Field(alias="workingTime") + self_trade_prevention_mode: StrictStr = Field(alias="selfTradePreventionMode") + fills: List[OrderResponseFullFillsInner] + __properties: ClassVar[List[str]] = ["symbol", "orderId", "orderListId", "clientOrderId", "transactTime", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "side", "strategyId", "strategyType", "workingTime", "selfTradePreventionMode", "fills"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrderResponseFull from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in fills (list) + _items = [] + if self.fills: + for _item in self.fills: + if _item: + _items.append(_item.to_dict()) + _dict['fills'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrderResponseFull from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "clientOrderId": obj.get("clientOrderId"), + "transactTime": obj.get("transactTime"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "side": obj.get("side"), + "strategyId": obj.get("strategyId"), + "strategyType": obj.get("strategyType"), + "workingTime": obj.get("workingTime"), + "selfTradePreventionMode": obj.get("selfTradePreventionMode"), + "fills": [OrderResponseFullFillsInner.from_dict(_item) for _item in obj["fills"]] if obj.get("fills") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/order_response_full_fills_inner.py b/target/python/binance_openapi/openapi_client/models/order_response_full_fills_inner.py new file mode 100644 index 0000000..fca2c50 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/order_response_full_fills_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OrderResponseFullFillsInner(BaseModel): + """ + OrderResponseFullFillsInner + """ # noqa: E501 + price: StrictStr + qty: StrictStr + commission: StrictStr + commission_asset: StrictStr = Field(alias="commissionAsset") + __properties: ClassVar[List[str]] = ["price", "qty", "commission", "commissionAsset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrderResponseFullFillsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrderResponseFullFillsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "price": obj.get("price"), + "qty": obj.get("qty"), + "commission": obj.get("commission"), + "commissionAsset": obj.get("commissionAsset") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/order_response_result.py b/target/python/binance_openapi/openapi_client/models/order_response_result.py new file mode 100644 index 0000000..e24d11c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/order_response_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OrderResponseResult(BaseModel): + """ + OrderResponseResult + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(alias="orderListId") + client_order_id: StrictStr = Field(alias="clientOrderId") + transact_time: StrictInt = Field(alias="transactTime") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + side: StrictStr + strategy_id: Optional[StrictInt] = Field(default=None, alias="strategyId") + strategy_type: Optional[StrictInt] = Field(default=None, alias="strategyType") + working_time: StrictInt = Field(alias="workingTime") + self_trade_prevention_mode: StrictStr = Field(alias="selfTradePreventionMode") + __properties: ClassVar[List[str]] = ["symbol", "orderId", "orderListId", "clientOrderId", "transactTime", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "side", "strategyId", "strategyType", "workingTime", "selfTradePreventionMode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrderResponseResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrderResponseResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "clientOrderId": obj.get("clientOrderId"), + "transactTime": obj.get("transactTime"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "side": obj.get("side"), + "strategyId": obj.get("strategyId"), + "strategyType": obj.get("strategyType"), + "workingTime": obj.get("workingTime"), + "selfTradePreventionMode": obj.get("selfTradePreventionMode") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/price_ticker.py b/target/python/binance_openapi/openapi_client/models/price_ticker.py new file mode 100644 index 0000000..2494ee7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/price_ticker.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class PriceTicker(BaseModel): + """ + PriceTicker + """ # noqa: E501 + symbol: StrictStr + price: StrictStr + __properties: ClassVar[List[str]] = ["symbol", "price"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PriceTicker from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PriceTicker from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "price": obj.get("price") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/repayment_info.py b/target/python/binance_openapi/openapi_client/models/repayment_info.py new file mode 100644 index 0000000..a788ba3 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/repayment_info.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class RepaymentInfo(BaseModel): + """ + RepaymentInfo + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + remaining_principal: StrictStr = Field(alias="remainingPrincipal") + remaining_interest: StrictStr = Field(alias="remainingInterest") + collateral_coin: StrictStr = Field(alias="collateralCoin") + remaining_collateral: StrictStr = Field(alias="remainingCollateral") + current_ltv: StrictStr = Field(alias="currentLTV") + repay_status: StrictStr = Field(alias="repayStatus") + __properties: ClassVar[List[str]] = ["loanCoin", "remainingPrincipal", "remainingInterest", "collateralCoin", "remainingCollateral", "currentLTV", "repayStatus"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RepaymentInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RepaymentInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "remainingPrincipal": obj.get("remainingPrincipal"), + "remainingInterest": obj.get("remainingInterest"), + "collateralCoin": obj.get("collateralCoin"), + "remainingCollateral": obj.get("remainingCollateral"), + "currentLTV": obj.get("currentLTV"), + "repayStatus": obj.get("repayStatus") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/repayment_info2.py b/target/python/binance_openapi/openapi_client/models/repayment_info2.py new file mode 100644 index 0000000..e576971 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/repayment_info2.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class RepaymentInfo2(BaseModel): + """ + RepaymentInfo2 + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + collateral_coin: StrictStr = Field(alias="collateralCoin") + repay_status: StrictStr = Field(alias="repayStatus") + __properties: ClassVar[List[str]] = ["loanCoin", "collateralCoin", "repayStatus"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RepaymentInfo2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RepaymentInfo2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "collateralCoin": obj.get("collateralCoin"), + "repayStatus": obj.get("repayStatus") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_restrictions_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_restrictions_get200_response.py new file mode 100644 index 0000000..4593d2d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_restrictions_get200_response.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AccountApiRestrictionsGet200Response(BaseModel): + """ + SapiV1AccountApiRestrictionsGet200Response + """ # noqa: E501 + ip_restrict: StrictBool = Field(alias="ipRestrict") + create_time: StrictInt = Field(alias="createTime") + enable_internal_transfer: StrictBool = Field(description="This option authorizes this key to transfer funds between your master account and your sub account instantly", alias="enableInternalTransfer") + enable_futures: StrictBool = Field(description="API Key created before your futures account opened does not support futures API service", alias="enableFutures") + enable_portfolio_margin_trading: Optional[StrictBool] = Field(default=None, description="API Key created before your activate portfolio margin does not support portfolio margin API service", alias="enablePortfolioMarginTrading") + enable_vanilla_options: StrictBool = Field(description="Authorizes this key to Vanilla options trading", alias="enableVanillaOptions") + permits_universal_transfer: StrictBool = Field(description="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", alias="permitsUniversalTransfer") + enable_reading: StrictBool = Field(alias="enableReading") + enable_spot_and_margin_trading: StrictBool = Field(alias="enableSpotAndMarginTrading") + enable_withdrawals: StrictBool = Field(description="This option allows you to withdraw via API. You must apply the IP Access Restriction filter in order to enable withdrawals", alias="enableWithdrawals") + enable_margin: StrictBool = Field(description="This option can be adjusted after the Cross Margin account transfer is completed", alias="enableMargin") + trading_authority_expiration_time: StrictInt = Field(description="Expiration time for spot and margin trading permission", alias="tradingAuthorityExpirationTime") + __properties: ClassVar[List[str]] = ["ipRestrict", "createTime", "enableInternalTransfer", "enableFutures", "enablePortfolioMarginTrading", "enableVanillaOptions", "permitsUniversalTransfer", "enableReading", "enableSpotAndMarginTrading", "enableWithdrawals", "enableMargin", "tradingAuthorityExpirationTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AccountApiRestrictionsGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AccountApiRestrictionsGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ipRestrict": obj.get("ipRestrict"), + "createTime": obj.get("createTime"), + "enableInternalTransfer": obj.get("enableInternalTransfer"), + "enableFutures": obj.get("enableFutures"), + "enablePortfolioMarginTrading": obj.get("enablePortfolioMarginTrading"), + "enableVanillaOptions": obj.get("enableVanillaOptions"), + "permitsUniversalTransfer": obj.get("permitsUniversalTransfer"), + "enableReading": obj.get("enableReading"), + "enableSpotAndMarginTrading": obj.get("enableSpotAndMarginTrading"), + "enableWithdrawals": obj.get("enableWithdrawals"), + "enableMargin": obj.get("enableMargin"), + "tradingAuthorityExpirationTime": obj.get("tradingAuthorityExpirationTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response.py new file mode 100644 index 0000000..ecc9387 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data import SapiV1AccountApiTradingStatusGet200ResponseData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AccountApiTradingStatusGet200Response(BaseModel): + """ + SapiV1AccountApiTradingStatusGet200Response + """ # noqa: E501 + data: SapiV1AccountApiTradingStatusGet200ResponseData + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AccountApiTradingStatusGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AccountApiTradingStatusGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": SapiV1AccountApiTradingStatusGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data.py new file mode 100644 index 0000000..a81c25e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_indicators import SapiV1AccountApiTradingStatusGet200ResponseDataIndicators +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_trigger_condition import SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AccountApiTradingStatusGet200ResponseData(BaseModel): + """ + SapiV1AccountApiTradingStatusGet200ResponseData + """ # noqa: E501 + is_locked: StrictBool = Field(description="API trading function is locked or not", alias="isLocked") + planned_recover_time: StrictInt = Field(description="If API trading function is locked, this is the planned recover time", alias="plannedRecoverTime") + trigger_condition: SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition = Field(alias="triggerCondition") + indicators: SapiV1AccountApiTradingStatusGet200ResponseDataIndicators + update_time: StrictInt = Field(alias="updateTime") + __properties: ClassVar[List[str]] = ["isLocked", "plannedRecoverTime", "triggerCondition", "indicators", "updateTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AccountApiTradingStatusGet200ResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of trigger_condition + if self.trigger_condition: + _dict['triggerCondition'] = self.trigger_condition.to_dict() + # override the default output from pydantic by calling `to_dict()` of indicators + if self.indicators: + _dict['indicators'] = self.indicators.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AccountApiTradingStatusGet200ResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "isLocked": obj.get("isLocked"), + "plannedRecoverTime": obj.get("plannedRecoverTime"), + "triggerCondition": SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition.from_dict(obj["triggerCondition"]) if obj.get("triggerCondition") is not None else None, + "indicators": SapiV1AccountApiTradingStatusGet200ResponseDataIndicators.from_dict(obj["indicators"]) if obj.get("indicators") is not None else None, + "updateTime": obj.get("updateTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data_indicators.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data_indicators.py new file mode 100644 index 0000000..47ed07c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data_indicators.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner import SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AccountApiTradingStatusGet200ResponseDataIndicators(BaseModel): + """ + The indicators updated every 30 seconds + """ # noqa: E501 + btcusdt: List[SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner] = Field(alias="BTCUSDT") + __properties: ClassVar[List[str]] = ["BTCUSDT"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AccountApiTradingStatusGet200ResponseDataIndicators from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in btcusdt (list) + _items = [] + if self.btcusdt: + for _item in self.btcusdt: + if _item: + _items.append(_item.to_dict()) + _dict['BTCUSDT'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AccountApiTradingStatusGet200ResponseDataIndicators from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "BTCUSDT": [SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner.from_dict(_item) for _item in obj["BTCUSDT"]] if obj.get("BTCUSDT") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner.py new file mode 100644 index 0000000..b73cdb6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner(BaseModel): + """ + SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner + """ # noqa: E501 + i: StrictStr = Field(description="Unfilled Ratio (UFR)") + c: StrictInt = Field(description="Count of all orders") + v: Union[StrictFloat, StrictInt] = Field(description="Current UFR value") + t: Union[StrictFloat, StrictInt] = Field(description="Trigger UFR value") + __properties: ClassVar[List[str]] = ["i", "c", "v", "t"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "i": obj.get("i"), + "c": obj.get("c"), + "v": obj.get("v"), + "t": obj.get("t") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data_trigger_condition.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data_trigger_condition.py new file mode 100644 index 0000000..d340ec4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_api_trading_status_get200_response_data_trigger_condition.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition(BaseModel): + """ + SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition + """ # noqa: E501 + gcr: StrictInt = Field(description="Number of GTC orders", alias="GCR") + ifer: StrictInt = Field(description="Number of FOK/IOC orders", alias="IFER") + ufr: StrictInt = Field(description="Number of orders", alias="UFR") + __properties: ClassVar[List[str]] = ["GCR", "IFER", "UFR"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "GCR": obj.get("GCR"), + "IFER": obj.get("IFER"), + "UFR": obj.get("UFR") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_account_info_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_info_get200_response.py new file mode 100644 index 0000000..30aab5d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_info_get200_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AccountInfoGet200Response(BaseModel): + """ + SapiV1AccountInfoGet200Response + """ # noqa: E501 + vip_level: StrictInt = Field(alias="vipLevel") + is_margin_enabled: StrictBool = Field(description="true or false for margin.", alias="isMarginEnabled") + is_future_enabled: StrictBool = Field(description="true or false for futures.", alias="isFutureEnabled") + __properties: ClassVar[List[str]] = ["vipLevel", "isMarginEnabled", "isFutureEnabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AccountInfoGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AccountInfoGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vipLevel": obj.get("vipLevel"), + "isMarginEnabled": obj.get("isMarginEnabled"), + "isFutureEnabled": obj.get("isFutureEnabled") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_account_snapshot_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_snapshot_get200_response.py new file mode 100644 index 0000000..63fcc0d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_snapshot_get200_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from openapi_client.models.snapshot_futures import SnapshotFutures +from openapi_client.models.snapshot_margin import SnapshotMargin +from openapi_client.models.snapshot_spot import SnapshotSpot +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SAPIV1ACCOUNTSNAPSHOTGET200RESPONSE_ONE_OF_SCHEMAS = ["SnapshotFutures", "SnapshotMargin", "SnapshotSpot"] + +class SapiV1AccountSnapshotGet200Response(BaseModel): + """ + SapiV1AccountSnapshotGet200Response + """ + # data type: SnapshotSpot + oneof_schema_1_validator: Optional[SnapshotSpot] = None + # data type: SnapshotMargin + oneof_schema_2_validator: Optional[SnapshotMargin] = None + # data type: SnapshotFutures + oneof_schema_3_validator: Optional[SnapshotFutures] = None + actual_instance: Optional[Union[SnapshotFutures, SnapshotMargin, SnapshotSpot]] = None + one_of_schemas: Set[str] = { "SnapshotFutures", "SnapshotMargin", "SnapshotSpot" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SapiV1AccountSnapshotGet200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: SnapshotSpot + if not isinstance(v, SnapshotSpot): + error_messages.append(f"Error! Input type `{type(v)}` is not `SnapshotSpot`") + else: + match += 1 + # validate data type: SnapshotMargin + if not isinstance(v, SnapshotMargin): + error_messages.append(f"Error! Input type `{type(v)}` is not `SnapshotMargin`") + else: + match += 1 + # validate data type: SnapshotFutures + if not isinstance(v, SnapshotFutures): + error_messages.append(f"Error! Input type `{type(v)}` is not `SnapshotFutures`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SapiV1AccountSnapshotGet200Response with oneOf schemas: SnapshotFutures, SnapshotMargin, SnapshotSpot. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SapiV1AccountSnapshotGet200Response with oneOf schemas: SnapshotFutures, SnapshotMargin, SnapshotSpot. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into SnapshotSpot + try: + instance.actual_instance = SnapshotSpot.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SnapshotMargin + try: + instance.actual_instance = SnapshotMargin.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SnapshotFutures + try: + instance.actual_instance = SnapshotFutures.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SapiV1AccountSnapshotGet200Response with oneOf schemas: SnapshotFutures, SnapshotMargin, SnapshotSpot. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SapiV1AccountSnapshotGet200Response with oneOf schemas: SnapshotFutures, SnapshotMargin, SnapshotSpot. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], SnapshotFutures, SnapshotMargin, SnapshotSpot]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_account_status_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_status_get200_response.py new file mode 100644 index 0000000..28666ed --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_account_status_get200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AccountStatusGet200Response(BaseModel): + """ + SapiV1AccountStatusGet200Response + """ # noqa: E501 + data: StrictStr + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AccountStatusGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AccountStatusGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": obj.get("data") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_historical_orders_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_historical_orders_get200_response.py new file mode 100644 index 0000000..dba6515 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_historical_orders_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_algo_futures_historical_orders_get200_response_orders_inner import SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoFuturesHistoricalOrdersGet200Response(BaseModel): + """ + SapiV1AlgoFuturesHistoricalOrdersGet200Response + """ # noqa: E501 + total: StrictInt + orders: List[SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner] + __properties: ClassVar[List[str]] = ["total", "orders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesHistoricalOrdersGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in orders (list) + _items = [] + if self.orders: + for _item in self.orders: + if _item: + _items.append(_item.to_dict()) + _dict['orders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesHistoricalOrdersGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "orders": [SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner.from_dict(_item) for _item in obj["orders"]] if obj.get("orders") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_historical_orders_get200_response_orders_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_historical_orders_get200_response_orders_inner.py new file mode 100644 index 0000000..3acfc9d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_historical_orders_get200_response_orders_inner.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner(BaseModel): + """ + SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner + """ # noqa: E501 + algo_id: StrictInt = Field(alias="algoId") + symbol: StrictStr + side: StrictStr + position_side: StrictStr = Field(alias="positionSide") + total_qty: StrictStr = Field(alias="totalQty") + executed_qty: StrictStr = Field(alias="executedQty") + executed_amt: StrictStr = Field(alias="executedAmt") + avg_price: StrictStr = Field(alias="avgPrice") + client_algo_id: StrictStr = Field(alias="clientAlgoId") + book_time: StrictInt = Field(alias="bookTime") + end_time: StrictInt = Field(alias="endTime") + algo_status: StrictStr = Field(alias="algoStatus") + algo_type: StrictStr = Field(alias="algoType") + urgency: StrictStr + __properties: ClassVar[List[str]] = ["algoId", "symbol", "side", "positionSide", "totalQty", "executedQty", "executedAmt", "avgPrice", "clientAlgoId", "bookTime", "endTime", "algoStatus", "algoType", "urgency"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "algoId": obj.get("algoId"), + "symbol": obj.get("symbol"), + "side": obj.get("side"), + "positionSide": obj.get("positionSide"), + "totalQty": obj.get("totalQty"), + "executedQty": obj.get("executedQty"), + "executedAmt": obj.get("executedAmt"), + "avgPrice": obj.get("avgPrice"), + "clientAlgoId": obj.get("clientAlgoId"), + "bookTime": obj.get("bookTime"), + "endTime": obj.get("endTime"), + "algoStatus": obj.get("algoStatus"), + "algoType": obj.get("algoType"), + "urgency": obj.get("urgency") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_new_order_vp_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_new_order_vp_post200_response.py new file mode 100644 index 0000000..24689a3 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_new_order_vp_post200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoFuturesNewOrderVpPost200Response(BaseModel): + """ + SapiV1AlgoFuturesNewOrderVpPost200Response + """ # noqa: E501 + client_algo_id: StrictStr = Field(alias="clientAlgoId") + success: StrictBool + code: StrictInt + msg: StrictStr + __properties: ClassVar[List[str]] = ["clientAlgoId", "success", "code", "msg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesNewOrderVpPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesNewOrderVpPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clientAlgoId": obj.get("clientAlgoId"), + "success": obj.get("success"), + "code": obj.get("code"), + "msg": obj.get("msg") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_open_orders_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_open_orders_get200_response.py new file mode 100644 index 0000000..036aea8 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_open_orders_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from openapi_client.models.sapi_v1_algo_futures_open_orders_get200_response_orders_inner import SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoFuturesOpenOrdersGet200Response(BaseModel): + """ + SapiV1AlgoFuturesOpenOrdersGet200Response + """ # noqa: E501 + total: StrictInt + orders: Optional[List[SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner]] = None + __properties: ClassVar[List[str]] = ["total", "orders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesOpenOrdersGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in orders (list) + _items = [] + if self.orders: + for _item in self.orders: + if _item: + _items.append(_item.to_dict()) + _dict['orders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesOpenOrdersGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "orders": [SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner.from_dict(_item) for _item in obj["orders"]] if obj.get("orders") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_open_orders_get200_response_orders_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_open_orders_get200_response_orders_inner.py new file mode 100644 index 0000000..1f76c94 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_open_orders_get200_response_orders_inner.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner(BaseModel): + """ + SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner + """ # noqa: E501 + algo_id: StrictInt = Field(alias="algoId") + symbol: StrictStr + side: StrictStr + position_side: StrictStr = Field(alias="positionSide") + total_qty: StrictStr = Field(alias="totalQty") + executed_qty: StrictStr = Field(alias="executedQty") + executed_amt: StrictStr = Field(alias="executedAmt") + avg_price: StrictStr = Field(alias="avgPrice") + client_algo_id: StrictStr = Field(alias="clientAlgoId") + book_time: StrictInt = Field(alias="bookTime") + end_time: StrictInt = Field(alias="endTime") + algo_status: StrictStr = Field(alias="algoStatus") + algo_type: StrictStr = Field(alias="algoType") + urgency: StrictStr + __properties: ClassVar[List[str]] = ["algoId", "symbol", "side", "positionSide", "totalQty", "executedQty", "executedAmt", "avgPrice", "clientAlgoId", "bookTime", "endTime", "algoStatus", "algoType", "urgency"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "algoId": obj.get("algoId"), + "symbol": obj.get("symbol"), + "side": obj.get("side"), + "positionSide": obj.get("positionSide"), + "totalQty": obj.get("totalQty"), + "executedQty": obj.get("executedQty"), + "executedAmt": obj.get("executedAmt"), + "avgPrice": obj.get("avgPrice"), + "clientAlgoId": obj.get("clientAlgoId"), + "bookTime": obj.get("bookTime"), + "endTime": obj.get("endTime"), + "algoStatus": obj.get("algoStatus"), + "algoType": obj.get("algoType"), + "urgency": obj.get("urgency") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_order_delete200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_order_delete200_response.py new file mode 100644 index 0000000..48b9da0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_order_delete200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoFuturesOrderDelete200Response(BaseModel): + """ + SapiV1AlgoFuturesOrderDelete200Response + """ # noqa: E501 + algo_id: StrictInt = Field(alias="algoId") + success: StrictBool + code: StrictInt + msg: StrictStr + __properties: ClassVar[List[str]] = ["algoId", "success", "code", "msg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesOrderDelete200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesOrderDelete200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "algoId": obj.get("algoId"), + "success": obj.get("success"), + "code": obj.get("code"), + "msg": obj.get("msg") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_sub_orders_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_sub_orders_get200_response.py new file mode 100644 index 0000000..88e41c5 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_sub_orders_get200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner import SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoFuturesSubOrdersGet200Response(BaseModel): + """ + SapiV1AlgoFuturesSubOrdersGet200Response + """ # noqa: E501 + total: StrictInt + executed_qty: StrictStr = Field(alias="executedQty") + executed_amt: StrictStr = Field(alias="executedAmt") + sub_orders: List[SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner] = Field(alias="subOrders") + __properties: ClassVar[List[str]] = ["total", "executedQty", "executedAmt", "subOrders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesSubOrdersGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in sub_orders (list) + _items = [] + if self.sub_orders: + for _item in self.sub_orders: + if _item: + _items.append(_item.to_dict()) + _dict['subOrders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesSubOrdersGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "executedQty": obj.get("executedQty"), + "executedAmt": obj.get("executedAmt"), + "subOrders": [SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner.from_dict(_item) for _item in obj["subOrders"]] if obj.get("subOrders") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner.py new file mode 100644 index 0000000..074f2d9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner(BaseModel): + """ + SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner + """ # noqa: E501 + algo_id: StrictInt = Field(alias="algoId") + order_id: StrictInt = Field(alias="orderId") + order_status: StrictStr = Field(alias="orderStatus") + executed_qty: Optional[StrictStr] = Field(default=None, alias="executedQty") + executed_amt: StrictStr = Field(alias="executedAmt") + fee_amt: StrictStr = Field(alias="feeAmt") + fee_asset: StrictStr = Field(alias="feeAsset") + book_time: StrictInt = Field(alias="bookTime") + avg_price: StrictStr = Field(alias="avgPrice") + side: StrictStr + symbol: StrictStr + sub_id: StrictInt = Field(alias="subId") + time_in_force: StrictStr = Field(alias="timeInForce") + orig_qty: StrictStr = Field(alias="origQty") + __properties: ClassVar[List[str]] = ["algoId", "orderId", "orderStatus", "executedQty", "executedAmt", "feeAmt", "feeAsset", "bookTime", "avgPrice", "side", "symbol", "subId", "timeInForce", "origQty"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "algoId": obj.get("algoId"), + "orderId": obj.get("orderId"), + "orderStatus": obj.get("orderStatus"), + "executedQty": obj.get("executedQty"), + "executedAmt": obj.get("executedAmt"), + "feeAmt": obj.get("feeAmt"), + "feeAsset": obj.get("feeAsset"), + "bookTime": obj.get("bookTime"), + "avgPrice": obj.get("avgPrice"), + "side": obj.get("side"), + "symbol": obj.get("symbol"), + "subId": obj.get("subId"), + "timeInForce": obj.get("timeInForce"), + "origQty": obj.get("origQty") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_historical_orders_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_historical_orders_get200_response.py new file mode 100644 index 0000000..37e025b --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_historical_orders_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_algo_spot_historical_orders_get200_response_orders_inner import SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoSpotHistoricalOrdersGet200Response(BaseModel): + """ + SapiV1AlgoSpotHistoricalOrdersGet200Response + """ # noqa: E501 + total: StrictInt + orders: List[SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner] + __properties: ClassVar[List[str]] = ["total", "orders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotHistoricalOrdersGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in orders (list) + _items = [] + if self.orders: + for _item in self.orders: + if _item: + _items.append(_item.to_dict()) + _dict['orders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotHistoricalOrdersGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "orders": [SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner.from_dict(_item) for _item in obj["orders"]] if obj.get("orders") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_historical_orders_get200_response_orders_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_historical_orders_get200_response_orders_inner.py new file mode 100644 index 0000000..dc0ce52 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_historical_orders_get200_response_orders_inner.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner(BaseModel): + """ + SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner + """ # noqa: E501 + algo_id: StrictInt = Field(alias="algoId") + symbol: StrictStr + side: StrictStr + total_qty: StrictStr = Field(alias="totalQty") + executed_qty: StrictStr = Field(alias="executedQty") + executed_amt: StrictStr = Field(alias="executedAmt") + avg_price: StrictStr = Field(alias="avgPrice") + client_algo_id: StrictStr = Field(alias="clientAlgoId") + book_time: StrictInt = Field(alias="bookTime") + end_time: StrictInt = Field(alias="endTime") + algo_status: StrictStr = Field(alias="algoStatus") + algo_type: StrictStr = Field(alias="algoType") + urgency: StrictStr + __properties: ClassVar[List[str]] = ["algoId", "symbol", "side", "totalQty", "executedQty", "executedAmt", "avgPrice", "clientAlgoId", "bookTime", "endTime", "algoStatus", "algoType", "urgency"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "algoId": obj.get("algoId"), + "symbol": obj.get("symbol"), + "side": obj.get("side"), + "totalQty": obj.get("totalQty"), + "executedQty": obj.get("executedQty"), + "executedAmt": obj.get("executedAmt"), + "avgPrice": obj.get("avgPrice"), + "clientAlgoId": obj.get("clientAlgoId"), + "bookTime": obj.get("bookTime"), + "endTime": obj.get("endTime"), + "algoStatus": obj.get("algoStatus"), + "algoType": obj.get("algoType"), + "urgency": obj.get("urgency") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_new_order_twap_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_new_order_twap_post200_response.py new file mode 100644 index 0000000..84ed661 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_new_order_twap_post200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoSpotNewOrderTwapPost200Response(BaseModel): + """ + SapiV1AlgoSpotNewOrderTwapPost200Response + """ # noqa: E501 + client_algo_id: StrictStr = Field(alias="clientAlgoId") + success: StrictBool + code: StrictInt + msg: StrictStr + __properties: ClassVar[List[str]] = ["clientAlgoId", "success", "code", "msg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotNewOrderTwapPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotNewOrderTwapPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clientAlgoId": obj.get("clientAlgoId"), + "success": obj.get("success"), + "code": obj.get("code"), + "msg": obj.get("msg") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_open_orders_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_open_orders_get200_response.py new file mode 100644 index 0000000..5126b7b --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_open_orders_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_algo_spot_open_orders_get200_response_orders_inner import SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoSpotOpenOrdersGet200Response(BaseModel): + """ + SapiV1AlgoSpotOpenOrdersGet200Response + """ # noqa: E501 + total: StrictInt + orders: List[SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner] + __properties: ClassVar[List[str]] = ["total", "orders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotOpenOrdersGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in orders (list) + _items = [] + if self.orders: + for _item in self.orders: + if _item: + _items.append(_item.to_dict()) + _dict['orders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotOpenOrdersGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "orders": [SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner.from_dict(_item) for _item in obj["orders"]] if obj.get("orders") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_open_orders_get200_response_orders_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_open_orders_get200_response_orders_inner.py new file mode 100644 index 0000000..96466f5 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_open_orders_get200_response_orders_inner.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner(BaseModel): + """ + SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner + """ # noqa: E501 + algo_id: StrictInt = Field(alias="algoId") + symbol: StrictStr + side: StrictStr + total_qty: StrictStr = Field(alias="totalQty") + executed_qty: StrictStr = Field(alias="executedQty") + executed_amt: StrictStr = Field(alias="executedAmt") + avg_price: StrictStr = Field(alias="avgPrice") + client_algo_id: StrictStr = Field(alias="clientAlgoId") + book_time: StrictInt = Field(alias="bookTime") + end_time: StrictInt = Field(alias="endTime") + algo_status: StrictStr = Field(alias="algoStatus") + algo_type: StrictStr = Field(alias="algoType") + urgency: StrictStr + __properties: ClassVar[List[str]] = ["algoId", "symbol", "side", "totalQty", "executedQty", "executedAmt", "avgPrice", "clientAlgoId", "bookTime", "endTime", "algoStatus", "algoType", "urgency"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "algoId": obj.get("algoId"), + "symbol": obj.get("symbol"), + "side": obj.get("side"), + "totalQty": obj.get("totalQty"), + "executedQty": obj.get("executedQty"), + "executedAmt": obj.get("executedAmt"), + "avgPrice": obj.get("avgPrice"), + "clientAlgoId": obj.get("clientAlgoId"), + "bookTime": obj.get("bookTime"), + "endTime": obj.get("endTime"), + "algoStatus": obj.get("algoStatus"), + "algoType": obj.get("algoType"), + "urgency": obj.get("urgency") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_order_delete200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_order_delete200_response.py new file mode 100644 index 0000000..1b40f96 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_order_delete200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoSpotOrderDelete200Response(BaseModel): + """ + SapiV1AlgoSpotOrderDelete200Response + """ # noqa: E501 + algo_id: StrictInt = Field(alias="algoId") + success: StrictBool + code: StrictInt + msg: StrictStr + __properties: ClassVar[List[str]] = ["algoId", "success", "code", "msg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotOrderDelete200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotOrderDelete200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "algoId": obj.get("algoId"), + "success": obj.get("success"), + "code": obj.get("code"), + "msg": obj.get("msg") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_sub_orders_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_sub_orders_get200_response.py new file mode 100644 index 0000000..b316de0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_sub_orders_get200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner import SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoSpotSubOrdersGet200Response(BaseModel): + """ + SapiV1AlgoSpotSubOrdersGet200Response + """ # noqa: E501 + total: StrictInt + executed_qty: StrictStr = Field(alias="executedQty") + executed_amt: StrictStr = Field(alias="executedAmt") + sub_orders: List[SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner] = Field(alias="subOrders") + __properties: ClassVar[List[str]] = ["total", "executedQty", "executedAmt", "subOrders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotSubOrdersGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in sub_orders (list) + _items = [] + if self.sub_orders: + for _item in self.sub_orders: + if _item: + _items.append(_item.to_dict()) + _dict['subOrders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotSubOrdersGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "executedQty": obj.get("executedQty"), + "executedAmt": obj.get("executedAmt"), + "subOrders": [SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner.from_dict(_item) for _item in obj["subOrders"]] if obj.get("subOrders") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner.py new file mode 100644 index 0000000..da4b2ed --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner(BaseModel): + """ + SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner + """ # noqa: E501 + algo_id: StrictInt = Field(alias="algoId") + order_id: StrictInt = Field(alias="orderId") + order_status: StrictStr = Field(alias="orderStatus") + executed_qty: StrictStr = Field(alias="executedQty") + executed_amt: StrictStr = Field(alias="executedAmt") + fee_amt: StrictStr = Field(alias="feeAmt") + fee_asset: StrictStr = Field(alias="feeAsset") + book_time: StrictInt = Field(alias="bookTime") + avg_price: StrictStr = Field(alias="avgPrice") + side: StrictStr + symbol: StrictStr + sub_id: StrictInt = Field(alias="subId") + time_in_force: StrictStr = Field(alias="timeInForce") + orig_qty: StrictStr = Field(alias="origQty") + __properties: ClassVar[List[str]] = ["algoId", "orderId", "orderStatus", "executedQty", "executedAmt", "feeAmt", "feeAsset", "bookTime", "avgPrice", "side", "symbol", "subId", "timeInForce", "origQty"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "algoId": obj.get("algoId"), + "orderId": obj.get("orderId"), + "orderStatus": obj.get("orderStatus"), + "executedQty": obj.get("executedQty"), + "executedAmt": obj.get("executedAmt"), + "feeAmt": obj.get("feeAmt"), + "feeAsset": obj.get("feeAsset"), + "bookTime": obj.get("bookTime"), + "avgPrice": obj.get("avgPrice"), + "side": obj.get("side"), + "symbol": obj.get("symbol"), + "subId": obj.get("subId"), + "timeInForce": obj.get("timeInForce"), + "origQty": obj.get("origQty") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_detail_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_detail_get200_response.py new file mode 100644 index 0000000..8d9494a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_detail_get200_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_asset_asset_detail_get200_response_ctr import SapiV1AssetAssetDetailGet200ResponseCTR +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetAssetDetailGet200Response(BaseModel): + """ + SapiV1AssetAssetDetailGet200Response + """ # noqa: E501 + ctr: SapiV1AssetAssetDetailGet200ResponseCTR = Field(alias="CTR") + __properties: ClassVar[List[str]] = ["CTR"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetAssetDetailGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctr + if self.ctr: + _dict['CTR'] = self.ctr.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetAssetDetailGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "CTR": SapiV1AssetAssetDetailGet200ResponseCTR.from_dict(obj["CTR"]) if obj.get("CTR") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_detail_get200_response_ctr.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_detail_get200_response_ctr.py new file mode 100644 index 0000000..fb327f5 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_detail_get200_response_ctr.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetAssetDetailGet200ResponseCTR(BaseModel): + """ + SapiV1AssetAssetDetailGet200ResponseCTR + """ # noqa: E501 + min_withdraw_amount: StrictStr = Field(alias="minWithdrawAmount") + deposit_status: StrictBool = Field(description="deposit status (false if ALL of networks' are false)", alias="depositStatus") + withdraw_fee: StrictInt = Field(alias="withdrawFee") + withdraw_status: StrictBool = Field(description="withdrawStatus status (false if ALL of networks' are false)", alias="withdrawStatus") + deposit_tip: StrictStr = Field(alias="depositTip") + __properties: ClassVar[List[str]] = ["minWithdrawAmount", "depositStatus", "withdrawFee", "withdrawStatus", "depositTip"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetAssetDetailGet200ResponseCTR from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetAssetDetailGet200ResponseCTR from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "minWithdrawAmount": obj.get("minWithdrawAmount"), + "depositStatus": obj.get("depositStatus"), + "withdrawFee": obj.get("withdrawFee"), + "withdrawStatus": obj.get("withdrawStatus"), + "depositTip": obj.get("depositTip") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_dividend_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_dividend_get200_response.py new file mode 100644 index 0000000..4373f1a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_dividend_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_asset_asset_dividend_get200_response_rows_inner import SapiV1AssetAssetDividendGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetAssetDividendGet200Response(BaseModel): + """ + SapiV1AssetAssetDividendGet200Response + """ # noqa: E501 + rows: List[SapiV1AssetAssetDividendGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetAssetDividendGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetAssetDividendGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1AssetAssetDividendGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_dividend_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_dividend_get200_response_rows_inner.py new file mode 100644 index 0000000..b7dcba8 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_asset_dividend_get200_response_rows_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetAssetDividendGet200ResponseRowsInner(BaseModel): + """ + SapiV1AssetAssetDividendGet200ResponseRowsInner + """ # noqa: E501 + id: StrictInt + amount: StrictStr + asset: StrictStr + div_time: StrictInt = Field(alias="divTime") + en_info: StrictStr = Field(alias="enInfo") + tran_id: StrictInt = Field(alias="tranId") + __properties: ClassVar[List[str]] = ["id", "amount", "asset", "divTime", "enInfo", "tranId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetAssetDividendGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetAssetDividendGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "amount": obj.get("amount"), + "asset": obj.get("asset"), + "divTime": obj.get("divTime"), + "enInfo": obj.get("enInfo"), + "tranId": obj.get("tranId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_convert_transfer_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_convert_transfer_post200_response.py new file mode 100644 index 0000000..7f5ec38 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_convert_transfer_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetConvertTransferPost200Response(BaseModel): + """ + SapiV1AssetConvertTransferPost200Response + """ # noqa: E501 + tran_id: StrictInt = Field(alias="tranId") + status: StrictStr + __properties: ClassVar[List[str]] = ["tranId", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetConvertTransferPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetConvertTransferPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tranId": obj.get("tranId"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_convert_transfer_query_by_page_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_convert_transfer_query_by_page_get200_response.py new file mode 100644 index 0000000..ac908cb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_convert_transfer_query_by_page_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner import SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetConvertTransferQueryByPageGet200Response(BaseModel): + """ + SapiV1AssetConvertTransferQueryByPageGet200Response + """ # noqa: E501 + total: StrictInt + rows: List[SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner] + __properties: ClassVar[List[str]] = ["total", "rows"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetConvertTransferQueryByPageGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetConvertTransferQueryByPageGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "rows": [SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner.py new file mode 100644 index 0000000..29f45a8 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner(BaseModel): + """ + SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner + """ # noqa: E501 + tran_id: StrictInt = Field(alias="tranId") + type: StrictInt + time: StrictInt + deducted_asset: StrictStr = Field(alias="deductedAsset") + deducted_amount: StrictStr = Field(alias="deductedAmount") + target_asset: StrictStr = Field(alias="targetAsset") + target_amount: StrictStr = Field(alias="targetAmount") + status: StrictStr + account_type: StrictStr = Field(alias="accountType") + __properties: ClassVar[List[str]] = ["tranId", "type", "time", "deductedAsset", "deductedAmount", "targetAsset", "targetAmount", "status", "accountType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tranId": obj.get("tranId"), + "type": obj.get("type"), + "time": obj.get("time"), + "deductedAsset": obj.get("deductedAsset"), + "deductedAmount": obj.get("deductedAmount"), + "targetAsset": obj.get("targetAsset"), + "targetAmount": obj.get("targetAmount"), + "status": obj.get("status"), + "accountType": obj.get("accountType") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_custody_transfer_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_custody_transfer_history_get200_response.py new file mode 100644 index 0000000..ef9e133 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_custody_transfer_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_asset_custody_transfer_history_get200_response_rows_inner import SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetCustodyTransferHistoryGet200Response(BaseModel): + """ + SapiV1AssetCustodyTransferHistoryGet200Response + """ # noqa: E501 + total: StrictInt + rows: List[SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner] + __properties: ClassVar[List[str]] = ["total", "rows"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetCustodyTransferHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetCustodyTransferHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "rows": [SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_custody_transfer_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_custody_transfer_history_get200_response_rows_inner.py new file mode 100644 index 0000000..6143a1d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_custody_transfer_history_get200_response_rows_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner + """ # noqa: E501 + client_tran_id: StrictStr = Field(alias="clientTranId") + transfer_type: StrictStr = Field(alias="transferType") + asset: StrictStr + amount: StrictStr + time: StrictInt + __properties: ClassVar[List[str]] = ["clientTranId", "transferType", "asset", "amount", "time"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clientTranId": obj.get("clientTranId"), + "transferType": obj.get("transferType"), + "asset": obj.get("asset"), + "amount": obj.get("amount"), + "time": obj.get("time") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dribblet_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dribblet_get200_response.py new file mode 100644 index 0000000..4629463 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dribblet_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner import SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetDribbletGet200Response(BaseModel): + """ + SapiV1AssetDribbletGet200Response + """ # noqa: E501 + total: StrictInt = Field(description="Total counts of exchange") + user_asset_dribblets: List[SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner] = Field(alias="userAssetDribblets") + __properties: ClassVar[List[str]] = ["total", "userAssetDribblets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetDribbletGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in user_asset_dribblets (list) + _items = [] + if self.user_asset_dribblets: + for _item in self.user_asset_dribblets: + if _item: + _items.append(_item.to_dict()) + _dict['userAssetDribblets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetDribbletGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "userAssetDribblets": [SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner.from_dict(_item) for _item in obj["userAssetDribblets"]] if obj.get("userAssetDribblets") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner.py new file mode 100644 index 0000000..e30c110 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner import SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner(BaseModel): + """ + SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner + """ # noqa: E501 + operate_time: StrictInt = Field(alias="operateTime") + total_transfered_amount: StrictStr = Field(description="Total transfered BNB amount for this exchange.", alias="totalTransferedAmount") + total_service_charge_amount: StrictStr = Field(description="Total service charge amount for this exchange.", alias="totalServiceChargeAmount") + trans_id: StrictInt = Field(alias="transId") + user_asset_dribblet_details: List[SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner] = Field(alias="userAssetDribbletDetails") + __properties: ClassVar[List[str]] = ["operateTime", "totalTransferedAmount", "totalServiceChargeAmount", "transId", "userAssetDribbletDetails"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in user_asset_dribblet_details (list) + _items = [] + if self.user_asset_dribblet_details: + for _item in self.user_asset_dribblet_details: + if _item: + _items.append(_item.to_dict()) + _dict['userAssetDribbletDetails'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "operateTime": obj.get("operateTime"), + "totalTransferedAmount": obj.get("totalTransferedAmount"), + "totalServiceChargeAmount": obj.get("totalServiceChargeAmount"), + "transId": obj.get("transId"), + "userAssetDribbletDetails": [SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner.from_dict(_item) for _item in obj["userAssetDribbletDetails"]] if obj.get("userAssetDribbletDetails") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner.py new file mode 100644 index 0000000..fa50637 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner(BaseModel): + """ + SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner + """ # noqa: E501 + trans_id: StrictInt = Field(alias="transId") + service_charge_amount: StrictStr = Field(alias="serviceChargeAmount") + amount: StrictStr + operate_time: StrictInt = Field(alias="operateTime") + transfered_amount: StrictStr = Field(alias="transferedAmount") + from_asset: StrictStr = Field(alias="fromAsset") + __properties: ClassVar[List[str]] = ["transId", "serviceChargeAmount", "amount", "operateTime", "transferedAmount", "fromAsset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "transId": obj.get("transId"), + "serviceChargeAmount": obj.get("serviceChargeAmount"), + "amount": obj.get("amount"), + "operateTime": obj.get("operateTime"), + "transferedAmount": obj.get("transferedAmount"), + "fromAsset": obj.get("fromAsset") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_btc_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_btc_post200_response.py new file mode 100644 index 0000000..723c0ce --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_btc_post200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_asset_dust_btc_post200_response_details_inner import SapiV1AssetDustBtcPost200ResponseDetailsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetDustBtcPost200Response(BaseModel): + """ + SapiV1AssetDustBtcPost200Response + """ # noqa: E501 + details: List[SapiV1AssetDustBtcPost200ResponseDetailsInner] + total_transfer_btc: StrictStr = Field(alias="totalTransferBtc") + total_transfer_bnb: StrictStr = Field(alias="totalTransferBNB") + dribblet_percentage: StrictStr = Field(description="Commission fee", alias="dribbletPercentage") + __properties: ClassVar[List[str]] = ["details", "totalTransferBtc", "totalTransferBNB", "dribbletPercentage"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetDustBtcPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in details (list) + _items = [] + if self.details: + for _item in self.details: + if _item: + _items.append(_item.to_dict()) + _dict['details'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetDustBtcPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": [SapiV1AssetDustBtcPost200ResponseDetailsInner.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None, + "totalTransferBtc": obj.get("totalTransferBtc"), + "totalTransferBNB": obj.get("totalTransferBNB"), + "dribbletPercentage": obj.get("dribbletPercentage") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_btc_post200_response_details_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_btc_post200_response_details_inner.py new file mode 100644 index 0000000..4d4a000 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_btc_post200_response_details_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetDustBtcPost200ResponseDetailsInner(BaseModel): + """ + SapiV1AssetDustBtcPost200ResponseDetailsInner + """ # noqa: E501 + asset: StrictStr + asset_full_name: StrictStr = Field(alias="assetFullName") + amount_free: StrictStr = Field(description="Convertible amount", alias="amountFree") + to_btc: StrictStr = Field(description="BTC amount", alias="toBTC") + to_bnb: StrictStr = Field(description="BNB amount(Not deducted commission fee", alias="toBNB") + to_bnb_off_exchange: StrictStr = Field(description="BNB amount(Deducted commission fee", alias="toBNBOffExchange") + exchange: StrictStr = Field(description="Commission fee") + __properties: ClassVar[List[str]] = ["asset", "assetFullName", "amountFree", "toBTC", "toBNB", "toBNBOffExchange", "exchange"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetDustBtcPost200ResponseDetailsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetDustBtcPost200ResponseDetailsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "assetFullName": obj.get("assetFullName"), + "amountFree": obj.get("amountFree"), + "toBTC": obj.get("toBTC"), + "toBNB": obj.get("toBNB"), + "toBNBOffExchange": obj.get("toBNBOffExchange"), + "exchange": obj.get("exchange") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_post200_response.py new file mode 100644 index 0000000..dd99ccc --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_post200_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_asset_dust_post200_response_transfer_result_inner import SapiV1AssetDustPost200ResponseTransferResultInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetDustPost200Response(BaseModel): + """ + SapiV1AssetDustPost200Response + """ # noqa: E501 + total_service_charge: StrictStr = Field(alias="totalServiceCharge") + total_transfered: StrictStr = Field(alias="totalTransfered") + transfer_result: List[SapiV1AssetDustPost200ResponseTransferResultInner] = Field(alias="transferResult") + __properties: ClassVar[List[str]] = ["totalServiceCharge", "totalTransfered", "transferResult"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetDustPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in transfer_result (list) + _items = [] + if self.transfer_result: + for _item in self.transfer_result: + if _item: + _items.append(_item.to_dict()) + _dict['transferResult'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetDustPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalServiceCharge": obj.get("totalServiceCharge"), + "totalTransfered": obj.get("totalTransfered"), + "transferResult": [SapiV1AssetDustPost200ResponseTransferResultInner.from_dict(_item) for _item in obj["transferResult"]] if obj.get("transferResult") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_post200_response_transfer_result_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_post200_response_transfer_result_inner.py new file mode 100644 index 0000000..c0c093e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_dust_post200_response_transfer_result_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetDustPost200ResponseTransferResultInner(BaseModel): + """ + SapiV1AssetDustPost200ResponseTransferResultInner + """ # noqa: E501 + amount: StrictStr + from_asset: StrictStr = Field(alias="fromAsset") + operate_time: StrictInt = Field(alias="operateTime") + service_charge_amount: StrictStr = Field(alias="serviceChargeAmount") + tran_id: StrictInt = Field(alias="tranId") + transfered_amount: StrictStr = Field(alias="transferedAmount") + __properties: ClassVar[List[str]] = ["amount", "fromAsset", "operateTime", "serviceChargeAmount", "tranId", "transferedAmount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetDustPost200ResponseTransferResultInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetDustPost200ResponseTransferResultInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "fromAsset": obj.get("fromAsset"), + "operateTime": obj.get("operateTime"), + "serviceChargeAmount": obj.get("serviceChargeAmount"), + "tranId": obj.get("tranId"), + "transferedAmount": obj.get("transferedAmount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_get_funding_asset_post200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_get_funding_asset_post200_response_inner.py new file mode 100644 index 0000000..f1292ad --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_get_funding_asset_post200_response_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetGetFundingAssetPost200ResponseInner(BaseModel): + """ + SapiV1AssetGetFundingAssetPost200ResponseInner + """ # noqa: E501 + asset: StrictStr + free: StrictStr + locked: StrictStr + freeze: StrictStr + withdrawing: StrictStr + btc_valuation: StrictStr = Field(alias="btcValuation") + __properties: ClassVar[List[str]] = ["asset", "free", "locked", "freeze", "withdrawing", "btcValuation"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetGetFundingAssetPost200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetGetFundingAssetPost200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "free": obj.get("free"), + "locked": obj.get("locked"), + "freeze": obj.get("freeze"), + "withdrawing": obj.get("withdrawing"), + "btcValuation": obj.get("btcValuation") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response.py new file mode 100644 index 0000000..3c56581 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner import SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response(BaseModel): + """ + SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response + """ # noqa: E501 + total: StrictInt + rows: List[SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner] + __properties: ClassVar[List[str]] = ["total", "rows"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "rows": [SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner.py new file mode 100644 index 0000000..181bbc9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner(BaseModel): + """ + SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner + """ # noqa: E501 + create_time: StrictInt = Field(alias="createTime") + tran_id: StrictInt = Field(alias="tranId") + type: StrictInt + asset: StrictStr + amount: StrictStr + status: StrictStr + __properties: ClassVar[List[str]] = ["createTime", "tranId", "type", "asset", "amount", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createTime": obj.get("createTime"), + "tranId": obj.get("tranId"), + "type": obj.get("type"), + "asset": obj.get("asset"), + "amount": obj.get("amount"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_trade_fee_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_trade_fee_get200_response_inner.py new file mode 100644 index 0000000..6776517 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_trade_fee_get200_response_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetTradeFeeGet200ResponseInner(BaseModel): + """ + SapiV1AssetTradeFeeGet200ResponseInner + """ # noqa: E501 + symbol: StrictStr + maker_commission: StrictStr = Field(alias="makerCommission") + taker_commission: StrictStr = Field(alias="takerCommission") + __properties: ClassVar[List[str]] = ["symbol", "makerCommission", "takerCommission"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetTradeFeeGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetTradeFeeGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "makerCommission": obj.get("makerCommission"), + "takerCommission": obj.get("takerCommission") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_transfer_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_transfer_get200_response.py new file mode 100644 index 0000000..8998182 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_transfer_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_asset_transfer_get200_response_rows_inner import SapiV1AssetTransferGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetTransferGet200Response(BaseModel): + """ + SapiV1AssetTransferGet200Response + """ # noqa: E501 + total: StrictInt + rows: List[SapiV1AssetTransferGet200ResponseRowsInner] + __properties: ClassVar[List[str]] = ["total", "rows"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetTransferGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetTransferGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "rows": [SapiV1AssetTransferGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_transfer_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_transfer_get200_response_rows_inner.py new file mode 100644 index 0000000..f750bf4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_transfer_get200_response_rows_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetTransferGet200ResponseRowsInner(BaseModel): + """ + SapiV1AssetTransferGet200ResponseRowsInner + """ # noqa: E501 + asset: StrictStr + amount: StrictStr + type: StrictStr + status: StrictStr + tran_id: StrictInt = Field(alias="tranId") + timestamp: StrictInt + __properties: ClassVar[List[str]] = ["asset", "amount", "type", "status", "tranId", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetTransferGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetTransferGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "amount": obj.get("amount"), + "type": obj.get("type"), + "status": obj.get("status"), + "tranId": obj.get("tranId"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_transfer_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_transfer_post200_response.py new file mode 100644 index 0000000..c590379 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_transfer_post200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetTransferPost200Response(BaseModel): + """ + SapiV1AssetTransferPost200Response + """ # noqa: E501 + tran_id: StrictInt = Field(alias="tranId") + __properties: ClassVar[List[str]] = ["tranId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetTransferPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetTransferPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tranId": obj.get("tranId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_wallet_balance_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_wallet_balance_get200_response_inner.py new file mode 100644 index 0000000..fa5b6d9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_asset_wallet_balance_get200_response_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1AssetWalletBalanceGet200ResponseInner(BaseModel): + """ + SapiV1AssetWalletBalanceGet200ResponseInner + """ # noqa: E501 + activate: StrictBool + balance: StrictStr + wallet_name: StrictStr = Field(alias="walletName") + __properties: ClassVar[List[str]] = ["activate", "balance", "walletName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1AssetWalletBalanceGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1AssetWalletBalanceGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "activate": obj.get("activate"), + "balance": obj.get("balance"), + "walletName": obj.get("walletName") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_redeem_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_redeem_post200_response.py new file mode 100644 index 0000000..9e9ae55 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_redeem_post200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1BlvtRedeemPost200Response(BaseModel): + """ + SapiV1BlvtRedeemPost200Response + """ # noqa: E501 + id: StrictInt + status: StrictStr = Field(description="S, P, and F for \"success\", \"pending\", and \"failure\"") + token_name: StrictStr = Field(alias="tokenName") + redeem_amount: StrictStr = Field(description="Redemption token amount", alias="redeemAmount") + amount: StrictStr = Field(description="Redemption value in usdt") + timestamp: StrictInt + __properties: ClassVar[List[str]] = ["id", "status", "tokenName", "redeemAmount", "amount", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1BlvtRedeemPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1BlvtRedeemPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "status": obj.get("status"), + "tokenName": obj.get("tokenName"), + "redeemAmount": obj.get("redeemAmount"), + "amount": obj.get("amount"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_redeem_record_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_redeem_record_get200_response_inner.py new file mode 100644 index 0000000..6bcccfd --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_redeem_record_get200_response_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1BlvtRedeemRecordGet200ResponseInner(BaseModel): + """ + SapiV1BlvtRedeemRecordGet200ResponseInner + """ # noqa: E501 + id: StrictInt + token_name: StrictStr = Field(alias="tokenName") + amount: StrictStr = Field(description="Redemption amount") + nav: StrictStr = Field(description="NAV of redemption") + fee: StrictStr = Field(description="Reemption fee") + net_proceed: StrictStr = Field(description="Net redemption value in usdt", alias="netProceed") + timestamp: StrictInt + __properties: ClassVar[List[str]] = ["id", "tokenName", "amount", "nav", "fee", "netProceed", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1BlvtRedeemRecordGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1BlvtRedeemRecordGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "tokenName": obj.get("tokenName"), + "amount": obj.get("amount"), + "nav": obj.get("nav"), + "fee": obj.get("fee"), + "netProceed": obj.get("netProceed"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_subscribe_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_subscribe_post200_response.py new file mode 100644 index 0000000..8f9a8f4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_subscribe_post200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1BlvtSubscribePost200Response(BaseModel): + """ + SapiV1BlvtSubscribePost200Response + """ # noqa: E501 + id: StrictInt + status: StrictStr = Field(description="S, P, and F for \"success\", \"pending\", and \"failure\"") + token_name: StrictStr = Field(alias="tokenName") + amount: StrictStr = Field(description="subscribed token amount") + cost: StrictStr = Field(description="subscription cost in usdt") + timestamp: StrictInt + __properties: ClassVar[List[str]] = ["id", "status", "tokenName", "amount", "cost", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1BlvtSubscribePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1BlvtSubscribePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "status": obj.get("status"), + "tokenName": obj.get("tokenName"), + "amount": obj.get("amount"), + "cost": obj.get("cost"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_subscribe_record_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_subscribe_record_get200_response.py new file mode 100644 index 0000000..5d3f6e6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_subscribe_record_get200_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1BlvtSubscribeRecordGet200Response(BaseModel): + """ + SapiV1BlvtSubscribeRecordGet200Response + """ # noqa: E501 + id: StrictInt + token_name: StrictStr = Field(alias="tokenName") + amount: StrictStr = Field(description="Subscription amount") + nav: StrictStr = Field(description="NAV price of subscription") + fee: StrictStr = Field(description="Subscription fee in usdt") + total_charge: StrictStr = Field(description="Subscription cost in usdt", alias="totalCharge") + timestamp: StrictInt + __properties: ClassVar[List[str]] = ["id", "tokenName", "amount", "nav", "fee", "totalCharge", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1BlvtSubscribeRecordGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1BlvtSubscribeRecordGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "tokenName": obj.get("tokenName"), + "amount": obj.get("amount"), + "nav": obj.get("nav"), + "fee": obj.get("fee"), + "totalCharge": obj.get("totalCharge"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_token_info_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_token_info_get200_response_inner.py new file mode 100644 index 0000000..4459023 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_token_info_get200_response_inner.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner import SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1BlvtTokenInfoGet200ResponseInner(BaseModel): + """ + SapiV1BlvtTokenInfoGet200ResponseInner + """ # noqa: E501 + token_name: StrictStr = Field(alias="tokenName") + description: StrictStr + underlying: StrictStr + token_issued: StrictStr = Field(alias="tokenIssued") + basket: StrictStr + current_baskets: List[SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner] = Field(alias="currentBaskets") + nav: StrictStr + real_leverage: StrictStr = Field(alias="realLeverage") + funding_rate: StrictStr = Field(alias="fundingRate") + daily_management_fee: StrictStr = Field(alias="dailyManagementFee") + purchase_fee_pct: StrictStr = Field(alias="purchaseFeePct") + daily_purchase_limit: StrictStr = Field(alias="dailyPurchaseLimit") + redeem_fee_pct: StrictStr = Field(alias="redeemFeePct") + daily_redeem_limit: StrictStr = Field(alias="dailyRedeemLimit") + timestamp: StrictInt + __properties: ClassVar[List[str]] = ["tokenName", "description", "underlying", "tokenIssued", "basket", "currentBaskets", "nav", "realLeverage", "fundingRate", "dailyManagementFee", "purchaseFeePct", "dailyPurchaseLimit", "redeemFeePct", "dailyRedeemLimit", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1BlvtTokenInfoGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in current_baskets (list) + _items = [] + if self.current_baskets: + for _item in self.current_baskets: + if _item: + _items.append(_item.to_dict()) + _dict['currentBaskets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1BlvtTokenInfoGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tokenName": obj.get("tokenName"), + "description": obj.get("description"), + "underlying": obj.get("underlying"), + "tokenIssued": obj.get("tokenIssued"), + "basket": obj.get("basket"), + "currentBaskets": [SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner.from_dict(_item) for _item in obj["currentBaskets"]] if obj.get("currentBaskets") is not None else None, + "nav": obj.get("nav"), + "realLeverage": obj.get("realLeverage"), + "fundingRate": obj.get("fundingRate"), + "dailyManagementFee": obj.get("dailyManagementFee"), + "purchaseFeePct": obj.get("purchaseFeePct"), + "dailyPurchaseLimit": obj.get("dailyPurchaseLimit"), + "redeemFeePct": obj.get("redeemFeePct"), + "dailyRedeemLimit": obj.get("dailyRedeemLimit"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner.py new file mode 100644 index 0000000..dc0505e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner(BaseModel): + """ + SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner + """ # noqa: E501 + symbol: StrictStr + amount: StrictStr + notional_value: StrictStr = Field(alias="notionalValue") + __properties: ClassVar[List[str]] = ["symbol", "amount", "notionalValue"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "amount": obj.get("amount"), + "notionalValue": obj.get("notionalValue") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_user_limit_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_user_limit_get200_response_inner.py new file mode 100644 index 0000000..29924d0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_blvt_user_limit_get200_response_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1BlvtUserLimitGet200ResponseInner(BaseModel): + """ + SapiV1BlvtUserLimitGet200ResponseInner + """ # noqa: E501 + token_name: StrictStr = Field(alias="tokenName") + user_daily_total_purchase_limit: StrictStr = Field(description="USDT", alias="userDailyTotalPurchaseLimit") + user_daily_total_redeem_limit: StrictStr = Field(description="USDT", alias="userDailyTotalRedeemLimit") + __properties: ClassVar[List[str]] = ["tokenName", "userDailyTotalPurchaseLimit", "userDailyTotalRedeemLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1BlvtUserLimitGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1BlvtUserLimitGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tokenName": obj.get("tokenName"), + "userDailyTotalPurchaseLimit": obj.get("userDailyTotalPurchaseLimit"), + "userDailyTotalRedeemLimit": obj.get("userDailyTotalRedeemLimit") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_c2c_order_match_list_user_order_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_c2c_order_match_list_user_order_history_get200_response.py new file mode 100644 index 0000000..b7f2b04 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_c2c_order_match_list_user_order_history_get200_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner import SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1C2cOrderMatchListUserOrderHistoryGet200Response(BaseModel): + """ + SapiV1C2cOrderMatchListUserOrderHistoryGet200Response + """ # noqa: E501 + code: StrictStr + message: StrictStr + data: List[SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner] + total: StrictInt + success: StrictBool + __properties: ClassVar[List[str]] = ["code", "message", "data", "total", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1C2cOrderMatchListUserOrderHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1C2cOrderMatchListUserOrderHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "data": [SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "total": obj.get("total"), + "success": obj.get("success") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner.py new file mode 100644 index 0000000..96cc4d6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner(BaseModel): + """ + SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner + """ # noqa: E501 + order_number: StrictStr = Field(alias="orderNumber") + adv_no: StrictStr = Field(alias="advNo") + trade_type: StrictStr = Field(alias="tradeType") + asset: StrictStr + fiat: StrictStr + fiat_symbol: StrictStr = Field(alias="fiatSymbol") + amount: StrictStr = Field(description="Quantity (in Crypto)") + total_price: StrictStr = Field(alias="totalPrice") + unit_price: StrictStr = Field(description="Unit Price (in Fiat)", alias="unitPrice") + order_status: StrictStr = Field(description="PENDING, TRADING, BUYER_PAYED, DISTRIBUTING, COMPLETED, IN_APPEAL, CANCELLED, CANCELLED_BY_SYSTEM", alias="orderStatus") + create_time: StrictInt = Field(alias="createTime") + commission: StrictStr = Field(description="Transaction Fee (in Crypto)") + counter_part_nick_name: StrictStr = Field(alias="counterPartNickName") + advertisement_role: StrictStr = Field(alias="advertisementRole") + __properties: ClassVar[List[str]] = ["orderNumber", "advNo", "tradeType", "asset", "fiat", "fiatSymbol", "amount", "totalPrice", "unitPrice", "orderStatus", "createTime", "commission", "counterPartNickName", "advertisementRole"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderNumber": obj.get("orderNumber"), + "advNo": obj.get("advNo"), + "tradeType": obj.get("tradeType"), + "asset": obj.get("asset"), + "fiat": obj.get("fiat"), + "fiatSymbol": obj.get("fiatSymbol"), + "amount": obj.get("amount"), + "totalPrice": obj.get("totalPrice"), + "unitPrice": obj.get("unitPrice"), + "orderStatus": obj.get("orderStatus"), + "createTime": obj.get("createTime"), + "commission": obj.get("commission"), + "counterPartNickName": obj.get("counterPartNickName"), + "advertisementRole": obj.get("advertisementRole") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_config_getall_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_config_getall_get200_response_inner.py new file mode 100644 index 0000000..038ed22 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_config_getall_get200_response_inner.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_capital_config_getall_get200_response_inner_network_list_inner import SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1CapitalConfigGetallGet200ResponseInner(BaseModel): + """ + SapiV1CapitalConfigGetallGet200ResponseInner + """ # noqa: E501 + coin: StrictStr + deposit_all_enable: StrictBool = Field(alias="depositAllEnable") + free: StrictStr + freeze: StrictStr + ipoable: StrictStr + ipoing: StrictStr + is_legal_money: StrictBool = Field(alias="isLegalMoney") + locked: StrictStr + name: StrictStr + network_list: List[SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner] = Field(alias="networkList") + storage: StrictStr + trading: StrictBool + withdraw_all_enable: StrictBool = Field(alias="withdrawAllEnable") + withdrawing: StrictStr + __properties: ClassVar[List[str]] = ["coin", "depositAllEnable", "free", "freeze", "ipoable", "ipoing", "isLegalMoney", "locked", "name", "networkList", "storage", "trading", "withdrawAllEnable", "withdrawing"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1CapitalConfigGetallGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in network_list (list) + _items = [] + if self.network_list: + for _item in self.network_list: + if _item: + _items.append(_item.to_dict()) + _dict['networkList'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1CapitalConfigGetallGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "coin": obj.get("coin"), + "depositAllEnable": obj.get("depositAllEnable"), + "free": obj.get("free"), + "freeze": obj.get("freeze"), + "ipoable": obj.get("ipoable"), + "ipoing": obj.get("ipoing"), + "isLegalMoney": obj.get("isLegalMoney"), + "locked": obj.get("locked"), + "name": obj.get("name"), + "networkList": [SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner.from_dict(_item) for _item in obj["networkList"]] if obj.get("networkList") is not None else None, + "storage": obj.get("storage"), + "trading": obj.get("trading"), + "withdrawAllEnable": obj.get("withdrawAllEnable"), + "withdrawing": obj.get("withdrawing") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_config_getall_get200_response_inner_network_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_config_getall_get200_response_inner_network_list_inner.py new file mode 100644 index 0000000..36cacbe --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_config_getall_get200_response_inner_network_list_inner.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner(BaseModel): + """ + SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner + """ # noqa: E501 + address_regex: StrictStr = Field(alias="addressRegex") + coin: StrictStr + deposit_desc: StrictStr = Field(description="shown only when \"depositEnable\" is false.", alias="depositDesc") + deposit_enable: StrictBool = Field(alias="depositEnable") + is_default: StrictBool = Field(alias="isDefault") + memo_regex: StrictStr = Field(alias="memoRegex") + min_confirm: StrictInt = Field(description="min number for balance confirmation.", alias="minConfirm") + name: StrictStr + network: StrictStr + special_tips: StrictStr = Field(alias="specialTips") + un_lock_confirm: StrictInt = Field(description="confirmation number for balance unlock.", alias="unLockConfirm") + withdraw_desc: StrictStr = Field(description="shown only when \"withdrawEnable\" is false", alias="withdrawDesc") + withdraw_enable: StrictBool = Field(alias="withdrawEnable") + withdraw_fee: StrictStr = Field(alias="withdrawFee") + withdraw_integer_multiple: StrictStr = Field(alias="withdrawIntegerMultiple") + withdraw_max: StrictStr = Field(alias="withdrawMax") + withdraw_min: StrictStr = Field(alias="withdrawMin") + same_address: StrictBool = Field(alias="sameAddress") + __properties: ClassVar[List[str]] = ["addressRegex", "coin", "depositDesc", "depositEnable", "isDefault", "memoRegex", "minConfirm", "name", "network", "specialTips", "unLockConfirm", "withdrawDesc", "withdrawEnable", "withdrawFee", "withdrawIntegerMultiple", "withdrawMax", "withdrawMin", "sameAddress"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "addressRegex": obj.get("addressRegex"), + "coin": obj.get("coin"), + "depositDesc": obj.get("depositDesc"), + "depositEnable": obj.get("depositEnable"), + "isDefault": obj.get("isDefault"), + "memoRegex": obj.get("memoRegex"), + "minConfirm": obj.get("minConfirm"), + "name": obj.get("name"), + "network": obj.get("network"), + "specialTips": obj.get("specialTips"), + "unLockConfirm": obj.get("unLockConfirm"), + "withdrawDesc": obj.get("withdrawDesc"), + "withdrawEnable": obj.get("withdrawEnable"), + "withdrawFee": obj.get("withdrawFee"), + "withdrawIntegerMultiple": obj.get("withdrawIntegerMultiple"), + "withdrawMax": obj.get("withdrawMax"), + "withdrawMin": obj.get("withdrawMin"), + "sameAddress": obj.get("sameAddress") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_contract_convertible_coins_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_contract_convertible_coins_get200_response.py new file mode 100644 index 0000000..d0cdfbf --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_contract_convertible_coins_get200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates import SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1CapitalContractConvertibleCoinsGet200Response(BaseModel): + """ + SapiV1CapitalContractConvertibleCoinsGet200Response + """ # noqa: E501 + convert_enabled: StrictBool = Field(alias="convertEnabled") + coins: List[StrictStr] + exchange_rates: SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates = Field(alias="exchangeRates") + __properties: ClassVar[List[str]] = ["convertEnabled", "coins", "exchangeRates"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1CapitalContractConvertibleCoinsGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of exchange_rates + if self.exchange_rates: + _dict['exchangeRates'] = self.exchange_rates.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1CapitalContractConvertibleCoinsGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "convertEnabled": obj.get("convertEnabled"), + "coins": obj.get("coins"), + "exchangeRates": SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates.from_dict(obj["exchangeRates"]) if obj.get("exchangeRates") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates.py new file mode 100644 index 0000000..f9f7d36 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates(BaseModel): + """ + SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates + """ # noqa: E501 + usdc: StrictStr = Field(alias="USDC") + tusd: StrictStr = Field(alias="TUSD") + usdp: StrictStr = Field(alias="USDP") + __properties: ClassVar[List[str]] = ["USDC", "TUSD", "USDP"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "USDC": obj.get("USDC"), + "TUSD": obj.get("TUSD"), + "USDP": obj.get("USDP") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_address_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_address_get200_response.py new file mode 100644 index 0000000..586149a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_address_get200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1CapitalDepositAddressGet200Response(BaseModel): + """ + SapiV1CapitalDepositAddressGet200Response + """ # noqa: E501 + address: StrictStr + coin: StrictStr + tag: StrictStr + url: StrictStr + __properties: ClassVar[List[str]] = ["address", "coin", "tag", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1CapitalDepositAddressGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1CapitalDepositAddressGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": obj.get("address"), + "coin": obj.get("coin"), + "tag": obj.get("tag"), + "url": obj.get("url") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_address_list_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_address_list_get200_response_inner.py new file mode 100644 index 0000000..cfb5e33 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_address_list_get200_response_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1CapitalDepositAddressListGet200ResponseInner(BaseModel): + """ + SapiV1CapitalDepositAddressListGet200ResponseInner + """ # noqa: E501 + coin: StrictStr + address: StrictStr + is_default: StrictInt = Field(alias="isDefault") + __properties: ClassVar[List[str]] = ["coin", "address", "isDefault"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1CapitalDepositAddressListGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1CapitalDepositAddressListGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "coin": obj.get("coin"), + "address": obj.get("address"), + "isDefault": obj.get("isDefault") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_credit_apply_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_credit_apply_post200_response.py new file mode 100644 index 0000000..6f8f01a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_credit_apply_post200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1CapitalDepositCreditApplyPost200Response(BaseModel): + """ + SapiV1CapitalDepositCreditApplyPost200Response + """ # noqa: E501 + code: StrictStr + message: StrictStr + data: StrictBool + success: StrictBool + __properties: ClassVar[List[str]] = ["code", "message", "data", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1CapitalDepositCreditApplyPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1CapitalDepositCreditApplyPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "data": obj.get("data"), + "success": obj.get("success") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_hisrec_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_hisrec_get200_response_inner.py new file mode 100644 index 0000000..c2a7493 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_hisrec_get200_response_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1CapitalDepositHisrecGet200ResponseInner(BaseModel): + """ + SapiV1CapitalDepositHisrecGet200ResponseInner + """ # noqa: E501 + amount: StrictStr + coin: StrictStr + network: StrictStr + status: StrictInt + address: StrictStr + address_tag: StrictStr = Field(alias="addressTag") + tx_id: StrictStr = Field(alias="txId") + insert_time: StrictInt = Field(alias="insertTime") + transfer_type: StrictInt = Field(alias="transferType") + unlock_confirm: StrictStr = Field(description="confirm times for unlocking", alias="unlockConfirm") + confirm_times: StrictStr = Field(alias="confirmTimes") + __properties: ClassVar[List[str]] = ["amount", "coin", "network", "status", "address", "addressTag", "txId", "insertTime", "transferType", "unlockConfirm", "confirmTimes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1CapitalDepositHisrecGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1CapitalDepositHisrecGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "coin": obj.get("coin"), + "network": obj.get("network"), + "status": obj.get("status"), + "address": obj.get("address"), + "addressTag": obj.get("addressTag"), + "txId": obj.get("txId"), + "insertTime": obj.get("insertTime"), + "transferType": obj.get("transferType"), + "unlockConfirm": obj.get("unlockConfirm"), + "confirmTimes": obj.get("confirmTimes") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_sub_address_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_sub_address_get200_response.py new file mode 100644 index 0000000..5a9ee94 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_sub_address_get200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1CapitalDepositSubAddressGet200Response(BaseModel): + """ + SapiV1CapitalDepositSubAddressGet200Response + """ # noqa: E501 + address: StrictStr + coin: StrictStr + tag: StrictStr + url: StrictStr + __properties: ClassVar[List[str]] = ["address", "coin", "tag", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1CapitalDepositSubAddressGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1CapitalDepositSubAddressGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": obj.get("address"), + "coin": obj.get("coin"), + "tag": obj.get("tag"), + "url": obj.get("url") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_sub_hisrec_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_sub_hisrec_get200_response_inner.py new file mode 100644 index 0000000..90419c3 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_deposit_sub_hisrec_get200_response_inner.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1CapitalDepositSubHisrecGet200ResponseInner(BaseModel): + """ + SapiV1CapitalDepositSubHisrecGet200ResponseInner + """ # noqa: E501 + amount: StrictStr + coin: StrictStr + network: StrictStr + status: StrictInt + address: StrictStr + address_tag: StrictStr = Field(alias="addressTag") + tx_id: StrictStr = Field(alias="txId") + insert_time: StrictInt = Field(alias="insertTime") + transfer_type: StrictInt = Field(alias="transferType") + confirm_times: StrictStr = Field(alias="confirmTimes") + __properties: ClassVar[List[str]] = ["amount", "coin", "network", "status", "address", "addressTag", "txId", "insertTime", "transferType", "confirmTimes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1CapitalDepositSubHisrecGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1CapitalDepositSubHisrecGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "coin": obj.get("coin"), + "network": obj.get("network"), + "status": obj.get("status"), + "address": obj.get("address"), + "addressTag": obj.get("addressTag"), + "txId": obj.get("txId"), + "insertTime": obj.get("insertTime"), + "transferType": obj.get("transferType"), + "confirmTimes": obj.get("confirmTimes") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_withdraw_address_list_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_withdraw_address_list_get200_response_inner.py new file mode 100644 index 0000000..96acd4b --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_withdraw_address_list_get200_response_inner.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1CapitalWithdrawAddressListGet200ResponseInner(BaseModel): + """ + SapiV1CapitalWithdrawAddressListGet200ResponseInner + """ # noqa: E501 + address: StrictStr + address_tag: StrictStr = Field(alias="addressTag") + coin: StrictStr + name: StrictStr + network: StrictStr + origin: StrictStr + origin_type: StrictStr = Field(alias="originType") + white_status: StrictBool = Field(alias="whiteStatus") + __properties: ClassVar[List[str]] = ["address", "addressTag", "coin", "name", "network", "origin", "originType", "whiteStatus"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1CapitalWithdrawAddressListGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1CapitalWithdrawAddressListGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": obj.get("address"), + "addressTag": obj.get("addressTag"), + "coin": obj.get("coin"), + "name": obj.get("name"), + "network": obj.get("network"), + "origin": obj.get("origin"), + "originType": obj.get("originType"), + "whiteStatus": obj.get("whiteStatus") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_withdraw_apply_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_withdraw_apply_post200_response.py new file mode 100644 index 0000000..2c48322 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_withdraw_apply_post200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1CapitalWithdrawApplyPost200Response(BaseModel): + """ + SapiV1CapitalWithdrawApplyPost200Response + """ # noqa: E501 + id: StrictStr + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1CapitalWithdrawApplyPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1CapitalWithdrawApplyPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_withdraw_history_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_withdraw_history_get200_response_inner.py new file mode 100644 index 0000000..9c3c101 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_capital_withdraw_history_get200_response_inner.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1CapitalWithdrawHistoryGet200ResponseInner(BaseModel): + """ + SapiV1CapitalWithdrawHistoryGet200ResponseInner + """ # noqa: E501 + address: StrictStr + amount: StrictStr + apply_time: StrictStr = Field(alias="applyTime") + coin: StrictStr + id: StrictStr + withdraw_order_id: StrictStr = Field(description="will not be returned if there's no withdrawOrderId for this withdraw.", alias="withdrawOrderId") + network: StrictStr + transfer_type: StrictInt = Field(description="1 for internal transfer, 0 for external transfer", alias="transferType") + status: StrictInt + transaction_fee: StrictStr = Field(alias="transactionFee") + confirm_no: Optional[StrictInt] = Field(default=None, alias="confirmNo") + info: Optional[StrictStr] = Field(default=None, description="Reason for withdrawal failure") + tx_id: StrictStr = Field(alias="txId") + __properties: ClassVar[List[str]] = ["address", "amount", "applyTime", "coin", "id", "withdrawOrderId", "network", "transferType", "status", "transactionFee", "confirmNo", "info", "txId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1CapitalWithdrawHistoryGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1CapitalWithdrawHistoryGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": obj.get("address"), + "amount": obj.get("amount"), + "applyTime": obj.get("applyTime"), + "coin": obj.get("coin"), + "id": obj.get("id"), + "withdrawOrderId": obj.get("withdrawOrderId"), + "network": obj.get("network"), + "transferType": obj.get("transferType"), + "status": obj.get("status"), + "transactionFee": obj.get("transactionFee"), + "confirmNo": obj.get("confirmNo"), + "info": obj.get("info"), + "txId": obj.get("txId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_accept_quote_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_accept_quote_post200_response.py new file mode 100644 index 0000000..8851144 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_accept_quote_post200_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ConvertAcceptQuotePost200Response(BaseModel): + """ + SapiV1ConvertAcceptQuotePost200Response + """ # noqa: E501 + order_id: StrictStr = Field(alias="orderId") + create_time: StrictInt = Field(alias="createTime") + order_status: StrictStr = Field(alias="orderStatus") + __properties: ClassVar[List[str]] = ["orderId", "createTime", "orderStatus"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ConvertAcceptQuotePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ConvertAcceptQuotePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderId": obj.get("orderId"), + "createTime": obj.get("createTime"), + "orderStatus": obj.get("orderStatus") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_asset_info_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_asset_info_get200_response_inner.py new file mode 100644 index 0000000..d19682e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_asset_info_get200_response_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ConvertAssetInfoGet200ResponseInner(BaseModel): + """ + SapiV1ConvertAssetInfoGet200ResponseInner + """ # noqa: E501 + asset: StrictStr + fraction: StrictInt + __properties: ClassVar[List[str]] = ["asset", "fraction"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ConvertAssetInfoGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ConvertAssetInfoGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "fraction": obj.get("fraction") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_exchange_info_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_exchange_info_get200_response_inner.py new file mode 100644 index 0000000..5715987 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_exchange_info_get200_response_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ConvertExchangeInfoGet200ResponseInner(BaseModel): + """ + SapiV1ConvertExchangeInfoGet200ResponseInner + """ # noqa: E501 + from_asset: StrictStr = Field(alias="fromAsset") + to_asset: StrictStr = Field(alias="toAsset") + from_asset_min_amount: StrictStr = Field(alias="fromAssetMinAmount") + from_asset_max_amount: StrictStr = Field(alias="fromAssetMaxAmount") + to_asset_min_amount: StrictStr = Field(alias="toAssetMinAmount") + to_asset_max_amount: StrictStr = Field(alias="toAssetMaxAmount") + __properties: ClassVar[List[str]] = ["fromAsset", "toAsset", "fromAssetMinAmount", "fromAssetMaxAmount", "toAssetMinAmount", "toAssetMaxAmount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ConvertExchangeInfoGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ConvertExchangeInfoGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fromAsset": obj.get("fromAsset"), + "toAsset": obj.get("toAsset"), + "fromAssetMinAmount": obj.get("fromAssetMinAmount"), + "fromAssetMaxAmount": obj.get("fromAssetMaxAmount"), + "toAssetMinAmount": obj.get("toAssetMinAmount"), + "toAssetMaxAmount": obj.get("toAssetMaxAmount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_get_quote_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_get_quote_post200_response.py new file mode 100644 index 0000000..6c2b29c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_get_quote_post200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ConvertGetQuotePost200Response(BaseModel): + """ + SapiV1ConvertGetQuotePost200Response + """ # noqa: E501 + quote_id: StrictStr = Field(alias="quoteId") + ratio: StrictStr + inverse_ratio: StrictStr = Field(alias="inverseRatio") + valid_timestamp: StrictInt = Field(alias="validTimestamp") + to_amount: StrictStr = Field(alias="toAmount") + from_amount: StrictStr = Field(alias="fromAmount") + __properties: ClassVar[List[str]] = ["quoteId", "ratio", "inverseRatio", "validTimestamp", "toAmount", "fromAmount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ConvertGetQuotePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ConvertGetQuotePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "quoteId": obj.get("quoteId"), + "ratio": obj.get("ratio"), + "inverseRatio": obj.get("inverseRatio"), + "validTimestamp": obj.get("validTimestamp"), + "toAmount": obj.get("toAmount"), + "fromAmount": obj.get("fromAmount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_cancel_order_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_cancel_order_post200_response.py new file mode 100644 index 0000000..4a0a33c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_cancel_order_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ConvertLimitCancelOrderPost200Response(BaseModel): + """ + SapiV1ConvertLimitCancelOrderPost200Response + """ # noqa: E501 + order_id: StrictInt = Field(alias="orderId") + status: StrictStr + __properties: ClassVar[List[str]] = ["orderId", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ConvertLimitCancelOrderPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ConvertLimitCancelOrderPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderId": obj.get("orderId"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_place_order_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_place_order_post200_response.py new file mode 100644 index 0000000..1da4cc0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_place_order_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ConvertLimitPlaceOrderPost200Response(BaseModel): + """ + SapiV1ConvertLimitPlaceOrderPost200Response + """ # noqa: E501 + order_id: StrictInt = Field(alias="orderId") + status: StrictStr + __properties: ClassVar[List[str]] = ["orderId", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ConvertLimitPlaceOrderPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ConvertLimitPlaceOrderPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderId": obj.get("orderId"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_query_open_orders_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_query_open_orders_get200_response.py new file mode 100644 index 0000000..8ca2320 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_query_open_orders_get200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_convert_limit_query_open_orders_get200_response_list_inner import SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ConvertLimitQueryOpenOrdersGet200Response(BaseModel): + """ + SapiV1ConvertLimitQueryOpenOrdersGet200Response + """ # noqa: E501 + list: List[SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner] + __properties: ClassVar[List[str]] = ["list"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ConvertLimitQueryOpenOrdersGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in list (list) + _items = [] + if self.list: + for _item in self.list: + if _item: + _items.append(_item.to_dict()) + _dict['list'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ConvertLimitQueryOpenOrdersGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "list": [SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner.from_dict(_item) for _item in obj["list"]] if obj.get("list") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_query_open_orders_get200_response_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_query_open_orders_get200_response_list_inner.py new file mode 100644 index 0000000..82c2338 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_limit_query_open_orders_get200_response_list_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner(BaseModel): + """ + SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner + """ # noqa: E501 + quote_id: StrictStr = Field(alias="quoteId") + order_id: StrictInt = Field(alias="orderId") + order_status: StrictStr = Field(alias="orderStatus") + from_asset: StrictStr = Field(alias="fromAsset") + from_amount: StrictStr = Field(alias="fromAmount") + to_asset: StrictStr = Field(alias="toAsset") + to_amount: StrictStr = Field(alias="toAmount") + ratio: StrictStr + inverse_ratio: StrictStr = Field(alias="inverseRatio") + create_time: StrictInt = Field(alias="createTime") + expired_timestamp: StrictInt = Field(alias="expiredTimestamp") + __properties: ClassVar[List[str]] = ["quoteId", "orderId", "orderStatus", "fromAsset", "fromAmount", "toAsset", "toAmount", "ratio", "inverseRatio", "createTime", "expiredTimestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "quoteId": obj.get("quoteId"), + "orderId": obj.get("orderId"), + "orderStatus": obj.get("orderStatus"), + "fromAsset": obj.get("fromAsset"), + "fromAmount": obj.get("fromAmount"), + "toAsset": obj.get("toAsset"), + "toAmount": obj.get("toAmount"), + "ratio": obj.get("ratio"), + "inverseRatio": obj.get("inverseRatio"), + "createTime": obj.get("createTime"), + "expiredTimestamp": obj.get("expiredTimestamp") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_order_status_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_order_status_get200_response.py new file mode 100644 index 0000000..cebe3bb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_order_status_get200_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ConvertOrderStatusGet200Response(BaseModel): + """ + SapiV1ConvertOrderStatusGet200Response + """ # noqa: E501 + order_id: StrictInt = Field(alias="orderId") + order_status: StrictStr = Field(alias="orderStatus") + from_asset: StrictStr = Field(alias="fromAsset") + from_amount: StrictStr = Field(alias="fromAmount") + to_asset: StrictStr = Field(alias="toAsset") + to_amount: StrictStr = Field(alias="toAmount") + ratio: StrictStr + inverse_ratio: StrictStr = Field(alias="inverseRatio") + create_time: StrictInt = Field(alias="createTime") + __properties: ClassVar[List[str]] = ["orderId", "orderStatus", "fromAsset", "fromAmount", "toAsset", "toAmount", "ratio", "inverseRatio", "createTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ConvertOrderStatusGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ConvertOrderStatusGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderId": obj.get("orderId"), + "orderStatus": obj.get("orderStatus"), + "fromAsset": obj.get("fromAsset"), + "fromAmount": obj.get("fromAmount"), + "toAsset": obj.get("toAsset"), + "toAmount": obj.get("toAmount"), + "ratio": obj.get("ratio"), + "inverseRatio": obj.get("inverseRatio"), + "createTime": obj.get("createTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_trade_flow_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_trade_flow_get200_response.py new file mode 100644 index 0000000..9b41c10 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_trade_flow_get200_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_convert_trade_flow_get200_response_list_inner import SapiV1ConvertTradeFlowGet200ResponseListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ConvertTradeFlowGet200Response(BaseModel): + """ + SapiV1ConvertTradeFlowGet200Response + """ # noqa: E501 + list: List[SapiV1ConvertTradeFlowGet200ResponseListInner] + start_time: StrictInt = Field(alias="startTime") + end_time: StrictInt = Field(alias="endTime") + limit: StrictInt + more_data: StrictBool = Field(alias="moreData") + __properties: ClassVar[List[str]] = ["list", "startTime", "endTime", "limit", "moreData"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ConvertTradeFlowGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in list (list) + _items = [] + if self.list: + for _item in self.list: + if _item: + _items.append(_item.to_dict()) + _dict['list'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ConvertTradeFlowGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "list": [SapiV1ConvertTradeFlowGet200ResponseListInner.from_dict(_item) for _item in obj["list"]] if obj.get("list") is not None else None, + "startTime": obj.get("startTime"), + "endTime": obj.get("endTime"), + "limit": obj.get("limit"), + "moreData": obj.get("moreData") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_trade_flow_get200_response_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_trade_flow_get200_response_list_inner.py new file mode 100644 index 0000000..9e5a896 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_convert_trade_flow_get200_response_list_inner.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ConvertTradeFlowGet200ResponseListInner(BaseModel): + """ + SapiV1ConvertTradeFlowGet200ResponseListInner + """ # noqa: E501 + quote_id: StrictStr = Field(alias="quoteId") + order_id: StrictInt = Field(alias="orderId") + order_status: StrictStr = Field(alias="orderStatus") + from_asset: StrictStr = Field(alias="fromAsset") + from_amount: StrictStr = Field(alias="fromAmount") + to_asset: StrictStr = Field(alias="toAsset") + to_amount: StrictStr = Field(alias="toAmount") + ratio: StrictStr = Field(description="price ratio") + inverse_ratio: StrictStr = Field(description="inverse price", alias="inverseRatio") + create_time: StrictInt = Field(alias="createTime") + __properties: ClassVar[List[str]] = ["quoteId", "orderId", "orderStatus", "fromAsset", "fromAmount", "toAsset", "toAmount", "ratio", "inverseRatio", "createTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ConvertTradeFlowGet200ResponseListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ConvertTradeFlowGet200ResponseListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "quoteId": obj.get("quoteId"), + "orderId": obj.get("orderId"), + "orderStatus": obj.get("orderStatus"), + "fromAsset": obj.get("fromAsset"), + "fromAmount": obj.get("fromAmount"), + "toAsset": obj.get("toAsset"), + "toAmount": obj.get("toAmount"), + "ratio": obj.get("ratio"), + "inverseRatio": obj.get("inverseRatio"), + "createTime": obj.get("createTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_accounts_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_accounts_get200_response.py new file mode 100644 index 0000000..5ae817a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_accounts_get200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1DciProductAccountsGet200Response(BaseModel): + """ + SapiV1DciProductAccountsGet200Response + """ # noqa: E501 + total_amount_in_btc: StrictStr = Field(description="Total BTC amounts in Dual Investment", alias="totalAmountInBTC") + total_amount_in_usdt: StrictStr = Field(description="Total USDT equivalents in BTC in Dual Investment", alias="totalAmountInUSDT") + __properties: ClassVar[List[str]] = ["totalAmountInBTC", "totalAmountInUSDT"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1DciProductAccountsGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1DciProductAccountsGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalAmountInBTC": obj.get("totalAmountInBTC"), + "totalAmountInUSDT": obj.get("totalAmountInUSDT") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_auto_compound_edit_status_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_auto_compound_edit_status_post200_response.py new file mode 100644 index 0000000..1f45946 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_auto_compound_edit_status_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1DciProductAutoCompoundEditStatusPost200Response(BaseModel): + """ + SapiV1DciProductAutoCompoundEditStatusPost200Response + """ # noqa: E501 + position_id: StrictStr = Field(alias="positionId") + auto_compound_plan: StrictStr = Field(description="NONE, STANDARD, ADVANCED", alias="autoCompoundPlan") + __properties: ClassVar[List[str]] = ["positionId", "autoCompoundPlan"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1DciProductAutoCompoundEditStatusPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1DciProductAutoCompoundEditStatusPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "positionId": obj.get("positionId"), + "autoCompoundPlan": obj.get("autoCompoundPlan") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_list_get200_response.py new file mode 100644 index 0000000..c62cbe6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_list_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_dci_product_list_get200_response_list_inner import SapiV1DciProductListGet200ResponseListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1DciProductListGet200Response(BaseModel): + """ + SapiV1DciProductListGet200Response + """ # noqa: E501 + total: StrictInt + list: List[SapiV1DciProductListGet200ResponseListInner] + __properties: ClassVar[List[str]] = ["total", "list"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1DciProductListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in list (list) + _items = [] + if self.list: + for _item in self.list: + if _item: + _items.append(_item.to_dict()) + _dict['list'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1DciProductListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "list": [SapiV1DciProductListGet200ResponseListInner.from_dict(_item) for _item in obj["list"]] if obj.get("list") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_list_get200_response_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_list_get200_response_list_inner.py new file mode 100644 index 0000000..8bb00d6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_list_get200_response_list_inner.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1DciProductListGet200ResponseListInner(BaseModel): + """ + SapiV1DciProductListGet200ResponseListInner + """ # noqa: E501 + id: StrictStr + invest_coin: StrictStr = Field(alias="investCoin") + exercised_coin: StrictStr = Field(alias="exercisedCoin") + strike_price: StrictStr = Field(alias="strikePrice") + duration: StrictInt + settle_date: StrictInt = Field(alias="settleDate") + purchase_decimal: StrictInt = Field(alias="purchaseDecimal") + purchase_end_time: StrictInt = Field(alias="purchaseEndTime") + can_purchase: StrictBool = Field(alias="canPurchase") + apr: StrictStr + order_id: StrictInt = Field(alias="orderId") + min_amount: StrictStr = Field(alias="minAmount") + max_amount: StrictStr = Field(alias="maxAmount") + create_timestamp: StrictInt = Field(alias="createTimestamp") + option_type: StrictStr = Field(alias="optionType") + is_auto_compound_enable: StrictBool = Field(alias="isAutoCompoundEnable") + auto_compound_plan_list: List[StrictStr] = Field(alias="autoCompoundPlanList") + __properties: ClassVar[List[str]] = ["id", "investCoin", "exercisedCoin", "strikePrice", "duration", "settleDate", "purchaseDecimal", "purchaseEndTime", "canPurchase", "apr", "orderId", "minAmount", "maxAmount", "createTimestamp", "optionType", "isAutoCompoundEnable", "autoCompoundPlanList"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1DciProductListGet200ResponseListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1DciProductListGet200ResponseListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "investCoin": obj.get("investCoin"), + "exercisedCoin": obj.get("exercisedCoin"), + "strikePrice": obj.get("strikePrice"), + "duration": obj.get("duration"), + "settleDate": obj.get("settleDate"), + "purchaseDecimal": obj.get("purchaseDecimal"), + "purchaseEndTime": obj.get("purchaseEndTime"), + "canPurchase": obj.get("canPurchase"), + "apr": obj.get("apr"), + "orderId": obj.get("orderId"), + "minAmount": obj.get("minAmount"), + "maxAmount": obj.get("maxAmount"), + "createTimestamp": obj.get("createTimestamp"), + "optionType": obj.get("optionType"), + "isAutoCompoundEnable": obj.get("isAutoCompoundEnable"), + "autoCompoundPlanList": obj.get("autoCompoundPlanList") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_positions_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_positions_get200_response.py new file mode 100644 index 0000000..ac349f4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_positions_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_dci_product_positions_get200_response_list_inner import SapiV1DciProductPositionsGet200ResponseListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1DciProductPositionsGet200Response(BaseModel): + """ + SapiV1DciProductPositionsGet200Response + """ # noqa: E501 + total: StrictInt + list: List[SapiV1DciProductPositionsGet200ResponseListInner] + __properties: ClassVar[List[str]] = ["total", "list"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1DciProductPositionsGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in list (list) + _items = [] + if self.list: + for _item in self.list: + if _item: + _items.append(_item.to_dict()) + _dict['list'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1DciProductPositionsGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "list": [SapiV1DciProductPositionsGet200ResponseListInner.from_dict(_item) for _item in obj["list"]] if obj.get("list") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_positions_get200_response_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_positions_get200_response_list_inner.py new file mode 100644 index 0000000..59dd757 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_positions_get200_response_list_inner.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1DciProductPositionsGet200ResponseListInner(BaseModel): + """ + SapiV1DciProductPositionsGet200ResponseListInner + """ # noqa: E501 + id: StrictStr + invest_coin: StrictStr = Field(alias="investCoin") + exercised_coin: StrictStr = Field(alias="exercisedCoin") + subscription_amount: StrictStr = Field(alias="subscriptionAmount") + strike_price: StrictStr = Field(alias="strikePrice") + duration: StrictInt + settle_date: StrictInt = Field(alias="settleDate") + purchase_status: StrictStr = Field(alias="purchaseStatus") + apr: StrictStr + order_id: StrictInt = Field(alias="orderId") + purchase_end_time: StrictInt = Field(alias="purchaseEndTime") + option_type: StrictStr = Field(alias="optionType") + auto_compound_plan: StrictStr = Field(alias="autoCompoundPlan") + __properties: ClassVar[List[str]] = ["id", "investCoin", "exercisedCoin", "subscriptionAmount", "strikePrice", "duration", "settleDate", "purchaseStatus", "apr", "orderId", "purchaseEndTime", "optionType", "autoCompoundPlan"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1DciProductPositionsGet200ResponseListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1DciProductPositionsGet200ResponseListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "investCoin": obj.get("investCoin"), + "exercisedCoin": obj.get("exercisedCoin"), + "subscriptionAmount": obj.get("subscriptionAmount"), + "strikePrice": obj.get("strikePrice"), + "duration": obj.get("duration"), + "settleDate": obj.get("settleDate"), + "purchaseStatus": obj.get("purchaseStatus"), + "apr": obj.get("apr"), + "orderId": obj.get("orderId"), + "purchaseEndTime": obj.get("purchaseEndTime"), + "optionType": obj.get("optionType"), + "autoCompoundPlan": obj.get("autoCompoundPlan") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_subscribe_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_subscribe_post200_response.py new file mode 100644 index 0000000..e0fd859 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_dci_product_subscribe_post200_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1DciProductSubscribePost200Response(BaseModel): + """ + SapiV1DciProductSubscribePost200Response + """ # noqa: E501 + position_id: StrictInt = Field(alias="positionId") + invest_coin: StrictStr = Field(alias="investCoin") + exercised_coin: StrictStr = Field(alias="exercisedCoin") + subscription_amount: StrictStr = Field(alias="subscriptionAmount") + duration: StrictInt + auto_compound_plan: StrictStr = Field(description="STANDARD, ADVANCED, this field won't display when autocompound is set to None", alias="autoCompoundPlan") + strike_price: StrictStr = Field(alias="strikePrice") + settle_date: StrictInt = Field(alias="settleDate") + purchase_status: StrictStr = Field(alias="purchaseStatus") + apr: StrictStr + order_id: StrictInt = Field(alias="orderId") + purchase_time: StrictInt = Field(alias="purchaseTime") + option_type: Optional[StrictStr] = Field(default=None, alias="optionType"") + __properties: ClassVar[List[str]] = ["positionId", "investCoin", "exercisedCoin", "subscriptionAmount", "duration", "autoCompoundPlan", "strikePrice", "settleDate", "purchaseStatus", "apr", "orderId", "purchaseTime", "optionType""] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1DciProductSubscribePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1DciProductSubscribePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "positionId": obj.get("positionId"), + "investCoin": obj.get("investCoin"), + "exercisedCoin": obj.get("exercisedCoin"), + "subscriptionAmount": obj.get("subscriptionAmount"), + "duration": obj.get("duration"), + "autoCompoundPlan": obj.get("autoCompoundPlan"), + "strikePrice": obj.get("strikePrice"), + "settleDate": obj.get("settleDate"), + "purchaseStatus": obj.get("purchaseStatus"), + "apr": obj.get("apr"), + "orderId": obj.get("orderId"), + "purchaseTime": obj.get("purchaseTime"), + "optionType"": obj.get("optionType"") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rate_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rate_history_get200_response.py new file mode 100644 index 0000000..e3f2c43 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rate_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingEthHistoryRateHistoryGet200Response(BaseModel): + """ + SapiV1EthStakingEthHistoryRateHistoryGet200Response + """ # noqa: E501 + rows: List[SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryRateHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryRateHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner.py new file mode 100644 index 0000000..c08baf5 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner + """ # noqa: E501 + annual_percentage_rate: StrictStr = Field(description="BETH APR", alias="annualPercentageRate") + exchange_rate: StrictStr = Field(description="BETH value per 1 WBETH", alias="exchangeRate") + time: StrictInt + __properties: ClassVar[List[str]] = ["annualPercentageRate", "exchangeRate", "time"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "annualPercentageRate": obj.get("annualPercentageRate"), + "exchangeRate": obj.get("exchangeRate"), + "time": obj.get("time") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_redemption_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_redemption_history_get200_response.py new file mode 100644 index 0000000..dcb0dfb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_redemption_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response(BaseModel): + """ + SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response + """ # noqa: E501 + rows: List[SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner.py new file mode 100644 index 0000000..9504acf --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner + """ # noqa: E501 + time: StrictInt + arrival_time: StrictInt = Field(alias="arrivalTime") + asset: StrictStr + amount: StrictStr + status: StrictStr = Field(description="PENDING, SUCCESS, FAILED") + distribute_asset: StrictStr = Field(alias="distributeAsset") + distribute_amount: StrictStr = Field(alias="distributeAmount") + conversion_ratio: StrictStr = Field(alias="conversionRatio") + __properties: ClassVar[List[str]] = ["time", "arrivalTime", "asset", "amount", "status", "distributeAsset", "distributeAmount", "conversionRatio"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "time": obj.get("time"), + "arrivalTime": obj.get("arrivalTime"), + "asset": obj.get("asset"), + "amount": obj.get("amount"), + "status": obj.get("status"), + "distributeAsset": obj.get("distributeAsset"), + "distributeAmount": obj.get("distributeAmount"), + "conversionRatio": obj.get("conversionRatio") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rewards_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rewards_history_get200_response.py new file mode 100644 index 0000000..1701ccc --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rewards_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingEthHistoryRewardsHistoryGet200Response(BaseModel): + """ + SapiV1EthStakingEthHistoryRewardsHistoryGet200Response + """ # noqa: E501 + rows: List[SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryRewardsHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryRewardsHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner.py new file mode 100644 index 0000000..bcf15c9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner + """ # noqa: E501 + time: StrictInt + asset: StrictStr + holding: StrictStr = Field(description="BETH holding balance") + amount: StrictStr = Field(description="Distributed rewards") + annual_percentage_rate: StrictStr = Field(description="0.5 means 50% here", alias="annualPercentageRate") + status: StrictStr + __properties: ClassVar[List[str]] = ["time", "asset", "holding", "amount", "annualPercentageRate", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "time": obj.get("time"), + "asset": obj.get("asset"), + "holding": obj.get("holding"), + "amount": obj.get("amount"), + "annualPercentageRate": obj.get("annualPercentageRate"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_staking_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_staking_history_get200_response.py new file mode 100644 index 0000000..027d01d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_staking_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingEthHistoryStakingHistoryGet200Response(BaseModel): + """ + SapiV1EthStakingEthHistoryStakingHistoryGet200Response + """ # noqa: E501 + rows: List[SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryStakingHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryStakingHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner.py new file mode 100644 index 0000000..f8a021f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner + """ # noqa: E501 + time: StrictInt + asset: StrictStr + amount: StrictStr + status: StrictStr = Field(description="PENDING, SUCCESS, FAILED") + distribute_amount: StrictStr = Field(alias="distributeAmount") + conversion_ratio: StrictStr = Field(alias="conversionRatio") + __properties: ClassVar[List[str]] = ["time", "asset", "amount", "status", "distributeAmount", "conversionRatio"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "time": obj.get("time"), + "asset": obj.get("asset"), + "amount": obj.get("amount"), + "status": obj.get("status"), + "distributeAmount": obj.get("distributeAmount"), + "conversionRatio": obj.get("conversionRatio") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response.py new file mode 100644 index 0000000..7eb58f2 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response(BaseModel): + """ + SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response + """ # noqa: E501 + est_rewards_in_eth: StrictStr = Field(alias="estRewardsInETH") + rows: List[SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["estRewardsInETH", "rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "estRewardsInETH": obj.get("estRewardsInETH"), + "rows": [SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner.py new file mode 100644 index 0000000..aa5bc30 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner + """ # noqa: E501 + time: StrictInt + amount_in_eth: StrictStr = Field(description="Estimated rewards accrued within WBETH", alias="amountInETH") + holding: StrictStr = Field(description="WBETH holding balance") + holding_in_eth: StrictStr = Field(alias="holdingInETH") + annual_percentage_rate: StrictStr = Field(alias="annualPercentageRate") + __properties: ClassVar[List[str]] = ["time", "amountInETH", "holding", "holdingInETH", "annualPercentageRate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "time": obj.get("time"), + "amountInETH": obj.get("amountInETH"), + "holding": obj.get("holding"), + "holdingInETH": obj.get("holdingInETH"), + "annualPercentageRate": obj.get("annualPercentageRate") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_quota_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_quota_get200_response.py new file mode 100644 index 0000000..45f4764 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_quota_get200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingEthQuotaGet200Response(BaseModel): + """ + SapiV1EthStakingEthQuotaGet200Response + """ # noqa: E501 + left_staking_personal_quota: StrictStr = Field(description="Show min(Daily available limit, total personal staking quota)", alias="leftStakingPersonalQuota") + left_redemption_personal_quota: StrictStr = Field(description="Show min(Daily personal redeem quota, total redemption limit)", alias="leftRedemptionPersonalQuota") + __properties: ClassVar[List[str]] = ["leftStakingPersonalQuota", "leftRedemptionPersonalQuota"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthQuotaGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthQuotaGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "leftStakingPersonalQuota": obj.get("leftStakingPersonalQuota"), + "leftRedemptionPersonalQuota": obj.get("leftRedemptionPersonalQuota") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_redeem_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_redeem_post200_response.py new file mode 100644 index 0000000..eac00fc --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_eth_redeem_post200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingEthRedeemPost200Response(BaseModel): + """ + SapiV1EthStakingEthRedeemPost200Response + """ # noqa: E501 + success: StrictBool + arrival_time: StrictInt = Field(alias="arrivalTime") + eth_amount: StrictStr = Field(alias="ethAmount") + conversion_ratio: StrictStr = Field(alias="conversionRatio") + __properties: ClassVar[List[str]] = ["success", "arrivalTime", "ethAmount", "conversionRatio"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthRedeemPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingEthRedeemPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "arrivalTime": obj.get("arrivalTime"), + "ethAmount": obj.get("ethAmount"), + "conversionRatio": obj.get("conversionRatio") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response.py new file mode 100644 index 0000000..1b5b102 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner import SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response(BaseModel): + """ + SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response + """ # noqa: E501 + rows: List[SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner.py new file mode 100644 index 0000000..1194f90 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner + """ # noqa: E501 + time: StrictInt + from_asset: StrictStr = Field(alias="fromAsset") + from_amount: StrictStr = Field(alias="fromAmount") + to_asset: StrictStr = Field(alias="toAsset") + to_amount: StrictStr = Field(alias="toAmount") + exchange_rate: StrictStr = Field(description="BETH amount per 1 WBETH", alias="exchangeRate") + status: StrictStr = Field(description="PENDING, SUCCESS, FAILED") + __properties: ClassVar[List[str]] = ["time", "fromAsset", "fromAmount", "toAsset", "toAmount", "exchangeRate", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "time": obj.get("time"), + "fromAsset": obj.get("fromAsset"), + "fromAmount": obj.get("fromAmount"), + "toAsset": obj.get("toAsset"), + "toAmount": obj.get("toAmount"), + "exchangeRate": obj.get("exchangeRate"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response.py new file mode 100644 index 0000000..7a9197c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner import SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingWbethHistoryWrapHistoryGet200Response(BaseModel): + """ + SapiV1EthStakingWbethHistoryWrapHistoryGet200Response + """ # noqa: E501 + rows: List[SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingWbethHistoryWrapHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingWbethHistoryWrapHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner.py new file mode 100644 index 0000000..9b184a4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner + """ # noqa: E501 + time: StrictInt + from_asset: StrictStr = Field(alias="fromAsset") + from_amount: StrictStr = Field(alias="fromAmount") + to_asset: StrictStr = Field(alias="toAsset") + to_amount: StrictStr = Field(alias="toAmount") + exchange_rate: StrictStr = Field(description="BETH amount per 1 WBETH", alias="exchangeRate") + status: StrictStr = Field(description="PENDING, SUCCESS, FAILED") + __properties: ClassVar[List[str]] = ["time", "fromAsset", "fromAmount", "toAsset", "toAmount", "exchangeRate", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "time": obj.get("time"), + "fromAsset": obj.get("fromAsset"), + "fromAmount": obj.get("fromAmount"), + "toAsset": obj.get("toAsset"), + "toAmount": obj.get("toAmount"), + "exchangeRate": obj.get("exchangeRate"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_wrap_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_wrap_post200_response.py new file mode 100644 index 0000000..5996676 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_eth_staking_wbeth_wrap_post200_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1EthStakingWbethWrapPost200Response(BaseModel): + """ + SapiV1EthStakingWbethWrapPost200Response + """ # noqa: E501 + success: StrictBool + wbeth_amount: StrictStr = Field(alias="wbethAmount") + exchange_rate: StrictStr = Field(alias="exchangeRate") + __properties: ClassVar[List[str]] = ["success", "wbethAmount", "exchangeRate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1EthStakingWbethWrapPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1EthStakingWbethWrapPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "wbethAmount": obj.get("wbethAmount"), + "exchangeRate": obj.get("exchangeRate") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_orders_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_orders_get200_response.py new file mode 100644 index 0000000..3535472 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_orders_get200_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_fiat_orders_get200_response_data_inner import SapiV1FiatOrdersGet200ResponseDataInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1FiatOrdersGet200Response(BaseModel): + """ + SapiV1FiatOrdersGet200Response + """ # noqa: E501 + code: StrictStr + message: StrictStr + data: List[SapiV1FiatOrdersGet200ResponseDataInner] + total: StrictInt + success: StrictBool + __properties: ClassVar[List[str]] = ["code", "message", "data", "total", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1FiatOrdersGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1FiatOrdersGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "data": [SapiV1FiatOrdersGet200ResponseDataInner.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "total": obj.get("total"), + "success": obj.get("success") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_orders_get200_response_data_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_orders_get200_response_data_inner.py new file mode 100644 index 0000000..554c065 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_orders_get200_response_data_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1FiatOrdersGet200ResponseDataInner(BaseModel): + """ + SapiV1FiatOrdersGet200ResponseDataInner + """ # noqa: E501 + order_no: StrictStr = Field(alias="orderNo") + fiat_currency: StrictStr = Field(alias="fiatCurrency") + indicated_amount: StrictStr = Field(alias="indicatedAmount") + amount: StrictStr + total_fee: StrictStr = Field(alias="totalFee") + method: StrictStr + status: StrictStr = Field(description="Processing, Failed, Successful, Finished, Refunding, Refunded, Refund Failed, Order Partial credit Stopped") + create_time: StrictInt = Field(alias="createTime") + update_time: StrictInt = Field(alias="updateTime") + __properties: ClassVar[List[str]] = ["orderNo", "fiatCurrency", "indicatedAmount", "amount", "totalFee", "method", "status", "createTime", "updateTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1FiatOrdersGet200ResponseDataInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1FiatOrdersGet200ResponseDataInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderNo": obj.get("orderNo"), + "fiatCurrency": obj.get("fiatCurrency"), + "indicatedAmount": obj.get("indicatedAmount"), + "amount": obj.get("amount"), + "totalFee": obj.get("totalFee"), + "method": obj.get("method"), + "status": obj.get("status"), + "createTime": obj.get("createTime"), + "updateTime": obj.get("updateTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_payments_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_payments_get200_response.py new file mode 100644 index 0000000..12907fe --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_payments_get200_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_fiat_payments_get200_response_data_inner import SapiV1FiatPaymentsGet200ResponseDataInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1FiatPaymentsGet200Response(BaseModel): + """ + SapiV1FiatPaymentsGet200Response + """ # noqa: E501 + code: StrictStr + message: StrictStr + data: List[SapiV1FiatPaymentsGet200ResponseDataInner] + total: StrictInt + success: StrictBool + __properties: ClassVar[List[str]] = ["code", "message", "data", "total", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1FiatPaymentsGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1FiatPaymentsGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "data": [SapiV1FiatPaymentsGet200ResponseDataInner.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "total": obj.get("total"), + "success": obj.get("success") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_payments_get200_response_data_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_payments_get200_response_data_inner.py new file mode 100644 index 0000000..b290ee9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_fiat_payments_get200_response_data_inner.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1FiatPaymentsGet200ResponseDataInner(BaseModel): + """ + SapiV1FiatPaymentsGet200ResponseDataInner + """ # noqa: E501 + order_no: StrictStr = Field(alias="orderNo") + source_amount: StrictStr = Field(description="Fiat trade amount", alias="sourceAmount") + fiat_currency: StrictStr = Field(description="Fiat token", alias="fiatCurrency") + obtain_amount: StrictStr = Field(description="Crypto trade amount", alias="obtainAmount") + crypto_currency: StrictStr = Field(description="Crypto token", alias="cryptoCurrency") + total_fee: StrictStr = Field(description="Trade fee", alias="totalFee") + price: StrictStr + status: StrictStr = Field(description="Processing, Completed, Failed, Refunded") + create_time: StrictInt = Field(alias="createTime") + update_time: StrictInt = Field(alias="updateTime") + __properties: ClassVar[List[str]] = ["orderNo", "sourceAmount", "fiatCurrency", "obtainAmount", "cryptoCurrency", "totalFee", "price", "status", "createTime", "updateTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1FiatPaymentsGet200ResponseDataInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1FiatPaymentsGet200ResponseDataInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderNo": obj.get("orderNo"), + "sourceAmount": obj.get("sourceAmount"), + "fiatCurrency": obj.get("fiatCurrency"), + "obtainAmount": obj.get("obtainAmount"), + "cryptoCurrency": obj.get("cryptoCurrency"), + "totalFee": obj.get("totalFee"), + "price": obj.get("price"), + "status": obj.get("status"), + "createTime": obj.get("createTime"), + "updateTime": obj.get("updateTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_futures_hist_data_link_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_futures_hist_data_link_get200_response.py new file mode 100644 index 0000000..9d1104f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_futures_hist_data_link_get200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_futures_hist_data_link_get200_response_data_inner import SapiV1FuturesHistDataLinkGet200ResponseDataInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1FuturesHistDataLinkGet200Response(BaseModel): + """ + SapiV1FuturesHistDataLinkGet200Response + """ # noqa: E501 + data: List[SapiV1FuturesHistDataLinkGet200ResponseDataInner] + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1FuturesHistDataLinkGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1FuturesHistDataLinkGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [SapiV1FuturesHistDataLinkGet200ResponseDataInner.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_futures_hist_data_link_get200_response_data_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_futures_hist_data_link_get200_response_data_inner.py new file mode 100644 index 0000000..e15becb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_futures_hist_data_link_get200_response_data_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1FuturesHistDataLinkGet200ResponseDataInner(BaseModel): + """ + SapiV1FuturesHistDataLinkGet200ResponseDataInner + """ # noqa: E501 + day: StrictStr + url: StrictStr + __properties: ClassVar[List[str]] = ["day", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1FuturesHistDataLinkGet200ResponseDataInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1FuturesHistDataLinkGet200ResponseDataInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "day": obj.get("day"), + "url": obj.get("url") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_futures_transfer_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_futures_transfer_get200_response.py new file mode 100644 index 0000000..4d65e6c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_futures_transfer_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_futures_transfer_get200_response_rows_inner import SapiV1FuturesTransferGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1FuturesTransferGet200Response(BaseModel): + """ + SapiV1FuturesTransferGet200Response + """ # noqa: E501 + rows: List[SapiV1FuturesTransferGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1FuturesTransferGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1FuturesTransferGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1FuturesTransferGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_futures_transfer_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_futures_transfer_get200_response_rows_inner.py new file mode 100644 index 0000000..027665a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_futures_transfer_get200_response_rows_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1FuturesTransferGet200ResponseRowsInner(BaseModel): + """ + SapiV1FuturesTransferGet200ResponseRowsInner + """ # noqa: E501 + asset: StrictStr + tran_id: StrictInt = Field(alias="tranId") + amount: StrictStr + type: StrictStr + timestamp: StrictInt + status: StrictStr = Field(description="one of PENDING (pending to execution), CONFIRMED (successfully transfered), FAILED (execution failed, nothing happened to your account);") + __properties: ClassVar[List[str]] = ["asset", "tranId", "amount", "type", "timestamp", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1FuturesTransferGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1FuturesTransferGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "tranId": obj.get("tranId"), + "amount": obj.get("amount"), + "type": obj.get("type"), + "timestamp": obj.get("timestamp"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_buy_code_token_limit_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_buy_code_token_limit_get200_response.py new file mode 100644 index 0000000..994286f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_buy_code_token_limit_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_giftcard_buy_code_token_limit_get200_response_data import SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1GiftcardBuyCodeTokenLimitGet200Response(BaseModel): + """ + SapiV1GiftcardBuyCodeTokenLimitGet200Response + """ # noqa: E501 + code: StrictStr + message: StrictStr + data: SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData + success: StrictBool + __properties: ClassVar[List[str]] = ["code", "message", "data", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1GiftcardBuyCodeTokenLimitGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1GiftcardBuyCodeTokenLimitGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "data": SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "success": obj.get("success") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_buy_code_token_limit_get200_response_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_buy_code_token_limit_get200_response_data.py new file mode 100644 index 0000000..883e96a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_buy_code_token_limit_get200_response_data.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData(BaseModel): + """ + SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData + """ # noqa: E501 + coin: Optional[StrictStr] = None + from_min: Optional[StrictStr] = Field(default=None, alias="fromMin") + from_max: Optional[StrictStr] = Field(default=None, alias="fromMax") + __properties: ClassVar[List[str]] = ["coin", "fromMin", "fromMax"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "coin": obj.get("coin"), + "fromMin": obj.get("fromMin"), + "fromMax": obj.get("fromMax") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_create_code_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_create_code_post200_response.py new file mode 100644 index 0000000..4cfaeb6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_create_code_post200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_giftcard_create_code_post200_response_data import SapiV1GiftcardCreateCodePost200ResponseData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1GiftcardCreateCodePost200Response(BaseModel): + """ + SapiV1GiftcardCreateCodePost200Response + """ # noqa: E501 + code: StrictStr + message: StrictStr + data: SapiV1GiftcardCreateCodePost200ResponseData + success: StrictBool + __properties: ClassVar[List[str]] = ["code", "message", "data", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1GiftcardCreateCodePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1GiftcardCreateCodePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "data": SapiV1GiftcardCreateCodePost200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "success": obj.get("success") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_create_code_post200_response_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_create_code_post200_response_data.py new file mode 100644 index 0000000..e4f9c0f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_create_code_post200_response_data.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1GiftcardCreateCodePost200ResponseData(BaseModel): + """ + SapiV1GiftcardCreateCodePost200ResponseData + """ # noqa: E501 + reference_no: StrictStr = Field(alias="referenceNo") + code: StrictStr + expired_time: StrictInt = Field(alias="expiredTime") + __properties: ClassVar[List[str]] = ["referenceNo", "code", "expiredTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1GiftcardCreateCodePost200ResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1GiftcardCreateCodePost200ResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "referenceNo": obj.get("referenceNo"), + "code": obj.get("code"), + "expiredTime": obj.get("expiredTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_cryptography_rsa_public_key_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_cryptography_rsa_public_key_get200_response.py new file mode 100644 index 0000000..805034d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_cryptography_rsa_public_key_get200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1GiftcardCryptographyRsaPublicKeyGet200Response(BaseModel): + """ + SapiV1GiftcardCryptographyRsaPublicKeyGet200Response + """ # noqa: E501 + code: StrictStr + message: StrictStr + data: StrictStr + success: StrictBool + __properties: ClassVar[List[str]] = ["code", "message", "data", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1GiftcardCryptographyRsaPublicKeyGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1GiftcardCryptographyRsaPublicKeyGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "data": obj.get("data"), + "success": obj.get("success") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_redeem_code_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_redeem_code_post200_response.py new file mode 100644 index 0000000..7e6fe99 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_redeem_code_post200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_giftcard_redeem_code_post200_response_data import SapiV1GiftcardRedeemCodePost200ResponseData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1GiftcardRedeemCodePost200Response(BaseModel): + """ + SapiV1GiftcardRedeemCodePost200Response + """ # noqa: E501 + code: StrictStr + message: StrictStr + data: SapiV1GiftcardRedeemCodePost200ResponseData + success: StrictBool + __properties: ClassVar[List[str]] = ["code", "message", "data", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1GiftcardRedeemCodePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1GiftcardRedeemCodePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "data": SapiV1GiftcardRedeemCodePost200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "success": obj.get("success") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_redeem_code_post200_response_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_redeem_code_post200_response_data.py new file mode 100644 index 0000000..cbf25fb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_redeem_code_post200_response_data.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1GiftcardRedeemCodePost200ResponseData(BaseModel): + """ + SapiV1GiftcardRedeemCodePost200ResponseData + """ # noqa: E501 + token: StrictStr + amount: StrictStr + reference_no: StrictStr = Field(alias="referenceNo") + identity_no: StrictStr = Field(alias="identityNo") + __properties: ClassVar[List[str]] = ["token", "amount", "referenceNo", "identityNo"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1GiftcardRedeemCodePost200ResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1GiftcardRedeemCodePost200ResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token"), + "amount": obj.get("amount"), + "referenceNo": obj.get("referenceNo"), + "identityNo": obj.get("identityNo") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_verify_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_verify_get200_response.py new file mode 100644 index 0000000..3cde93e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_verify_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_giftcard_verify_get200_response_data import SapiV1GiftcardVerifyGet200ResponseData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1GiftcardVerifyGet200Response(BaseModel): + """ + SapiV1GiftcardVerifyGet200Response + """ # noqa: E501 + code: StrictStr + message: StrictStr + data: SapiV1GiftcardVerifyGet200ResponseData + success: StrictBool + __properties: ClassVar[List[str]] = ["code", "message", "data", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1GiftcardVerifyGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1GiftcardVerifyGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "data": SapiV1GiftcardVerifyGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "success": obj.get("success") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_verify_get200_response_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_verify_get200_response_data.py new file mode 100644 index 0000000..3a8328b --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_giftcard_verify_get200_response_data.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1GiftcardVerifyGet200ResponseData(BaseModel): + """ + SapiV1GiftcardVerifyGet200ResponseData + """ # noqa: E501 + valid: StrictBool + token: StrictStr + amount: StrictStr + __properties: ClassVar[List[str]] = ["valid", "token", "amount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1GiftcardVerifyGet200ResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1GiftcardVerifyGet200ResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "valid": obj.get("valid"), + "token": obj.get("token"), + "amount": obj.get("amount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_all_asset_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_all_asset_get200_response.py new file mode 100644 index 0000000..047acc9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_all_asset_get200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestAllAssetGet200Response(BaseModel): + """ + SapiV1LendingAutoInvestAllAssetGet200Response + """ # noqa: E501 + target_assets: List[StrictStr] = Field(alias="targetAssets") + source_assets: List[StrictStr] = Field(alias="sourceAssets") + __properties: ClassVar[List[str]] = ["targetAssets", "sourceAssets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestAllAssetGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestAllAssetGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetAssets": obj.get("targetAssets"), + "sourceAssets": obj.get("sourceAssets") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_history_list_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_history_list_get200_response_inner.py new file mode 100644 index 0000000..8fee0c5 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_history_list_get200_response_inner.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestHistoryListGet200ResponseInner(BaseModel): + """ + SapiV1LendingAutoInvestHistoryListGet200ResponseInner + """ # noqa: E501 + id: StrictInt + target_asset: StrictStr = Field(alias="targetAsset") + plan_type: StrictStr = Field(alias="planType") + plan_name: StrictStr = Field(alias="planName") + plan_id: StrictInt = Field(alias="planId") + transaction_date_time: StrictInt = Field(alias="transactionDateTime") + transaction_status: StrictStr = Field(alias="transactionStatus") + failed_type: StrictStr = Field(alias="failedType") + source_asset: StrictStr = Field(alias="sourceAsset") + source_asset_amount: StrictStr = Field(alias="sourceAssetAmount") + target_asset_amount: StrictStr = Field(alias="targetAssetAmount") + source_wallet: StrictStr = Field(alias="sourceWallet") + flexible_used: StrictStr = Field(alias="flexibleUsed") + transaction_fee: StrictStr = Field(alias="transactionFee") + transaction_fee_unit: StrictStr = Field(alias="transactionFeeUnit") + execution_price: StrictStr = Field(alias="executionPrice") + execution_type: StrictStr = Field(alias="executionType") + subscription_cycle: StrictStr = Field(alias="subscriptionCycle") + __properties: ClassVar[List[str]] = ["id", "targetAsset", "planType", "planName", "planId", "transactionDateTime", "transactionStatus", "failedType", "sourceAsset", "sourceAssetAmount", "targetAssetAmount", "sourceWallet", "flexibleUsed", "transactionFee", "transactionFeeUnit", "executionPrice", "executionType", "subscriptionCycle"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestHistoryListGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestHistoryListGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "targetAsset": obj.get("targetAsset"), + "planType": obj.get("planType"), + "planName": obj.get("planName"), + "planId": obj.get("planId"), + "transactionDateTime": obj.get("transactionDateTime"), + "transactionStatus": obj.get("transactionStatus"), + "failedType": obj.get("failedType"), + "sourceAsset": obj.get("sourceAsset"), + "sourceAssetAmount": obj.get("sourceAssetAmount"), + "targetAssetAmount": obj.get("targetAssetAmount"), + "sourceWallet": obj.get("sourceWallet"), + "flexibleUsed": obj.get("flexibleUsed"), + "transactionFee": obj.get("transactionFee"), + "transactionFeeUnit": obj.get("transactionFeeUnit"), + "executionPrice": obj.get("executionPrice"), + "executionType": obj.get("executionType"), + "subscriptionCycle": obj.get("subscriptionCycle") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_info_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_info_get200_response.py new file mode 100644 index 0000000..e51e7a7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_info_get200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner import SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestIndexInfoGet200Response(BaseModel): + """ + SapiV1LendingAutoInvestIndexInfoGet200Response + """ # noqa: E501 + index_id: StrictInt = Field(alias="indexId") + index_name: StrictStr = Field(alias="indexName") + status: StrictStr + asset_allocation: List[SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner] = Field(alias="assetAllocation") + __properties: ClassVar[List[str]] = ["indexId", "indexName", "status", "assetAllocation"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestIndexInfoGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in asset_allocation (list) + _items = [] + if self.asset_allocation: + for _item in self.asset_allocation: + if _item: + _items.append(_item.to_dict()) + _dict['assetAllocation'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestIndexInfoGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "indexId": obj.get("indexId"), + "indexName": obj.get("indexName"), + "status": obj.get("status"), + "assetAllocation": [SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner.from_dict(_item) for _item in obj["assetAllocation"]] if obj.get("assetAllocation") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner.py new file mode 100644 index 0000000..ceb0cd6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner(BaseModel): + """ + SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner + """ # noqa: E501 + target_asset: StrictStr = Field(alias="targetAsset") + allocation: StrictStr + __properties: ClassVar[List[str]] = ["targetAsset", "allocation"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetAsset": obj.get("targetAsset"), + "allocation": obj.get("allocation") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_user_summary_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_user_summary_get200_response.py new file mode 100644 index 0000000..396ba67 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_user_summary_get200_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner import SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner import SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestIndexUserSummaryGet200Response(BaseModel): + """ + SapiV1LendingAutoInvestIndexUserSummaryGet200Response + """ # noqa: E501 + index_id: StrictInt = Field(alias="indexId") + total_invested_in_usd: StrictStr = Field(alias="totalInvestedInUSD") + current_invested_in_usd: StrictStr = Field(description="current invest", alias="currentInvestedInUSD") + pnl_in_usd: StrictStr = Field(description="PNL of the plan in USD based on current amount", alias="pnlInUSD") + roi: StrictStr = Field(description="ROI of the plan based on current amount") + asset_allocation: List[SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner] = Field(alias="assetAllocation") + details: List[SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner] + __properties: ClassVar[List[str]] = ["indexId", "totalInvestedInUSD", "currentInvestedInUSD", "pnlInUSD", "roi", "assetAllocation", "details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestIndexUserSummaryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in asset_allocation (list) + _items = [] + if self.asset_allocation: + for _item in self.asset_allocation: + if _item: + _items.append(_item.to_dict()) + _dict['assetAllocation'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in details (list) + _items = [] + if self.details: + for _item in self.details: + if _item: + _items.append(_item.to_dict()) + _dict['details'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestIndexUserSummaryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "indexId": obj.get("indexId"), + "totalInvestedInUSD": obj.get("totalInvestedInUSD"), + "currentInvestedInUSD": obj.get("currentInvestedInUSD"), + "pnlInUSD": obj.get("pnlInUSD"), + "roi": obj.get("roi"), + "assetAllocation": [SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner.from_dict(_item) for _item in obj["assetAllocation"]] if obj.get("assetAllocation") is not None else None, + "details": [SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner.py new file mode 100644 index 0000000..2e97ac6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner(BaseModel): + """ + SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner + """ # noqa: E501 + target_asset: StrictStr = Field(description="for pie chart", alias="targetAsset") + allocation: StrictStr + __properties: ClassVar[List[str]] = ["targetAsset", "allocation"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetAsset": obj.get("targetAsset"), + "allocation": obj.get("allocation") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner.py new file mode 100644 index 0000000..9f331f7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner(BaseModel): + """ + SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner + """ # noqa: E501 + target_asset: StrictStr = Field(alias="targetAsset") + average_price_in_usd: StrictStr = Field(description="average price of the asset in USD", alias="averagePriceInUSD") + total_invested_in_usd: StrictStr = Field(description="total source asset invested for this target asset in equivilent of USD", alias="totalInvestedInUSD") + current_invested_in_usd: StrictStr = Field(description="current invest", alias="currentInvestedInUSD") + purchased_amount: StrictStr = Field(description="purchased amount of target asset", alias="purchasedAmount") + pnl_in_usd: StrictStr = Field(description="PNL denominated in USD", alias="pnlInUSD") + roi: StrictStr = Field(description="ROI calculated in decimal") + percentage: StrictStr = Field(description="asset allocation in the plan. If it's single plan, then it's 100") + available_amount: StrictStr = Field(alias="availableAmount") + redeemed_amount: StrictStr = Field(alias="redeemedAmount") + asset_value_in_usd: StrictStr = Field(alias="assetValueInUSD") + __properties: ClassVar[List[str]] = ["targetAsset", "averagePriceInUSD", "totalInvestedInUSD", "currentInvestedInUSD", "purchasedAmount", "pnlInUSD", "roi", "percentage", "availableAmount", "redeemedAmount", "assetValueInUSD"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetAsset": obj.get("targetAsset"), + "averagePriceInUSD": obj.get("averagePriceInUSD"), + "totalInvestedInUSD": obj.get("totalInvestedInUSD"), + "currentInvestedInUSD": obj.get("currentInvestedInUSD"), + "purchasedAmount": obj.get("purchasedAmount"), + "pnlInUSD": obj.get("pnlInUSD"), + "roi": obj.get("roi"), + "percentage": obj.get("percentage"), + "availableAmount": obj.get("availableAmount"), + "redeemedAmount": obj.get("redeemedAmount"), + "assetValueInUSD": obj.get("assetValueInUSD") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_one_off_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_one_off_post200_response.py new file mode 100644 index 0000000..27e780c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_one_off_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestOneOffPost200Response(BaseModel): + """ + SapiV1LendingAutoInvestOneOffPost200Response + """ # noqa: E501 + transaction_id: StrictInt = Field(alias="transactionId") + wait_second: StrictInt = Field(alias="waitSecond") + __properties: ClassVar[List[str]] = ["transactionId", "waitSecond"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestOneOffPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestOneOffPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "transactionId": obj.get("transactionId"), + "waitSecond": obj.get("waitSecond") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner.py new file mode 100644 index 0000000..34dc8e7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestOneOffPostDetailsParameterInner(BaseModel): + """ + SapiV1LendingAutoInvestOneOffPostDetailsParameterInner + """ # noqa: E501 + target_asset: Optional[StrictStr] = Field(default=None, alias="targetAsset") + percentage: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["targetAsset", "percentage"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestOneOffPostDetailsParameterInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestOneOffPostDetailsParameterInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetAsset": obj.get("targetAsset"), + "percentage": obj.get("percentage") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_one_off_status_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_one_off_status_get200_response.py new file mode 100644 index 0000000..e5fe94e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_one_off_status_get200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestOneOffStatusGet200Response(BaseModel): + """ + SapiV1LendingAutoInvestOneOffStatusGet200Response + """ # noqa: E501 + transaction_id: StrictInt = Field(alias="transactionId") + status: StrictStr + __properties: ClassVar[List[str]] = ["transactionId", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestOneOffStatusGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestOneOffStatusGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "transactionId": obj.get("transactionId"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_add_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_add_post200_response.py new file mode 100644 index 0000000..fd59bd0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_add_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestPlanAddPost200Response(BaseModel): + """ + SapiV1LendingAutoInvestPlanAddPost200Response + """ # noqa: E501 + plan_id: StrictInt = Field(alias="planId") + next_execution_date_time: StrictInt = Field(alias="nextExecutionDateTime") + __properties: ClassVar[List[str]] = ["planId", "nextExecutionDateTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanAddPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanAddPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "planId": obj.get("planId"), + "nextExecutionDateTime": obj.get("nextExecutionDateTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner.py new file mode 100644 index 0000000..0467fcf --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner(BaseModel): + """ + SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner + """ # noqa: E501 + target_asset: Optional[StrictStr] = Field(default=None, alias="targetAsset") + percentage: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["targetAsset", "percentage"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetAsset": obj.get("targetAsset"), + "percentage": obj.get("percentage") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_edit_status_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_edit_status_post200_response.py new file mode 100644 index 0000000..da382f8 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_edit_status_post200_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestPlanEditStatusPost200Response(BaseModel): + """ + SapiV1LendingAutoInvestPlanEditStatusPost200Response + """ # noqa: E501 + plan_id: StrictInt = Field(alias="planId") + next_execution_date_time: StrictInt = Field(alias="nextExecutionDateTime") + status: StrictStr + __properties: ClassVar[List[str]] = ["planId", "nextExecutionDateTime", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanEditStatusPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanEditStatusPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "planId": obj.get("planId"), + "nextExecutionDateTime": obj.get("nextExecutionDateTime"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_id_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_id_get200_response.py new file mode 100644 index 0000000..55c84c8 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_id_get200_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner import SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestPlanIdGet200Response(BaseModel): + """ + SapiV1LendingAutoInvestPlanIdGet200Response + """ # noqa: E501 + plan_value_in_usd: Optional[StrictStr] = Field(default=None, alias="planValueInUSD") + plan_value_in_btc: Optional[StrictStr] = Field(default=None, alias="planValueInBTC") + pnl_in_usd: Optional[StrictStr] = Field(default=None, alias="pnlInUSD") + roi: Optional[StrictStr] = None + plan: Optional[List[SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner]] = None + __properties: ClassVar[List[str]] = ["planValueInUSD", "planValueInBTC", "pnlInUSD", "roi", "plan"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanIdGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in plan (list) + _items = [] + if self.plan: + for _item in self.plan: + if _item: + _items.append(_item.to_dict()) + _dict['plan'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanIdGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "planValueInUSD": obj.get("planValueInUSD"), + "planValueInBTC": obj.get("planValueInBTC"), + "pnlInUSD": obj.get("pnlInUSD"), + "roi": obj.get("roi"), + "plan": [SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner.from_dict(_item) for _item in obj["plan"]] if obj.get("plan") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner.py new file mode 100644 index 0000000..802f1aa --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner import SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner(BaseModel): + """ + SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner + """ # noqa: E501 + plan_id: StrictInt = Field(alias="planId") + plan_type: StrictStr = Field(alias="planType") + edit_allowed: StrictStr = Field(alias="editAllowed") + flexible_allowed_to_use: StrictStr = Field(alias="flexibleAllowedToUse") + creation_date_time: StrictInt = Field(alias="creationDateTime") + first_execution_date_time: StrictInt = Field(alias="firstExecutionDateTime") + next_execution_date_time: StrictInt = Field(alias="nextExecutionDateTime") + status: StrictStr + target_asset: StrictStr = Field(alias="targetAsset") + source_asset: StrictStr = Field(alias="sourceAsset") + total_invested_in_usd: StrictStr = Field(alias="totalInvestedInUSD") + plan_value_in_usd: StrictStr = Field(alias="planValueInUSD") + pnl_in_usd: StrictStr = Field(alias="pnlInUSD") + roi: StrictStr + details: List[SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner] + __properties: ClassVar[List[str]] = ["planId", "planType", "editAllowed", "flexibleAllowedToUse", "creationDateTime", "firstExecutionDateTime", "nextExecutionDateTime", "status", "targetAsset", "sourceAsset", "totalInvestedInUSD", "planValueInUSD", "pnlInUSD", "roi", "details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in details (list) + _items = [] + if self.details: + for _item in self.details: + if _item: + _items.append(_item.to_dict()) + _dict['details'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "planId": obj.get("planId"), + "planType": obj.get("planType"), + "editAllowed": obj.get("editAllowed"), + "flexibleAllowedToUse": obj.get("flexibleAllowedToUse"), + "creationDateTime": obj.get("creationDateTime"), + "firstExecutionDateTime": obj.get("firstExecutionDateTime"), + "nextExecutionDateTime": obj.get("nextExecutionDateTime"), + "status": obj.get("status"), + "targetAsset": obj.get("targetAsset"), + "sourceAsset": obj.get("sourceAsset"), + "totalInvestedInUSD": obj.get("totalInvestedInUSD"), + "planValueInUSD": obj.get("planValueInUSD"), + "pnlInUSD": obj.get("pnlInUSD"), + "roi": obj.get("roi"), + "details": [SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner.py new file mode 100644 index 0000000..e070e56 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner(BaseModel): + """ + SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner + """ # noqa: E501 + target_asset: StrictStr = Field(alias="targetAsset") + average_price_in_usd: StrictStr = Field(alias="averagePriceInUSD") + total_invested_in_usd: StrictStr = Field(alias="totalInvestedInUSD") + purchased_amount: StrictStr = Field(alias="purchasedAmount") + purchased_amount_unit: StrictStr = Field(alias="purchasedAmountUnit") + pnl_in_usd: StrictStr = Field(alias="pnlInUSD") + roi: StrictStr + percentage: StrictStr + asset_status: StrictStr = Field(alias="assetStatus") + available_amount: StrictStr = Field(alias="availableAmount") + available_amount_unit: StrictStr = Field(alias="availableAmountUnit") + redeemed_amout: StrictStr = Field(alias="redeemedAmout") + redeemed_amout_unit: StrictStr = Field(alias="redeemedAmoutUnit") + asset_value_in_usd: StrictStr = Field(alias="assetValueInUSD") + __properties: ClassVar[List[str]] = ["targetAsset", "averagePriceInUSD", "totalInvestedInUSD", "purchasedAmount", "purchasedAmountUnit", "pnlInUSD", "roi", "percentage", "assetStatus", "availableAmount", "availableAmountUnit", "redeemedAmout", "redeemedAmoutUnit", "assetValueInUSD"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetAsset": obj.get("targetAsset"), + "averagePriceInUSD": obj.get("averagePriceInUSD"), + "totalInvestedInUSD": obj.get("totalInvestedInUSD"), + "purchasedAmount": obj.get("purchasedAmount"), + "purchasedAmountUnit": obj.get("purchasedAmountUnit"), + "pnlInUSD": obj.get("pnlInUSD"), + "roi": obj.get("roi"), + "percentage": obj.get("percentage"), + "assetStatus": obj.get("assetStatus"), + "availableAmount": obj.get("availableAmount"), + "availableAmountUnit": obj.get("availableAmountUnit"), + "redeemedAmout": obj.get("redeemedAmout"), + "redeemedAmoutUnit": obj.get("redeemedAmoutUnit"), + "assetValueInUSD": obj.get("assetValueInUSD") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_list_get200_response.py new file mode 100644 index 0000000..cbba7d6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_list_get200_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner import SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestPlanListGet200Response(BaseModel): + """ + SapiV1LendingAutoInvestPlanListGet200Response + """ # noqa: E501 + plan_value_in_usd: StrictStr = Field(alias="planValueInUSD") + plan_value_in_btc: StrictStr = Field(alias="planValueInBTC") + pnl_in_usd: StrictStr = Field(alias="pnlInUSD") + roi: StrictStr + plan: List[SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner] + __properties: ClassVar[List[str]] = ["planValueInUSD", "planValueInBTC", "pnlInUSD", "roi", "plan"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in plan (list) + _items = [] + if self.plan: + for _item in self.plan: + if _item: + _items.append(_item.to_dict()) + _dict['plan'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "planValueInUSD": obj.get("planValueInUSD"), + "planValueInBTC": obj.get("planValueInBTC"), + "pnlInUSD": obj.get("pnlInUSD"), + "roi": obj.get("roi"), + "plan": [SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner.from_dict(_item) for _item in obj["plan"]] if obj.get("plan") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner.py new file mode 100644 index 0000000..a0c6815 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner(BaseModel): + """ + SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner + """ # noqa: E501 + plan_id: StrictInt = Field(alias="planId") + plan_type: StrictStr = Field(alias="planType") + edit_allowed: StrictStr = Field(alias="editAllowed") + creation_date_time: StrictInt = Field(alias="creationDateTime") + first_execution_date_time: StrictInt = Field(alias="firstExecutionDateTime") + next_execution_date_time: StrictInt = Field(alias="nextExecutionDateTime") + status: StrictStr + last_updated_date_time: StrictInt = Field(alias="lastUpdatedDateTime") + target_asset: StrictStr = Field(alias="targetAsset") + total_target_amount: StrictStr = Field(alias="totalTargetAmount") + source_asset: StrictStr = Field(alias="sourceAsset") + total_invested_in_usd: StrictStr = Field(alias="totalInvestedInUSD") + subscription_amount: StrictStr = Field(alias="subscriptionAmount") + subscription_cycle: StrictStr = Field(alias="subscriptionCycle") + subscription_start_day: StrictStr = Field(alias="subscriptionStartDay") + subscription_start_weekday: StrictStr = Field(alias="subscriptionStartWeekday") + subscription_start_time: StrictStr = Field(alias="subscriptionStartTime") + source_wallet: StrictStr = Field(alias="sourceWallet") + flexible_allowed_to_use: StrictStr = Field(alias="flexibleAllowedToUse") + plan_value_in_usd: StrictStr = Field(alias="planValueInUSD") + pnl_in_usd: StrictStr = Field(alias="pnlInUSD") + roi: StrictStr + __properties: ClassVar[List[str]] = ["planId", "planType", "editAllowed", "creationDateTime", "firstExecutionDateTime", "nextExecutionDateTime", "status", "lastUpdatedDateTime", "targetAsset", "totalTargetAmount", "sourceAsset", "totalInvestedInUSD", "subscriptionAmount", "subscriptionCycle", "subscriptionStartDay", "subscriptionStartWeekday", "subscriptionStartTime", "sourceWallet", "flexibleAllowedToUse", "planValueInUSD", "pnlInUSD", "roi"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "planId": obj.get("planId"), + "planType": obj.get("planType"), + "editAllowed": obj.get("editAllowed"), + "creationDateTime": obj.get("creationDateTime"), + "firstExecutionDateTime": obj.get("firstExecutionDateTime"), + "nextExecutionDateTime": obj.get("nextExecutionDateTime"), + "status": obj.get("status"), + "lastUpdatedDateTime": obj.get("lastUpdatedDateTime"), + "targetAsset": obj.get("targetAsset"), + "totalTargetAmount": obj.get("totalTargetAmount"), + "sourceAsset": obj.get("sourceAsset"), + "totalInvestedInUSD": obj.get("totalInvestedInUSD"), + "subscriptionAmount": obj.get("subscriptionAmount"), + "subscriptionCycle": obj.get("subscriptionCycle"), + "subscriptionStartDay": obj.get("subscriptionStartDay"), + "subscriptionStartWeekday": obj.get("subscriptionStartWeekday"), + "subscriptionStartTime": obj.get("subscriptionStartTime"), + "sourceWallet": obj.get("sourceWallet"), + "flexibleAllowedToUse": obj.get("flexibleAllowedToUse"), + "planValueInUSD": obj.get("planValueInUSD"), + "pnlInUSD": obj.get("pnlInUSD"), + "roi": obj.get("roi") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner.py new file mode 100644 index 0000000..c39666b --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner import SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner(BaseModel): + """ + SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner + """ # noqa: E501 + index_id: StrictInt = Field(alias="indexId") + index_name: StrictStr = Field(alias="indexName") + rebalance_id: StrictInt = Field(alias="rebalanceId") + status: StrictStr + rebalance_fee: StrictStr = Field(alias="rebalanceFee") + rebalance_fee_unit: StrictStr = Field(alias="rebalanceFeeUnit") + transaction_details: List[SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner] = Field(alias="transactionDetails") + __properties: ClassVar[List[str]] = ["indexId", "indexName", "rebalanceId", "status", "rebalanceFee", "rebalanceFeeUnit", "transactionDetails"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in transaction_details (list) + _items = [] + if self.transaction_details: + for _item in self.transaction_details: + if _item: + _items.append(_item.to_dict()) + _dict['transactionDetails'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "indexId": obj.get("indexId"), + "indexName": obj.get("indexName"), + "rebalanceId": obj.get("rebalanceId"), + "status": obj.get("status"), + "rebalanceFee": obj.get("rebalanceFee"), + "rebalanceFeeUnit": obj.get("rebalanceFeeUnit"), + "transactionDetails": [SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner.from_dict(_item) for _item in obj["transactionDetails"]] if obj.get("transactionDetails") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner.py new file mode 100644 index 0000000..130468d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner(BaseModel): + """ + SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner + """ # noqa: E501 + asset: StrictStr + transaction_date_time: StrictInt = Field(alias="transactionDateTime") + rebalance_direction: StrictStr = Field(alias="rebalanceDirection") + rebalance_amount: StrictStr = Field(alias="rebalanceAmount") + __properties: ClassVar[List[str]] = ["asset", "transactionDateTime", "rebalanceDirection", "rebalanceAmount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "transactionDateTime": obj.get("transactionDateTime"), + "rebalanceDirection": obj.get("rebalanceDirection"), + "rebalanceAmount": obj.get("rebalanceAmount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_redeem_history_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_redeem_history_get200_response_inner.py new file mode 100644 index 0000000..098f057 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_redeem_history_get200_response_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner(BaseModel): + """ + SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner + """ # noqa: E501 + index_id: StrictInt = Field(alias="indexId") + index_name: StrictStr = Field(alias="indexName") + redemption_id: StrictInt = Field(alias="redemptionId") + status: StrictStr + asset: StrictStr + amount: StrictStr + redemption_date_time: StrictInt = Field(alias="redemptionDateTime") + transaction_fee: StrictStr = Field(alias="transactionFee") + transaction_fee_unit: StrictStr = Field(alias="transactionFeeUnit") + __properties: ClassVar[List[str]] = ["indexId", "indexName", "redemptionId", "status", "asset", "amount", "redemptionDateTime", "transactionFee", "transactionFeeUnit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "indexId": obj.get("indexId"), + "indexName": obj.get("indexName"), + "redemptionId": obj.get("redemptionId"), + "status": obj.get("status"), + "asset": obj.get("asset"), + "amount": obj.get("amount"), + "redemptionDateTime": obj.get("redemptionDateTime"), + "transactionFee": obj.get("transactionFee"), + "transactionFeeUnit": obj.get("transactionFeeUnit") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_redeem_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_redeem_post200_response.py new file mode 100644 index 0000000..08204f1 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_redeem_post200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestRedeemPost200Response(BaseModel): + """ + SapiV1LendingAutoInvestRedeemPost200Response + """ # noqa: E501 + redemption_id: StrictInt = Field(alias="redemptionId") + __properties: ClassVar[List[str]] = ["redemptionId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestRedeemPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestRedeemPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "redemptionId": obj.get("redemptionId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_source_asset_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_source_asset_list_get200_response.py new file mode 100644 index 0000000..44a548c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_source_asset_list_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner import SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestSourceAssetListGet200Response(BaseModel): + """ + SapiV1LendingAutoInvestSourceAssetListGet200Response + """ # noqa: E501 + fee_rate: StrictStr = Field(alias="feeRate") + source_assets: List[SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner] = Field(alias="sourceAssets") + __properties: ClassVar[List[str]] = ["feeRate", "sourceAssets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestSourceAssetListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in source_assets (list) + _items = [] + if self.source_assets: + for _item in self.source_assets: + if _item: + _items.append(_item.to_dict()) + _dict['sourceAssets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestSourceAssetListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "feeRate": obj.get("feeRate"), + "sourceAssets": [SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner.from_dict(_item) for _item in obj["sourceAssets"]] if obj.get("sourceAssets") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner.py new file mode 100644 index 0000000..96ba989 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner(BaseModel): + """ + SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner + """ # noqa: E501 + source_asset: StrictStr = Field(alias="sourceAsset") + asset_min_amount: StrictStr = Field(alias="assetMinAmount") + asset_max_amount: StrictStr = Field(alias="assetMaxAmount") + scale: StrictStr + flexible_amount: StrictStr = Field(alias="flexibleAmount") + __properties: ClassVar[List[str]] = ["sourceAsset", "assetMinAmount", "assetMaxAmount", "scale", "flexibleAmount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sourceAsset": obj.get("sourceAsset"), + "assetMinAmount": obj.get("assetMinAmount"), + "assetMaxAmount": obj.get("assetMaxAmount"), + "scale": obj.get("scale"), + "flexibleAmount": obj.get("flexibleAmount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_list_get200_response.py new file mode 100644 index 0000000..4d0cd30 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_list_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner import SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestTargetAssetListGet200Response(BaseModel): + """ + SapiV1LendingAutoInvestTargetAssetListGet200Response + """ # noqa: E501 + target_assets: Optional[StrictStr] = Field(default=None, alias="targetAssets") + auto_invest_asset_list: Optional[List[SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner]] = Field(default=None, alias="autoInvestAssetList") + __properties: ClassVar[List[str]] = ["targetAssets", "autoInvestAssetList"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestTargetAssetListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in auto_invest_asset_list (list) + _items = [] + if self.auto_invest_asset_list: + for _item in self.auto_invest_asset_list: + if _item: + _items.append(_item.to_dict()) + _dict['autoInvestAssetList'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestTargetAssetListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetAssets": obj.get("targetAssets"), + "autoInvestAssetList": [SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner.from_dict(_item) for _item in obj["autoInvestAssetList"]] if obj.get("autoInvestAssetList") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner.py new file mode 100644 index 0000000..e793546 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner import SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner(BaseModel): + """ + SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner + """ # noqa: E501 + target_asset: StrictStr = Field(alias="targetAsset") + roi_and_dimension_type_list: List[SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner] = Field(alias="roiAndDimensionTypeList") + __properties: ClassVar[List[str]] = ["targetAsset", "roiAndDimensionTypeList"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in roi_and_dimension_type_list (list) + _items = [] + if self.roi_and_dimension_type_list: + for _item in self.roi_and_dimension_type_list: + if _item: + _items.append(_item.to_dict()) + _dict['roiAndDimensionTypeList'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetAsset": obj.get("targetAsset"), + "roiAndDimensionTypeList": [SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner.from_dict(_item) for _item in obj["roiAndDimensionTypeList"]] if obj.get("roiAndDimensionTypeList") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner.py new file mode 100644 index 0000000..e3abc61 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner(BaseModel): + """ + SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner + """ # noqa: E501 + simulate_roi: StrictStr = Field(alias="simulateRoi") + dimension_value: StrictStr = Field(alias="dimensionValue") + dimension_unit: StrictStr = Field(alias="dimensionUnit") + __properties: ClassVar[List[str]] = ["simulateRoi", "dimensionValue", "dimensionUnit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "simulateRoi": obj.get("simulateRoi"), + "dimensionValue": obj.get("dimensionValue"), + "dimensionUnit": obj.get("dimensionUnit") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner.py new file mode 100644 index 0000000..4720092 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner(BaseModel): + """ + SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner + """ # noqa: E501 + var_date: StrictStr = Field(alias="date") + simulate_roi: StrictStr = Field(alias="simulateRoi") + __properties: ClassVar[List[str]] = ["date", "simulateRoi"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "simulateRoi": obj.get("simulateRoi") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_customized_fixed_purchase_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_customized_fixed_purchase_post200_response.py new file mode 100644 index 0000000..ac25d89 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_customized_fixed_purchase_post200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingCustomizedFixedPurchasePost200Response(BaseModel): + """ + SapiV1LendingCustomizedFixedPurchasePost200Response + """ # noqa: E501 + purchase_id: StrictStr = Field(alias="purchaseId") + __properties: ClassVar[List[str]] = ["purchaseId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingCustomizedFixedPurchasePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingCustomizedFixedPurchasePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "purchaseId": obj.get("purchaseId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_position_changed_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_position_changed_post200_response.py new file mode 100644 index 0000000..68145a9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_position_changed_post200_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingPositionChangedPost200Response(BaseModel): + """ + SapiV1LendingPositionChangedPost200Response + """ # noqa: E501 + daily_purchase_id: StrictInt = Field(alias="dailyPurchaseId") + success: StrictBool + time: StrictInt + __properties: ClassVar[List[str]] = ["dailyPurchaseId", "success", "time"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingPositionChangedPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingPositionChangedPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dailyPurchaseId": obj.get("dailyPurchaseId"), + "success": obj.get("success"), + "time": obj.get("time") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_project_list_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_project_list_get200_response_inner.py new file mode 100644 index 0000000..5e239d4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_project_list_get200_response_inner.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingProjectListGet200ResponseInner(BaseModel): + """ + SapiV1LendingProjectListGet200ResponseInner + """ # noqa: E501 + asset: StrictStr + display_priority: StrictInt = Field(alias="displayPriority") + duration: StrictInt + interest_per_lot: StrictStr = Field(alias="interestPerLot") + interest_rate: StrictStr = Field(alias="interestRate") + lot_size: StrictStr = Field(alias="lotSize") + lots_low_limit: StrictInt = Field(alias="lotsLowLimit") + lots_purchased: StrictInt = Field(alias="lotsPurchased") + lots_up_limit: StrictInt = Field(alias="lotsUpLimit") + max_lots_per_user: StrictInt = Field(alias="maxLotsPerUser") + need_kyc: StrictBool = Field(alias="needKyc") + project_id: StrictStr = Field(alias="projectId") + project_name: StrictStr = Field(alias="projectName") + status: StrictStr + type: StrictStr + with_area_limitation: StrictBool = Field(alias="withAreaLimitation") + __properties: ClassVar[List[str]] = ["asset", "displayPriority", "duration", "interestPerLot", "interestRate", "lotSize", "lotsLowLimit", "lotsPurchased", "lotsUpLimit", "maxLotsPerUser", "needKyc", "projectId", "projectName", "status", "type", "withAreaLimitation"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingProjectListGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingProjectListGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "displayPriority": obj.get("displayPriority"), + "duration": obj.get("duration"), + "interestPerLot": obj.get("interestPerLot"), + "interestRate": obj.get("interestRate"), + "lotSize": obj.get("lotSize"), + "lotsLowLimit": obj.get("lotsLowLimit"), + "lotsPurchased": obj.get("lotsPurchased"), + "lotsUpLimit": obj.get("lotsUpLimit"), + "maxLotsPerUser": obj.get("maxLotsPerUser"), + "needKyc": obj.get("needKyc"), + "projectId": obj.get("projectId"), + "projectName": obj.get("projectName"), + "status": obj.get("status"), + "type": obj.get("type"), + "withAreaLimitation": obj.get("withAreaLimitation") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_project_position_list_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_project_position_list_get200_response_inner.py new file mode 100644 index 0000000..b7e6803 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_lending_project_position_list_get200_response_inner.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import date +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LendingProjectPositionListGet200ResponseInner(BaseModel): + """ + SapiV1LendingProjectPositionListGet200ResponseInner + """ # noqa: E501 + asset: StrictStr + can_transfer: StrictBool = Field(alias="canTransfer") + create_timestamp: StrictInt = Field(alias="createTimestamp") + duration: StrictInt + end_time: StrictInt = Field(alias="endTime") + interest: StrictStr + interest_rate: StrictStr = Field(alias="interestRate") + lot: StrictInt + position_id: StrictInt = Field(alias="positionId") + principal: StrictStr + project_id: StrictStr = Field(alias="projectId") + project_name: StrictStr = Field(alias="projectName") + purchase_time: StrictInt = Field(alias="purchaseTime") + redeem_date: date = Field(alias="redeemDate") + start_time: StrictInt = Field(alias="startTime") + status: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["asset", "canTransfer", "createTimestamp", "duration", "endTime", "interest", "interestRate", "lot", "positionId", "principal", "projectId", "projectName", "purchaseTime", "redeemDate", "startTime", "status", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LendingProjectPositionListGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LendingProjectPositionListGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "canTransfer": obj.get("canTransfer"), + "createTimestamp": obj.get("createTimestamp"), + "duration": obj.get("duration"), + "endTime": obj.get("endTime"), + "interest": obj.get("interest"), + "interestRate": obj.get("interestRate"), + "lot": obj.get("lot"), + "positionId": obj.get("positionId"), + "principal": obj.get("principal"), + "projectId": obj.get("projectId"), + "projectName": obj.get("projectName"), + "purchaseTime": obj.get("purchaseTime"), + "redeemDate": obj.get("redeemDate"), + "startTime": obj.get("startTime"), + "status": obj.get("status"), + "type": obj.get("type") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_adjust_ltv_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_adjust_ltv_post200_response.py new file mode 100644 index 0000000..d0a8cb6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_adjust_ltv_post200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanAdjustLtvPost200Response(BaseModel): + """ + SapiV1LoanAdjustLtvPost200Response + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + collateral_coin: StrictStr = Field(alias="collateralCoin") + direction: StrictStr + amount: StrictStr + current_ltv: StrictStr = Field(alias="currentLTV") + __properties: ClassVar[List[str]] = ["loanCoin", "collateralCoin", "direction", "amount", "currentLTV"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanAdjustLtvPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanAdjustLtvPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "collateralCoin": obj.get("collateralCoin"), + "direction": obj.get("direction"), + "amount": obj.get("amount"), + "currentLTV": obj.get("currentLTV") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_borrow_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_borrow_history_get200_response.py new file mode 100644 index 0000000..b303528 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_borrow_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_loan_borrow_history_get200_response_rows_inner import SapiV1LoanBorrowHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanBorrowHistoryGet200Response(BaseModel): + """ + SapiV1LoanBorrowHistoryGet200Response + """ # noqa: E501 + rows: List[SapiV1LoanBorrowHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanBorrowHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanBorrowHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1LoanBorrowHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_borrow_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_borrow_history_get200_response_rows_inner.py new file mode 100644 index 0000000..4a38313 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_borrow_history_get200_response_rows_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanBorrowHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1LoanBorrowHistoryGet200ResponseRowsInner + """ # noqa: E501 + order_id: StrictInt = Field(alias="orderId") + loan_coin: StrictStr = Field(alias="loanCoin") + initial_loan_amount: StrictStr = Field(alias="initialLoanAmount") + hourly_interest_rate: StrictStr = Field(alias="hourlyInterestRate") + loan_term: StrictStr = Field(alias="loanTerm") + collateral_coin: StrictStr = Field(alias="collateralCoin") + initial_collateral_amount: StrictStr = Field(alias="initialCollateralAmount") + borrow_time: StrictInt = Field(alias="borrowTime") + status: StrictStr + __properties: ClassVar[List[str]] = ["orderId", "loanCoin", "initialLoanAmount", "hourlyInterestRate", "loanTerm", "collateralCoin", "initialCollateralAmount", "borrowTime", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanBorrowHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanBorrowHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderId": obj.get("orderId"), + "loanCoin": obj.get("loanCoin"), + "initialLoanAmount": obj.get("initialLoanAmount"), + "hourlyInterestRate": obj.get("hourlyInterestRate"), + "loanTerm": obj.get("loanTerm"), + "collateralCoin": obj.get("collateralCoin"), + "initialCollateralAmount": obj.get("initialCollateralAmount"), + "borrowTime": obj.get("borrowTime"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_borrow_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_borrow_post200_response.py new file mode 100644 index 0000000..da9a62c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_borrow_post200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanBorrowPost200Response(BaseModel): + """ + SapiV1LoanBorrowPost200Response + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + loan_amount: StrictStr = Field(alias="loanAmount") + collateral_coin: StrictStr = Field(alias="collateralCoin") + collateral_amount: StrictStr = Field(alias="collateralAmount") + hourly_interest_rate: StrictStr = Field(alias="hourlyInterestRate") + order_id: StrictStr = Field(alias="orderId") + __properties: ClassVar[List[str]] = ["loanCoin", "loanAmount", "collateralCoin", "collateralAmount", "hourlyInterestRate", "orderId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanBorrowPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanBorrowPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "loanAmount": obj.get("loanAmount"), + "collateralCoin": obj.get("collateralCoin"), + "collateralAmount": obj.get("collateralAmount"), + "hourlyInterestRate": obj.get("hourlyInterestRate"), + "orderId": obj.get("orderId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_collateral_data_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_collateral_data_get200_response.py new file mode 100644 index 0000000..c0065eb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_collateral_data_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_loan_collateral_data_get200_response_rows_inner import SapiV1LoanCollateralDataGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanCollateralDataGet200Response(BaseModel): + """ + SapiV1LoanCollateralDataGet200Response + """ # noqa: E501 + rows: List[SapiV1LoanCollateralDataGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanCollateralDataGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanCollateralDataGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1LoanCollateralDataGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_collateral_data_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_collateral_data_get200_response_rows_inner.py new file mode 100644 index 0000000..6b3b37b --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_collateral_data_get200_response_rows_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanCollateralDataGet200ResponseRowsInner(BaseModel): + """ + SapiV1LoanCollateralDataGet200ResponseRowsInner + """ # noqa: E501 + collateral_coin: StrictStr = Field(alias="collateralCoin") + initial_ltv: StrictStr = Field(alias="initialLTV") + margin_call_ltv: StrictStr = Field(alias="marginCallLTV") + liquidation_ltv: StrictStr = Field(alias="liquidationLTV") + max_limit: StrictStr = Field(alias="maxLimit") + vip_level: StrictInt = Field(alias="vipLevel") + __properties: ClassVar[List[str]] = ["collateralCoin", "initialLTV", "marginCallLTV", "liquidationLTV", "maxLimit", "vipLevel"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanCollateralDataGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanCollateralDataGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collateralCoin": obj.get("collateralCoin"), + "initialLTV": obj.get("initialLTV"), + "marginCallLTV": obj.get("marginCallLTV"), + "liquidationLTV": obj.get("liquidationLTV"), + "maxLimit": obj.get("maxLimit"), + "vipLevel": obj.get("vipLevel") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_customize_margin_call_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_customize_margin_call_post200_response.py new file mode 100644 index 0000000..de64786 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_customize_margin_call_post200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_loan_customize_margin_call_post200_response_rows_inner import SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanCustomizeMarginCallPost200Response(BaseModel): + """ + SapiV1LoanCustomizeMarginCallPost200Response + """ # noqa: E501 + rows: List[SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanCustomizeMarginCallPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanCustomizeMarginCallPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_customize_margin_call_post200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_customize_margin_call_post200_response_rows_inner.py new file mode 100644 index 0000000..40580aa --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_customize_margin_call_post200_response_rows_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner(BaseModel): + """ + SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner + """ # noqa: E501 + order_id: StrictStr = Field(alias="orderId") + collateral_coin: StrictStr = Field(alias="collateralCoin") + pre_margin_call: StrictStr = Field(alias="preMarginCall") + after_margin_call: StrictStr = Field(alias="afterMarginCall") + customize_time: StrictInt = Field(alias="customizeTime") + __properties: ClassVar[List[str]] = ["orderId", "collateralCoin", "preMarginCall", "afterMarginCall", "customizeTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderId": obj.get("orderId"), + "collateralCoin": obj.get("collateralCoin"), + "preMarginCall": obj.get("preMarginCall"), + "afterMarginCall": obj.get("afterMarginCall"), + "customizeTime": obj.get("customizeTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_income_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_income_get200_response_inner.py new file mode 100644 index 0000000..0b041ef --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_income_get200_response_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanIncomeGet200ResponseInner(BaseModel): + """ + SapiV1LoanIncomeGet200ResponseInner + """ # noqa: E501 + asset: StrictStr + type: StrictStr + amount: StrictStr + timestamp: StrictInt + tran_id: StrictStr = Field(alias="tranId") + __properties: ClassVar[List[str]] = ["asset", "type", "amount", "timestamp", "tranId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanIncomeGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanIncomeGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "type": obj.get("type"), + "amount": obj.get("amount"), + "timestamp": obj.get("timestamp"), + "tranId": obj.get("tranId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_loanable_data_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_loanable_data_get200_response.py new file mode 100644 index 0000000..5cb3950 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_loanable_data_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_loan_loanable_data_get200_response_rows_inner import SapiV1LoanLoanableDataGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanLoanableDataGet200Response(BaseModel): + """ + SapiV1LoanLoanableDataGet200Response + """ # noqa: E501 + rows: List[SapiV1LoanLoanableDataGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanLoanableDataGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanLoanableDataGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1LoanLoanableDataGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_loanable_data_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_loanable_data_get200_response_rows_inner.py new file mode 100644 index 0000000..74037fe --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_loanable_data_get200_response_rows_inner.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanLoanableDataGet200ResponseRowsInner(BaseModel): + """ + SapiV1LoanLoanableDataGet200ResponseRowsInner + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + var_7d_hourly_interest_rate: StrictStr = Field(alias="_7dHourlyInterestRate") + var_7d_daily_interest_rate: StrictStr = Field(alias="_7dDailyInterestRate") + var_14d_hourly_interest_rate: StrictStr = Field(alias="_14dHourlyInterestRate") + var_14d_daily_interest_rate: StrictStr = Field(alias="_14dDailyInterestRate") + var_30d_hourly_interest_rate: StrictStr = Field(alias="_30dHourlyInterestRate") + var_30d_daily_interest_rate: StrictStr = Field(alias="_30dDailyInterestRate") + var_90d_hourly_interest_rate: StrictStr = Field(alias="_90dHourlyInterestRate") + var_90d_daily_interest_rate: StrictStr = Field(alias="_90dDailyInterestRate") + var_180d_hourly_interest_rate: StrictStr = Field(alias="_180dHourlyInterestRate") + var_180d_daily_interest_rate: StrictStr = Field(alias="_180dDailyInterestRate") + min_limit: StrictStr = Field(alias="minLimit") + max_limit: StrictStr = Field(alias="maxLimit") + vip_level: StrictInt = Field(alias="vipLevel") + __properties: ClassVar[List[str]] = ["loanCoin", "_7dHourlyInterestRate", "_7dDailyInterestRate", "_14dHourlyInterestRate", "_14dDailyInterestRate", "_30dHourlyInterestRate", "_30dDailyInterestRate", "_90dHourlyInterestRate", "_90dDailyInterestRate", "_180dHourlyInterestRate", "_180dDailyInterestRate", "minLimit", "maxLimit", "vipLevel"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanLoanableDataGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanLoanableDataGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "_7dHourlyInterestRate": obj.get("_7dHourlyInterestRate"), + "_7dDailyInterestRate": obj.get("_7dDailyInterestRate"), + "_14dHourlyInterestRate": obj.get("_14dHourlyInterestRate"), + "_14dDailyInterestRate": obj.get("_14dDailyInterestRate"), + "_30dHourlyInterestRate": obj.get("_30dHourlyInterestRate"), + "_30dDailyInterestRate": obj.get("_30dDailyInterestRate"), + "_90dHourlyInterestRate": obj.get("_90dHourlyInterestRate"), + "_90dDailyInterestRate": obj.get("_90dDailyInterestRate"), + "_180dHourlyInterestRate": obj.get("_180dHourlyInterestRate"), + "_180dDailyInterestRate": obj.get("_180dDailyInterestRate"), + "minLimit": obj.get("minLimit"), + "maxLimit": obj.get("maxLimit"), + "vipLevel": obj.get("vipLevel") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ltv_adjustment_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ltv_adjustment_history_get200_response.py new file mode 100644 index 0000000..2783848 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ltv_adjustment_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner import SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanLtvAdjustmentHistoryGet200Response(BaseModel): + """ + SapiV1LoanLtvAdjustmentHistoryGet200Response + """ # noqa: E501 + rows: List[SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanLtvAdjustmentHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanLtvAdjustmentHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner.py new file mode 100644 index 0000000..35bc6f2 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + collateral_coin: StrictStr = Field(alias="collateralCoin") + direction: StrictStr + amount: StrictStr + pre_ltv: StrictStr = Field(alias="preLTV") + after_ltv: StrictStr = Field(alias="afterLTV") + adjust_time: StrictInt = Field(alias="adjustTime") + order_id: StrictInt = Field(alias="orderId") + __properties: ClassVar[List[str]] = ["loanCoin", "collateralCoin", "direction", "amount", "preLTV", "afterLTV", "adjustTime", "orderId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "collateralCoin": obj.get("collateralCoin"), + "direction": obj.get("direction"), + "amount": obj.get("amount"), + "preLTV": obj.get("preLTV"), + "afterLTV": obj.get("afterLTV"), + "adjustTime": obj.get("adjustTime"), + "orderId": obj.get("orderId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ongoing_orders_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ongoing_orders_get200_response.py new file mode 100644 index 0000000..0cd34fc --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ongoing_orders_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_loan_ongoing_orders_get200_response_rows_inner import SapiV1LoanOngoingOrdersGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanOngoingOrdersGet200Response(BaseModel): + """ + SapiV1LoanOngoingOrdersGet200Response + """ # noqa: E501 + rows: List[SapiV1LoanOngoingOrdersGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanOngoingOrdersGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanOngoingOrdersGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1LoanOngoingOrdersGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ongoing_orders_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ongoing_orders_get200_response_rows_inner.py new file mode 100644 index 0000000..5ceff2b --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_ongoing_orders_get200_response_rows_inner.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanOngoingOrdersGet200ResponseRowsInner(BaseModel): + """ + SapiV1LoanOngoingOrdersGet200ResponseRowsInner + """ # noqa: E501 + order_id: StrictInt = Field(alias="orderId") + loan_coin: StrictStr = Field(alias="loanCoin") + total_debt: StrictStr = Field(alias="totalDebt") + residual_interest: StrictStr = Field(alias="residualInterest") + collateral_coin: StrictStr = Field(alias="collateralCoin") + collateral_amount: StrictStr = Field(alias="collateralAmount") + current_ltv: StrictStr = Field(alias="currentLTV") + expiration_time: StrictInt = Field(alias="expirationTime") + __properties: ClassVar[List[str]] = ["orderId", "loanCoin", "totalDebt", "residualInterest", "collateralCoin", "collateralAmount", "currentLTV", "expirationTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanOngoingOrdersGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanOngoingOrdersGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderId": obj.get("orderId"), + "loanCoin": obj.get("loanCoin"), + "totalDebt": obj.get("totalDebt"), + "residualInterest": obj.get("residualInterest"), + "collateralCoin": obj.get("collateralCoin"), + "collateralAmount": obj.get("collateralAmount"), + "currentLTV": obj.get("currentLTV"), + "expirationTime": obj.get("expirationTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_collateral_rate_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_collateral_rate_get200_response.py new file mode 100644 index 0000000..696dbaf --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_collateral_rate_get200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanRepayCollateralRateGet200Response(BaseModel): + """ + SapiV1LoanRepayCollateralRateGet200Response + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + collateral_coin: StrictStr = Field(alias="collateralCoin") + repay_amount: StrictStr = Field(alias="repayAmount") + rate: StrictStr = Field(description="rate of collateral coin/loan coin") + __properties: ClassVar[List[str]] = ["loanCoin", "collateralCoin", "repayAmount", "rate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanRepayCollateralRateGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanRepayCollateralRateGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "collateralCoin": obj.get("collateralCoin"), + "repayAmount": obj.get("repayAmount"), + "rate": obj.get("rate") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_history_get200_response.py new file mode 100644 index 0000000..fa4eef2 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_loan_repay_history_get200_response_rows_inner import SapiV1LoanRepayHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanRepayHistoryGet200Response(BaseModel): + """ + SapiV1LoanRepayHistoryGet200Response + """ # noqa: E501 + rows: List[SapiV1LoanRepayHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanRepayHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanRepayHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1LoanRepayHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_history_get200_response_rows_inner.py new file mode 100644 index 0000000..b1962d5 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_history_get200_response_rows_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanRepayHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1LoanRepayHistoryGet200ResponseRowsInner + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + repay_amount: StrictStr = Field(alias="repayAmount") + collateral_coin: StrictStr = Field(alias="collateralCoin") + collateral_used: StrictStr = Field(alias="collateralUsed") + collateral_return: StrictStr = Field(alias="collateralReturn") + repay_type: StrictStr = Field(alias="repayType") + repay_status: StrictStr = Field(description="'repayType': '1' // 1 for 'repay with borrowed coin', 2 for 'repay with collateral' 'repayStatus': 'Repaid' // Repaid, Repaying, Failed", alias="repayStatus") + repay_time: StrictInt = Field(alias="repayTime") + order_id: StrictInt = Field(alias="orderId") + __properties: ClassVar[List[str]] = ["loanCoin", "repayAmount", "collateralCoin", "collateralUsed", "collateralReturn", "repayType", "repayStatus", "repayTime", "orderId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanRepayHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanRepayHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "repayAmount": obj.get("repayAmount"), + "collateralCoin": obj.get("collateralCoin"), + "collateralUsed": obj.get("collateralUsed"), + "collateralReturn": obj.get("collateralReturn"), + "repayType": obj.get("repayType"), + "repayStatus": obj.get("repayStatus"), + "repayTime": obj.get("repayTime"), + "orderId": obj.get("orderId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_post200_response.py new file mode 100644 index 0000000..283964a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_repay_post200_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from openapi_client.models.repayment_info import RepaymentInfo +from openapi_client.models.repayment_info2 import RepaymentInfo2 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SAPIV1LOANREPAYPOST200RESPONSE_ONE_OF_SCHEMAS = ["RepaymentInfo", "RepaymentInfo2"] + +class SapiV1LoanRepayPost200Response(BaseModel): + """ + SapiV1LoanRepayPost200Response + """ + # data type: RepaymentInfo + oneof_schema_1_validator: Optional[RepaymentInfo] = None + # data type: RepaymentInfo2 + oneof_schema_2_validator: Optional[RepaymentInfo2] = None + actual_instance: Optional[Union[RepaymentInfo, RepaymentInfo2]] = None + one_of_schemas: Set[str] = { "RepaymentInfo", "RepaymentInfo2" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SapiV1LoanRepayPost200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: RepaymentInfo + if not isinstance(v, RepaymentInfo): + error_messages.append(f"Error! Input type `{type(v)}` is not `RepaymentInfo`") + else: + match += 1 + # validate data type: RepaymentInfo2 + if not isinstance(v, RepaymentInfo2): + error_messages.append(f"Error! Input type `{type(v)}` is not `RepaymentInfo2`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SapiV1LoanRepayPost200Response with oneOf schemas: RepaymentInfo, RepaymentInfo2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SapiV1LoanRepayPost200Response with oneOf schemas: RepaymentInfo, RepaymentInfo2. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into RepaymentInfo + try: + instance.actual_instance = RepaymentInfo.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into RepaymentInfo2 + try: + instance.actual_instance = RepaymentInfo2.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SapiV1LoanRepayPost200Response with oneOf schemas: RepaymentInfo, RepaymentInfo2. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SapiV1LoanRepayPost200Response with oneOf schemas: RepaymentInfo, RepaymentInfo2. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], RepaymentInfo, RepaymentInfo2]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_borrow_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_borrow_post200_response.py new file mode 100644 index 0000000..7c493f5 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_borrow_post200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipBorrowPost200Response(BaseModel): + """ + SapiV1LoanVipBorrowPost200Response + """ # noqa: E501 + loan_account_id: StrictStr = Field(alias="loanAccountId") + request_id: StrictStr = Field(alias="requestId") + loan_coin: StrictStr = Field(alias="loanCoin") + is_flexible_rate: StrictStr = Field(alias="isFlexibleRate") + loan_amount: StrictStr = Field(alias="loanAmount") + collateral_account_id: StrictStr = Field(alias="collateralAccountId") + collateral_coin: StrictStr = Field(alias="collateralCoin") + loan_term: Optional[StrictStr] = Field(default=None, alias="loanTerm") + __properties: ClassVar[List[str]] = ["loanAccountId", "requestId", "loanCoin", "isFlexibleRate", "loanAmount", "collateralAccountId", "collateralCoin", "loanTerm"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipBorrowPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipBorrowPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanAccountId": obj.get("loanAccountId"), + "requestId": obj.get("requestId"), + "loanCoin": obj.get("loanCoin"), + "isFlexibleRate": obj.get("isFlexibleRate"), + "loanAmount": obj.get("loanAmount"), + "collateralAccountId": obj.get("collateralAccountId"), + "collateralCoin": obj.get("collateralCoin"), + "loanTerm": obj.get("loanTerm") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_account_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_account_get200_response.py new file mode 100644 index 0000000..4bdf67e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_account_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_loan_vip_collateral_account_get200_response_rows_inner import SapiV1LoanVipCollateralAccountGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipCollateralAccountGet200Response(BaseModel): + """ + SapiV1LoanVipCollateralAccountGet200Response + """ # noqa: E501 + rows: List[SapiV1LoanVipCollateralAccountGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipCollateralAccountGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipCollateralAccountGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1LoanVipCollateralAccountGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_account_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_account_get200_response_rows_inner.py new file mode 100644 index 0000000..53e6142 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_account_get200_response_rows_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipCollateralAccountGet200ResponseRowsInner(BaseModel): + """ + SapiV1LoanVipCollateralAccountGet200ResponseRowsInner + """ # noqa: E501 + collateral_account_id: StrictStr = Field(alias="collateralAccountId") + collateral_coin: StrictStr = Field(alias="collateralCoin") + collateral_value: StrictStr = Field(description="locked collateral value shown in USD value", alias="collateralValue") + __properties: ClassVar[List[str]] = ["collateralAccountId", "collateralCoin", "collateralValue"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipCollateralAccountGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipCollateralAccountGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collateralAccountId": obj.get("collateralAccountId"), + "collateralCoin": obj.get("collateralCoin"), + "collateralValue": obj.get("collateralValue") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_data_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_data_get200_response.py new file mode 100644 index 0000000..c5256ce --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_data_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_loan_vip_collateral_data_get200_response_rows_inner import SapiV1LoanVipCollateralDataGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipCollateralDataGet200Response(BaseModel): + """ + SapiV1LoanVipCollateralDataGet200Response + """ # noqa: E501 + rows: List[SapiV1LoanVipCollateralDataGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipCollateralDataGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipCollateralDataGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1LoanVipCollateralDataGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_data_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_data_get200_response_rows_inner.py new file mode 100644 index 0000000..06e1ce2 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_collateral_data_get200_response_rows_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipCollateralDataGet200ResponseRowsInner(BaseModel): + """ + SapiV1LoanVipCollateralDataGet200ResponseRowsInner + """ # noqa: E501 + collateral_coin: StrictStr = Field(alias="collateralCoin") + var_1st_collateral_ratio: StrictStr = Field(alias="_1stCollateralRatio") + var_1st_collateral_range: StrictStr = Field(alias="_1stCollateralRange") + var_2nd_collateral_ratio: StrictStr = Field(alias="_2ndCollateralRatio") + var_2nd_collateral_range: StrictStr = Field(alias="_2ndCollateralRange") + var_3rd_collateral_ratio: StrictStr = Field(alias="_3rdCollateralRatio") + var_3rd_collateral_range: StrictStr = Field(alias="_3rdCollateralRange") + var_4th_collateral_ratio: StrictStr = Field(alias="_4thCollateralRatio") + var_4th_collateral_range: StrictStr = Field(alias="_4thCollateralRange") + __properties: ClassVar[List[str]] = ["collateralCoin", "_1stCollateralRatio", "_1stCollateralRange", "_2ndCollateralRatio", "_2ndCollateralRange", "_3rdCollateralRatio", "_3rdCollateralRange", "_4thCollateralRatio", "_4thCollateralRange"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipCollateralDataGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipCollateralDataGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collateralCoin": obj.get("collateralCoin"), + "_1stCollateralRatio": obj.get("_1stCollateralRatio"), + "_1stCollateralRange": obj.get("_1stCollateralRange"), + "_2ndCollateralRatio": obj.get("_2ndCollateralRatio"), + "_2ndCollateralRange": obj.get("_2ndCollateralRange"), + "_3rdCollateralRatio": obj.get("_3rdCollateralRatio"), + "_3rdCollateralRange": obj.get("_3rdCollateralRange"), + "_4thCollateralRatio": obj.get("_4thCollateralRatio"), + "_4thCollateralRange": obj.get("_4thCollateralRange") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_loanable_data_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_loanable_data_get200_response.py new file mode 100644 index 0000000..a8868e5 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_loanable_data_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_loan_vip_loanable_data_get200_response_rows_inner import SapiV1LoanVipLoanableDataGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipLoanableDataGet200Response(BaseModel): + """ + SapiV1LoanVipLoanableDataGet200Response + """ # noqa: E501 + total: StrictInt + rows: List[SapiV1LoanVipLoanableDataGet200ResponseRowsInner] + __properties: ClassVar[List[str]] = ["total", "rows"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipLoanableDataGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipLoanableDataGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "rows": [SapiV1LoanVipLoanableDataGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_loanable_data_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_loanable_data_get200_response_rows_inner.py new file mode 100644 index 0000000..8d8acf7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_loanable_data_get200_response_rows_inner.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipLoanableDataGet200ResponseRowsInner(BaseModel): + """ + SapiV1LoanVipLoanableDataGet200ResponseRowsInner + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + flexible_daily_interest_rate: StrictStr = Field(alias="_flexibleDailyInterestRate") + flexible_yearly_interest_rate: StrictStr = Field(alias="_flexibleYearlyInterestRate") + var_30d_daily_interest_rate: StrictStr = Field(alias="_30dDailyInterestRate") + var_30d_yearly_interest_rate: StrictStr = Field(alias="_30dYearlyInterestRate") + var_60d_daily_interest_rate: StrictStr = Field(alias="_60dDailyInterestRate") + var_60d_yearly_interest_rate: StrictStr = Field(alias="_60dYearlyInterestRate") + min_limit: StrictStr = Field(alias="minLimit") + max_limit: StrictStr = Field(alias="maxLimit") + vip_level: StrictInt = Field(alias="vipLevel") + __properties: ClassVar[List[str]] = ["loanCoin", "_flexibleDailyInterestRate", "_flexibleYearlyInterestRate", "_30dDailyInterestRate", "_30dYearlyInterestRate", "_60dDailyInterestRate", "_60dYearlyInterestRate", "minLimit", "maxLimit", "vipLevel"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipLoanableDataGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipLoanableDataGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "_flexibleDailyInterestRate": obj.get("_flexibleDailyInterestRate"), + "_flexibleYearlyInterestRate": obj.get("_flexibleYearlyInterestRate"), + "_30dDailyInterestRate": obj.get("_30dDailyInterestRate"), + "_30dYearlyInterestRate": obj.get("_30dYearlyInterestRate"), + "_60dDailyInterestRate": obj.get("_60dDailyInterestRate"), + "_60dYearlyInterestRate": obj.get("_60dYearlyInterestRate"), + "minLimit": obj.get("minLimit"), + "maxLimit": obj.get("maxLimit"), + "vipLevel": obj.get("vipLevel") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_ongoing_orders_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_ongoing_orders_get200_response.py new file mode 100644 index 0000000..a9590dc --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_ongoing_orders_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner import SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipOngoingOrdersGet200Response(BaseModel): + """ + SapiV1LoanVipOngoingOrdersGet200Response + """ # noqa: E501 + rows: List[SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipOngoingOrdersGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipOngoingOrdersGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner.py new file mode 100644 index 0000000..63d980e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner(BaseModel): + """ + SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner + """ # noqa: E501 + order_id: StrictInt = Field(alias="orderId") + loan_coin: StrictStr = Field(alias="loanCoin") + total_debt: StrictStr = Field(alias="totalDebt") + residual_interest: StrictStr = Field(alias="residualInterest") + collateral_account_id: StrictStr = Field(alias="collateralAccountId") + collateral_coin: StrictStr = Field(alias="collateralCoin") + collateral_value: StrictStr = Field(description="locked collateral value shown in USD value", alias="collateralValue") + total_collateral_value_after_haircut: Optional[StrictStr] = Field(default=None, alias="totalCollateralValueAfterHaircut") + locked_collateral_value: Optional[StrictStr] = Field(default=None, alias="lockedCollateralValue") + current_ltv: StrictStr = Field(alias="currentLTV") + expiration_time: StrictInt = Field(alias="expirationTime") + loan_date: StrictStr = Field(alias="loanDate") + loan_rate: StrictStr = Field(alias="loanRate") + loan_term: StrictStr = Field(alias="loanTerm") + __properties: ClassVar[List[str]] = ["orderId", "loanCoin", "totalDebt", "residualInterest", "collateralAccountId", "collateralCoin", "collateralValue", "totalCollateralValueAfterHaircut", "lockedCollateralValue", "currentLTV", "expirationTime", "loanDate", "loanRate", "loanTerm"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderId": obj.get("orderId"), + "loanCoin": obj.get("loanCoin"), + "totalDebt": obj.get("totalDebt"), + "residualInterest": obj.get("residualInterest"), + "collateralAccountId": obj.get("collateralAccountId"), + "collateralCoin": obj.get("collateralCoin"), + "collateralValue": obj.get("collateralValue"), + "totalCollateralValueAfterHaircut": obj.get("totalCollateralValueAfterHaircut"), + "lockedCollateralValue": obj.get("lockedCollateralValue"), + "currentLTV": obj.get("currentLTV"), + "expirationTime": obj.get("expirationTime"), + "loanDate": obj.get("loanDate"), + "loanRate": obj.get("loanRate"), + "loanTerm": obj.get("loanTerm") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_renew_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_renew_post200_response.py new file mode 100644 index 0000000..6e905cd --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_renew_post200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipRenewPost200Response(BaseModel): + """ + SapiV1LoanVipRenewPost200Response + """ # noqa: E501 + loan_account_id: StrictStr = Field(alias="loanAccountId") + loan_coin: StrictStr = Field(alias="loanCoin") + loan_amount: StrictStr = Field(alias="loanAmount") + collateral_account_id: StrictStr = Field(alias="collateralAccountId") + collateral_coin: StrictStr = Field(alias="collateralCoin") + loan_term: StrictStr = Field(alias="loanTerm") + __properties: ClassVar[List[str]] = ["loanAccountId", "loanCoin", "loanAmount", "collateralAccountId", "collateralCoin", "loanTerm"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipRenewPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipRenewPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanAccountId": obj.get("loanAccountId"), + "loanCoin": obj.get("loanCoin"), + "loanAmount": obj.get("loanAmount"), + "collateralAccountId": obj.get("collateralAccountId"), + "collateralCoin": obj.get("collateralCoin"), + "loanTerm": obj.get("loanTerm") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_repay_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_repay_history_get200_response.py new file mode 100644 index 0000000..326d178 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_repay_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_loan_vip_repay_history_get200_response_rows_inner import SapiV1LoanVipRepayHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipRepayHistoryGet200Response(BaseModel): + """ + SapiV1LoanVipRepayHistoryGet200Response + """ # noqa: E501 + rows: List[SapiV1LoanVipRepayHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipRepayHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipRepayHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1LoanVipRepayHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_repay_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_repay_history_get200_response_rows_inner.py new file mode 100644 index 0000000..40e9973 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_repay_history_get200_response_rows_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipRepayHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1LoanVipRepayHistoryGet200ResponseRowsInner + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + repay_amount: StrictStr = Field(alias="repayAmount") + collateral_coin: StrictStr = Field(alias="collateralCoin") + repay_status: StrictStr = Field(description="Repaid, Repaying, Failed", alias="repayStatus") + repay_time: StrictStr = Field(alias="repayTime") + order_id: StrictStr = Field(alias="orderId") + __properties: ClassVar[List[str]] = ["loanCoin", "repayAmount", "collateralCoin", "repayStatus", "repayTime", "orderId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipRepayHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipRepayHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "repayAmount": obj.get("repayAmount"), + "collateralCoin": obj.get("collateralCoin"), + "repayStatus": obj.get("repayStatus"), + "repayTime": obj.get("repayTime"), + "orderId": obj.get("orderId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_repay_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_repay_post200_response.py new file mode 100644 index 0000000..380e6bb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_repay_post200_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipRepayPost200Response(BaseModel): + """ + SapiV1LoanVipRepayPost200Response + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + repay_amount: StrictStr = Field(alias="repayAmount") + remaining_principal: StrictStr = Field(alias="remainingPrincipal") + remaining_interest: StrictStr = Field(alias="remainingInterest") + collateral_coin: StrictStr = Field(alias="collateralCoin") + current_ltv: StrictStr = Field(alias="currentLTV") + repay_status: StrictStr = Field(description="Repaid, Repaying, Failed", alias="repayStatus") + __properties: ClassVar[List[str]] = ["loanCoin", "repayAmount", "remainingPrincipal", "remainingInterest", "collateralCoin", "currentLTV", "repayStatus"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipRepayPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipRepayPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "repayAmount": obj.get("repayAmount"), + "remainingPrincipal": obj.get("remainingPrincipal"), + "remainingInterest": obj.get("remainingInterest"), + "collateralCoin": obj.get("collateralCoin"), + "currentLTV": obj.get("currentLTV"), + "repayStatus": obj.get("repayStatus") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_request_data_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_request_data_get200_response.py new file mode 100644 index 0000000..ec838f4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_request_data_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_loan_vip_request_data_get200_response_rows_inner import SapiV1LoanVipRequestDataGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipRequestDataGet200Response(BaseModel): + """ + SapiV1LoanVipRequestDataGet200Response + """ # noqa: E501 + total: StrictInt + rows: List[SapiV1LoanVipRequestDataGet200ResponseRowsInner] + __properties: ClassVar[List[str]] = ["total", "rows"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipRequestDataGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipRequestDataGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "rows": [SapiV1LoanVipRequestDataGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_request_data_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_request_data_get200_response_rows_inner.py new file mode 100644 index 0000000..c8237b7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_request_data_get200_response_rows_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipRequestDataGet200ResponseRowsInner(BaseModel): + """ + SapiV1LoanVipRequestDataGet200ResponseRowsInner + """ # noqa: E501 + loan_account_id: StrictStr = Field(alias="loanAccountId") + order_id: StrictStr = Field(alias="orderId") + request_id: StrictStr = Field(alias="requestId") + loan_coin: StrictStr = Field(alias="loanCoin") + loan_amount: StrictStr = Field(alias="loanAmount") + collateral_account_id: StrictStr = Field(alias="collateralAccountId") + collateral_coin: StrictStr = Field(alias="collateralCoin") + loan_term: StrictInt = Field(alias="loanTerm") + status: StrictInt + __properties: ClassVar[List[str]] = ["loanAccountId", "orderId", "requestId", "loanCoin", "loanAmount", "collateralAccountId", "collateralCoin", "loanTerm", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipRequestDataGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipRequestDataGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanAccountId": obj.get("loanAccountId"), + "orderId": obj.get("orderId"), + "requestId": obj.get("requestId"), + "loanCoin": obj.get("loanCoin"), + "loanAmount": obj.get("loanAmount"), + "collateralAccountId": obj.get("collateralAccountId"), + "collateralCoin": obj.get("collateralCoin"), + "loanTerm": obj.get("loanTerm"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_request_interest_rate_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_request_interest_rate_get200_response_inner.py new file mode 100644 index 0000000..397b3cb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_loan_vip_request_interest_rate_get200_response_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1LoanVipRequestInterestRateGet200ResponseInner(BaseModel): + """ + SapiV1LoanVipRequestInterestRateGet200ResponseInner + """ # noqa: E501 + asset: StrictStr + flexible_daily_interest_rate: StrictStr = Field(alias="flexibleDailyInterestRate") + flexible_yearly_interest_rate: StrictStr = Field(alias="flexibleYearlyInterestRate") + time: StrictInt + __properties: ClassVar[List[str]] = ["asset", "flexibleDailyInterestRate", "flexibleYearlyInterestRate", "time"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1LoanVipRequestInterestRateGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1LoanVipRequestInterestRateGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "flexibleDailyInterestRate": obj.get("flexibleDailyInterestRate"), + "flexibleYearlyInterestRate": obj.get("flexibleYearlyInterestRate"), + "time": obj.get("time") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response.py new file mode 100644 index 0000000..cddf6a6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountAccountSnapshotGet200Response(BaseModel): + """ + SapiV1ManagedSubaccountAccountSnapshotGet200Response + """ # noqa: E501 + code: StrictInt + msg: StrictStr + snapshot_vos: List[SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner] = Field(alias="snapshotVos") + __properties: ClassVar[List[str]] = ["code", "msg", "snapshotVos"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in snapshot_vos (list) + _items = [] + if self.snapshot_vos: + for _item in self.snapshot_vos: + if _item: + _items.append(_item.to_dict()) + _dict['snapshotVos'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "snapshotVos": [SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner.from_dict(_item) for _item in obj["snapshotVos"]] if obj.get("snapshotVos") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner.py new file mode 100644 index 0000000..e5a1c2f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner(BaseModel): + """ + SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner + """ # noqa: E501 + data: SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData + type: StrictStr + update_time: StrictInt = Field(alias="updateTime") + __properties: ClassVar[List[str]] = ["data", "type", "updateTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "type": obj.get("type"), + "updateTime": obj.get("updateTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data.py new file mode 100644 index 0000000..3d3f5a3 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData(BaseModel): + """ + SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData + """ # noqa: E501 + balances: List[SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner] + total_asset_of_btc: StrictStr = Field(alias="totalAssetOfBtc") + __properties: ClassVar[List[str]] = ["balances", "totalAssetOfBtc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in balances (list) + _items = [] + if self.balances: + for _item in self.balances: + if _item: + _items.append(_item.to_dict()) + _dict['balances'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "balances": [SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner.from_dict(_item) for _item in obj["balances"]] if obj.get("balances") is not None else None, + "totalAssetOfBtc": obj.get("totalAssetOfBtc") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner.py new file mode 100644 index 0000000..de11b5c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner(BaseModel): + """ + SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner + """ # noqa: E501 + asset: StrictStr + free: StrictStr + locked: StrictStr + __properties: ClassVar[List[str]] = ["asset", "free", "locked"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "free": obj.get("free"), + "locked": obj.get("locked") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_asset_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_asset_get200_response_inner.py new file mode 100644 index 0000000..2bae362 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_asset_get200_response_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountAssetGet200ResponseInner(BaseModel): + """ + SapiV1ManagedSubaccountAssetGet200ResponseInner + """ # noqa: E501 + coin: StrictStr + name: StrictStr + total_balance: StrictStr = Field(alias="totalBalance") + available_balance: StrictStr = Field(alias="availableBalance") + in_order: StrictStr = Field(alias="inOrder") + btc_value: StrictStr = Field(alias="btcValue") + __properties: ClassVar[List[str]] = ["coin", "name", "totalBalance", "availableBalance", "inOrder", "btcValue"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountAssetGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountAssetGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "coin": obj.get("coin"), + "name": obj.get("name"), + "totalBalance": obj.get("totalBalance"), + "availableBalance": obj.get("availableBalance"), + "inOrder": obj.get("inOrder"), + "btcValue": obj.get("btcValue") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_deposit_address_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_deposit_address_get200_response.py new file mode 100644 index 0000000..6c46108 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_deposit_address_get200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountDepositAddressGet200Response(BaseModel): + """ + SapiV1ManagedSubaccountDepositAddressGet200Response + """ # noqa: E501 + coin: StrictStr + address: StrictStr + tag: StrictStr + url: StrictStr + __properties: ClassVar[List[str]] = ["coin", "address", "tag", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountDepositAddressGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountDepositAddressGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "coin": obj.get("coin"), + "address": obj.get("address"), + "tag": obj.get("tag"), + "url": obj.get("url") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_deposit_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_deposit_post200_response.py new file mode 100644 index 0000000..9331bb7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_deposit_post200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountDepositPost200Response(BaseModel): + """ + SapiV1ManagedSubaccountDepositPost200Response + """ # noqa: E501 + tran_id: StrictInt = Field(alias="tranId") + __properties: ClassVar[List[str]] = ["tranId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountDepositPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountDepositPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tranId": obj.get("tranId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response.py new file mode 100644 index 0000000..40a6a3c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountFetchFutureAssetGet200Response(BaseModel): + """ + SapiV1ManagedSubaccountFetchFutureAssetGet200Response + """ # noqa: E501 + code: StrictInt + message: StrictStr + snapshot_vos: List[SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner] = Field(alias="snapshotVos") + __properties: ClassVar[List[str]] = ["code", "message", "snapshotVos"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in snapshot_vos (list) + _items = [] + if self.snapshot_vos: + for _item in self.snapshot_vos: + if _item: + _items.append(_item.to_dict()) + _dict['snapshotVos'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "snapshotVos": [SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner.from_dict(_item) for _item in obj["snapshotVos"]] if obj.get("snapshotVos") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner.py new file mode 100644 index 0000000..cff06be --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner(BaseModel): + """ + SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner + """ # noqa: E501 + type: StrictStr + update_time: StrictInt = Field(alias="updateTime") + data: SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData + __properties: ClassVar[List[str]] = ["type", "updateTime", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "updateTime": obj.get("updateTime"), + "data": SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data.py new file mode 100644 index 0000000..0582472 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData(BaseModel): + """ + SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData + """ # noqa: E501 + assets: List[SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner] + position: List[SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner] + __properties: ClassVar[List[str]] = ["assets", "position"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in assets (list) + _items = [] + if self.assets: + for _item in self.assets: + if _item: + _items.append(_item.to_dict()) + _dict['assets'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in position (list) + _items = [] + if self.position: + for _item in self.position: + if _item: + _items.append(_item.to_dict()) + _dict['position'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assets": [SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None, + "position": [SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner.from_dict(_item) for _item in obj["position"]] if obj.get("position") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner.py new file mode 100644 index 0000000..63964b6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner(BaseModel): + """ + SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner + """ # noqa: E501 + asset: StrictStr + margin_balance: Union[StrictFloat, StrictInt] = Field(alias="marginBalance") + wallet_balance: Union[StrictFloat, StrictInt] = Field(alias="walletBalance") + __properties: ClassVar[List[str]] = ["asset", "marginBalance", "walletBalance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "marginBalance": obj.get("marginBalance"), + "walletBalance": obj.get("walletBalance") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner.py new file mode 100644 index 0000000..d071b0d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner(BaseModel): + """ + SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner + """ # noqa: E501 + symbol: StrictStr + entry_price: Union[StrictFloat, StrictInt] = Field(alias="entryPrice") + mark_price: Union[StrictFloat, StrictInt] = Field(alias="markPrice") + position_amt: Union[StrictFloat, StrictInt] = Field(alias="positionAmt") + __properties: ClassVar[List[str]] = ["symbol", "entryPrice", "markPrice", "positionAmt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "entryPrice": obj.get("entryPrice"), + "markPrice": obj.get("markPrice"), + "positionAmt": obj.get("positionAmt") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_info_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_info_get200_response.py new file mode 100644 index 0000000..bfcbc5c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_info_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner import SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountInfoGet200Response(BaseModel): + """ + SapiV1ManagedSubaccountInfoGet200Response + """ # noqa: E501 + total: StrictInt + manager_sub_user_info_vo_list: List[SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner] = Field(alias="managerSubUserInfoVoList") + __properties: ClassVar[List[str]] = ["total", "managerSubUserInfoVoList"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountInfoGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in manager_sub_user_info_vo_list (list) + _items = [] + if self.manager_sub_user_info_vo_list: + for _item in self.manager_sub_user_info_vo_list: + if _item: + _items.append(_item.to_dict()) + _dict['managerSubUserInfoVoList'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountInfoGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "managerSubUserInfoVoList": [SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner.from_dict(_item) for _item in obj["managerSubUserInfoVoList"]] if obj.get("managerSubUserInfoVoList") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner.py new file mode 100644 index 0000000..c5a8fb5 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner(BaseModel): + """ + SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner + """ # noqa: E501 + root_user_id: StrictInt = Field(alias="rootUserId") + managersub_user_id: StrictInt = Field(alias="managersubUserId") + bind_parent_user_id: StrictInt = Field(alias="bindParentUserId") + email: Optional[StrictStr] = None + insert_time_stamp: StrictInt = Field(alias="insertTimeStamp") + bind_parent_email: StrictStr = Field(alias="bindParentEmail") + is_sub_user_enabled: StrictBool = Field(alias="isSubUserEnabled") + is_user_active: StrictBool = Field(alias="isUserActive") + is_margin_enabled: StrictBool = Field(alias="isMarginEnabled") + is_future_enabled: StrictBool = Field(alias="isFutureEnabled") + is_signed_lvt_risk_agreement: StrictBool = Field(alias="isSignedLVTRiskAgreement") + __properties: ClassVar[List[str]] = ["rootUserId", "managersubUserId", "bindParentUserId", "email", "insertTimeStamp", "bindParentEmail", "isSubUserEnabled", "isUserActive", "isMarginEnabled", "isFutureEnabled", "isSignedLVTRiskAgreement"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rootUserId": obj.get("rootUserId"), + "managersubUserId": obj.get("managersubUserId"), + "bindParentUserId": obj.get("bindParentUserId"), + "email": obj.get("email"), + "insertTimeStamp": obj.get("insertTimeStamp"), + "bindParentEmail": obj.get("bindParentEmail"), + "isSubUserEnabled": obj.get("isSubUserEnabled"), + "isUserActive": obj.get("isUserActive"), + "isMarginEnabled": obj.get("isMarginEnabled"), + "isFutureEnabled": obj.get("isFutureEnabled"), + "isSignedLVTRiskAgreement": obj.get("isSignedLVTRiskAgreement") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_margin_asset_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_margin_asset_get200_response.py new file mode 100644 index 0000000..f7ebe73 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_margin_asset_get200_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner import SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountMarginAssetGet200Response(BaseModel): + """ + SapiV1ManagedSubaccountMarginAssetGet200Response + """ # noqa: E501 + margin_level: StrictStr = Field(alias="marginLevel") + total_asset_of_btc: StrictStr = Field(alias="totalAssetOfBtc") + total_liability_of_btc: StrictStr = Field(alias="totalLiabilityOfBtc") + total_net_asset_of_btc: StrictStr = Field(alias="totalNetAssetOfBtc") + user_assets: List[SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner] = Field(alias="userAssets") + __properties: ClassVar[List[str]] = ["marginLevel", "totalAssetOfBtc", "totalLiabilityOfBtc", "totalNetAssetOfBtc", "userAssets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountMarginAssetGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in user_assets (list) + _items = [] + if self.user_assets: + for _item in self.user_assets: + if _item: + _items.append(_item.to_dict()) + _dict['userAssets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountMarginAssetGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "marginLevel": obj.get("marginLevel"), + "totalAssetOfBtc": obj.get("totalAssetOfBtc"), + "totalLiabilityOfBtc": obj.get("totalLiabilityOfBtc"), + "totalNetAssetOfBtc": obj.get("totalNetAssetOfBtc"), + "userAssets": [SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner.from_dict(_item) for _item in obj["userAssets"]] if obj.get("userAssets") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner.py new file mode 100644 index 0000000..0a83068 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner(BaseModel): + """ + SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner + """ # noqa: E501 + asset: StrictStr + borrowed: StrictStr + free: StrictStr + interest: StrictStr + locked: StrictStr + net_asset: StrictStr = Field(alias="netAsset") + __properties: ClassVar[List[str]] = ["asset", "borrowed", "free", "interest", "locked", "netAsset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "borrowed": obj.get("borrowed"), + "free": obj.get("free"), + "interest": obj.get("interest"), + "locked": obj.get("locked"), + "netAsset": obj.get("netAsset") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response.py new file mode 100644 index 0000000..2e9fe99 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner import SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response(BaseModel): + """ + SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response + """ # noqa: E501 + count: StrictInt + manager_sub_transfer_history_vos: List[SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner] = Field(alias="managerSubTransferHistoryVos") + __properties: ClassVar[List[str]] = ["count", "managerSubTransferHistoryVos"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in manager_sub_transfer_history_vos (list) + _items = [] + if self.manager_sub_transfer_history_vos: + for _item in self.manager_sub_transfer_history_vos: + if _item: + _items.append(_item.to_dict()) + _dict['managerSubTransferHistoryVos'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "count": obj.get("count"), + "managerSubTransferHistoryVos": [SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner.from_dict(_item) for _item in obj["managerSubTransferHistoryVos"]] if obj.get("managerSubTransferHistoryVos") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner.py new file mode 100644 index 0000000..8b53d6d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner(BaseModel): + """ + SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner + """ # noqa: E501 + from_email: StrictStr = Field(alias="fromEmail") + from_account_type: StrictStr = Field(alias="fromAccountType") + to_email: StrictStr = Field(alias="toEmail") + to_account_type: StrictStr = Field(alias="toAccountType") + asset: StrictStr + amount: StrictStr + scheduled_data: StrictInt = Field(alias="scheduledData") + create_time: StrictInt = Field(alias="createTime") + status: StrictStr + tran_id: StrictInt = Field(alias="tranId") + __properties: ClassVar[List[str]] = ["fromEmail", "fromAccountType", "toEmail", "toAccountType", "asset", "amount", "scheduledData", "createTime", "status", "tranId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fromEmail": obj.get("fromEmail"), + "fromAccountType": obj.get("fromAccountType"), + "toEmail": obj.get("toEmail"), + "toAccountType": obj.get("toAccountType"), + "asset": obj.get("asset"), + "amount": obj.get("amount"), + "scheduledData": obj.get("scheduledData"), + "createTime": obj.get("createTime"), + "status": obj.get("status"), + "tranId": obj.get("tranId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_get200_response.py new file mode 100644 index 0000000..f584f95 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner import SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountQueryTransLogGet200Response(BaseModel): + """ + SapiV1ManagedSubaccountQueryTransLogGet200Response + """ # noqa: E501 + count: StrictInt + manager_sub_transfer_history_vos: List[SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner] = Field(alias="managerSubTransferHistoryVos") + __properties: ClassVar[List[str]] = ["count", "managerSubTransferHistoryVos"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountQueryTransLogGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in manager_sub_transfer_history_vos (list) + _items = [] + if self.manager_sub_transfer_history_vos: + for _item in self.manager_sub_transfer_history_vos: + if _item: + _items.append(_item.to_dict()) + _dict['managerSubTransferHistoryVos'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountQueryTransLogGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "count": obj.get("count"), + "managerSubTransferHistoryVos": [SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner.from_dict(_item) for _item in obj["managerSubTransferHistoryVos"]] if obj.get("managerSubTransferHistoryVos") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner.py new file mode 100644 index 0000000..9aef575 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner(BaseModel): + """ + SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner + """ # noqa: E501 + from_email: StrictStr = Field(alias="fromEmail") + from_account_type: StrictStr = Field(alias="fromAccountType") + to_email: StrictStr = Field(alias="toEmail") + to_account_type: StrictStr = Field(alias="toAccountType") + asset: StrictStr + amount: StrictStr + scheduled_data: StrictInt = Field(alias="scheduledData") + create_time: StrictInt = Field(alias="createTime") + status: StrictStr + tran_id: StrictInt = Field(alias="tranId") + __properties: ClassVar[List[str]] = ["fromEmail", "fromAccountType", "toEmail", "toAccountType", "asset", "amount", "scheduledData", "createTime", "status", "tranId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fromEmail": obj.get("fromEmail"), + "fromAccountType": obj.get("fromAccountType"), + "toEmail": obj.get("toEmail"), + "toAccountType": obj.get("toAccountType"), + "asset": obj.get("asset"), + "amount": obj.get("amount"), + "scheduledData": obj.get("scheduledData"), + "createTime": obj.get("createTime"), + "status": obj.get("status"), + "tranId": obj.get("tranId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_account_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_account_get200_response.py new file mode 100644 index 0000000..0a6a87b --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_account_get200_response.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_margin_account_get200_response_user_assets_inner import SapiV1MarginAccountGet200ResponseUserAssetsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginAccountGet200Response(BaseModel): + """ + SapiV1MarginAccountGet200Response + """ # noqa: E501 + borrow_enabled: StrictBool = Field(alias="borrowEnabled") + margin_level: StrictStr = Field(alias="marginLevel") + total_asset_of_btc: StrictStr = Field(alias="totalAssetOfBtc") + total_liability_of_btc: StrictStr = Field(alias="totalLiabilityOfBtc") + total_net_asset_of_btc: StrictStr = Field(alias="totalNetAssetOfBtc") + trade_enabled: StrictBool = Field(alias="tradeEnabled") + transfer_enabled: StrictBool = Field(alias="transferEnabled") + user_assets: List[SapiV1MarginAccountGet200ResponseUserAssetsInner] = Field(alias="userAssets") + __properties: ClassVar[List[str]] = ["borrowEnabled", "marginLevel", "totalAssetOfBtc", "totalLiabilityOfBtc", "totalNetAssetOfBtc", "tradeEnabled", "transferEnabled", "userAssets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginAccountGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in user_assets (list) + _items = [] + if self.user_assets: + for _item in self.user_assets: + if _item: + _items.append(_item.to_dict()) + _dict['userAssets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginAccountGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "borrowEnabled": obj.get("borrowEnabled"), + "marginLevel": obj.get("marginLevel"), + "totalAssetOfBtc": obj.get("totalAssetOfBtc"), + "totalLiabilityOfBtc": obj.get("totalLiabilityOfBtc"), + "totalNetAssetOfBtc": obj.get("totalNetAssetOfBtc"), + "tradeEnabled": obj.get("tradeEnabled"), + "transferEnabled": obj.get("transferEnabled"), + "userAssets": [SapiV1MarginAccountGet200ResponseUserAssetsInner.from_dict(_item) for _item in obj["userAssets"]] if obj.get("userAssets") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_account_get200_response_user_assets_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_account_get200_response_user_assets_inner.py new file mode 100644 index 0000000..50ea0a9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_account_get200_response_user_assets_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginAccountGet200ResponseUserAssetsInner(BaseModel): + """ + SapiV1MarginAccountGet200ResponseUserAssetsInner + """ # noqa: E501 + asset: StrictStr + borrowed: StrictStr + free: StrictStr + interest: StrictStr + locked: StrictStr + net_asset: StrictStr = Field(alias="netAsset") + __properties: ClassVar[List[str]] = ["asset", "borrowed", "free", "interest", "locked", "netAsset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginAccountGet200ResponseUserAssetsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginAccountGet200ResponseUserAssetsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "borrowed": obj.get("borrowed"), + "free": obj.get("free"), + "interest": obj.get("interest"), + "locked": obj.get("locked"), + "netAsset": obj.get("netAsset") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_all_assets_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_all_assets_get200_response_inner.py new file mode 100644 index 0000000..2683254 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_all_assets_get200_response_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginAllAssetsGet200ResponseInner(BaseModel): + """ + SapiV1MarginAllAssetsGet200ResponseInner + """ # noqa: E501 + asset_full_name: StrictStr = Field(alias="assetFullName") + asset_name: StrictStr = Field(alias="assetName") + is_borrowable: StrictBool = Field(alias="isBorrowable") + is_mortgageable: StrictBool = Field(alias="isMortgageable") + user_min_borrow: StrictStr = Field(alias="userMinBorrow") + user_min_repay: StrictStr = Field(alias="userMinRepay") + __properties: ClassVar[List[str]] = ["assetFullName", "assetName", "isBorrowable", "isMortgageable", "userMinBorrow", "userMinRepay"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginAllAssetsGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginAllAssetsGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assetFullName": obj.get("assetFullName"), + "assetName": obj.get("assetName"), + "isBorrowable": obj.get("isBorrowable"), + "isMortgageable": obj.get("isMortgageable"), + "userMinBorrow": obj.get("userMinBorrow"), + "userMinRepay": obj.get("userMinRepay") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_all_pairs_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_all_pairs_get200_response_inner.py new file mode 100644 index 0000000..17c822c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_all_pairs_get200_response_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginAllPairsGet200ResponseInner(BaseModel): + """ + SapiV1MarginAllPairsGet200ResponseInner + """ # noqa: E501 + base: StrictStr + id: StrictInt + is_buy_allowed: StrictBool = Field(alias="isBuyAllowed") + is_margin_trade: StrictBool = Field(alias="isMarginTrade") + is_sell_allowed: StrictBool = Field(alias="isSellAllowed") + quote: StrictStr + symbol: StrictStr + __properties: ClassVar[List[str]] = ["base", "id", "isBuyAllowed", "isMarginTrade", "isSellAllowed", "quote", "symbol"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginAllPairsGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginAllPairsGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "base": obj.get("base"), + "id": obj.get("id"), + "isBuyAllowed": obj.get("isBuyAllowed"), + "isMarginTrade": obj.get("isMarginTrade"), + "isSellAllowed": obj.get("isSellAllowed"), + "quote": obj.get("quote"), + "symbol": obj.get("symbol") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_available_inventory_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_available_inventory_get200_response.py new file mode 100644 index 0000000..00f19be --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_available_inventory_get200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_margin_available_inventory_get200_response_assets import SapiV1MarginAvailableInventoryGet200ResponseAssets +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginAvailableInventoryGet200Response(BaseModel): + """ + SapiV1MarginAvailableInventoryGet200Response + """ # noqa: E501 + assets: SapiV1MarginAvailableInventoryGet200ResponseAssets + update_time: StrictInt = Field(alias="updateTime") + __properties: ClassVar[List[str]] = ["assets", "updateTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginAvailableInventoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of assets + if self.assets: + _dict['assets'] = self.assets.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginAvailableInventoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assets": SapiV1MarginAvailableInventoryGet200ResponseAssets.from_dict(obj["assets"]) if obj.get("assets") is not None else None, + "updateTime": obj.get("updateTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_available_inventory_get200_response_assets.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_available_inventory_get200_response_assets.py new file mode 100644 index 0000000..402eff0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_available_inventory_get200_response_assets.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginAvailableInventoryGet200ResponseAssets(BaseModel): + """ + SapiV1MarginAvailableInventoryGet200ResponseAssets + """ # noqa: E501 + matic: StrictStr = Field(alias="MATIC") + stpt: StrictStr = Field(alias="STPT") + tvk: StrictStr = Field(alias="TVK") + shib: StrictStr = Field(alias="SHIB") + __properties: ClassVar[List[str]] = ["MATIC", "STPT", "TVK", "SHIB"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginAvailableInventoryGet200ResponseAssets from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginAvailableInventoryGet200ResponseAssets from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "MATIC": obj.get("MATIC"), + "STPT": obj.get("STPT"), + "TVK": obj.get("TVK"), + "SHIB": obj.get("SHIB") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_borrow_repay_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_borrow_repay_get200_response.py new file mode 100644 index 0000000..4d7d657 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_borrow_repay_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_margin_borrow_repay_get200_response_rows_inner import SapiV1MarginBorrowRepayGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginBorrowRepayGet200Response(BaseModel): + """ + SapiV1MarginBorrowRepayGet200Response + """ # noqa: E501 + rows: List[SapiV1MarginBorrowRepayGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginBorrowRepayGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginBorrowRepayGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1MarginBorrowRepayGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_borrow_repay_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_borrow_repay_get200_response_rows_inner.py new file mode 100644 index 0000000..80f29a9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_borrow_repay_get200_response_rows_inner.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginBorrowRepayGet200ResponseRowsInner(BaseModel): + """ + SapiV1MarginBorrowRepayGet200ResponseRowsInner + """ # noqa: E501 + isolated_symbol: Optional[StrictStr] = Field(default=None, description="Isolated symbol, will not be returned for crossed margin", alias="isolatedSymbol") + amount: Optional[StrictStr] = Field(default=None, description="Total amount borrowed/repaid") + asset: StrictStr + interest: Optional[StrictStr] = Field(default=None, description="Interest repaid") + principal: StrictStr = Field(description="Principal repaid") + status: StrictStr = Field(description="one of PENDING (pending execution), CONFIRMED (successfully execution), FAILED (execution failed, nothing happened to your account)") + timestamp: StrictInt + tx_id: StrictInt = Field(alias="txId") + __properties: ClassVar[List[str]] = ["isolatedSymbol", "amount", "asset", "interest", "principal", "status", "timestamp", "txId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginBorrowRepayGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginBorrowRepayGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "isolatedSymbol": obj.get("isolatedSymbol"), + "amount": obj.get("amount"), + "asset": obj.get("asset"), + "interest": obj.get("interest"), + "principal": obj.get("principal"), + "status": obj.get("status"), + "timestamp": obj.get("timestamp"), + "txId": obj.get("txId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_borrow_repay_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_borrow_repay_post200_response.py new file mode 100644 index 0000000..331a980 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_borrow_repay_post200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginBorrowRepayPost200Response(BaseModel): + """ + SapiV1MarginBorrowRepayPost200Response + """ # noqa: E501 + tran_id: StrictInt = Field(alias="tranId") + __properties: ClassVar[List[str]] = ["tranId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginBorrowRepayPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginBorrowRepayPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tranId": obj.get("tranId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_capital_flow_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_capital_flow_get200_response_inner.py new file mode 100644 index 0000000..1690eeb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_capital_flow_get200_response_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginCapitalFlowGet200ResponseInner(BaseModel): + """ + SapiV1MarginCapitalFlowGet200ResponseInner + """ # noqa: E501 + id: StrictInt + tran_id: StrictInt = Field(alias="tranId") + timestamp: StrictInt + asset: StrictStr + symbol: StrictStr + type: StrictStr + amount: StrictStr + __properties: ClassVar[List[str]] = ["id", "tranId", "timestamp", "asset", "symbol", "type", "amount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginCapitalFlowGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginCapitalFlowGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "tranId": obj.get("tranId"), + "timestamp": obj.get("timestamp"), + "asset": obj.get("asset"), + "symbol": obj.get("symbol"), + "type": obj.get("type"), + "amount": obj.get("amount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner.py new file mode 100644 index 0000000..028ded4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner import SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner(BaseModel): + """ + SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner + """ # noqa: E501 + collaterals: List[SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner] + asset_names: List[StrictStr] = Field(alias="assetNames") + __properties: ClassVar[List[str]] = ["collaterals", "assetNames"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in collaterals (list) + _items = [] + if self.collaterals: + for _item in self.collaterals: + if _item: + _items.append(_item.to_dict()) + _dict['collaterals'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collaterals": [SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner.from_dict(_item) for _item in obj["collaterals"]] if obj.get("collaterals") is not None else None, + "assetNames": obj.get("assetNames") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner.py new file mode 100644 index 0000000..9d3eedb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner(BaseModel): + """ + SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner + """ # noqa: E501 + min_usd_value: StrictStr = Field(alias="minUsdValue") + max_usd_value: StrictStr = Field(alias="maxUsdValue") + discount_rate: StrictStr = Field(alias="discountRate") + __properties: ClassVar[List[str]] = ["minUsdValue", "maxUsdValue", "discountRate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "minUsdValue": obj.get("minUsdValue"), + "maxUsdValue": obj.get("maxUsdValue"), + "discountRate": obj.get("discountRate") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_cross_margin_data_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_cross_margin_data_get200_response_inner.py new file mode 100644 index 0000000..00e61fd --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_cross_margin_data_get200_response_inner.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginCrossMarginDataGet200ResponseInner(BaseModel): + """ + SapiV1MarginCrossMarginDataGet200ResponseInner + """ # noqa: E501 + vip_level: StrictInt = Field(alias="vipLevel") + coin: StrictStr + transfer_in: StrictBool = Field(alias="transferIn") + borrowable: StrictBool + daily_interest: StrictStr = Field(alias="dailyInterest") + yearly_interest: StrictStr = Field(alias="yearlyInterest") + borrow_limit: StrictStr = Field(alias="borrowLimit") + marginable_pairs: List[StrictStr] = Field(alias="marginablePairs") + __properties: ClassVar[List[str]] = ["vipLevel", "coin", "transferIn", "borrowable", "dailyInterest", "yearlyInterest", "borrowLimit", "marginablePairs"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginCrossMarginDataGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginCrossMarginDataGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vipLevel": obj.get("vipLevel"), + "coin": obj.get("coin"), + "transferIn": obj.get("transferIn"), + "borrowable": obj.get("borrowable"), + "dailyInterest": obj.get("dailyInterest"), + "yearlyInterest": obj.get("yearlyInterest"), + "borrowLimit": obj.get("borrowLimit"), + "marginablePairs": obj.get("marginablePairs") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_delist_schedule_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_delist_schedule_get200_response_inner.py new file mode 100644 index 0000000..0010ded --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_delist_schedule_get200_response_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginDelistScheduleGet200ResponseInner(BaseModel): + """ + SapiV1MarginDelistScheduleGet200ResponseInner + """ # noqa: E501 + delist_time: Optional[StrictInt] = Field(default=None, alias="delistTime") + cross_margin_assets: Optional[List[StrictStr]] = Field(default=None, alias="crossMarginAssets") + isolated_margin_symbols: Optional[List[StrictStr]] = Field(default=None, alias="isolatedMarginSymbols") + __properties: ClassVar[List[str]] = ["delistTime", "crossMarginAssets", "isolatedMarginSymbols"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginDelistScheduleGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginDelistScheduleGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "delistTime": obj.get("delistTime"), + "crossMarginAssets": obj.get("crossMarginAssets"), + "isolatedMarginSymbols": obj.get("isolatedMarginSymbols") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_exchange_small_liability_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_exchange_small_liability_get200_response_inner.py new file mode 100644 index 0000000..b19a5e7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_exchange_small_liability_get200_response_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginExchangeSmallLiabilityGet200ResponseInner(BaseModel): + """ + SapiV1MarginExchangeSmallLiabilityGet200ResponseInner + """ # noqa: E501 + asset: StrictStr + interest: StrictStr + principal: StrictStr + liability_asset: StrictStr = Field(alias="liabilityAsset") + liability_qty: Union[StrictFloat, StrictInt] = Field(alias="liabilityQty") + __properties: ClassVar[List[str]] = ["asset", "interest", "principal", "liabilityAsset", "liabilityQty"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginExchangeSmallLiabilityGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginExchangeSmallLiabilityGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "interest": obj.get("interest"), + "principal": obj.get("principal"), + "liabilityAsset": obj.get("liabilityAsset"), + "liabilityQty": obj.get("liabilityQty") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_exchange_small_liability_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_exchange_small_liability_history_get200_response.py new file mode 100644 index 0000000..5a5bb50 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_exchange_small_liability_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner import SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginExchangeSmallLiabilityHistoryGet200Response(BaseModel): + """ + SapiV1MarginExchangeSmallLiabilityHistoryGet200Response + """ # noqa: E501 + total: StrictInt + rows: List[SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner] + __properties: ClassVar[List[str]] = ["total", "rows"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginExchangeSmallLiabilityHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginExchangeSmallLiabilityHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "rows": [SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner.py new file mode 100644 index 0000000..d4bc0e1 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner + """ # noqa: E501 + asset: StrictStr + amount: StrictStr + target_asset: StrictStr = Field(alias="targetAsset") + target_amount: StrictStr = Field(alias="targetAmount") + biz_type: StrictStr = Field(alias="bizType") + timestamp: StrictInt + __properties: ClassVar[List[str]] = ["asset", "amount", "targetAsset", "targetAmount", "bizType", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "amount": obj.get("amount"), + "targetAsset": obj.get("targetAsset"), + "targetAmount": obj.get("targetAmount"), + "bizType": obj.get("bizType"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_force_liquidation_rec_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_force_liquidation_rec_get200_response.py new file mode 100644 index 0000000..74001c4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_force_liquidation_rec_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner import SapiV1MarginForceLiquidationRecGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginForceLiquidationRecGet200Response(BaseModel): + """ + SapiV1MarginForceLiquidationRecGet200Response + """ # noqa: E501 + rows: List[SapiV1MarginForceLiquidationRecGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginForceLiquidationRecGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginForceLiquidationRecGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1MarginForceLiquidationRecGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner.py new file mode 100644 index 0000000..4a51320 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginForceLiquidationRecGet200ResponseRowsInner(BaseModel): + """ + SapiV1MarginForceLiquidationRecGet200ResponseRowsInner + """ # noqa: E501 + avg_price: StrictStr = Field(alias="avgPrice") + executed_qty: StrictStr = Field(alias="executedQty") + order_id: StrictInt = Field(alias="orderId") + price: StrictStr + qty: StrictStr + side: StrictStr + symbol: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + is_isolated: StrictBool = Field(alias="isIsolated") + updated_time: StrictInt = Field(alias="updatedTime") + __properties: ClassVar[List[str]] = ["avgPrice", "executedQty", "orderId", "price", "qty", "side", "symbol", "timeInForce", "isIsolated", "updatedTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginForceLiquidationRecGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginForceLiquidationRecGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "avgPrice": obj.get("avgPrice"), + "executedQty": obj.get("executedQty"), + "orderId": obj.get("orderId"), + "price": obj.get("price"), + "qty": obj.get("qty"), + "side": obj.get("side"), + "symbol": obj.get("symbol"), + "timeInForce": obj.get("timeInForce"), + "isIsolated": obj.get("isIsolated"), + "updatedTime": obj.get("updatedTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_interest_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_interest_history_get200_response.py new file mode 100644 index 0000000..c8bb6f0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_interest_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_margin_interest_history_get200_response_rows_inner import SapiV1MarginInterestHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginInterestHistoryGet200Response(BaseModel): + """ + SapiV1MarginInterestHistoryGet200Response + """ # noqa: E501 + rows: List[SapiV1MarginInterestHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginInterestHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginInterestHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1MarginInterestHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_interest_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_interest_history_get200_response_rows_inner.py new file mode 100644 index 0000000..28a21c1 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_interest_history_get200_response_rows_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginInterestHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1MarginInterestHistoryGet200ResponseRowsInner + """ # noqa: E501 + isolated_symbol: StrictStr = Field(alias="isolatedSymbol") + asset: StrictStr + interest: StrictStr + interest_accured_time: StrictInt = Field(alias="interestAccuredTime") + interest_rate: StrictStr = Field(alias="interestRate") + principal: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["isolatedSymbol", "asset", "interest", "interestAccuredTime", "interestRate", "principal", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginInterestHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginInterestHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "isolatedSymbol": obj.get("isolatedSymbol"), + "asset": obj.get("asset"), + "interest": obj.get("interest"), + "interestAccuredTime": obj.get("interestAccuredTime"), + "interestRate": obj.get("interestRate"), + "principal": obj.get("principal"), + "type": obj.get("type") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_interest_rate_history_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_interest_rate_history_get200_response_inner.py new file mode 100644 index 0000000..0a5a2c2 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_interest_rate_history_get200_response_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginInterestRateHistoryGet200ResponseInner(BaseModel): + """ + SapiV1MarginInterestRateHistoryGet200ResponseInner + """ # noqa: E501 + asset: StrictStr + daily_interest_rate: StrictStr = Field(alias="dailyInterestRate") + timestamp: StrictInt + vip_level: StrictInt = Field(alias="vipLevel") + __properties: ClassVar[List[str]] = ["asset", "dailyInterestRate", "timestamp", "vipLevel"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginInterestRateHistoryGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginInterestRateHistoryGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "dailyInterestRate": obj.get("dailyInterestRate"), + "timestamp": obj.get("timestamp"), + "vipLevel": obj.get("vipLevel") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_account_limit_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_account_limit_get200_response.py new file mode 100644 index 0000000..96d00b0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_account_limit_get200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginIsolatedAccountLimitGet200Response(BaseModel): + """ + SapiV1MarginIsolatedAccountLimitGet200Response + """ # noqa: E501 + enabled_account: StrictInt = Field(alias="enabledAccount") + max_account: StrictInt = Field(alias="maxAccount") + __properties: ClassVar[List[str]] = ["enabledAccount", "maxAccount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginIsolatedAccountLimitGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginIsolatedAccountLimitGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabledAccount": obj.get("enabledAccount"), + "maxAccount": obj.get("maxAccount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_account_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_account_post200_response.py new file mode 100644 index 0000000..ac6cc4e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_account_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginIsolatedAccountPost200Response(BaseModel): + """ + SapiV1MarginIsolatedAccountPost200Response + """ # noqa: E501 + success: StrictBool + symbol: StrictStr + __properties: ClassVar[List[str]] = ["success", "symbol"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginIsolatedAccountPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginIsolatedAccountPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "symbol": obj.get("symbol") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_all_pairs_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_all_pairs_get200_response_inner.py new file mode 100644 index 0000000..d4f1be4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_all_pairs_get200_response_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginIsolatedAllPairsGet200ResponseInner(BaseModel): + """ + SapiV1MarginIsolatedAllPairsGet200ResponseInner + """ # noqa: E501 + symbol: StrictStr + base: StrictStr + quote: StrictStr + is_margin_trade: StrictBool = Field(alias="isMarginTrade") + is_buy_allowed: StrictBool = Field(alias="isBuyAllowed") + is_sell_allowed: StrictBool = Field(alias="isSellAllowed") + __properties: ClassVar[List[str]] = ["symbol", "base", "quote", "isMarginTrade", "isBuyAllowed", "isSellAllowed"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginIsolatedAllPairsGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginIsolatedAllPairsGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "base": obj.get("base"), + "quote": obj.get("quote"), + "isMarginTrade": obj.get("isMarginTrade"), + "isBuyAllowed": obj.get("isBuyAllowed"), + "isSellAllowed": obj.get("isSellAllowed") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_margin_data_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_margin_data_get200_response_inner.py new file mode 100644 index 0000000..4530fba --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_margin_data_get200_response_inner.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from openapi_client.models.sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner import SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginIsolatedMarginDataGet200ResponseInner(BaseModel): + """ + SapiV1MarginIsolatedMarginDataGet200ResponseInner + """ # noqa: E501 + vip_level: Optional[StrictInt] = Field(default=None, alias="vipLevel") + symbol: Optional[StrictStr] = None + leverage: Optional[StrictStr] = None + data: Optional[List[SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner]] = None + __properties: ClassVar[List[str]] = ["vipLevel", "symbol", "leverage", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginIsolatedMarginDataGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginIsolatedMarginDataGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vipLevel": obj.get("vipLevel"), + "symbol": obj.get("symbol"), + "leverage": obj.get("leverage"), + "data": [SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner.py new file mode 100644 index 0000000..5c2c9d4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner(BaseModel): + """ + SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner + """ # noqa: E501 + coin: Optional[StrictStr] = None + daily_interest: Optional[StrictStr] = Field(default=None, alias="dailyInterest") + borrow_limit: Optional[StrictStr] = Field(default=None, alias="borrowLimit") + __properties: ClassVar[List[str]] = ["coin", "dailyInterest", "borrowLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "coin": obj.get("coin"), + "dailyInterest": obj.get("dailyInterest"), + "borrowLimit": obj.get("borrowLimit") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_margin_tier_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_margin_tier_get200_response_inner.py new file mode 100644 index 0000000..eb8b179 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_isolated_margin_tier_get200_response_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginIsolatedMarginTierGet200ResponseInner(BaseModel): + """ + SapiV1MarginIsolatedMarginTierGet200ResponseInner + """ # noqa: E501 + symbol: Optional[StrictStr] = None + tier: Optional[StrictInt] = None + effective_multiple: Optional[StrictStr] = Field(default=None, alias="effectiveMultiple") + initial_risk_ratio: Optional[StrictStr] = Field(default=None, alias="initialRiskRatio") + liquidation_risk_ratio: Optional[StrictStr] = Field(default=None, alias="liquidationRiskRatio") + base_asset_max_borrowable: Optional[StrictStr] = Field(default=None, alias="baseAssetMaxBorrowable") + quote_asset_max_borrowable: Optional[StrictStr] = Field(default=None, alias="quoteAssetMaxBorrowable") + __properties: ClassVar[List[str]] = ["symbol", "tier", "effectiveMultiple", "initialRiskRatio", "liquidationRiskRatio", "baseAssetMaxBorrowable", "quoteAssetMaxBorrowable"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginIsolatedMarginTierGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginIsolatedMarginTierGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "tier": obj.get("tier"), + "effectiveMultiple": obj.get("effectiveMultiple"), + "initialRiskRatio": obj.get("initialRiskRatio"), + "liquidationRiskRatio": obj.get("liquidationRiskRatio"), + "baseAssetMaxBorrowable": obj.get("baseAssetMaxBorrowable"), + "quoteAssetMaxBorrowable": obj.get("quoteAssetMaxBorrowable") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_leverage_bracket_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_leverage_bracket_get200_response_inner.py new file mode 100644 index 0000000..e83309f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_leverage_bracket_get200_response_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner import SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginLeverageBracketGet200ResponseInner(BaseModel): + """ + SapiV1MarginLeverageBracketGet200ResponseInner + """ # noqa: E501 + asset_names: List[StrictStr] = Field(alias="assetNames") + rank: StrictInt + brackets: List[SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner] + __properties: ClassVar[List[str]] = ["assetNames", "rank", "brackets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginLeverageBracketGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in brackets (list) + _items = [] + if self.brackets: + for _item in self.brackets: + if _item: + _items.append(_item.to_dict()) + _dict['brackets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginLeverageBracketGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assetNames": obj.get("assetNames"), + "rank": obj.get("rank"), + "brackets": [SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner.from_dict(_item) for _item in obj["brackets"]] if obj.get("brackets") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner.py new file mode 100644 index 0000000..580890f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner(BaseModel): + """ + SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner + """ # noqa: E501 + leverage: Optional[StrictInt] = None + max_debt: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="maxDebt") + maintenance_margin_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="maintenanceMarginRate") + initial_margin_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="initialMarginRate") + fast_num: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="fastNum") + __properties: ClassVar[List[str]] = ["leverage", "maxDebt", "maintenanceMarginRate", "initialMarginRate", "fastNum"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "leverage": obj.get("leverage"), + "maxDebt": obj.get("maxDebt"), + "maintenanceMarginRate": obj.get("maintenanceMarginRate"), + "initialMarginRate": obj.get("initialMarginRate"), + "fastNum": obj.get("fastNum") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_max_borrowable_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_max_borrowable_get200_response.py new file mode 100644 index 0000000..8c07588 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_max_borrowable_get200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginMaxBorrowableGet200Response(BaseModel): + """ + SapiV1MarginMaxBorrowableGet200Response + """ # noqa: E501 + amount: StrictStr = Field(description="account's currently max borrowable amount with sufficient system availability") + borrow_limit: StrictStr = Field(description="max borrowable amount limited by the account level", alias="borrowLimit") + __properties: ClassVar[List[str]] = ["amount", "borrowLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginMaxBorrowableGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginMaxBorrowableGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "borrowLimit": obj.get("borrowLimit") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_max_leverage_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_max_leverage_post200_response.py new file mode 100644 index 0000000..6cadeb5 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_max_leverage_post200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginMaxLeveragePost200Response(BaseModel): + """ + SapiV1MarginMaxLeveragePost200Response + """ # noqa: E501 + success: StrictBool + __properties: ClassVar[List[str]] = ["success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginMaxLeveragePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginMaxLeveragePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_max_transferable_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_max_transferable_get200_response.py new file mode 100644 index 0000000..cafc365 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_max_transferable_get200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginMaxTransferableGet200Response(BaseModel): + """ + SapiV1MarginMaxTransferableGet200Response + """ # noqa: E501 + amount: StrictStr = Field(description="Account's currently max borrowable amount with sufficient system availability") + borrow_limit: StrictStr = Field(description="Max borrowable amount limited by the account level", alias="borrowLimit") + __properties: ClassVar[List[str]] = ["amount", "borrowLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginMaxTransferableGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginMaxTransferableGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "borrowLimit": obj.get("borrowLimit") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_next_hourly_interest_rate_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_next_hourly_interest_rate_get200_response_inner.py new file mode 100644 index 0000000..1a593cc --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_next_hourly_interest_rate_get200_response_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginNextHourlyInterestRateGet200ResponseInner(BaseModel): + """ + SapiV1MarginNextHourlyInterestRateGet200ResponseInner + """ # noqa: E501 + asset: StrictStr + next_hourly_interest_rate: StrictStr = Field(alias="nextHourlyInterestRate") + __properties: ClassVar[List[str]] = ["asset", "nextHourlyInterestRate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginNextHourlyInterestRateGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginNextHourlyInterestRateGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "nextHourlyInterestRate": obj.get("nextHourlyInterestRate") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_open_order_list_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_open_order_list_get200_response_inner.py new file mode 100644 index 0000000..9be501e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_open_order_list_get200_response_inner.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.api_v3_open_order_list_get200_response_inner_orders_inner import ApiV3OpenOrderListGet200ResponseInnerOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginOpenOrderListGet200ResponseInner(BaseModel): + """ + SapiV1MarginOpenOrderListGet200ResponseInner + """ # noqa: E501 + order_list_id: StrictInt = Field(alias="orderListId") + contingency_type: StrictStr = Field(alias="contingencyType") + list_status_type: StrictStr = Field(alias="listStatusType") + list_order_status: StrictStr = Field(alias="listOrderStatus") + list_client_order_id: StrictStr = Field(alias="listClientOrderId") + transaction_time: StrictInt = Field(alias="transactionTime") + symbol: StrictStr + is_isolated: StrictBool = Field(alias="isIsolated") + orders: List[ApiV3OpenOrderListGet200ResponseInnerOrdersInner] + __properties: ClassVar[List[str]] = ["orderListId", "contingencyType", "listStatusType", "listOrderStatus", "listClientOrderId", "transactionTime", "symbol", "isIsolated", "orders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginOpenOrderListGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in orders (list) + _items = [] + if self.orders: + for _item in self.orders: + if _item: + _items.append(_item.to_dict()) + _dict['orders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginOpenOrderListGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderListId": obj.get("orderListId"), + "contingencyType": obj.get("contingencyType"), + "listStatusType": obj.get("listStatusType"), + "listOrderStatus": obj.get("listOrderStatus"), + "listClientOrderId": obj.get("listClientOrderId"), + "transactionTime": obj.get("transactionTime"), + "symbol": obj.get("symbol"), + "isIsolated": obj.get("isIsolated"), + "orders": [ApiV3OpenOrderListGet200ResponseInnerOrdersInner.from_dict(_item) for _item in obj["orders"]] if obj.get("orders") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_open_orders_delete200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_open_orders_delete200_response_inner.py new file mode 100644 index 0000000..2fcc7a2 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_open_orders_delete200_response_inner.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from openapi_client.models.canceled_margin_order_detail import CanceledMarginOrderDetail +from openapi_client.models.margin_oco_order import MarginOcoOrder +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +SAPIV1MARGINOPENORDERSDELETE200RESPONSEINNER_ANY_OF_SCHEMAS = ["CanceledMarginOrderDetail", "MarginOcoOrder"] + +class SapiV1MarginOpenOrdersDelete200ResponseInner(BaseModel): + """ + SapiV1MarginOpenOrdersDelete200ResponseInner + """ + + # data type: CanceledMarginOrderDetail + anyof_schema_1_validator: Optional[CanceledMarginOrderDetail] = None + # data type: MarginOcoOrder + anyof_schema_2_validator: Optional[MarginOcoOrder] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[CanceledMarginOrderDetail, MarginOcoOrder]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "CanceledMarginOrderDetail", "MarginOcoOrder" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = SapiV1MarginOpenOrdersDelete200ResponseInner.model_construct() + error_messages = [] + # validate data type: CanceledMarginOrderDetail + if not isinstance(v, CanceledMarginOrderDetail): + error_messages.append(f"Error! Input type `{type(v)}` is not `CanceledMarginOrderDetail`") + else: + return v + + # validate data type: MarginOcoOrder + if not isinstance(v, MarginOcoOrder): + error_messages.append(f"Error! Input type `{type(v)}` is not `MarginOcoOrder`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in SapiV1MarginOpenOrdersDelete200ResponseInner with anyOf schemas: CanceledMarginOrderDetail, MarginOcoOrder. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[CanceledMarginOrderDetail] = None + try: + instance.actual_instance = CanceledMarginOrderDetail.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[MarginOcoOrder] = None + try: + instance.actual_instance = MarginOcoOrder.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into SapiV1MarginOpenOrdersDelete200ResponseInner with anyOf schemas: CanceledMarginOrderDetail, MarginOcoOrder. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], CanceledMarginOrderDetail, MarginOcoOrder]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_list_get200_response.py new file mode 100644 index 0000000..8af202c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_list_get200_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.api_v3_order_list_get200_response_orders_inner import ApiV3OrderListGet200ResponseOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginOrderListGet200Response(BaseModel): + """ + SapiV1MarginOrderListGet200Response + """ # noqa: E501 + order_list_id: StrictInt = Field(alias="orderListId") + contingency_type: StrictStr = Field(alias="contingencyType") + list_status_type: StrictStr = Field(alias="listStatusType") + list_order_status: StrictStr = Field(alias="listOrderStatus") + list_client_order_id: StrictStr = Field(alias="listClientOrderId") + transaction_time: StrictInt = Field(alias="transactionTime") + symbol: StrictStr + is_isolated: StrictBool = Field(alias="isIsolated") + orders: List[ApiV3OrderListGet200ResponseOrdersInner] + __properties: ClassVar[List[str]] = ["orderListId", "contingencyType", "listStatusType", "listOrderStatus", "listClientOrderId", "transactionTime", "symbol", "isIsolated", "orders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginOrderListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in orders (list) + _items = [] + if self.orders: + for _item in self.orders: + if _item: + _items.append(_item.to_dict()) + _dict['orders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginOrderListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderListId": obj.get("orderListId"), + "contingencyType": obj.get("contingencyType"), + "listStatusType": obj.get("listStatusType"), + "listOrderStatus": obj.get("listOrderStatus"), + "listClientOrderId": obj.get("listClientOrderId"), + "transactionTime": obj.get("transactionTime"), + "symbol": obj.get("symbol"), + "isIsolated": obj.get("isIsolated"), + "orders": [ApiV3OrderListGet200ResponseOrdersInner.from_dict(_item) for _item in obj["orders"]] if obj.get("orders") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_oco_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_oco_post200_response.py new file mode 100644 index 0000000..c744223 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_oco_post200_response.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_margin_order_oco_post200_response_order_reports_inner import SapiV1MarginOrderOcoPost200ResponseOrderReportsInner +from openapi_client.models.sapi_v1_margin_order_oco_post200_response_orders_inner import SapiV1MarginOrderOcoPost200ResponseOrdersInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginOrderOcoPost200Response(BaseModel): + """ + SapiV1MarginOrderOcoPost200Response + """ # noqa: E501 + order_list_id: StrictInt = Field(alias="orderListId") + contingency_type: StrictStr = Field(alias="contingencyType") + list_status_type: StrictStr = Field(alias="listStatusType") + list_order_status: StrictStr = Field(alias="listOrderStatus") + list_client_order_id: StrictStr = Field(alias="listClientOrderId") + transaction_time: StrictInt = Field(alias="transactionTime") + symbol: StrictStr + margin_buy_borrow_amount: StrictStr = Field(description="will not return if no margin trade happens", alias="marginBuyBorrowAmount") + margin_buy_borrow_asset: StrictStr = Field(description="will not return if no margin trade happens", alias="marginBuyBorrowAsset") + is_isolated: StrictBool = Field(alias="isIsolated") + orders: List[SapiV1MarginOrderOcoPost200ResponseOrdersInner] + order_reports: List[SapiV1MarginOrderOcoPost200ResponseOrderReportsInner] = Field(alias="orderReports") + __properties: ClassVar[List[str]] = ["orderListId", "contingencyType", "listStatusType", "listOrderStatus", "listClientOrderId", "transactionTime", "symbol", "marginBuyBorrowAmount", "marginBuyBorrowAsset", "isIsolated", "orders", "orderReports"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginOrderOcoPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in orders (list) + _items = [] + if self.orders: + for _item in self.orders: + if _item: + _items.append(_item.to_dict()) + _dict['orders'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in order_reports (list) + _items = [] + if self.order_reports: + for _item in self.order_reports: + if _item: + _items.append(_item.to_dict()) + _dict['orderReports'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginOrderOcoPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderListId": obj.get("orderListId"), + "contingencyType": obj.get("contingencyType"), + "listStatusType": obj.get("listStatusType"), + "listOrderStatus": obj.get("listOrderStatus"), + "listClientOrderId": obj.get("listClientOrderId"), + "transactionTime": obj.get("transactionTime"), + "symbol": obj.get("symbol"), + "marginBuyBorrowAmount": obj.get("marginBuyBorrowAmount"), + "marginBuyBorrowAsset": obj.get("marginBuyBorrowAsset"), + "isIsolated": obj.get("isIsolated"), + "orders": [SapiV1MarginOrderOcoPost200ResponseOrdersInner.from_dict(_item) for _item in obj["orders"]] if obj.get("orders") is not None else None, + "orderReports": [SapiV1MarginOrderOcoPost200ResponseOrderReportsInner.from_dict(_item) for _item in obj["orderReports"]] if obj.get("orderReports") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_oco_post200_response_order_reports_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_oco_post200_response_order_reports_inner.py new file mode 100644 index 0000000..9ea5754 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_oco_post200_response_order_reports_inner.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginOrderOcoPost200ResponseOrderReportsInner(BaseModel): + """ + SapiV1MarginOrderOcoPost200ResponseOrderReportsInner + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + order_list_id: StrictInt = Field(alias="orderListId") + client_order_id: StrictStr = Field(alias="clientOrderId") + transact_time: StrictInt = Field(alias="transactTime") + price: StrictStr + orig_qty: StrictStr = Field(alias="origQty") + executed_qty: StrictStr = Field(alias="executedQty") + cummulative_quote_qty: StrictStr = Field(alias="cummulativeQuoteQty") + status: StrictStr + time_in_force: StrictStr = Field(alias="timeInForce") + type: StrictStr + side: StrictStr + stop_price: StrictStr = Field(alias="stopPrice") + __properties: ClassVar[List[str]] = ["symbol", "orderId", "orderListId", "clientOrderId", "transactTime", "price", "origQty", "executedQty", "cummulativeQuoteQty", "status", "timeInForce", "type", "side", "stopPrice"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginOrderOcoPost200ResponseOrderReportsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginOrderOcoPost200ResponseOrderReportsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "orderListId": obj.get("orderListId"), + "clientOrderId": obj.get("clientOrderId"), + "transactTime": obj.get("transactTime"), + "price": obj.get("price"), + "origQty": obj.get("origQty"), + "executedQty": obj.get("executedQty"), + "cummulativeQuoteQty": obj.get("cummulativeQuoteQty"), + "status": obj.get("status"), + "timeInForce": obj.get("timeInForce"), + "type": obj.get("type"), + "side": obj.get("side"), + "stopPrice": obj.get("stopPrice") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_oco_post200_response_orders_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_oco_post200_response_orders_inner.py new file mode 100644 index 0000000..9831a98 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_oco_post200_response_orders_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginOrderOcoPost200ResponseOrdersInner(BaseModel): + """ + SapiV1MarginOrderOcoPost200ResponseOrdersInner + """ # noqa: E501 + symbol: StrictStr + order_id: StrictInt = Field(alias="orderId") + client_order_id: StrictStr = Field(alias="clientOrderId") + __properties: ClassVar[List[str]] = ["symbol", "orderId", "clientOrderId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginOrderOcoPost200ResponseOrdersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginOrderOcoPost200ResponseOrdersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId"), + "clientOrderId": obj.get("clientOrderId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_post200_response.py new file mode 100644 index 0000000..9e855ec --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_order_post200_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from openapi_client.models.margin_order_response_ack import MarginOrderResponseAck +from openapi_client.models.margin_order_response_full import MarginOrderResponseFull +from openapi_client.models.margin_order_response_result import MarginOrderResponseResult +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SAPIV1MARGINORDERPOST200RESPONSE_ONE_OF_SCHEMAS = ["MarginOrderResponseAck", "MarginOrderResponseFull", "MarginOrderResponseResult"] + +class SapiV1MarginOrderPost200Response(BaseModel): + """ + SapiV1MarginOrderPost200Response + """ + # data type: MarginOrderResponseAck + oneof_schema_1_validator: Optional[MarginOrderResponseAck] = None + # data type: MarginOrderResponseResult + oneof_schema_2_validator: Optional[MarginOrderResponseResult] = None + # data type: MarginOrderResponseFull + oneof_schema_3_validator: Optional[MarginOrderResponseFull] = None + actual_instance: Optional[Union[MarginOrderResponseAck, MarginOrderResponseFull, MarginOrderResponseResult]] = None + one_of_schemas: Set[str] = { "MarginOrderResponseAck", "MarginOrderResponseFull", "MarginOrderResponseResult" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SapiV1MarginOrderPost200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: MarginOrderResponseAck + if not isinstance(v, MarginOrderResponseAck): + error_messages.append(f"Error! Input type `{type(v)}` is not `MarginOrderResponseAck`") + else: + match += 1 + # validate data type: MarginOrderResponseResult + if not isinstance(v, MarginOrderResponseResult): + error_messages.append(f"Error! Input type `{type(v)}` is not `MarginOrderResponseResult`") + else: + match += 1 + # validate data type: MarginOrderResponseFull + if not isinstance(v, MarginOrderResponseFull): + error_messages.append(f"Error! Input type `{type(v)}` is not `MarginOrderResponseFull`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SapiV1MarginOrderPost200Response with oneOf schemas: MarginOrderResponseAck, MarginOrderResponseFull, MarginOrderResponseResult. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SapiV1MarginOrderPost200Response with oneOf schemas: MarginOrderResponseAck, MarginOrderResponseFull, MarginOrderResponseResult. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into MarginOrderResponseAck + try: + instance.actual_instance = MarginOrderResponseAck.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MarginOrderResponseResult + try: + instance.actual_instance = MarginOrderResponseResult.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MarginOrderResponseFull + try: + instance.actual_instance = MarginOrderResponseFull.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SapiV1MarginOrderPost200Response with oneOf schemas: MarginOrderResponseAck, MarginOrderResponseFull, MarginOrderResponseResult. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SapiV1MarginOrderPost200Response with oneOf schemas: MarginOrderResponseAck, MarginOrderResponseFull, MarginOrderResponseResult. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], MarginOrderResponseAck, MarginOrderResponseFull, MarginOrderResponseResult]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_price_index_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_price_index_get200_response.py new file mode 100644 index 0000000..f1ba1e6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_price_index_get200_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginPriceIndexGet200Response(BaseModel): + """ + SapiV1MarginPriceIndexGet200Response + """ # noqa: E501 + calc_time: StrictInt = Field(alias="calcTime") + price: StrictStr + symbol: StrictStr + __properties: ClassVar[List[str]] = ["calcTime", "price", "symbol"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginPriceIndexGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginPriceIndexGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "calcTime": obj.get("calcTime"), + "price": obj.get("price"), + "symbol": obj.get("symbol") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_rate_limit_order_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_rate_limit_order_get200_response_inner.py new file mode 100644 index 0000000..e11926e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_rate_limit_order_get200_response_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginRateLimitOrderGet200ResponseInner(BaseModel): + """ + SapiV1MarginRateLimitOrderGet200ResponseInner + """ # noqa: E501 + rate_limit_type: StrictStr = Field(alias="rateLimitType") + interval: StrictStr + interval_num: StrictInt = Field(alias="intervalNum") + limit: StrictInt + count: StrictInt + __properties: ClassVar[List[str]] = ["rateLimitType", "interval", "intervalNum", "limit", "count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginRateLimitOrderGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginRateLimitOrderGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rateLimitType": obj.get("rateLimitType"), + "interval": obj.get("interval"), + "intervalNum": obj.get("intervalNum"), + "limit": obj.get("limit"), + "count": obj.get("count") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_trade_coeff_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_trade_coeff_get200_response.py new file mode 100644 index 0000000..33914ab --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_trade_coeff_get200_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginTradeCoeffGet200Response(BaseModel): + """ + SapiV1MarginTradeCoeffGet200Response + """ # noqa: E501 + normal_bar: Optional[StrictStr] = Field(default=None, description="Account's currently max borrowable amount with sufficient system availability", alias="normalBar") + margin_call_bar: Optional[StrictStr] = Field(default=None, description="Max borrowable amount limited by the account level", alias="marginCallBar") + force_liquidation_bar: Optional[StrictStr] = Field(default=None, description="Liquidation Margin Ratio", alias="forceLiquidationBar") + __properties: ClassVar[List[str]] = ["normalBar", "marginCallBar", "forceLiquidationBar"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginTradeCoeffGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginTradeCoeffGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "normalBar": obj.get("normalBar"), + "marginCallBar": obj.get("marginCallBar"), + "forceLiquidationBar": obj.get("forceLiquidationBar") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_transfer_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_transfer_get200_response.py new file mode 100644 index 0000000..209ee4d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_transfer_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_margin_transfer_get200_response_rows_inner import SapiV1MarginTransferGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginTransferGet200Response(BaseModel): + """ + SapiV1MarginTransferGet200Response + """ # noqa: E501 + rows: List[SapiV1MarginTransferGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginTransferGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginTransferGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1MarginTransferGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_transfer_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_transfer_get200_response_rows_inner.py new file mode 100644 index 0000000..157e9bf --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_margin_transfer_get200_response_rows_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MarginTransferGet200ResponseRowsInner(BaseModel): + """ + SapiV1MarginTransferGet200ResponseRowsInner + """ # noqa: E501 + amount: StrictStr + asset: StrictStr + status: StrictStr + timestamp: StrictInt + tx_id: StrictInt = Field(alias="txId") + type: StrictStr + __properties: ClassVar[List[str]] = ["amount", "asset", "status", "timestamp", "txId", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MarginTransferGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MarginTransferGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "asset": obj.get("asset"), + "status": obj.get("status"), + "timestamp": obj.get("timestamp"), + "txId": obj.get("txId"), + "type": obj.get("type") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_cancel_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_cancel_post200_response.py new file mode 100644 index 0000000..4ccafe3 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_cancel_post200_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningHashTransferConfigCancelPost200Response(BaseModel): + """ + SapiV1MiningHashTransferConfigCancelPost200Response + """ # noqa: E501 + code: StrictInt + msg: StrictStr + data: StrictBool + __properties: ClassVar[List[str]] = ["code", "msg", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferConfigCancelPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferConfigCancelPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "data": obj.get("data") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_details_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_details_list_get200_response.py new file mode 100644 index 0000000..d351a50 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_details_list_get200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response_data import SapiV1MiningHashTransferConfigDetailsListGet200ResponseData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningHashTransferConfigDetailsListGet200Response(BaseModel): + """ + SapiV1MiningHashTransferConfigDetailsListGet200Response + """ # noqa: E501 + code: StrictInt + msg: StrictStr + data: SapiV1MiningHashTransferConfigDetailsListGet200ResponseData + __properties: ClassVar[List[str]] = ["code", "msg", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferConfigDetailsListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferConfigDetailsListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "data": SapiV1MiningHashTransferConfigDetailsListGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_details_list_get200_response_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_details_list_get200_response_data.py new file mode 100644 index 0000000..03b2628 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_details_list_get200_response_data.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner import SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningHashTransferConfigDetailsListGet200ResponseData(BaseModel): + """ + SapiV1MiningHashTransferConfigDetailsListGet200ResponseData + """ # noqa: E501 + config_details: List[SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner] = Field(alias="configDetails") + total_num: StrictInt = Field(alias="totalNum") + page_size: StrictInt = Field(alias="pageSize") + __properties: ClassVar[List[str]] = ["configDetails", "totalNum", "pageSize"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferConfigDetailsListGet200ResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in config_details (list) + _items = [] + if self.config_details: + for _item in self.config_details: + if _item: + _items.append(_item.to_dict()) + _dict['configDetails'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferConfigDetailsListGet200ResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "configDetails": [SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner.from_dict(_item) for _item in obj["configDetails"]] if obj.get("configDetails") is not None else None, + "totalNum": obj.get("totalNum"), + "pageSize": obj.get("pageSize") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner.py new file mode 100644 index 0000000..4a0a257 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner(BaseModel): + """ + SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner + """ # noqa: E501 + config_id: StrictInt = Field(description="Mining ID", alias="configId") + pool_username: StrictStr = Field(description="Transfer out of subaccount", alias="poolUsername") + to_pool_username: StrictStr = Field(description="Transfer into subaccount", alias="toPoolUsername") + algo_name: StrictStr = Field(description="Transfer algorithm", alias="algoName") + hash_rate: StrictInt = Field(description="Transferred Hashrate quantity", alias="hashRate") + start_day: StrictInt = Field(description="Start date", alias="startDay") + end_day: StrictInt = Field(description="End date", alias="endDay") + status: StrictInt = Field(description="0 Processing, 1:Cancelled, 2:Terminated ") + __properties: ClassVar[List[str]] = ["configId", "poolUsername", "toPoolUsername", "algoName", "hashRate", "startDay", "endDay", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "configId": obj.get("configId"), + "poolUsername": obj.get("poolUsername"), + "toPoolUsername": obj.get("toPoolUsername"), + "algoName": obj.get("algoName"), + "hashRate": obj.get("hashRate"), + "startDay": obj.get("startDay"), + "endDay": obj.get("endDay"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_post200_response.py new file mode 100644 index 0000000..7f3e760 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_config_post200_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningHashTransferConfigPost200Response(BaseModel): + """ + SapiV1MiningHashTransferConfigPost200Response + """ # noqa: E501 + code: StrictInt + msg: StrictStr + data: StrictInt = Field(description="Mining Account") + __properties: ClassVar[List[str]] = ["code", "msg", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferConfigPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferConfigPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "data": obj.get("data") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_profit_details_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_profit_details_get200_response.py new file mode 100644 index 0000000..5656e06 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_profit_details_get200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response_data import SapiV1MiningHashTransferProfitDetailsGet200ResponseData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningHashTransferProfitDetailsGet200Response(BaseModel): + """ + SapiV1MiningHashTransferProfitDetailsGet200Response + """ # noqa: E501 + code: StrictInt + msg: StrictStr + data: SapiV1MiningHashTransferProfitDetailsGet200ResponseData + __properties: ClassVar[List[str]] = ["code", "msg", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferProfitDetailsGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferProfitDetailsGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "data": SapiV1MiningHashTransferProfitDetailsGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_profit_details_get200_response_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_profit_details_get200_response_data.py new file mode 100644 index 0000000..2fe2417 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_profit_details_get200_response_data.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner import SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningHashTransferProfitDetailsGet200ResponseData(BaseModel): + """ + SapiV1MiningHashTransferProfitDetailsGet200ResponseData + """ # noqa: E501 + profit_transfer_details: List[SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner] = Field(alias="profitTransferDetails") + total_num: StrictInt = Field(alias="totalNum") + page_size: StrictInt = Field(alias="pageSize") + __properties: ClassVar[List[str]] = ["profitTransferDetails", "totalNum", "pageSize"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferProfitDetailsGet200ResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in profit_transfer_details (list) + _items = [] + if self.profit_transfer_details: + for _item in self.profit_transfer_details: + if _item: + _items.append(_item.to_dict()) + _dict['profitTransferDetails'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferProfitDetailsGet200ResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "profitTransferDetails": [SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner.from_dict(_item) for _item in obj["profitTransferDetails"]] if obj.get("profitTransferDetails") is not None else None, + "totalNum": obj.get("totalNum"), + "pageSize": obj.get("pageSize") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner.py new file mode 100644 index 0000000..3ffcfcd --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner(BaseModel): + """ + SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner + """ # noqa: E501 + pool_username: StrictStr = Field(description="Transfer out of sub-account", alias="poolUsername") + to_pool_username: StrictStr = Field(description="Transfer into subaccount", alias="toPoolUsername") + algo_name: StrictStr = Field(description="Transfer algorithm", alias="algoName") + hash_rate: StrictInt = Field(description="Transferred Hashrate quantity", alias="hashRate") + day: StrictInt = Field(description="Transfer date") + amount: Union[StrictFloat, StrictInt] = Field(description="Transfer income") + coin_name: StrictStr = Field(alias="coinName") + __properties: ClassVar[List[str]] = ["poolUsername", "toPoolUsername", "algoName", "hashRate", "day", "amount", "coinName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "poolUsername": obj.get("poolUsername"), + "toPoolUsername": obj.get("toPoolUsername"), + "algoName": obj.get("algoName"), + "hashRate": obj.get("hashRate"), + "day": obj.get("day"), + "amount": obj.get("amount"), + "coinName": obj.get("coinName") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_list_get200_response.py new file mode 100644 index 0000000..f019f67 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_list_get200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_payment_list_get200_response_data import SapiV1MiningPaymentListGet200ResponseData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningPaymentListGet200Response(BaseModel): + """ + SapiV1MiningPaymentListGet200Response + """ # noqa: E501 + code: StrictInt + msg: StrictStr + data: SapiV1MiningPaymentListGet200ResponseData + __properties: ClassVar[List[str]] = ["code", "msg", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "data": SapiV1MiningPaymentListGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_list_get200_response_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_list_get200_response_data.py new file mode 100644 index 0000000..c70c4a7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_list_get200_response_data.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_payment_list_get200_response_data_account_profits_inner import SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningPaymentListGet200ResponseData(BaseModel): + """ + SapiV1MiningPaymentListGet200ResponseData + """ # noqa: E501 + account_profits: List[SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner] = Field(alias="accountProfits") + total_num: StrictInt = Field(description="Total Rows", alias="totalNum") + page_size: StrictInt = Field(description="Rows per page", alias="pageSize") + __properties: ClassVar[List[str]] = ["accountProfits", "totalNum", "pageSize"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentListGet200ResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in account_profits (list) + _items = [] + if self.account_profits: + for _item in self.account_profits: + if _item: + _items.append(_item.to_dict()) + _dict['accountProfits'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentListGet200ResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountProfits": [SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner.from_dict(_item) for _item in obj["accountProfits"]] if obj.get("accountProfits") is not None else None, + "totalNum": obj.get("totalNum"), + "pageSize": obj.get("pageSize") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_list_get200_response_data_account_profits_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_list_get200_response_data_account_profits_inner.py new file mode 100644 index 0000000..15f67da --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_list_get200_response_data_account_profits_inner.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner(BaseModel): + """ + SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner + """ # noqa: E501 + time: StrictInt = Field(description="Mining date") + type: StrictInt = Field(description="0:Mining Wallet,5:Mining Address,7:Pool Savings,8:Transferred,31:Income Transfer ,32:Hashrate Resale-Mining Wallet 33:Hashrate Resale-Pool Savings") + hash_transfer: StrictInt = Field(description="Transferred Hashrate", alias="hashTransfer") + transfer_amount: Union[StrictFloat, StrictInt] = Field(description="Transferred Income", alias="transferAmount") + day_hash_rate: StrictInt = Field(description="Daily Hashrate", alias="dayHashRate") + profit_amount: Union[StrictFloat, StrictInt] = Field(description="Earnings Amount", alias="profitAmount") + coin_name: StrictStr = Field(description="Coin Type", alias="coinName") + status: StrictInt = Field(description="Status:0:Unpaid, 1:Paying 2:Paid") + __properties: ClassVar[List[str]] = ["time", "type", "hashTransfer", "transferAmount", "dayHashRate", "profitAmount", "coinName", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "time": obj.get("time"), + "type": obj.get("type"), + "hashTransfer": obj.get("hashTransfer"), + "transferAmount": obj.get("transferAmount"), + "dayHashRate": obj.get("dayHashRate"), + "profitAmount": obj.get("profitAmount"), + "coinName": obj.get("coinName"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_other_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_other_get200_response.py new file mode 100644 index 0000000..0b2feef --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_other_get200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_payment_other_get200_response_data import SapiV1MiningPaymentOtherGet200ResponseData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningPaymentOtherGet200Response(BaseModel): + """ + SapiV1MiningPaymentOtherGet200Response + """ # noqa: E501 + code: StrictInt + msg: StrictStr + data: SapiV1MiningPaymentOtherGet200ResponseData + __properties: ClassVar[List[str]] = ["code", "msg", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentOtherGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentOtherGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "data": SapiV1MiningPaymentOtherGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_other_get200_response_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_other_get200_response_data.py new file mode 100644 index 0000000..343a0cb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_other_get200_response_data.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_payment_other_get200_response_data_other_profits_inner import SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningPaymentOtherGet200ResponseData(BaseModel): + """ + SapiV1MiningPaymentOtherGet200ResponseData + """ # noqa: E501 + other_profits: List[SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner] = Field(alias="otherProfits") + total_num: StrictInt = Field(description="Total Rows", alias="totalNum") + page_size: StrictInt = Field(description="Rows per page", alias="pageSize") + __properties: ClassVar[List[str]] = ["otherProfits", "totalNum", "pageSize"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentOtherGet200ResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in other_profits (list) + _items = [] + if self.other_profits: + for _item in self.other_profits: + if _item: + _items.append(_item.to_dict()) + _dict['otherProfits'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentOtherGet200ResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "otherProfits": [SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner.from_dict(_item) for _item in obj["otherProfits"]] if obj.get("otherProfits") is not None else None, + "totalNum": obj.get("totalNum"), + "pageSize": obj.get("pageSize") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_other_get200_response_data_other_profits_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_other_get200_response_data_other_profits_inner.py new file mode 100644 index 0000000..8532536 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_other_get200_response_data_other_profits_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner(BaseModel): + """ + SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner + """ # noqa: E501 + time: StrictInt = Field(description="Mining date") + coin_name: StrictStr = Field(description="Coin Name", alias="coinName") + type: StrictInt = Field(description="1: Merged Mining, 2: Activity Bonus, 3:Rebate 4:Smart Pool 6:Income Transfer 7:Pool Savings") + profit_amount: Union[StrictFloat, StrictInt] = Field(alias="profitAmount") + status: StrictInt = Field(description="0:Unpaid, 1:Paying 2:Paid") + __properties: ClassVar[List[str]] = ["time", "coinName", "type", "profitAmount", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "time": obj.get("time"), + "coinName": obj.get("coinName"), + "type": obj.get("type"), + "profitAmount": obj.get("profitAmount"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_uid_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_uid_get200_response.py new file mode 100644 index 0000000..5cb85d5 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_uid_get200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response_data import SapiV1MiningPaymentUidGet200ResponseData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningPaymentUidGet200Response(BaseModel): + """ + SapiV1MiningPaymentUidGet200Response + """ # noqa: E501 + code: StrictInt + msg: StrictStr + data: SapiV1MiningPaymentUidGet200ResponseData + __properties: ClassVar[List[str]] = ["code", "msg", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentUidGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentUidGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "data": SapiV1MiningPaymentUidGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_uid_get200_response_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_uid_get200_response_data.py new file mode 100644 index 0000000..f7576c2 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_uid_get200_response_data.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner import SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningPaymentUidGet200ResponseData(BaseModel): + """ + SapiV1MiningPaymentUidGet200ResponseData + """ # noqa: E501 + account_profits: List[SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner] = Field(alias="accountProfits") + total_num: StrictInt = Field(alias="totalNum") + page_size: StrictInt = Field(alias="pageSize") + __properties: ClassVar[List[str]] = ["accountProfits", "totalNum", "pageSize"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentUidGet200ResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in account_profits (list) + _items = [] + if self.account_profits: + for _item in self.account_profits: + if _item: + _items.append(_item.to_dict()) + _dict['accountProfits'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentUidGet200ResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountProfits": [SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner.from_dict(_item) for _item in obj["accountProfits"]] if obj.get("accountProfits") is not None else None, + "totalNum": obj.get("totalNum"), + "pageSize": obj.get("pageSize") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner.py new file mode 100644 index 0000000..76ac86a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner(BaseModel): + """ + SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner + """ # noqa: E501 + time: StrictInt + coin_name: StrictStr = Field(alias="coinName") + type: StrictInt = Field(description="0:Referral 1:Refund 2:Rebate") + puid: StrictInt = Field(description="puid") + sub_name: StrictStr = Field(description="Mining account", alias="subName") + amount: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["time", "coinName", "type", "puid", "subName", "amount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "time": obj.get("time"), + "coinName": obj.get("coinName"), + "type": obj.get("type"), + "puid": obj.get("puid"), + "subName": obj.get("subName"), + "amount": obj.get("amount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_algo_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_algo_list_get200_response.py new file mode 100644 index 0000000..d3d7f17 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_algo_list_get200_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_pub_algo_list_get200_response_data_inner import SapiV1MiningPubAlgoListGet200ResponseDataInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningPubAlgoListGet200Response(BaseModel): + """ + SapiV1MiningPubAlgoListGet200Response + """ # noqa: E501 + code: StrictInt + msg: StrictStr + data: List[SapiV1MiningPubAlgoListGet200ResponseDataInner] + __properties: ClassVar[List[str]] = ["code", "msg", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningPubAlgoListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningPubAlgoListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "data": [SapiV1MiningPubAlgoListGet200ResponseDataInner.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_algo_list_get200_response_data_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_algo_list_get200_response_data_inner.py new file mode 100644 index 0000000..90b1dae --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_algo_list_get200_response_data_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningPubAlgoListGet200ResponseDataInner(BaseModel): + """ + SapiV1MiningPubAlgoListGet200ResponseDataInner + """ # noqa: E501 + algo_name: StrictStr = Field(alias="algoName") + algo_id: StrictInt = Field(alias="algoId") + pool_index: StrictInt = Field(alias="poolIndex") + unit: StrictStr + __properties: ClassVar[List[str]] = ["algoName", "algoId", "poolIndex", "unit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningPubAlgoListGet200ResponseDataInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningPubAlgoListGet200ResponseDataInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "algoName": obj.get("algoName"), + "algoId": obj.get("algoId"), + "poolIndex": obj.get("poolIndex"), + "unit": obj.get("unit") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_coin_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_coin_list_get200_response.py new file mode 100644 index 0000000..839ad17 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_coin_list_get200_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_pub_coin_list_get200_response_data_inner import SapiV1MiningPubCoinListGet200ResponseDataInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningPubCoinListGet200Response(BaseModel): + """ + SapiV1MiningPubCoinListGet200Response + """ # noqa: E501 + code: StrictInt + msg: StrictStr + data: List[SapiV1MiningPubCoinListGet200ResponseDataInner] + __properties: ClassVar[List[str]] = ["code", "msg", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningPubCoinListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningPubCoinListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "data": [SapiV1MiningPubCoinListGet200ResponseDataInner.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_coin_list_get200_response_data_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_coin_list_get200_response_data_inner.py new file mode 100644 index 0000000..91cde05 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_pub_coin_list_get200_response_data_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningPubCoinListGet200ResponseDataInner(BaseModel): + """ + SapiV1MiningPubCoinListGet200ResponseDataInner + """ # noqa: E501 + coin_name: StrictStr = Field(alias="coinName") + coin_id: StrictInt = Field(alias="coinId") + pool_index: StrictInt = Field(alias="poolIndex") + algo_id: StrictInt = Field(alias="algoId") + algo_name: StrictStr = Field(alias="algoName") + __properties: ClassVar[List[str]] = ["coinName", "coinId", "poolIndex", "algoId", "algoName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningPubCoinListGet200ResponseDataInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningPubCoinListGet200ResponseDataInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "coinName": obj.get("coinName"), + "coinId": obj.get("coinId"), + "poolIndex": obj.get("poolIndex"), + "algoId": obj.get("algoId"), + "algoName": obj.get("algoName") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_list_get200_response.py new file mode 100644 index 0000000..81d3115 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_list_get200_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response_data_inner import SapiV1MiningStatisticsUserListGet200ResponseDataInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningStatisticsUserListGet200Response(BaseModel): + """ + SapiV1MiningStatisticsUserListGet200Response + """ # noqa: E501 + code: StrictInt + msg: StrictStr + data: List[SapiV1MiningStatisticsUserListGet200ResponseDataInner] + __properties: ClassVar[List[str]] = ["code", "msg", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningStatisticsUserListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningStatisticsUserListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "data": [SapiV1MiningStatisticsUserListGet200ResponseDataInner.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_list_get200_response_data_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_list_get200_response_data_inner.py new file mode 100644 index 0000000..3724a93 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_list_get200_response_data_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner import SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningStatisticsUserListGet200ResponseDataInner(BaseModel): + """ + SapiV1MiningStatisticsUserListGet200ResponseDataInner + """ # noqa: E501 + type: StrictStr + user_name: StrictStr = Field(alias="userName") + list: List[SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner] + __properties: ClassVar[List[str]] = ["type", "userName", "list"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningStatisticsUserListGet200ResponseDataInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in list (list) + _items = [] + if self.list: + for _item in self.list: + if _item: + _items.append(_item.to_dict()) + _dict['list'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningStatisticsUserListGet200ResponseDataInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "userName": obj.get("userName"), + "list": [SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner.from_dict(_item) for _item in obj["list"]] if obj.get("list") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner.py new file mode 100644 index 0000000..ef71961 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner(BaseModel): + """ + SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner + """ # noqa: E501 + time: StrictInt + hashrate: StrictStr + reject: StrictStr + __properties: ClassVar[List[str]] = ["time", "hashrate", "reject"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "time": obj.get("time"), + "hashrate": obj.get("hashrate"), + "reject": obj.get("reject") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_status_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_status_get200_response.py new file mode 100644 index 0000000..8562a60 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_status_get200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response_data import SapiV1MiningStatisticsUserStatusGet200ResponseData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningStatisticsUserStatusGet200Response(BaseModel): + """ + SapiV1MiningStatisticsUserStatusGet200Response + """ # noqa: E501 + code: StrictInt + msg: StrictStr + data: SapiV1MiningStatisticsUserStatusGet200ResponseData + __properties: ClassVar[List[str]] = ["code", "msg", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningStatisticsUserStatusGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningStatisticsUserStatusGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "data": SapiV1MiningStatisticsUserStatusGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_status_get200_response_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_status_get200_response_data.py new file mode 100644 index 0000000..de11c38 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_status_get200_response_data.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response_data_profit_today import SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningStatisticsUserStatusGet200ResponseData(BaseModel): + """ + SapiV1MiningStatisticsUserStatusGet200ResponseData + """ # noqa: E501 + fifteen_min_hash_rate: StrictStr = Field(alias="fifteenMinHashRate") + day_hash_rate: StrictStr = Field(alias="dayHashRate") + valid_num: StrictInt = Field(alias="validNum") + invalid_num: StrictInt = Field(alias="invalidNum") + profit_today: SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday = Field(alias="profitToday") + profit_yesterday: SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday = Field(alias="profitYesterday") + user_name: StrictStr = Field(alias="userName") + unit: StrictStr + algo: StrictStr + __properties: ClassVar[List[str]] = ["fifteenMinHashRate", "dayHashRate", "validNum", "invalidNum", "profitToday", "profitYesterday", "userName", "unit", "algo"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningStatisticsUserStatusGet200ResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of profit_today + if self.profit_today: + _dict['profitToday'] = self.profit_today.to_dict() + # override the default output from pydantic by calling `to_dict()` of profit_yesterday + if self.profit_yesterday: + _dict['profitYesterday'] = self.profit_yesterday.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningStatisticsUserStatusGet200ResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fifteenMinHashRate": obj.get("fifteenMinHashRate"), + "dayHashRate": obj.get("dayHashRate"), + "validNum": obj.get("validNum"), + "invalidNum": obj.get("invalidNum"), + "profitToday": SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday.from_dict(obj["profitToday"]) if obj.get("profitToday") is not None else None, + "profitYesterday": SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday.from_dict(obj["profitYesterday"]) if obj.get("profitYesterday") is not None else None, + "userName": obj.get("userName"), + "unit": obj.get("unit"), + "algo": obj.get("algo") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_status_get200_response_data_profit_today.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_status_get200_response_data_profit_today.py new file mode 100644 index 0000000..3ab3937 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_statistics_user_status_get200_response_data_profit_today.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday(BaseModel): + """ + SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday + """ # noqa: E501 + btc: StrictStr = Field(alias="BTC") + bsv: StrictStr = Field(alias="BSV") + bch: StrictStr = Field(alias="BCH") + __properties: ClassVar[List[str]] = ["BTC", "BSV", "BCH"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "BTC": obj.get("BTC"), + "BSV": obj.get("BSV"), + "BCH": obj.get("BCH") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_detail_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_detail_get200_response.py new file mode 100644 index 0000000..57f9319 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_detail_get200_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response_data_inner import SapiV1MiningWorkerDetailGet200ResponseDataInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningWorkerDetailGet200Response(BaseModel): + """ + SapiV1MiningWorkerDetailGet200Response + """ # noqa: E501 + code: StrictInt + msg: StrictStr + data: List[SapiV1MiningWorkerDetailGet200ResponseDataInner] + __properties: ClassVar[List[str]] = ["code", "msg", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningWorkerDetailGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningWorkerDetailGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "data": [SapiV1MiningWorkerDetailGet200ResponseDataInner.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_detail_get200_response_data_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_detail_get200_response_data_inner.py new file mode 100644 index 0000000..dcb1d0f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_detail_get200_response_data_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner import SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningWorkerDetailGet200ResponseDataInner(BaseModel): + """ + SapiV1MiningWorkerDetailGet200ResponseDataInner + """ # noqa: E501 + worker_name: StrictStr = Field(description="Mining Account name", alias="workerName") + type: StrictStr = Field(description="Type of hourly hashrate") + hashrate_datas: List[SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner] = Field(alias="hashrateDatas") + __properties: ClassVar[List[str]] = ["workerName", "type", "hashrateDatas"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningWorkerDetailGet200ResponseDataInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in hashrate_datas (list) + _items = [] + if self.hashrate_datas: + for _item in self.hashrate_datas: + if _item: + _items.append(_item.to_dict()) + _dict['hashrateDatas'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningWorkerDetailGet200ResponseDataInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "workerName": obj.get("workerName"), + "type": obj.get("type"), + "hashrateDatas": [SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner.from_dict(_item) for _item in obj["hashrateDatas"]] if obj.get("hashrateDatas") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner.py new file mode 100644 index 0000000..e5c0f1a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner(BaseModel): + """ + SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner + """ # noqa: E501 + time: StrictInt + hashrate: StrictStr + reject: StrictInt = Field(description="Rejection Rate") + __properties: ClassVar[List[str]] = ["time", "hashrate", "reject"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "time": obj.get("time"), + "hashrate": obj.get("hashrate"), + "reject": obj.get("reject") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_list_get200_response.py new file mode 100644 index 0000000..7f95f24 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_list_get200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_worker_list_get200_response_data import SapiV1MiningWorkerListGet200ResponseData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningWorkerListGet200Response(BaseModel): + """ + SapiV1MiningWorkerListGet200Response + """ # noqa: E501 + code: StrictInt + msg: StrictStr + data: SapiV1MiningWorkerListGet200ResponseData + __properties: ClassVar[List[str]] = ["code", "msg", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningWorkerListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningWorkerListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "data": SapiV1MiningWorkerListGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_list_get200_response_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_list_get200_response_data.py new file mode 100644 index 0000000..cd3eaad --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_list_get200_response_data.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner import SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningWorkerListGet200ResponseData(BaseModel): + """ + SapiV1MiningWorkerListGet200ResponseData + """ # noqa: E501 + worker_datas: List[SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner] = Field(alias="workerDatas") + total_num: StrictInt = Field(alias="totalNum") + page_size: StrictInt = Field(alias="pageSize") + __properties: ClassVar[List[str]] = ["workerDatas", "totalNum", "pageSize"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningWorkerListGet200ResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in worker_datas (list) + _items = [] + if self.worker_datas: + for _item in self.worker_datas: + if _item: + _items.append(_item.to_dict()) + _dict['workerDatas'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningWorkerListGet200ResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "workerDatas": [SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner.from_dict(_item) for _item in obj["workerDatas"]] if obj.get("workerDatas") is not None else None, + "totalNum": obj.get("totalNum"), + "pageSize": obj.get("pageSize") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner.py new file mode 100644 index 0000000..474911c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner(BaseModel): + """ + SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner + """ # noqa: E501 + worker_id: StrictStr = Field(alias="workerId") + worker_name: StrictStr = Field(alias="workerName") + status: StrictInt = Field(description="Status:1 valid, 2 invalid, 3 no longer valid") + hash_rate: StrictInt = Field(description="Real-time rate", alias="hashRate") + day_hash_rate: StrictInt = Field(description="24H Hashrate", alias="dayHashRate") + reject_rate: StrictInt = Field(description="Real-time Rejection Rate", alias="rejectRate") + last_share_time: StrictInt = Field(description="Last submission time", alias="lastShareTime") + __properties: ClassVar[List[str]] = ["workerId", "workerName", "status", "hashRate", "dayHashRate", "rejectRate", "lastShareTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "workerId": obj.get("workerId"), + "workerName": obj.get("workerName"), + "status": obj.get("status"), + "hashRate": obj.get("hashRate"), + "dayHashRate": obj.get("dayHashRate"), + "rejectRate": obj.get("rejectRate"), + "lastShareTime": obj.get("lastShareTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_deposit_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_deposit_get200_response.py new file mode 100644 index 0000000..7067ba1 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_deposit_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_nft_history_deposit_get200_response_list_inner import SapiV1NftHistoryDepositGet200ResponseListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1NftHistoryDepositGet200Response(BaseModel): + """ + SapiV1NftHistoryDepositGet200Response + """ # noqa: E501 + total: StrictInt + list: List[SapiV1NftHistoryDepositGet200ResponseListInner] + __properties: ClassVar[List[str]] = ["total", "list"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1NftHistoryDepositGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in list (list) + _items = [] + if self.list: + for _item in self.list: + if _item: + _items.append(_item.to_dict()) + _dict['list'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1NftHistoryDepositGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "list": [SapiV1NftHistoryDepositGet200ResponseListInner.from_dict(_item) for _item in obj["list"]] if obj.get("list") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_deposit_get200_response_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_deposit_get200_response_list_inner.py new file mode 100644 index 0000000..db7e901 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_deposit_get200_response_list_inner.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1NftHistoryDepositGet200ResponseListInner(BaseModel): + """ + SapiV1NftHistoryDepositGet200ResponseListInner + """ # noqa: E501 + network: StrictStr + tx_id: Optional[StrictInt] = Field(alias="txID") + contract_adrress: StrictStr = Field(alias="contractAdrress") + token_id: StrictStr = Field(alias="tokenId") + timestamp: StrictInt + __properties: ClassVar[List[str]] = ["network", "txID", "contractAdrress", "tokenId", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1NftHistoryDepositGet200ResponseListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if tx_id (nullable) is None + # and model_fields_set contains the field + if self.tx_id is None and "tx_id" in self.model_fields_set: + _dict['txID'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1NftHistoryDepositGet200ResponseListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "network": obj.get("network"), + "txID": obj.get("txID"), + "contractAdrress": obj.get("contractAdrress"), + "tokenId": obj.get("tokenId"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_transactions_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_transactions_get200_response.py new file mode 100644 index 0000000..2e70af6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_transactions_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response_list_inner import SapiV1NftHistoryTransactionsGet200ResponseListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1NftHistoryTransactionsGet200Response(BaseModel): + """ + SapiV1NftHistoryTransactionsGet200Response + """ # noqa: E501 + total: StrictInt + list: List[SapiV1NftHistoryTransactionsGet200ResponseListInner] + __properties: ClassVar[List[str]] = ["total", "list"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1NftHistoryTransactionsGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in list (list) + _items = [] + if self.list: + for _item in self.list: + if _item: + _items.append(_item.to_dict()) + _dict['list'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1NftHistoryTransactionsGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "list": [SapiV1NftHistoryTransactionsGet200ResponseListInner.from_dict(_item) for _item in obj["list"]] if obj.get("list") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_transactions_get200_response_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_transactions_get200_response_list_inner.py new file mode 100644 index 0000000..178e9bd --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_transactions_get200_response_list_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner import SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1NftHistoryTransactionsGet200ResponseListInner(BaseModel): + """ + SapiV1NftHistoryTransactionsGet200ResponseListInner + """ # noqa: E501 + order_no: StrictStr = Field(description="0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee", alias="orderNo") + tokens: List[SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner] + trade_time: StrictInt = Field(alias="tradeTime") + trade_amount: StrictStr = Field(alias="tradeAmount") + trade_currency: StrictStr = Field(alias="tradeCurrency") + __properties: ClassVar[List[str]] = ["orderNo", "tokens", "tradeTime", "tradeAmount", "tradeCurrency"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1NftHistoryTransactionsGet200ResponseListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in tokens (list) + _items = [] + if self.tokens: + for _item in self.tokens: + if _item: + _items.append(_item.to_dict()) + _dict['tokens'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1NftHistoryTransactionsGet200ResponseListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderNo": obj.get("orderNo"), + "tokens": [SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner.from_dict(_item) for _item in obj["tokens"]] if obj.get("tokens") is not None else None, + "tradeTime": obj.get("tradeTime"), + "tradeAmount": obj.get("tradeAmount"), + "tradeCurrency": obj.get("tradeCurrency") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner.py new file mode 100644 index 0000000..3f2e630 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner(BaseModel): + """ + SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner + """ # noqa: E501 + network: StrictStr + token_id: StrictStr = Field(alias="tokenId") + contract_address: StrictStr = Field(alias="contractAddress") + __properties: ClassVar[List[str]] = ["network", "tokenId", "contractAddress"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "network": obj.get("network"), + "tokenId": obj.get("tokenId"), + "contractAddress": obj.get("contractAddress") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_withdraw_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_withdraw_get200_response.py new file mode 100644 index 0000000..c330e3f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_withdraw_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_nft_history_withdraw_get200_response_list_inner import SapiV1NftHistoryWithdrawGet200ResponseListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1NftHistoryWithdrawGet200Response(BaseModel): + """ + SapiV1NftHistoryWithdrawGet200Response + """ # noqa: E501 + total: StrictInt + list: List[SapiV1NftHistoryWithdrawGet200ResponseListInner] + __properties: ClassVar[List[str]] = ["total", "list"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1NftHistoryWithdrawGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in list (list) + _items = [] + if self.list: + for _item in self.list: + if _item: + _items.append(_item.to_dict()) + _dict['list'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1NftHistoryWithdrawGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "list": [SapiV1NftHistoryWithdrawGet200ResponseListInner.from_dict(_item) for _item in obj["list"]] if obj.get("list") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_withdraw_get200_response_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_withdraw_get200_response_list_inner.py new file mode 100644 index 0000000..e1357ec --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_history_withdraw_get200_response_list_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1NftHistoryWithdrawGet200ResponseListInner(BaseModel): + """ + SapiV1NftHistoryWithdrawGet200ResponseListInner + """ # noqa: E501 + network: StrictStr + tx_id: StrictStr = Field(alias="txID") + contract_adrress: StrictStr = Field(alias="contractAdrress") + token_id: StrictStr = Field(alias="tokenId") + timestamp: StrictInt + fee: Union[StrictFloat, StrictInt] + fee_asset: StrictStr = Field(alias="feeAsset") + __properties: ClassVar[List[str]] = ["network", "txID", "contractAdrress", "tokenId", "timestamp", "fee", "feeAsset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1NftHistoryWithdrawGet200ResponseListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1NftHistoryWithdrawGet200ResponseListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "network": obj.get("network"), + "txID": obj.get("txID"), + "contractAdrress": obj.get("contractAdrress"), + "tokenId": obj.get("tokenId"), + "timestamp": obj.get("timestamp"), + "fee": obj.get("fee"), + "feeAsset": obj.get("feeAsset") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_user_get_asset_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_user_get_asset_get200_response.py new file mode 100644 index 0000000..ce40390 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_user_get_asset_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_nft_user_get_asset_get200_response_list_inner import SapiV1NftUserGetAssetGet200ResponseListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1NftUserGetAssetGet200Response(BaseModel): + """ + SapiV1NftUserGetAssetGet200Response + """ # noqa: E501 + total: StrictInt + list: List[SapiV1NftUserGetAssetGet200ResponseListInner] + __properties: ClassVar[List[str]] = ["total", "list"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1NftUserGetAssetGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in list (list) + _items = [] + if self.list: + for _item in self.list: + if _item: + _items.append(_item.to_dict()) + _dict['list'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1NftUserGetAssetGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "list": [SapiV1NftUserGetAssetGet200ResponseListInner.from_dict(_item) for _item in obj["list"]] if obj.get("list") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_user_get_asset_get200_response_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_user_get_asset_get200_response_list_inner.py new file mode 100644 index 0000000..128c049 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_nft_user_get_asset_get200_response_list_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1NftUserGetAssetGet200ResponseListInner(BaseModel): + """ + SapiV1NftUserGetAssetGet200ResponseListInner + """ # noqa: E501 + network: StrictStr + contract_address: StrictStr = Field(alias="contractAddress") + token_id: StrictStr = Field(alias="tokenId") + __properties: ClassVar[List[str]] = ["network", "contractAddress", "tokenId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1NftUserGetAssetGet200ResponseListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1NftUserGetAssetGet200ResponseListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "network": obj.get("network"), + "contractAddress": obj.get("contractAddress"), + "tokenId": obj.get("tokenId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response.py new file mode 100644 index 0000000..ae325c8 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner import SapiV1PayTransactionsGet200ResponseDataInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PayTransactionsGet200Response(BaseModel): + """ + SapiV1PayTransactionsGet200Response + """ # noqa: E501 + code: StrictStr + message: StrictStr + data: List[SapiV1PayTransactionsGet200ResponseDataInner] + success: StrictBool + __properties: ClassVar[List[str]] = ["code", "message", "data", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PayTransactionsGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PayTransactionsGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "data": [SapiV1PayTransactionsGet200ResponseDataInner.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "success": obj.get("success") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner.py new file mode 100644 index 0000000..fa84988 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner import SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_payer_info import SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_receiver_info import SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PayTransactionsGet200ResponseDataInner(BaseModel): + """ + SapiV1PayTransactionsGet200ResponseDataInner + """ # noqa: E501 + order_type: StrictStr = Field(description="Enum:PAY(C2B Merchant Acquiring Payment), PAY_REFUND(C2B Merchant Acquiring Payment,refund), C2C(C2C Transfer Payment),CRYPTO_BOX(Crypto box), CRYPTO_BOX_RF(Crypto Box, refund), C2C_HOLDING(Transfer to new Binance user), C2C_HOLDING_RF(Transfer to new Binance user,refund), PAYOUT(B2C Disbursement Payment)", alias="orderType") + transaction_id: StrictStr = Field(alias="transactionId") + transaction_time: StrictInt = Field(alias="transactionTime") + amount: StrictStr = Field(description="order amount(up to 8 decimal places), positive is income, negative is expenditure") + currency: StrictStr + wallet_type: StrictInt = Field(alias="walletType") + wallet_types: List[StrictInt] = Field(alias="walletTypes") + funds_detail: List[SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner] = Field(alias="fundsDetail") + payer_info: SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo = Field(alias="payerInfo") + receiver_info: SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo = Field(alias="receiverInfo") + __properties: ClassVar[List[str]] = ["orderType", "transactionId", "transactionTime", "amount", "currency", "walletType", "walletTypes", "fundsDetail", "payerInfo", "receiverInfo"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PayTransactionsGet200ResponseDataInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in funds_detail (list) + _items = [] + if self.funds_detail: + for _item in self.funds_detail: + if _item: + _items.append(_item.to_dict()) + _dict['fundsDetail'] = _items + # override the default output from pydantic by calling `to_dict()` of payer_info + if self.payer_info: + _dict['payerInfo'] = self.payer_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of receiver_info + if self.receiver_info: + _dict['receiverInfo'] = self.receiver_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PayTransactionsGet200ResponseDataInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orderType": obj.get("orderType"), + "transactionId": obj.get("transactionId"), + "transactionTime": obj.get("transactionTime"), + "amount": obj.get("amount"), + "currency": obj.get("currency"), + "walletType": obj.get("walletType"), + "walletTypes": obj.get("walletTypes"), + "fundsDetail": [SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner.from_dict(_item) for _item in obj["fundsDetail"]] if obj.get("fundsDetail") is not None else None, + "payerInfo": SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo.from_dict(obj["payerInfo"]) if obj.get("payerInfo") is not None else None, + "receiverInfo": SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo.from_dict(obj["receiverInfo"]) if obj.get("receiverInfo") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner.py new file mode 100644 index 0000000..1b63923 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner(BaseModel): + """ + SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner + """ # noqa: E501 + currency: StrictStr + amount: StrictStr + __properties: ClassVar[List[str]] = ["currency", "amount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "currency": obj.get("currency"), + "amount": obj.get("amount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_payer_info.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_payer_info.py new file mode 100644 index 0000000..22eb260 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_payer_info.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo(BaseModel): + """ + SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo + """ # noqa: E501 + name: StrictStr + type: StrictStr + binance_id: StrictStr = Field(alias="binanceId") + account_id: StrictStr = Field(alias="accountId") + __properties: ClassVar[List[str]] = ["name", "type", "binanceId", "accountId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type"), + "binanceId": obj.get("binanceId"), + "accountId": obj.get("accountId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_receiver_info.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_receiver_info.py new file mode 100644 index 0000000..adcabf0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_receiver_info.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner import SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo(BaseModel): + """ + SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo + """ # noqa: E501 + name: StrictStr + type: StrictStr + email: StrictStr + binance_id: StrictStr = Field(alias="binanceId") + account_id: StrictStr = Field(alias="accountId") + country_code: StrictStr = Field(alias="countryCode") + phone_number: StrictStr = Field(alias="phoneNumber") + mobile_code: StrictStr = Field(alias="mobileCode") + extend: Optional[List[SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner]] = None + __properties: ClassVar[List[str]] = ["name", "type", "email", "binanceId", "accountId", "countryCode", "phoneNumber", "mobileCode", "extend"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in extend (list) + _items = [] + if self.extend: + for _item in self.extend: + if _item: + _items.append(_item.to_dict()) + _dict['extend'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type"), + "email": obj.get("email"), + "binanceId": obj.get("binanceId"), + "accountId": obj.get("accountId"), + "countryCode": obj.get("countryCode"), + "phoneNumber": obj.get("phoneNumber"), + "mobileCode": obj.get("mobileCode"), + "extend": [SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner.from_dict(_item) for _item in obj["extend"]] if obj.get("extend") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner.py new file mode 100644 index 0000000..b1d03ba --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner(BaseModel): + """ + SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner + """ # noqa: E501 + institution_name: StrictStr = Field(alias="institutionName") + card_number: StrictStr = Field(alias="cardNumber") + digital_wallet_id: StrictStr = Field(alias="digitalWalletId") + __properties: ClassVar[List[str]] = ["institutionName", "cardNumber", "digitalWalletId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "institutionName": obj.get("institutionName"), + "cardNumber": obj.get("cardNumber"), + "digitalWalletId": obj.get("digitalWalletId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_account_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_account_get200_response.py new file mode 100644 index 0000000..11a1e79 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_account_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PortfolioAccountGet200Response(BaseModel): + """ + SapiV1PortfolioAccountGet200Response + """ # noqa: E501 + uni_mmr: StrictStr = Field(description="Classic Portfolio margin account maintenance margin rate", alias="uniMMR") + account_equity: StrictStr = Field(description="Account equity, unit is USD", alias="accountEquity") + actual_equity: StrictStr = Field(description="Actual equity, unit is USD", alias="actualEquity") + account_maint_margin: StrictStr = Field(description="Classic Portfolio margin account maintenance margin, unit is USD", alias="accountMaintMargin") + account_status: StrictStr = Field(description="Classic Portfolio margin account status:\"NORMAL\", \"MARGIN_CALL\", \"SUPPLY_MARGIN\", \"REDUCE_ONLY\", \"ACTIVE_LIQUIDATION\", \"FORCE_LIQUIDATION\", \"BANKRUPTED\"", alias="accountStatus") + account_type: StrictStr = Field(description="PM_1 for classic PM, PM_2 for PM", alias="accountType") + __properties: ClassVar[List[str]] = ["uniMMR", "accountEquity", "actualEquity", "accountMaintMargin", "accountStatus", "accountType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PortfolioAccountGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PortfolioAccountGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "uniMMR": obj.get("uniMMR"), + "accountEquity": obj.get("accountEquity"), + "actualEquity": obj.get("actualEquity"), + "accountMaintMargin": obj.get("accountMaintMargin"), + "accountStatus": obj.get("accountStatus"), + "accountType": obj.get("accountType") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_asset_index_price_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_asset_index_price_get200_response_inner.py new file mode 100644 index 0000000..22d51be --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_asset_index_price_get200_response_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PortfolioAssetIndexPriceGet200ResponseInner(BaseModel): + """ + SapiV1PortfolioAssetIndexPriceGet200ResponseInner + """ # noqa: E501 + asset: StrictStr + asset_index_price: StrictStr = Field(alias="assetIndexPrice") + time: StrictInt + __properties: ClassVar[List[str]] = ["asset", "assetIndexPrice", "time"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PortfolioAssetIndexPriceGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PortfolioAssetIndexPriceGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "assetIndexPrice": obj.get("assetIndexPrice"), + "time": obj.get("time") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_auto_collection_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_auto_collection_post200_response.py new file mode 100644 index 0000000..871a166 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_auto_collection_post200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PortfolioAutoCollectionPost200Response(BaseModel): + """ + SapiV1PortfolioAutoCollectionPost200Response + """ # noqa: E501 + msg: StrictStr + __properties: ClassVar[List[str]] = ["msg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PortfolioAutoCollectionPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PortfolioAutoCollectionPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "msg": obj.get("msg") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_collateral_rate_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_collateral_rate_get200_response_inner.py new file mode 100644 index 0000000..a54ad31 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_collateral_rate_get200_response_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PortfolioCollateralRateGet200ResponseInner(BaseModel): + """ + SapiV1PortfolioCollateralRateGet200ResponseInner + """ # noqa: E501 + asset: StrictStr + collateral_rate: StrictStr = Field(alias="collateralRate") + __properties: ClassVar[List[str]] = ["asset", "collateralRate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PortfolioCollateralRateGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PortfolioCollateralRateGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "collateralRate": obj.get("collateralRate") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_interest_history_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_interest_history_get200_response_inner.py new file mode 100644 index 0000000..3a3ca87 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_interest_history_get200_response_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PortfolioInterestHistoryGet200ResponseInner(BaseModel): + """ + SapiV1PortfolioInterestHistoryGet200ResponseInner + """ # noqa: E501 + asset: StrictStr + interest: StrictStr + interest_accrued_time: StrictInt = Field(alias="interestAccruedTime") + interest_rate: StrictStr = Field(alias="interestRate") + principal: StrictStr + __properties: ClassVar[List[str]] = ["asset", "interest", "interestAccruedTime", "interestRate", "principal"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PortfolioInterestHistoryGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PortfolioInterestHistoryGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "interest": obj.get("interest"), + "interestAccruedTime": obj.get("interestAccruedTime"), + "interestRate": obj.get("interestRate"), + "principal": obj.get("principal") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_margin_asset_leverage_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_margin_asset_leverage_get200_response_inner.py new file mode 100644 index 0000000..9f85a16 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_margin_asset_leverage_get200_response_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PortfolioMarginAssetLeverageGet200ResponseInner(BaseModel): + """ + SapiV1PortfolioMarginAssetLeverageGet200ResponseInner + """ # noqa: E501 + asset: Optional[StrictStr] = None + collateral_rate: Optional[StrictStr] = Field(default=None, alias="collateralRate") + __properties: ClassVar[List[str]] = ["asset", "collateralRate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PortfolioMarginAssetLeverageGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PortfolioMarginAssetLeverageGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "collateralRate": obj.get("collateralRate") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_pm_loan_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_pm_loan_get200_response.py new file mode 100644 index 0000000..90ef767 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_pm_loan_get200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PortfolioPmLoanGet200Response(BaseModel): + """ + SapiV1PortfolioPmLoanGet200Response + """ # noqa: E501 + asset: StrictStr + amount: StrictStr + __properties: ClassVar[List[str]] = ["asset", "amount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PortfolioPmLoanGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PortfolioPmLoanGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "amount": obj.get("amount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_repay_futures_switch_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_repay_futures_switch_get200_response.py new file mode 100644 index 0000000..1ddf240 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_repay_futures_switch_get200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PortfolioRepayFuturesSwitchGet200Response(BaseModel): + """ + SapiV1PortfolioRepayFuturesSwitchGet200Response + """ # noqa: E501 + auto_repay: StrictBool = Field(alias="autoRepay") + __properties: ClassVar[List[str]] = ["autoRepay"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PortfolioRepayFuturesSwitchGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PortfolioRepayFuturesSwitchGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autoRepay": obj.get("autoRepay") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_repay_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_repay_post200_response.py new file mode 100644 index 0000000..4a0d5a7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_portfolio_repay_post200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1PortfolioRepayPost200Response(BaseModel): + """ + SapiV1PortfolioRepayPost200Response + """ # noqa: E501 + tran_id: StrictInt = Field(alias="tranId") + __properties: ClassVar[List[str]] = ["tranId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1PortfolioRepayPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1PortfolioRepayPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tranId": obj.get("tranId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_rebate_tax_query_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_rebate_tax_query_get200_response.py new file mode 100644 index 0000000..136bd65 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_rebate_tax_query_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response_data import SapiV1RebateTaxQueryGet200ResponseData +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1RebateTaxQueryGet200Response(BaseModel): + """ + SapiV1RebateTaxQueryGet200Response + """ # noqa: E501 + status: StrictStr + type: StrictStr + code: StrictStr + data: SapiV1RebateTaxQueryGet200ResponseData + __properties: ClassVar[List[str]] = ["status", "type", "code", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1RebateTaxQueryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1RebateTaxQueryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "type": obj.get("type"), + "code": obj.get("code"), + "data": SapiV1RebateTaxQueryGet200ResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_rebate_tax_query_get200_response_data.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_rebate_tax_query_get200_response_data.py new file mode 100644 index 0000000..0d1ac41 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_rebate_tax_query_get200_response_data.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response_data_data_inner import SapiV1RebateTaxQueryGet200ResponseDataDataInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1RebateTaxQueryGet200ResponseData(BaseModel): + """ + SapiV1RebateTaxQueryGet200ResponseData + """ # noqa: E501 + page: StrictInt + total_records: StrictInt = Field(alias="totalRecords") + total_page_num: StrictInt = Field(alias="totalPageNum") + data: List[SapiV1RebateTaxQueryGet200ResponseDataDataInner] + __properties: ClassVar[List[str]] = ["page", "totalRecords", "totalPageNum", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1RebateTaxQueryGet200ResponseData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1RebateTaxQueryGet200ResponseData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "page": obj.get("page"), + "totalRecords": obj.get("totalRecords"), + "totalPageNum": obj.get("totalPageNum"), + "data": [SapiV1RebateTaxQueryGet200ResponseDataDataInner.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_rebate_tax_query_get200_response_data_data_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_rebate_tax_query_get200_response_data_data_inner.py new file mode 100644 index 0000000..7180de1 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_rebate_tax_query_get200_response_data_data_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1RebateTaxQueryGet200ResponseDataDataInner(BaseModel): + """ + SapiV1RebateTaxQueryGet200ResponseDataDataInner + """ # noqa: E501 + asset: StrictStr + type: StrictInt = Field(description="rebate type:1 is commission rebate,2 is referral kickback") + amount: StrictStr + update_time: StrictInt = Field(alias="updateTime") + __properties: ClassVar[List[str]] = ["asset", "type", "amount", "updateTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1RebateTaxQueryGet200ResponseDataDataInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1RebateTaxQueryGet200ResponseDataDataInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "type": obj.get("type"), + "amount": obj.get("amount"), + "updateTime": obj.get("updateTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_account_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_account_get200_response.py new file mode 100644 index 0000000..5d99abe --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_account_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnAccountGet200Response(BaseModel): + """ + SapiV1SimpleEarnAccountGet200Response + """ # noqa: E501 + total_amount_in_btc: StrictStr = Field(alias="totalAmountInBTC") + total_amount_in_usdt: StrictStr = Field(alias="totalAmountInUSDT") + total_flexible_amount_in_btc: StrictStr = Field(alias="totalFlexibleAmountInBTC") + total_flexible_amount_in_usdt: StrictStr = Field(alias="totalFlexibleAmountInUSDT") + total_locked_in_btc: StrictStr = Field(alias="totalLockedInBTC") + total_locked_in_usdt: StrictStr = Field(alias="totalLockedInUSDT") + __properties: ClassVar[List[str]] = ["totalAmountInBTC", "totalAmountInUSDT", "totalFlexibleAmountInBTC", "totalFlexibleAmountInUSDT", "totalLockedInBTC", "totalLockedInUSDT"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnAccountGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnAccountGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalAmountInBTC": obj.get("totalAmountInBTC"), + "totalAmountInUSDT": obj.get("totalAmountInUSDT"), + "totalFlexibleAmountInBTC": obj.get("totalFlexibleAmountInBTC"), + "totalFlexibleAmountInUSDT": obj.get("totalFlexibleAmountInUSDT"), + "totalLockedInBTC": obj.get("totalLockedInBTC"), + "totalLockedInUSDT": obj.get("totalLockedInUSDT") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_collateral_record_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_collateral_record_get200_response.py new file mode 100644 index 0000000..6653257 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_collateral_record_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response(BaseModel): + """ + SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response + """ # noqa: E501 + rows: List[SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner.py new file mode 100644 index 0000000..7ae41f0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner(BaseModel): + """ + SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner + """ # noqa: E501 + amount: StrictStr + product_id: StrictStr = Field(alias="productId") + asset: StrictStr + create_time: StrictInt = Field(alias="createTime") + type: StrictStr + product_name: StrictStr = Field(alias="productName") + order_id: StrictInt = Field(alias="orderId") + __properties: ClassVar[List[str]] = ["amount", "productId", "asset", "createTime", "type", "productName", "orderId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "productId": obj.get("productId"), + "asset": obj.get("asset"), + "createTime": obj.get("createTime"), + "type": obj.get("type"), + "productName": obj.get("productName"), + "orderId": obj.get("orderId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rate_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rate_history_get200_response.py new file mode 100644 index 0000000..2dd85ab --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rate_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response(BaseModel): + """ + SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response + """ # noqa: E501 + rows: List[SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner.py new file mode 100644 index 0000000..cb27f28 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner + """ # noqa: E501 + product_id: StrictStr = Field(alias="productId") + asset: StrictStr + annual_percentage_rate: StrictStr = Field(alias="annualPercentageRate") + time: StrictInt + __properties: ClassVar[List[str]] = ["productId", "asset", "annualPercentageRate", "time"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "productId": obj.get("productId"), + "asset": obj.get("asset"), + "annualPercentageRate": obj.get("annualPercentageRate"), + "time": obj.get("time") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_redemption_record_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_redemption_record_get200_response.py new file mode 100644 index 0000000..b70a802 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_redemption_record_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response(BaseModel): + """ + SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response + """ # noqa: E501 + rows: List[SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner.py new file mode 100644 index 0000000..b8d489d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner(BaseModel): + """ + SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner + """ # noqa: E501 + amount: StrictStr + asset: StrictStr + time: StrictInt + project_id: StrictStr = Field(alias="projectId") + redeem_id: StrictInt = Field(alias="redeemId") + dest_account: StrictStr = Field(description="SPOT, FUNDING", alias="destAccount") + status: StrictStr + __properties: ClassVar[List[str]] = ["amount", "asset", "time", "projectId", "redeemId", "destAccount", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "asset": obj.get("asset"), + "time": obj.get("time"), + "projectId": obj.get("projectId"), + "redeemId": obj.get("redeemId"), + "destAccount": obj.get("destAccount"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rewards_record_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rewards_record_get200_response.py new file mode 100644 index 0000000..249b4a6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rewards_record_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response(BaseModel): + """ + SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response + """ # noqa: E501 + rows: List[SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner.py new file mode 100644 index 0000000..71c6019 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner(BaseModel): + """ + SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner + """ # noqa: E501 + asset: StrictStr + rewards: StrictStr + project_id: StrictStr = Field(alias="projectId") + type: StrictStr + time: StrictInt + __properties: ClassVar[List[str]] = ["asset", "rewards", "projectId", "type", "time"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "rewards": obj.get("rewards"), + "projectId": obj.get("projectId"), + "type": obj.get("type"), + "time": obj.get("time") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_subscription_record_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_subscription_record_get200_response.py new file mode 100644 index 0000000..19de964 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_subscription_record_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response(BaseModel): + """ + SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response + """ # noqa: E501 + rows: List[SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner.py new file mode 100644 index 0000000..1a70b34 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner(BaseModel): + """ + SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner + """ # noqa: E501 + amount: StrictStr + asset: StrictStr + time: StrictInt + purchase_id: StrictInt = Field(alias="purchaseId") + type: StrictStr = Field(description="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") + source_account: StrictStr = Field(description="SPOT, FUNDING, SPOTANDFUNDING", alias="sourceAccount") + amt_from_spot: StrictStr = Field(description="Display if sourceAccount is SPOTANDFUNDING ", alias="amtFromSpot") + amt_from_funding: StrictStr = Field(description="Display if sourceAccount is SPOTANDFUNDING", alias="amtFromFunding") + status: StrictStr = Field(description="PURCHASING/SUCCESS/FAILED") + __properties: ClassVar[List[str]] = ["amount", "asset", "time", "purchaseId", "type", "sourceAccount", "amtFromSpot", "amtFromFunding", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "asset": obj.get("asset"), + "time": obj.get("time"), + "purchaseId": obj.get("purchaseId"), + "type": obj.get("type"), + "sourceAccount": obj.get("sourceAccount"), + "amtFromSpot": obj.get("amtFromSpot"), + "amtFromFunding": obj.get("amtFromFunding"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_list_get200_response.py new file mode 100644 index 0000000..e382008 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_list_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response_rows_inner import SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleListGet200Response(BaseModel): + """ + SapiV1SimpleEarnFlexibleListGet200Response + """ # noqa: E501 + rows: List[SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_list_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_list_get200_response_rows_inner.py new file mode 100644 index 0000000..bea6861 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_list_get200_response_rows_inner.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate import SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner(BaseModel): + """ + SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner + """ # noqa: E501 + asset: StrictStr + latest_annual_percentage_rate: StrictStr = Field(alias="latestAnnualPercentageRate") + tier_annual_percentage_rate: SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate = Field(alias="tierAnnualPercentageRate") + air_drop_percentage_rate: StrictStr = Field(alias="airDropPercentageRate") + can_purchase: StrictBool = Field(alias="canPurchase") + can_redeem: StrictBool = Field(alias="canRedeem") + is_sold_out: StrictBool = Field(alias="isSoldOut") + hot: StrictBool + min_purchase_amount: StrictStr = Field(alias="minPurchaseAmount") + product_id: StrictStr = Field(alias="productId") + subscription_start_time: StrictStr = Field(alias="subscriptionStartTime") + status: StrictStr + __properties: ClassVar[List[str]] = ["asset", "latestAnnualPercentageRate", "tierAnnualPercentageRate", "airDropPercentageRate", "canPurchase", "canRedeem", "isSoldOut", "hot", "minPurchaseAmount", "productId", "subscriptionStartTime", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of tier_annual_percentage_rate + if self.tier_annual_percentage_rate: + _dict['tierAnnualPercentageRate'] = self.tier_annual_percentage_rate.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "latestAnnualPercentageRate": obj.get("latestAnnualPercentageRate"), + "tierAnnualPercentageRate": SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate.from_dict(obj["tierAnnualPercentageRate"]) if obj.get("tierAnnualPercentageRate") is not None else None, + "airDropPercentageRate": obj.get("airDropPercentageRate"), + "canPurchase": obj.get("canPurchase"), + "canRedeem": obj.get("canRedeem"), + "isSoldOut": obj.get("isSoldOut"), + "hot": obj.get("hot"), + "minPurchaseAmount": obj.get("minPurchaseAmount"), + "productId": obj.get("productId"), + "subscriptionStartTime": obj.get("subscriptionStartTime"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate.py new file mode 100644 index 0000000..667b41d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate(BaseModel): + """ + SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate + """ # noqa: E501 + var_0_5_btc: Union[StrictFloat, StrictInt] = Field(alias="0-5BTC") + var_5_10_btc: Union[StrictFloat, StrictInt] = Field(alias="5-10BTC") + __properties: ClassVar[List[str]] = ["0-5BTC", "5-10BTC"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "0-5BTC": obj.get("0-5BTC"), + "5-10BTC": obj.get("5-10BTC") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_personal_left_quota_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_personal_left_quota_get200_response.py new file mode 100644 index 0000000..2c29d6e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_personal_left_quota_get200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response(BaseModel): + """ + SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response + """ # noqa: E501 + left_personal_quota: StrictStr = Field(alias="leftPersonalQuota") + __properties: ClassVar[List[str]] = ["leftPersonalQuota"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "leftPersonalQuota": obj.get("leftPersonalQuota") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_position_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_position_get200_response.py new file mode 100644 index 0000000..568981e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_position_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_flexible_position_get200_response_rows_inner import SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexiblePositionGet200Response(BaseModel): + """ + SapiV1SimpleEarnFlexiblePositionGet200Response + """ # noqa: E501 + rows: List[SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexiblePositionGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexiblePositionGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_position_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_position_get200_response_rows_inner.py new file mode 100644 index 0000000..ec5c915 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_position_get200_response_rows_inner.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate import SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner(BaseModel): + """ + SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner + """ # noqa: E501 + total_amount: StrictStr = Field(alias="totalAmount") + tier_annual_percentage_rate: SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate = Field(alias="tierAnnualPercentageRate") + latest_annual_percentage_rate: StrictStr = Field(alias="latestAnnualPercentageRate") + yesterday_airdrop_percentage_rate: StrictStr = Field(alias="yesterdayAirdropPercentageRate") + asset: StrictStr + air_drop_asset: StrictStr = Field(alias="airDropAsset") + can_redeem: StrictBool = Field(alias="canRedeem") + collateral_amount: StrictStr = Field(alias="collateralAmount") + product_id: StrictStr = Field(alias="productId") + yesterday_real_time_rewards: StrictStr = Field(alias="yesterdayRealTimeRewards") + cumulative_bonus_rewards: StrictStr = Field(alias="cumulativeBonusRewards") + cumulative_real_time_rewards: StrictStr = Field(alias="cumulativeRealTimeRewards") + cumulative_total_rewards: StrictStr = Field(alias="cumulativeTotalRewards") + auto_subscribe: StrictBool = Field(alias="autoSubscribe") + __properties: ClassVar[List[str]] = ["totalAmount", "tierAnnualPercentageRate", "latestAnnualPercentageRate", "yesterdayAirdropPercentageRate", "asset", "airDropAsset", "canRedeem", "collateralAmount", "productId", "yesterdayRealTimeRewards", "cumulativeBonusRewards", "cumulativeRealTimeRewards", "cumulativeTotalRewards", "autoSubscribe"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of tier_annual_percentage_rate + if self.tier_annual_percentage_rate: + _dict['tierAnnualPercentageRate'] = self.tier_annual_percentage_rate.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalAmount": obj.get("totalAmount"), + "tierAnnualPercentageRate": SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate.from_dict(obj["tierAnnualPercentageRate"]) if obj.get("tierAnnualPercentageRate") is not None else None, + "latestAnnualPercentageRate": obj.get("latestAnnualPercentageRate"), + "yesterdayAirdropPercentageRate": obj.get("yesterdayAirdropPercentageRate"), + "asset": obj.get("asset"), + "airDropAsset": obj.get("airDropAsset"), + "canRedeem": obj.get("canRedeem"), + "collateralAmount": obj.get("collateralAmount"), + "productId": obj.get("productId"), + "yesterdayRealTimeRewards": obj.get("yesterdayRealTimeRewards"), + "cumulativeBonusRewards": obj.get("cumulativeBonusRewards"), + "cumulativeRealTimeRewards": obj.get("cumulativeRealTimeRewards"), + "cumulativeTotalRewards": obj.get("cumulativeTotalRewards"), + "autoSubscribe": obj.get("autoSubscribe") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_redeem_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_redeem_post200_response.py new file mode 100644 index 0000000..8ceeee4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_redeem_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleRedeemPost200Response(BaseModel): + """ + SapiV1SimpleEarnFlexibleRedeemPost200Response + """ # noqa: E501 + redeem_id: StrictInt = Field(alias="redeemId") + success: StrictBool + __properties: ClassVar[List[str]] = ["redeemId", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleRedeemPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleRedeemPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "redeemId": obj.get("redeemId"), + "success": obj.get("success") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_subscribe_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_subscribe_post200_response.py new file mode 100644 index 0000000..14091d4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_subscribe_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleSubscribePost200Response(BaseModel): + """ + SapiV1SimpleEarnFlexibleSubscribePost200Response + """ # noqa: E501 + purchase_id: StrictInt = Field(alias="purchaseId") + success: StrictBool + __properties: ClassVar[List[str]] = ["purchaseId", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleSubscribePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleSubscribePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "purchaseId": obj.get("purchaseId"), + "success": obj.get("success") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_subscription_preview_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_subscription_preview_get200_response.py new file mode 100644 index 0000000..72a9770 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_flexible_subscription_preview_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response(BaseModel): + """ + SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response + """ # noqa: E501 + total_amount: StrictStr = Field(alias="totalAmount") + reward_asset: StrictStr = Field(alias="rewardAsset") + air_drop_asset: StrictStr = Field(alias="airDropAsset") + est_daily_bonus_rewards: StrictStr = Field(alias="estDailyBonusRewards") + est_daily_real_time_rewards: StrictStr = Field(alias="estDailyRealTimeRewards") + est_daily_airdrop_rewards: StrictStr = Field(alias="estDailyAirdropRewards") + __properties: ClassVar[List[str]] = ["totalAmount", "rewardAsset", "airDropAsset", "estDailyBonusRewards", "estDailyRealTimeRewards", "estDailyAirdropRewards"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalAmount": obj.get("totalAmount"), + "rewardAsset": obj.get("rewardAsset"), + "airDropAsset": obj.get("airDropAsset"), + "estDailyBonusRewards": obj.get("estDailyBonusRewards"), + "estDailyRealTimeRewards": obj.get("estDailyRealTimeRewards"), + "estDailyAirdropRewards": obj.get("estDailyAirdropRewards") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_redemption_record_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_redemption_record_get200_response.py new file mode 100644 index 0000000..20e8890 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_redemption_record_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response(BaseModel): + """ + SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response + """ # noqa: E501 + rows: List[SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner.py new file mode 100644 index 0000000..f350b90 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner(BaseModel): + """ + SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner + """ # noqa: E501 + position_id: StrictStr = Field(alias="positionId") + redeem_id: StrictInt = Field(alias="redeemId") + time: StrictInt + asset: StrictStr + lock_period: StrictStr = Field(alias="lockPeriod") + amount: StrictStr + type: StrictStr = Field(description="MATURE for redeem to Spot Wallet, NEW_TRANSFERRED for redeem to Flexible product, AHEAD for early redemption") + deliver_date: StrictStr = Field(alias="deliverDate") + status: StrictStr + __properties: ClassVar[List[str]] = ["positionId", "redeemId", "time", "asset", "lockPeriod", "amount", "type", "deliverDate", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "positionId": obj.get("positionId"), + "redeemId": obj.get("redeemId"), + "time": obj.get("time"), + "asset": obj.get("asset"), + "lockPeriod": obj.get("lockPeriod"), + "amount": obj.get("amount"), + "type": obj.get("type"), + "deliverDate": obj.get("deliverDate"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_rewards_record_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_rewards_record_get200_response.py new file mode 100644 index 0000000..7276769 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_rewards_record_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response(BaseModel): + """ + SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response + """ # noqa: E501 + rows: List[SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner.py new file mode 100644 index 0000000..e8529ef --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner(BaseModel): + """ + SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner + """ # noqa: E501 + position_id: StrictStr = Field(alias="positionId") + time: StrictInt + asset: StrictStr + lock_period: StrictStr = Field(alias="lockPeriod") + amount: StrictStr + __properties: ClassVar[List[str]] = ["positionId", "time", "asset", "lockPeriod", "amount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "positionId": obj.get("positionId"), + "time": obj.get("time"), + "asset": obj.get("asset"), + "lockPeriod": obj.get("lockPeriod"), + "amount": obj.get("amount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_subscription_record_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_subscription_record_get200_response.py new file mode 100644 index 0000000..207b7ee --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_subscription_record_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response(BaseModel): + """ + SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response + """ # noqa: E501 + rows: List[SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner.py new file mode 100644 index 0000000..73773cb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner(BaseModel): + """ + SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner + """ # noqa: E501 + position_id: StrictStr = Field(alias="positionId") + purchase_id: StrictInt = Field(alias="purchaseId") + time: StrictInt + asset: StrictStr + amount: StrictStr + lock_period: StrictStr = Field(alias="lockPeriod") + type: StrictStr = Field(description="NORMAL for normal subscription, AUTO for auto-subscription order, ACTIVITY for activity order, TRIAL for trial fund order, RESTAKE for restake order") + source_account: StrictStr = Field(description="SPOT, FUNDING, SPOTANDFUNDING", alias="sourceAccount") + amt_from_spot: StrictStr = Field(description="Display if sourceAccount is SPOTANDFUNDING ", alias="amtFromSpot") + amt_from_funding: StrictStr = Field(description="Display if sourceAccount is SPOTANDFUNDING", alias="amtFromFunding") + status: StrictStr = Field(description="PURCHASING/SUCCESS/FAILED") + __properties: ClassVar[List[str]] = ["positionId", "purchaseId", "time", "asset", "amount", "lockPeriod", "type", "sourceAccount", "amtFromSpot", "amtFromFunding", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "positionId": obj.get("positionId"), + "purchaseId": obj.get("purchaseId"), + "time": obj.get("time"), + "asset": obj.get("asset"), + "amount": obj.get("amount"), + "lockPeriod": obj.get("lockPeriod"), + "type": obj.get("type"), + "sourceAccount": obj.get("sourceAccount"), + "amtFromSpot": obj.get("amtFromSpot"), + "amtFromFunding": obj.get("amtFromFunding"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response.py new file mode 100644 index 0000000..db6b3d1 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner import SapiV1SimpleEarnLockedListGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnLockedListGet200Response(BaseModel): + """ + SapiV1SimpleEarnLockedListGet200Response + """ # noqa: E501 + rows: List[SapiV1SimpleEarnLockedListGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1SimpleEarnLockedListGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response_rows_inner.py new file mode 100644 index 0000000..f2d2780 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response_rows_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail import SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota import SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnLockedListGet200ResponseRowsInner(BaseModel): + """ + SapiV1SimpleEarnLockedListGet200ResponseRowsInner + """ # noqa: E501 + project_id: StrictStr = Field(alias="projectId") + detail: SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail + quota: SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota + __properties: ClassVar[List[str]] = ["projectId", "detail", "quota"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedListGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # override the default output from pydantic by calling `to_dict()` of quota + if self.quota: + _dict['quota'] = self.quota.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedListGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "detail": SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail.from_dict(obj["detail"]) if obj.get("detail") is not None else None, + "quota": SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota.from_dict(obj["quota"]) if obj.get("quota") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail.py new file mode 100644 index 0000000..b5e8d23 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail(BaseModel): + """ + SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail + """ # noqa: E501 + asset: StrictStr + reward_asset: StrictStr = Field(alias="rewardAsset") + duration: StrictInt + renewable: StrictBool + is_sold_out: StrictBool = Field(alias="isSoldOut") + apr: StrictStr + status: StrictStr + subscription_start_time: StrictStr = Field(alias="subscriptionStartTime") + extra_reward_asset: StrictStr = Field(alias="extraRewardAsset") + extra_reward_apr: StrictStr = Field(alias="extraRewardAPR") + __properties: ClassVar[List[str]] = ["asset", "rewardAsset", "duration", "renewable", "isSoldOut", "apr", "status", "subscriptionStartTime", "extraRewardAsset", "extraRewardAPR"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "rewardAsset": obj.get("rewardAsset"), + "duration": obj.get("duration"), + "renewable": obj.get("renewable"), + "isSoldOut": obj.get("isSoldOut"), + "apr": obj.get("apr"), + "status": obj.get("status"), + "subscriptionStartTime": obj.get("subscriptionStartTime"), + "extraRewardAsset": obj.get("extraRewardAsset"), + "extraRewardAPR": obj.get("extraRewardAPR") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota.py new file mode 100644 index 0000000..438ebf9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota(BaseModel): + """ + SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota + """ # noqa: E501 + total_personal_quota: StrictStr = Field(alias="totalPersonalQuota") + minimum: StrictStr + __properties: ClassVar[List[str]] = ["totalPersonalQuota", "minimum"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalPersonalQuota": obj.get("totalPersonalQuota"), + "minimum": obj.get("minimum") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_position_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_position_get200_response.py new file mode 100644 index 0000000..318231f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_position_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_simple_earn_locked_position_get200_response_rows_inner import SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnLockedPositionGet200Response(BaseModel): + """ + SapiV1SimpleEarnLockedPositionGet200Response + """ # noqa: E501 + rows: List[SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedPositionGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedPositionGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_position_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_position_get200_response_rows_inner.py new file mode 100644 index 0000000..ec337e0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_position_get200_response_rows_inner.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner(BaseModel): + """ + SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner + """ # noqa: E501 + position_id: StrictStr = Field(alias="positionId") + project_id: StrictStr = Field(alias="projectId") + asset: StrictStr + amount: StrictStr + purchase_time: StrictStr = Field(alias="purchaseTime") + duration: StrictStr + accrual_days: StrictStr = Field(alias="accrualDays") + reward_asset: StrictStr = Field(alias="rewardAsset") + apy: StrictStr = Field(alias="APY") + is_renewable: StrictBool = Field(alias="isRenewable") + is_auto_renew: StrictBool = Field(alias="isAutoRenew") + redeem_date: StrictStr = Field(alias="redeemDate") + __properties: ClassVar[List[str]] = ["positionId", "projectId", "asset", "amount", "purchaseTime", "duration", "accrualDays", "rewardAsset", "APY", "isRenewable", "isAutoRenew", "redeemDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "positionId": obj.get("positionId"), + "projectId": obj.get("projectId"), + "asset": obj.get("asset"), + "amount": obj.get("amount"), + "purchaseTime": obj.get("purchaseTime"), + "duration": obj.get("duration"), + "accrualDays": obj.get("accrualDays"), + "rewardAsset": obj.get("rewardAsset"), + "APY": obj.get("APY"), + "isRenewable": obj.get("isRenewable"), + "isAutoRenew": obj.get("isAutoRenew"), + "redeemDate": obj.get("redeemDate") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_subscribe_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_subscribe_post200_response.py new file mode 100644 index 0000000..18e012e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_subscribe_post200_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnLockedSubscribePost200Response(BaseModel): + """ + SapiV1SimpleEarnLockedSubscribePost200Response + """ # noqa: E501 + purchase_id: StrictInt = Field(alias="purchaseId") + position_id: StrictStr = Field(alias="positionId") + success: StrictBool + __properties: ClassVar[List[str]] = ["purchaseId", "positionId", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedSubscribePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedSubscribePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "purchaseId": obj.get("purchaseId"), + "positionId": obj.get("positionId"), + "success": obj.get("success") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner.py new file mode 100644 index 0000000..768a44d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner(BaseModel): + """ + SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner + """ # noqa: E501 + reward_asset: StrictStr = Field(alias="rewardAsset") + total_reward_amt: StrictStr = Field(alias="totalRewardAmt") + extra_reward_asset: StrictStr = Field(alias="extraRewardAsset") + est_total_extra_reward_amt: StrictStr = Field(alias="estTotalExtraRewardAmt") + next_pay: StrictStr = Field(alias="nextPay") + next_pay_date: StrictStr = Field(alias="nextPayDate") + value_date: StrictStr = Field(alias="valueDate") + rewards_end_date: StrictStr = Field(alias="rewardsEndDate") + deliver_date: StrictStr = Field(alias="deliverDate") + next_subscription_date: StrictStr = Field(alias="nextSubscriptionDate") + __properties: ClassVar[List[str]] = ["rewardAsset", "totalRewardAmt", "extraRewardAsset", "estTotalExtraRewardAmt", "nextPay", "nextPayDate", "valueDate", "rewardsEndDate", "deliverDate", "nextSubscriptionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rewardAsset": obj.get("rewardAsset"), + "totalRewardAmt": obj.get("totalRewardAmt"), + "extraRewardAsset": obj.get("extraRewardAsset"), + "estTotalExtraRewardAmt": obj.get("estTotalExtraRewardAmt"), + "nextPay": obj.get("nextPay"), + "nextPayDate": obj.get("nextPayDate"), + "valueDate": obj.get("valueDate"), + "rewardsEndDate": obj.get("rewardsEndDate"), + "deliverDate": obj.get("deliverDate"), + "nextSubscriptionDate": obj.get("nextSubscriptionDate") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_spot_delist_schedule_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_spot_delist_schedule_get200_response_inner.py new file mode 100644 index 0000000..e8f24bf --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_spot_delist_schedule_get200_response_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SpotDelistScheduleGet200ResponseInner(BaseModel): + """ + SapiV1SpotDelistScheduleGet200ResponseInner + """ # noqa: E501 + delist_time: StrictInt = Field(alias="delistTime") + symbol: List[StrictStr] + __properties: ClassVar[List[str]] = ["delistTime", "symbol"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SpotDelistScheduleGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SpotDelistScheduleGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "delistTime": obj.get("delistTime"), + "symbol": obj.get("symbol") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_blvt_enable_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_blvt_enable_post200_response.py new file mode 100644 index 0000000..ea926ca --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_blvt_enable_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountBlvtEnablePost200Response(BaseModel): + """ + SapiV1SubAccountBlvtEnablePost200Response + """ # noqa: E501 + email: StrictStr + enable_blvt: StrictBool = Field(alias="enableBlvt") + __properties: ClassVar[List[str]] = ["email", "enableBlvt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountBlvtEnablePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountBlvtEnablePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "enableBlvt": obj.get("enableBlvt") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_eoptions_enable_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_eoptions_enable_post200_response.py new file mode 100644 index 0000000..e5e9f8e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_eoptions_enable_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountEoptionsEnablePost200Response(BaseModel): + """ + SapiV1SubAccountEoptionsEnablePost200Response + """ # noqa: E501 + email: StrictStr + is_e_options_enabled: StrictBool = Field(alias="isEOptionsEnabled") + __properties: ClassVar[List[str]] = ["email", "isEOptionsEnabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountEoptionsEnablePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountEoptionsEnablePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "isEOptionsEnabled": obj.get("isEOptionsEnabled") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_get200_response.py new file mode 100644 index 0000000..a321385 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_get200_response.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_sub_account_futures_account_get200_response_assets_inner import SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountFuturesAccountGet200Response(BaseModel): + """ + SapiV1SubAccountFuturesAccountGet200Response + """ # noqa: E501 + email: StrictStr + asset: StrictStr + assets: List[SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner] + can_deposit: StrictBool = Field(alias="canDeposit") + can_trade: StrictBool = Field(alias="canTrade") + can_withdraw: StrictBool = Field(alias="canWithdraw") + fee_tier: StrictInt = Field(alias="feeTier") + max_withdraw_amount: StrictStr = Field(alias="maxWithdrawAmount") + total_initial_margin: StrictStr = Field(alias="totalInitialMargin") + total_maintenance_margin: StrictStr = Field(alias="totalMaintenanceMargin") + total_margin_balance: StrictStr = Field(alias="totalMarginBalance") + total_open_order_initial_margin: StrictStr = Field(alias="totalOpenOrderInitialMargin") + total_position_initial_margin: StrictStr = Field(alias="totalPositionInitialMargin") + total_unrealized_profit: StrictStr = Field(alias="totalUnrealizedProfit") + total_wallet_balance: StrictStr = Field(alias="totalWalletBalance") + update_time: StrictInt = Field(alias="updateTime") + __properties: ClassVar[List[str]] = ["email", "asset", "assets", "canDeposit", "canTrade", "canWithdraw", "feeTier", "maxWithdrawAmount", "totalInitialMargin", "totalMaintenanceMargin", "totalMarginBalance", "totalOpenOrderInitialMargin", "totalPositionInitialMargin", "totalUnrealizedProfit", "totalWalletBalance", "updateTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesAccountGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in assets (list) + _items = [] + if self.assets: + for _item in self.assets: + if _item: + _items.append(_item.to_dict()) + _dict['assets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesAccountGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "asset": obj.get("asset"), + "assets": [SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None, + "canDeposit": obj.get("canDeposit"), + "canTrade": obj.get("canTrade"), + "canWithdraw": obj.get("canWithdraw"), + "feeTier": obj.get("feeTier"), + "maxWithdrawAmount": obj.get("maxWithdrawAmount"), + "totalInitialMargin": obj.get("totalInitialMargin"), + "totalMaintenanceMargin": obj.get("totalMaintenanceMargin"), + "totalMarginBalance": obj.get("totalMarginBalance"), + "totalOpenOrderInitialMargin": obj.get("totalOpenOrderInitialMargin"), + "totalPositionInitialMargin": obj.get("totalPositionInitialMargin"), + "totalUnrealizedProfit": obj.get("totalUnrealizedProfit"), + "totalWalletBalance": obj.get("totalWalletBalance"), + "updateTime": obj.get("updateTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_get200_response_assets_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_get200_response_assets_inner.py new file mode 100644 index 0000000..8e603ff --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_get200_response_assets_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner(BaseModel): + """ + SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner + """ # noqa: E501 + asset: StrictStr + initial_margin: StrictStr = Field(alias="initialMargin") + maintenance_margin: StrictStr = Field(alias="maintenanceMargin") + margin_balance: StrictStr = Field(alias="marginBalance") + max_withdraw_amount: StrictStr = Field(alias="maxWithdrawAmount") + open_order_initial_margin: StrictStr = Field(alias="openOrderInitialMargin") + position_initial_margin: StrictStr = Field(alias="positionInitialMargin") + unrealized_profit: StrictStr = Field(alias="unrealizedProfit") + wallet_balance: StrictStr = Field(alias="walletBalance") + __properties: ClassVar[List[str]] = ["asset", "initialMargin", "maintenanceMargin", "marginBalance", "maxWithdrawAmount", "openOrderInitialMargin", "positionInitialMargin", "unrealizedProfit", "walletBalance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "initialMargin": obj.get("initialMargin"), + "maintenanceMargin": obj.get("maintenanceMargin"), + "marginBalance": obj.get("marginBalance"), + "maxWithdrawAmount": obj.get("maxWithdrawAmount"), + "openOrderInitialMargin": obj.get("openOrderInitialMargin"), + "positionInitialMargin": obj.get("positionInitialMargin"), + "unrealizedProfit": obj.get("unrealizedProfit"), + "walletBalance": obj.get("walletBalance") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_summary_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_summary_get200_response.py new file mode 100644 index 0000000..4c7a038 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_summary_get200_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner import SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountFuturesAccountSummaryGet200Response(BaseModel): + """ + SapiV1SubAccountFuturesAccountSummaryGet200Response + """ # noqa: E501 + total_initial_margin: StrictStr = Field(alias="totalInitialMargin") + total_maintenance_margin: StrictStr = Field(alias="totalMaintenanceMargin") + total_margin_balance: StrictStr = Field(alias="totalMarginBalance") + total_open_order_initial_margin: StrictStr = Field(alias="totalOpenOrderInitialMargin") + total_position_initial_margin: StrictStr = Field(alias="totalPositionInitialMargin") + total_unrealized_profit: StrictStr = Field(alias="totalUnrealizedProfit") + total_wallet_balance: StrictStr = Field(alias="totalWalletBalance") + asset: StrictStr + sub_account_list: List[SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner] = Field(alias="subAccountList") + __properties: ClassVar[List[str]] = ["totalInitialMargin", "totalMaintenanceMargin", "totalMarginBalance", "totalOpenOrderInitialMargin", "totalPositionInitialMargin", "totalUnrealizedProfit", "totalWalletBalance", "asset", "subAccountList"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesAccountSummaryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in sub_account_list (list) + _items = [] + if self.sub_account_list: + for _item in self.sub_account_list: + if _item: + _items.append(_item.to_dict()) + _dict['subAccountList'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesAccountSummaryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalInitialMargin": obj.get("totalInitialMargin"), + "totalMaintenanceMargin": obj.get("totalMaintenanceMargin"), + "totalMarginBalance": obj.get("totalMarginBalance"), + "totalOpenOrderInitialMargin": obj.get("totalOpenOrderInitialMargin"), + "totalPositionInitialMargin": obj.get("totalPositionInitialMargin"), + "totalUnrealizedProfit": obj.get("totalUnrealizedProfit"), + "totalWalletBalance": obj.get("totalWalletBalance"), + "asset": obj.get("asset"), + "subAccountList": [SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner.from_dict(_item) for _item in obj["subAccountList"]] if obj.get("subAccountList") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner.py new file mode 100644 index 0000000..72cb47c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner(BaseModel): + """ + SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner + """ # noqa: E501 + email: StrictStr + total_initial_margin: StrictStr = Field(alias="totalInitialMargin") + total_maintenance_margin: StrictStr = Field(alias="totalMaintenanceMargin") + total_margin_balance: StrictStr = Field(alias="totalMarginBalance") + total_open_order_initial_margin: StrictStr = Field(alias="totalOpenOrderInitialMargin") + total_position_initial_margin: StrictStr = Field(alias="totalPositionInitialMargin") + total_unrealized_profit: StrictStr = Field(alias="totalUnrealizedProfit") + total_wallet_balance: StrictStr = Field(alias="totalWalletBalance") + asset: StrictStr + __properties: ClassVar[List[str]] = ["email", "totalInitialMargin", "totalMaintenanceMargin", "totalMarginBalance", "totalOpenOrderInitialMargin", "totalPositionInitialMargin", "totalUnrealizedProfit", "totalWalletBalance", "asset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "totalInitialMargin": obj.get("totalInitialMargin"), + "totalMaintenanceMargin": obj.get("totalMaintenanceMargin"), + "totalMarginBalance": obj.get("totalMarginBalance"), + "totalOpenOrderInitialMargin": obj.get("totalOpenOrderInitialMargin"), + "totalPositionInitialMargin": obj.get("totalPositionInitialMargin"), + "totalUnrealizedProfit": obj.get("totalUnrealizedProfit"), + "totalWalletBalance": obj.get("totalWalletBalance"), + "asset": obj.get("asset") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_enable_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_enable_post200_response.py new file mode 100644 index 0000000..2cc1a5a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_enable_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountFuturesEnablePost200Response(BaseModel): + """ + SapiV1SubAccountFuturesEnablePost200Response + """ # noqa: E501 + email: StrictStr + is_futures_enabled: StrictBool = Field(alias="isFuturesEnabled") + __properties: ClassVar[List[str]] = ["email", "isFuturesEnabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesEnablePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesEnablePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "isFuturesEnabled": obj.get("isFuturesEnabled") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_internal_transfer_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_internal_transfer_get200_response.py new file mode 100644 index 0000000..b9672aa --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_internal_transfer_get200_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner import SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountFuturesInternalTransferGet200Response(BaseModel): + """ + SapiV1SubAccountFuturesInternalTransferGet200Response + """ # noqa: E501 + success: StrictBool + futures_type: StrictInt = Field(alias="futuresType") + transfers: List[SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner] + __properties: ClassVar[List[str]] = ["success", "futuresType", "transfers"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesInternalTransferGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in transfers (list) + _items = [] + if self.transfers: + for _item in self.transfers: + if _item: + _items.append(_item.to_dict()) + _dict['transfers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesInternalTransferGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "futuresType": obj.get("futuresType"), + "transfers": [SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner.from_dict(_item) for _item in obj["transfers"]] if obj.get("transfers") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner.py new file mode 100644 index 0000000..cf66df6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner(BaseModel): + """ + SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner + """ # noqa: E501 + var_from: StrictStr = Field(alias="from") + to: StrictStr + asset: StrictStr + qty: StrictStr + tran_id: StrictInt = Field(alias="tranId") + time: StrictInt + __properties: ClassVar[List[str]] = ["from", "to", "asset", "qty", "tranId", "time"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "from": obj.get("from"), + "to": obj.get("to"), + "asset": obj.get("asset"), + "qty": obj.get("qty"), + "tranId": obj.get("tranId"), + "time": obj.get("time") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_internal_transfer_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_internal_transfer_post200_response.py new file mode 100644 index 0000000..05a7e8e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_internal_transfer_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountFuturesInternalTransferPost200Response(BaseModel): + """ + SapiV1SubAccountFuturesInternalTransferPost200Response + """ # noqa: E501 + success: StrictBool + txn_id: StrictStr = Field(alias="txnId") + __properties: ClassVar[List[str]] = ["success", "txnId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesInternalTransferPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesInternalTransferPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "txnId": obj.get("txnId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_position_risk_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_position_risk_get200_response_inner.py new file mode 100644 index 0000000..7ed5bc4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_position_risk_get200_response_inner.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountFuturesPositionRiskGet200ResponseInner(BaseModel): + """ + SapiV1SubAccountFuturesPositionRiskGet200ResponseInner + """ # noqa: E501 + entry_price: StrictStr = Field(alias="entryPrice") + leverage: StrictStr = Field(description="current initial leverage") + max_notional: StrictStr = Field(description="notional value limit of current initial leverage", alias="maxNotional") + liquidation_price: StrictStr = Field(alias="liquidationPrice") + mark_price: StrictStr = Field(alias="markPrice") + position_amount: StrictStr = Field(alias="positionAmount") + symbol: StrictStr + unrealized_profit: StrictStr = Field(alias="unrealizedProfit") + __properties: ClassVar[List[str]] = ["entryPrice", "leverage", "maxNotional", "liquidationPrice", "markPrice", "positionAmount", "symbol", "unrealizedProfit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesPositionRiskGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesPositionRiskGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "entryPrice": obj.get("entryPrice"), + "leverage": obj.get("leverage"), + "maxNotional": obj.get("maxNotional"), + "liquidationPrice": obj.get("liquidationPrice"), + "markPrice": obj.get("markPrice"), + "positionAmount": obj.get("positionAmount"), + "symbol": obj.get("symbol"), + "unrealizedProfit": obj.get("unrealizedProfit") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_transfer_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_transfer_post200_response.py new file mode 100644 index 0000000..2d25152 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_futures_transfer_post200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountFuturesTransferPost200Response(BaseModel): + """ + SapiV1SubAccountFuturesTransferPost200Response + """ # noqa: E501 + txn_id: StrictStr = Field(alias="txnId") + __properties: ClassVar[List[str]] = ["txnId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesTransferPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountFuturesTransferPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "txnId": obj.get("txnId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_list_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_list_get200_response.py new file mode 100644 index 0000000..001535a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_list_get200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_sub_account_list_get200_response_sub_accounts_inner import SapiV1SubAccountListGet200ResponseSubAccountsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountListGet200Response(BaseModel): + """ + SapiV1SubAccountListGet200Response + """ # noqa: E501 + sub_accounts: List[SapiV1SubAccountListGet200ResponseSubAccountsInner] = Field(alias="subAccounts") + __properties: ClassVar[List[str]] = ["subAccounts"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountListGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in sub_accounts (list) + _items = [] + if self.sub_accounts: + for _item in self.sub_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['subAccounts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountListGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "subAccounts": [SapiV1SubAccountListGet200ResponseSubAccountsInner.from_dict(_item) for _item in obj["subAccounts"]] if obj.get("subAccounts") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_list_get200_response_sub_accounts_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_list_get200_response_sub_accounts_inner.py new file mode 100644 index 0000000..1a434dc --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_list_get200_response_sub_accounts_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountListGet200ResponseSubAccountsInner(BaseModel): + """ + SapiV1SubAccountListGet200ResponseSubAccountsInner + """ # noqa: E501 + email: StrictStr + is_freeze: StrictBool = Field(alias="isFreeze") + create_time: StrictInt = Field(alias="createTime") + is_managed_sub_account: StrictBool = Field(alias="isManagedSubAccount") + is_asset_management_sub_account: StrictBool = Field(alias="isAssetManagementSubAccount") + __properties: ClassVar[List[str]] = ["email", "isFreeze", "createTime", "isManagedSubAccount", "isAssetManagementSubAccount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountListGet200ResponseSubAccountsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountListGet200ResponseSubAccountsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "isFreeze": obj.get("isFreeze"), + "createTime": obj.get("createTime"), + "isManagedSubAccount": obj.get("isManagedSubAccount"), + "isAssetManagementSubAccount": obj.get("isAssetManagementSubAccount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_get200_response.py new file mode 100644 index 0000000..d5bd306 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_get200_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_margin_account_get200_response_user_assets_inner import SapiV1MarginAccountGet200ResponseUserAssetsInner +from openapi_client.models.sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo import SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountMarginAccountGet200Response(BaseModel): + """ + SapiV1SubAccountMarginAccountGet200Response + """ # noqa: E501 + email: StrictStr + margin_level: StrictStr = Field(alias="marginLevel") + total_asset_of_btc: StrictStr = Field(alias="totalAssetOfBtc") + total_liability_of_btc: StrictStr = Field(alias="totalLiabilityOfBtc") + total_net_asset_of_btc: StrictStr = Field(alias="totalNetAssetOfBtc") + margin_trade_coeff_vo: SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo = Field(alias="marginTradeCoeffVo") + margin_user_asset_vo_list: List[SapiV1MarginAccountGet200ResponseUserAssetsInner] = Field(alias="marginUserAssetVoList") + __properties: ClassVar[List[str]] = ["email", "marginLevel", "totalAssetOfBtc", "totalLiabilityOfBtc", "totalNetAssetOfBtc", "marginTradeCoeffVo", "marginUserAssetVoList"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountMarginAccountGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of margin_trade_coeff_vo + if self.margin_trade_coeff_vo: + _dict['marginTradeCoeffVo'] = self.margin_trade_coeff_vo.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in margin_user_asset_vo_list (list) + _items = [] + if self.margin_user_asset_vo_list: + for _item in self.margin_user_asset_vo_list: + if _item: + _items.append(_item.to_dict()) + _dict['marginUserAssetVoList'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountMarginAccountGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "marginLevel": obj.get("marginLevel"), + "totalAssetOfBtc": obj.get("totalAssetOfBtc"), + "totalLiabilityOfBtc": obj.get("totalLiabilityOfBtc"), + "totalNetAssetOfBtc": obj.get("totalNetAssetOfBtc"), + "marginTradeCoeffVo": SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo.from_dict(obj["marginTradeCoeffVo"]) if obj.get("marginTradeCoeffVo") is not None else None, + "marginUserAssetVoList": [SapiV1MarginAccountGet200ResponseUserAssetsInner.from_dict(_item) for _item in obj["marginUserAssetVoList"]] if obj.get("marginUserAssetVoList") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo.py new file mode 100644 index 0000000..5f3db82 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo(BaseModel): + """ + SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo + """ # noqa: E501 + force_liquidation_bar: StrictStr = Field(description="Liquidation margin ratio", alias="forceLiquidationBar") + margin_call_bar: StrictStr = Field(description="Margin call margin ratio", alias="marginCallBar") + normal_bar: StrictStr = Field(description="Initial margin ratio", alias="normalBar") + __properties: ClassVar[List[str]] = ["forceLiquidationBar", "marginCallBar", "normalBar"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "forceLiquidationBar": obj.get("forceLiquidationBar"), + "marginCallBar": obj.get("marginCallBar"), + "normalBar": obj.get("normalBar") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_summary_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_summary_get200_response.py new file mode 100644 index 0000000..4abd89e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_summary_get200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner import SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountMarginAccountSummaryGet200Response(BaseModel): + """ + SapiV1SubAccountMarginAccountSummaryGet200Response + """ # noqa: E501 + total_asset_of_btc: StrictStr = Field(alias="totalAssetOfBtc") + total_liability_of_btc: StrictStr = Field(alias="totalLiabilityOfBtc") + total_net_asset_of_btc: StrictStr = Field(alias="totalNetAssetOfBtc") + sub_account_list: List[SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner] = Field(alias="subAccountList") + __properties: ClassVar[List[str]] = ["totalAssetOfBtc", "totalLiabilityOfBtc", "totalNetAssetOfBtc", "subAccountList"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountMarginAccountSummaryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in sub_account_list (list) + _items = [] + if self.sub_account_list: + for _item in self.sub_account_list: + if _item: + _items.append(_item.to_dict()) + _dict['subAccountList'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountMarginAccountSummaryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalAssetOfBtc": obj.get("totalAssetOfBtc"), + "totalLiabilityOfBtc": obj.get("totalLiabilityOfBtc"), + "totalNetAssetOfBtc": obj.get("totalNetAssetOfBtc"), + "subAccountList": [SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner.from_dict(_item) for _item in obj["subAccountList"]] if obj.get("subAccountList") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner.py new file mode 100644 index 0000000..e9af848 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner(BaseModel): + """ + SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner + """ # noqa: E501 + email: StrictStr + total_asset_of_btc: StrictStr = Field(alias="totalAssetOfBtc") + total_liability_of_btc: StrictStr = Field(alias="totalLiabilityOfBtc") + total_net_asset_of_btc: StrictStr = Field(alias="totalNetAssetOfBtc") + __properties: ClassVar[List[str]] = ["email", "totalAssetOfBtc", "totalLiabilityOfBtc", "totalNetAssetOfBtc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "totalAssetOfBtc": obj.get("totalAssetOfBtc"), + "totalLiabilityOfBtc": obj.get("totalLiabilityOfBtc"), + "totalNetAssetOfBtc": obj.get("totalNetAssetOfBtc") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_enable_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_enable_post200_response.py new file mode 100644 index 0000000..c1a9bf9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_margin_enable_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountMarginEnablePost200Response(BaseModel): + """ + SapiV1SubAccountMarginEnablePost200Response + """ # noqa: E501 + email: StrictStr + is_margin_enabled: StrictBool = Field(alias="isMarginEnabled") + __properties: ClassVar[List[str]] = ["email", "isMarginEnabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountMarginEnablePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountMarginEnablePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "isMarginEnabled": obj.get("isMarginEnabled") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_spot_summary_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_spot_summary_get200_response.py new file mode 100644 index 0000000..befc619 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_spot_summary_get200_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner import SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountSpotSummaryGet200Response(BaseModel): + """ + SapiV1SubAccountSpotSummaryGet200Response + """ # noqa: E501 + total_count: StrictInt = Field(alias="totalCount") + master_account_total_asset: StrictStr = Field(alias="masterAccountTotalAsset") + spot_sub_user_asset_btc_vo_list: List[SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner] = Field(alias="spotSubUserAssetBtcVoList") + __properties: ClassVar[List[str]] = ["totalCount", "masterAccountTotalAsset", "spotSubUserAssetBtcVoList"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountSpotSummaryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in spot_sub_user_asset_btc_vo_list (list) + _items = [] + if self.spot_sub_user_asset_btc_vo_list: + for _item in self.spot_sub_user_asset_btc_vo_list: + if _item: + _items.append(_item.to_dict()) + _dict['spotSubUserAssetBtcVoList'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountSpotSummaryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalCount": obj.get("totalCount"), + "masterAccountTotalAsset": obj.get("masterAccountTotalAsset"), + "spotSubUserAssetBtcVoList": [SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner.from_dict(_item) for _item in obj["spotSubUserAssetBtcVoList"]] if obj.get("spotSubUserAssetBtcVoList") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner.py new file mode 100644 index 0000000..019da9d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner(BaseModel): + """ + SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner + """ # noqa: E501 + email: StrictStr + total_asset: StrictStr = Field(alias="totalAsset") + __properties: ClassVar[List[str]] = ["email", "totalAsset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "totalAsset": obj.get("totalAsset") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_status_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_status_get200_response_inner.py new file mode 100644 index 0000000..f1f903e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_status_get200_response_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountStatusGet200ResponseInner(BaseModel): + """ + SapiV1SubAccountStatusGet200ResponseInner + """ # noqa: E501 + email: StrictStr + is_sub_user_enabled: StrictBool = Field(alias="isSubUserEnabled") + is_user_active: StrictBool = Field(alias="isUserActive") + insert_time: StrictInt = Field(description="sub account create time", alias="insertTime") + is_margin_enabled: StrictBool = Field(alias="isMarginEnabled") + is_future_enabled: StrictBool = Field(alias="isFutureEnabled") + mobile: StrictInt = Field(description="user mobile number") + __properties: ClassVar[List[str]] = ["email", "isSubUserEnabled", "isUserActive", "insertTime", "isMarginEnabled", "isFutureEnabled", "mobile"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountStatusGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountStatusGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "isSubUserEnabled": obj.get("isSubUserEnabled"), + "isUserActive": obj.get("isUserActive"), + "insertTime": obj.get("insertTime"), + "isMarginEnabled": obj.get("isMarginEnabled"), + "isFutureEnabled": obj.get("isFutureEnabled"), + "mobile": obj.get("mobile") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response.py new file mode 100644 index 0000000..cd88338 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountSubAccountApiIpRestrictionGet200Response(BaseModel): + """ + SapiV1SubAccountSubAccountApiIpRestrictionGet200Response + """ # noqa: E501 + ip_restrict: StrictStr = Field(alias="ipRestrict") + ip_list: List[StrictStr] = Field(alias="ipList") + update_time: StrictInt = Field(alias="updateTime") + api_key: StrictStr = Field(alias="apiKey") + __properties: ClassVar[List[str]] = ["ipRestrict", "ipList", "updateTime", "apiKey"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountSubAccountApiIpRestrictionGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountSubAccountApiIpRestrictionGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ipRestrict": obj.get("ipRestrict"), + "ipList": obj.get("ipList"), + "updateTime": obj.get("updateTime"), + "apiKey": obj.get("apiKey") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response.py new file mode 100644 index 0000000..7d42aad --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response(BaseModel): + """ + SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response + """ # noqa: E501 + ip_restrict: StrictStr = Field(alias="ipRestrict") + ip_list: List[StrictStr] = Field(alias="ipList") + update_time: StrictInt = Field(alias="updateTime") + api_key: StrictStr = Field(alias="apiKey") + __properties: ClassVar[List[str]] = ["ipRestrict", "ipList", "updateTime", "apiKey"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ipRestrict": obj.get("ipRestrict"), + "ipList": obj.get("ipList"), + "updateTime": obj.get("updateTime"), + "apiKey": obj.get("apiKey") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_sub_transfer_history_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_sub_transfer_history_get200_response_inner.py new file mode 100644 index 0000000..6c1b133 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_sub_transfer_history_get200_response_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountSubTransferHistoryGet200ResponseInner(BaseModel): + """ + SapiV1SubAccountSubTransferHistoryGet200ResponseInner + """ # noqa: E501 + var_from: StrictStr = Field(alias="from") + to: StrictStr + asset: StrictStr + qty: StrictStr + status: StrictStr + tran_id: StrictInt = Field(alias="tranId") + time: StrictInt + __properties: ClassVar[List[str]] = ["from", "to", "asset", "qty", "status", "tranId", "time"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountSubTransferHistoryGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountSubTransferHistoryGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "from": obj.get("from"), + "to": obj.get("to"), + "asset": obj.get("asset"), + "qty": obj.get("qty"), + "status": obj.get("status"), + "tranId": obj.get("tranId"), + "time": obj.get("time") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_transaction_statistics_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_transaction_statistics_get200_response.py new file mode 100644 index 0000000..0e2e915 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_transaction_statistics_get200_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner import SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountTransactionStatisticsGet200Response(BaseModel): + """ + SapiV1SubAccountTransactionStatisticsGet200Response + """ # noqa: E501 + recent30_btc_total: StrictStr = Field(alias="recent30BtcTotal") + recent30_btc_futures_total: StrictStr = Field(alias="recent30BtcFuturesTotal") + recent30_btc_margin_total: StrictStr = Field(alias="recent30BtcMarginTotal") + recent30_busd_total: StrictStr = Field(alias="recent30BusdTotal") + recent30_busd_futures_total: StrictStr = Field(alias="recent30BusdFuturesTotal") + recent30_busd_margin_total: StrictStr = Field(alias="recent30BusdMarginTotal") + trade_info_vos: List[SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner] = Field(alias="tradeInfoVos") + __properties: ClassVar[List[str]] = ["recent30BtcTotal", "recent30BtcFuturesTotal", "recent30BtcMarginTotal", "recent30BusdTotal", "recent30BusdFuturesTotal", "recent30BusdMarginTotal", "tradeInfoVos"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountTransactionStatisticsGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in trade_info_vos (list) + _items = [] + if self.trade_info_vos: + for _item in self.trade_info_vos: + if _item: + _items.append(_item.to_dict()) + _dict['tradeInfoVos'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountTransactionStatisticsGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "recent30BtcTotal": obj.get("recent30BtcTotal"), + "recent30BtcFuturesTotal": obj.get("recent30BtcFuturesTotal"), + "recent30BtcMarginTotal": obj.get("recent30BtcMarginTotal"), + "recent30BusdTotal": obj.get("recent30BusdTotal"), + "recent30BusdFuturesTotal": obj.get("recent30BusdFuturesTotal"), + "recent30BusdMarginTotal": obj.get("recent30BusdMarginTotal"), + "tradeInfoVos": [SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner.from_dict(_item) for _item in obj["tradeInfoVos"]] if obj.get("tradeInfoVos") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner.py new file mode 100644 index 0000000..91977ee --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner(BaseModel): + """ + SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner + """ # noqa: E501 + user_id: Optional[StrictInt] = Field(default=None, alias="userId") + btc: Optional[Union[StrictFloat, StrictInt]] = None + btc_futures: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="btcFutures") + btc_margin: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="btcMargin") + busd: Optional[Union[StrictFloat, StrictInt]] = None + busd_futures: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="busdFutures") + busd_margin: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="busdMargin") + var_date: Optional[StrictInt] = Field(default=None, alias="date") + __properties: ClassVar[List[str]] = ["userId", "btc", "btcFutures", "btcMargin", "busd", "busdFutures", "busdMargin", "date"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "btc": obj.get("btc"), + "btcFutures": obj.get("btcFutures"), + "btcMargin": obj.get("btcMargin"), + "busd": obj.get("busd"), + "busdFutures": obj.get("busdFutures"), + "busdMargin": obj.get("busdMargin"), + "date": obj.get("date") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner.py new file mode 100644 index 0000000..af80690 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner(BaseModel): + """ + SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner + """ # noqa: E501 + counter_party: StrictStr = Field(alias="counterParty") + email: StrictStr + type: StrictInt = Field(description="1 for transfer in, 2 for transfer out") + asset: StrictStr + qty: StrictStr + from_account_type: StrictStr = Field(alias="fromAccountType") + to_account_type: StrictStr = Field(alias="toAccountType") + status: StrictStr + tran_id: StrictInt = Field(alias="tranId") + time: StrictInt + __properties: ClassVar[List[str]] = ["counterParty", "email", "type", "asset", "qty", "fromAccountType", "toAccountType", "status", "tranId", "time"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "counterParty": obj.get("counterParty"), + "email": obj.get("email"), + "type": obj.get("type"), + "asset": obj.get("asset"), + "qty": obj.get("qty"), + "fromAccountType": obj.get("fromAccountType"), + "toAccountType": obj.get("toAccountType"), + "status": obj.get("status"), + "tranId": obj.get("tranId"), + "time": obj.get("time") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_universal_transfer_get200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_universal_transfer_get200_response_inner.py new file mode 100644 index 0000000..03a861c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_universal_transfer_get200_response_inner.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountUniversalTransferGet200ResponseInner(BaseModel): + """ + SapiV1SubAccountUniversalTransferGet200ResponseInner + """ # noqa: E501 + tran_id: StrictInt = Field(alias="tranId") + from_email: StrictStr = Field(alias="fromEmail") + to_email: StrictStr = Field(alias="toEmail") + asset: StrictStr + amount: StrictStr + from_account_type: StrictStr = Field(alias="fromAccountType") + to_account_type: StrictStr = Field(alias="toAccountType") + status: StrictStr + create_time_stamp: StrictInt = Field(alias="createTimeStamp") + client_tran_id: StrictStr = Field(alias="clientTranId") + __properties: ClassVar[List[str]] = ["tranId", "fromEmail", "toEmail", "asset", "amount", "fromAccountType", "toAccountType", "status", "createTimeStamp", "clientTranId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountUniversalTransferGet200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountUniversalTransferGet200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tranId": obj.get("tranId"), + "fromEmail": obj.get("fromEmail"), + "toEmail": obj.get("toEmail"), + "asset": obj.get("asset"), + "amount": obj.get("amount"), + "fromAccountType": obj.get("fromAccountType"), + "toAccountType": obj.get("toAccountType"), + "status": obj.get("status"), + "createTimeStamp": obj.get("createTimeStamp"), + "clientTranId": obj.get("clientTranId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_universal_transfer_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_universal_transfer_post200_response.py new file mode 100644 index 0000000..2529e04 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_universal_transfer_post200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountUniversalTransferPost200Response(BaseModel): + """ + SapiV1SubAccountUniversalTransferPost200Response + """ # noqa: E501 + tran_id: StrictInt = Field(alias="tranId") + client_tran_id: StrictStr = Field(alias="clientTranId") + __properties: ClassVar[List[str]] = ["tranId", "clientTranId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountUniversalTransferPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountUniversalTransferPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tranId": obj.get("tranId"), + "clientTranId": obj.get("clientTranId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_virtual_sub_account_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_virtual_sub_account_post200_response.py new file mode 100644 index 0000000..2f475fc --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_sub_account_virtual_sub_account_post200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SubAccountVirtualSubAccountPost200Response(BaseModel): + """ + SapiV1SubAccountVirtualSubAccountPost200Response + """ # noqa: E501 + email: StrictStr + __properties: ClassVar[List[str]] = ["email"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SubAccountVirtualSubAccountPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SubAccountVirtualSubAccountPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_system_status_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_system_status_get200_response.py new file mode 100644 index 0000000..3ed25c6 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_system_status_get200_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1SystemStatusGet200Response(BaseModel): + """ + SapiV1SystemStatusGet200Response + """ # noqa: E501 + status: StrictInt = Field(description="0: normal, 1:system maintenance") + msg: StrictStr = Field(description="\"normal\", \"system_maintenance\"") + __properties: ClassVar[List[str]] = ["status", "msg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1SystemStatusGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1SystemStatusGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "msg": obj.get("msg") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v1_user_data_stream_isolated_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v1_user_data_stream_isolated_post200_response.py new file mode 100644 index 0000000..bbe7926 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v1_user_data_stream_isolated_post200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV1UserDataStreamIsolatedPost200Response(BaseModel): + """ + SapiV1UserDataStreamIsolatedPost200Response + """ # noqa: E501 + listen_key: StrictStr = Field(alias="listenKey") + __properties: ClassVar[List[str]] = ["listenKey"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV1UserDataStreamIsolatedPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV1UserDataStreamIsolatedPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "listenKey": obj.get("listenKey") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_account_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_account_get200_response.py new file mode 100644 index 0000000..4392aab --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_account_get200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v2_eth_staking_account_get200_response_holdings import SapiV2EthStakingAccountGet200ResponseHoldings +from openapi_client.models.sapi_v2_eth_staking_account_get200_response_profit import SapiV2EthStakingAccountGet200ResponseProfit +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2EthStakingAccountGet200Response(BaseModel): + """ + SapiV2EthStakingAccountGet200Response + """ # noqa: E501 + holding_in_eth: StrictStr = Field(alias="holdingInETH") + holdings: SapiV2EthStakingAccountGet200ResponseHoldings + thirty_days_profit_in_eth: StrictStr = Field(alias="thirtyDaysProfitInETH") + profit: SapiV2EthStakingAccountGet200ResponseProfit + __properties: ClassVar[List[str]] = ["holdingInETH", "holdings", "thirtyDaysProfitInETH", "profit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2EthStakingAccountGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of holdings + if self.holdings: + _dict['holdings'] = self.holdings.to_dict() + # override the default output from pydantic by calling `to_dict()` of profit + if self.profit: + _dict['profit'] = self.profit.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2EthStakingAccountGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "holdingInETH": obj.get("holdingInETH"), + "holdings": SapiV2EthStakingAccountGet200ResponseHoldings.from_dict(obj["holdings"]) if obj.get("holdings") is not None else None, + "thirtyDaysProfitInETH": obj.get("thirtyDaysProfitInETH"), + "profit": SapiV2EthStakingAccountGet200ResponseProfit.from_dict(obj["profit"]) if obj.get("profit") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_account_get200_response_holdings.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_account_get200_response_holdings.py new file mode 100644 index 0000000..f5cf8a2 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_account_get200_response_holdings.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2EthStakingAccountGet200ResponseHoldings(BaseModel): + """ + SapiV2EthStakingAccountGet200ResponseHoldings + """ # noqa: E501 + wbeth_amount: StrictStr = Field(alias="wbethAmount") + beth_amount: StrictStr = Field(alias="bethAmount") + __properties: ClassVar[List[str]] = ["wbethAmount", "bethAmount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2EthStakingAccountGet200ResponseHoldings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2EthStakingAccountGet200ResponseHoldings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "wbethAmount": obj.get("wbethAmount"), + "bethAmount": obj.get("bethAmount") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_account_get200_response_profit.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_account_get200_response_profit.py new file mode 100644 index 0000000..5acb5b0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_account_get200_response_profit.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2EthStakingAccountGet200ResponseProfit(BaseModel): + """ + SapiV2EthStakingAccountGet200ResponseProfit + """ # noqa: E501 + amount_from_wbeth: StrictStr = Field(alias="amountFromWBETH") + amount_from_beth: StrictStr = Field(alias="amountFromBETH") + __properties: ClassVar[List[str]] = ["amountFromWBETH", "amountFromBETH"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2EthStakingAccountGet200ResponseProfit from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2EthStakingAccountGet200ResponseProfit from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amountFromWBETH": obj.get("amountFromWBETH"), + "amountFromBETH": obj.get("amountFromBETH") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_eth_stake_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_eth_stake_post200_response.py new file mode 100644 index 0000000..40c405e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_eth_staking_eth_stake_post200_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2EthStakingEthStakePost200Response(BaseModel): + """ + SapiV2EthStakingEthStakePost200Response + """ # noqa: E501 + success: StrictBool + wbeth_amount: StrictStr = Field(alias="wbethAmount") + conversion_ratio: StrictStr = Field(description="ETH amount per 1 WBETH", alias="conversionRatio") + __properties: ClassVar[List[str]] = ["success", "wbethAmount", "conversionRatio"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2EthStakingEthStakePost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2EthStakingEthStakePost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "wbethAmount": obj.get("wbethAmount"), + "conversionRatio": obj.get("conversionRatio") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_adjust_ltv_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_adjust_ltv_post200_response.py new file mode 100644 index 0000000..9c2f25c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_adjust_ltv_post200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleAdjustLtvPost200Response(BaseModel): + """ + SapiV2LoanFlexibleAdjustLtvPost200Response + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + collateral_coin: StrictStr = Field(alias="collateralCoin") + direction: StrictStr + adjustment_amount: StrictStr = Field(alias="adjustmentAmount") + current_ltv: StrictStr = Field(alias="currentLTV") + __properties: ClassVar[List[str]] = ["loanCoin", "collateralCoin", "direction", "adjustmentAmount", "currentLTV"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleAdjustLtvPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleAdjustLtvPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "collateralCoin": obj.get("collateralCoin"), + "direction": obj.get("direction"), + "adjustmentAmount": obj.get("adjustmentAmount"), + "currentLTV": obj.get("currentLTV") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_borrow_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_borrow_history_get200_response.py new file mode 100644 index 0000000..b1dce22 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_borrow_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner import SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleBorrowHistoryGet200Response(BaseModel): + """ + SapiV2LoanFlexibleBorrowHistoryGet200Response + """ # noqa: E501 + total: StrictInt + rows: List[SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner] + __properties: ClassVar[List[str]] = ["total", "rows"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleBorrowHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleBorrowHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "rows": [SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner.py new file mode 100644 index 0000000..1d63f2c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + initial_loan_amount: StrictStr = Field(alias="initialLoanAmount") + collateral_coin: StrictStr = Field(alias="collateralCoin") + initial_collateral_amount: StrictStr = Field(alias="initialCollateralAmount") + borrow_time: StrictInt = Field(alias="borrowTime") + status: StrictStr + __properties: ClassVar[List[str]] = ["loanCoin", "initialLoanAmount", "collateralCoin", "initialCollateralAmount", "borrowTime", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "initialLoanAmount": obj.get("initialLoanAmount"), + "collateralCoin": obj.get("collateralCoin"), + "initialCollateralAmount": obj.get("initialCollateralAmount"), + "borrowTime": obj.get("borrowTime"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_borrow_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_borrow_post200_response.py new file mode 100644 index 0000000..89446c9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_borrow_post200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleBorrowPost200Response(BaseModel): + """ + SapiV2LoanFlexibleBorrowPost200Response + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + loan_amount: StrictStr = Field(alias="loanAmount") + collateral_coin: Optional[StrictStr] = Field(default=None, alias="collateralCoin") + collateral_amount: StrictStr = Field(alias="collateralAmount") + status: StrictStr + __properties: ClassVar[List[str]] = ["loanCoin", "loanAmount", "collateralCoin", "collateralAmount", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleBorrowPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleBorrowPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "loanAmount": obj.get("loanAmount"), + "collateralCoin": obj.get("collateralCoin"), + "collateralAmount": obj.get("collateralAmount"), + "status": obj.get("status") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_collateral_data_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_collateral_data_get200_response.py new file mode 100644 index 0000000..249e36b --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_collateral_data_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner import SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleCollateralDataGet200Response(BaseModel): + """ + SapiV2LoanFlexibleCollateralDataGet200Response + """ # noqa: E501 + rows: List[SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleCollateralDataGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleCollateralDataGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner.py new file mode 100644 index 0000000..de7dc67 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner(BaseModel): + """ + SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner + """ # noqa: E501 + collateral_coin: StrictStr = Field(alias="collateralCoin") + initial_ltv: StrictStr = Field(alias="initialLTV") + margin_call_ltv: StrictStr = Field(alias="marginCallLTV") + liquidation_ltv: StrictStr = Field(alias="liquidationLTV") + max_limit: StrictStr = Field(alias="maxLimit") + __properties: ClassVar[List[str]] = ["collateralCoin", "initialLTV", "marginCallLTV", "liquidationLTV", "maxLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "collateralCoin": obj.get("collateralCoin"), + "initialLTV": obj.get("initialLTV"), + "marginCallLTV": obj.get("marginCallLTV"), + "liquidationLTV": obj.get("liquidationLTV"), + "maxLimit": obj.get("maxLimit") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_loanable_data_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_loanable_data_get200_response.py new file mode 100644 index 0000000..c62166f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_loanable_data_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner import SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleLoanableDataGet200Response(BaseModel): + """ + SapiV2LoanFlexibleLoanableDataGet200Response + """ # noqa: E501 + rows: List[SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleLoanableDataGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleLoanableDataGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner.py new file mode 100644 index 0000000..2d0bee4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner(BaseModel): + """ + SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + flexible_interest_rate: StrictStr = Field(alias="flexibleInterestRate") + flexible_min_limit: StrictStr = Field(alias="flexibleMinLimit") + flexible_max_limit: StrictStr = Field(alias="flexibleMaxLimit") + __properties: ClassVar[List[str]] = ["loanCoin", "flexibleInterestRate", "flexibleMinLimit", "flexibleMaxLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "flexibleInterestRate": obj.get("flexibleInterestRate"), + "flexibleMinLimit": obj.get("flexibleMinLimit"), + "flexibleMaxLimit": obj.get("flexibleMaxLimit") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ltv_adjustment_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ltv_adjustment_history_get200_response.py new file mode 100644 index 0000000..ca12d30 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ltv_adjustment_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner import SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response(BaseModel): + """ + SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response + """ # noqa: E501 + rows: List[SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner.py new file mode 100644 index 0000000..e45e7d5 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + collateral_coin: StrictStr = Field(alias="collateralCoin") + direction: StrictStr + collateral_amount: StrictStr = Field(alias="collateralAmount") + pre_ltv: StrictStr = Field(alias="preLTV") + after_ltv: StrictStr = Field(alias="afterLTV") + adjust_time: StrictInt = Field(alias="adjustTime") + __properties: ClassVar[List[str]] = ["loanCoin", "collateralCoin", "direction", "collateralAmount", "preLTV", "afterLTV", "adjustTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "collateralCoin": obj.get("collateralCoin"), + "direction": obj.get("direction"), + "collateralAmount": obj.get("collateralAmount"), + "preLTV": obj.get("preLTV"), + "afterLTV": obj.get("afterLTV"), + "adjustTime": obj.get("adjustTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ongoing_orders_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ongoing_orders_get200_response.py new file mode 100644 index 0000000..f151469 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ongoing_orders_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner import SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleOngoingOrdersGet200Response(BaseModel): + """ + SapiV2LoanFlexibleOngoingOrdersGet200Response + """ # noqa: E501 + total: StrictInt + rows: List[SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner] + __properties: ClassVar[List[str]] = ["total", "rows"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleOngoingOrdersGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleOngoingOrdersGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "rows": [SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner.py new file mode 100644 index 0000000..292b6ab --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner(BaseModel): + """ + SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + total_debt: StrictStr = Field(alias="totalDebt") + collateral_coin: StrictStr = Field(alias="collateralCoin") + collateral_amount: StrictStr = Field(alias="collateralAmount") + current_ltv: StrictStr = Field(alias="currentLTV") + __properties: ClassVar[List[str]] = ["loanCoin", "totalDebt", "collateralCoin", "collateralAmount", "currentLTV"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "totalDebt": obj.get("totalDebt"), + "collateralCoin": obj.get("collateralCoin"), + "collateralAmount": obj.get("collateralAmount"), + "currentLTV": obj.get("currentLTV") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_repay_history_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_repay_history_get200_response.py new file mode 100644 index 0000000..2bc59fb --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_repay_history_get200_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v2_loan_flexible_repay_history_get200_response_rows_inner import SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleRepayHistoryGet200Response(BaseModel): + """ + SapiV2LoanFlexibleRepayHistoryGet200Response + """ # noqa: E501 + rows: List[SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner] + total: StrictInt + __properties: ClassVar[List[str]] = ["rows", "total"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleRepayHistoryGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in rows (list) + _items = [] + if self.rows: + for _item in self.rows: + if _item: + _items.append(_item.to_dict()) + _dict['rows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleRepayHistoryGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rows": [SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner.from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None, + "total": obj.get("total") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_repay_history_get200_response_rows_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_repay_history_get200_response_rows_inner.py new file mode 100644 index 0000000..6fc1fc3 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_repay_history_get200_response_rows_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner(BaseModel): + """ + SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + repay_amount: StrictStr = Field(alias="repayAmount") + collateral_coin: StrictStr = Field(alias="collateralCoin") + collateral_return: StrictStr = Field(alias="collateralReturn") + repay_status: StrictStr = Field(alias="repayStatus") + repay_time: StrictInt = Field(alias="repayTime") + __properties: ClassVar[List[str]] = ["loanCoin", "repayAmount", "collateralCoin", "collateralReturn", "repayStatus", "repayTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "repayAmount": obj.get("repayAmount"), + "collateralCoin": obj.get("collateralCoin"), + "collateralReturn": obj.get("collateralReturn"), + "repayStatus": obj.get("repayStatus"), + "repayTime": obj.get("repayTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_repay_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_repay_post200_response.py new file mode 100644 index 0000000..be27b6a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_loan_flexible_repay_post200_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2LoanFlexibleRepayPost200Response(BaseModel): + """ + SapiV2LoanFlexibleRepayPost200Response + """ # noqa: E501 + loan_coin: StrictStr = Field(alias="loanCoin") + collateral_coin: StrictStr = Field(alias="collateralCoin") + remaining_debt: StrictStr = Field(alias="remainingDebt") + remaining_collateral: StrictStr = Field(alias="remainingCollateral") + full_repayment: StrictBool = Field(alias="fullRepayment") + current_ltv: StrictStr = Field(alias="currentLTV") + repay_status: StrictStr = Field(description="Repaid, Repaying, Failed", alias="repayStatus") + __properties: ClassVar[List[str]] = ["loanCoin", "collateralCoin", "remainingDebt", "remainingCollateral", "fullRepayment", "currentLTV", "repayStatus"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleRepayPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2LoanFlexibleRepayPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loanCoin": obj.get("loanCoin"), + "collateralCoin": obj.get("collateralCoin"), + "remainingDebt": obj.get("remainingDebt"), + "remainingCollateral": obj.get("remainingCollateral"), + "fullRepayment": obj.get("fullRepayment"), + "currentLTV": obj.get("currentLTV"), + "repayStatus": obj.get("repayStatus") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_futures_account_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_futures_account_get200_response.py new file mode 100644 index 0000000..7b72c58 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_futures_account_get200_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from openapi_client.models.sub_account_coin_futures_details import SubAccountCOINFuturesDetails +from openapi_client.models.sub_account_usdt_futures_details import SubAccountUSDTFuturesDetails +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SAPIV2SUBACCOUNTFUTURESACCOUNTGET200RESPONSE_ONE_OF_SCHEMAS = ["SubAccountCOINFuturesDetails", "SubAccountUSDTFuturesDetails"] + +class SapiV2SubAccountFuturesAccountGet200Response(BaseModel): + """ + SapiV2SubAccountFuturesAccountGet200Response + """ + # data type: SubAccountUSDTFuturesDetails + oneof_schema_1_validator: Optional[SubAccountUSDTFuturesDetails] = None + # data type: SubAccountCOINFuturesDetails + oneof_schema_2_validator: Optional[SubAccountCOINFuturesDetails] = None + actual_instance: Optional[Union[SubAccountCOINFuturesDetails, SubAccountUSDTFuturesDetails]] = None + one_of_schemas: Set[str] = { "SubAccountCOINFuturesDetails", "SubAccountUSDTFuturesDetails" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SapiV2SubAccountFuturesAccountGet200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: SubAccountUSDTFuturesDetails + if not isinstance(v, SubAccountUSDTFuturesDetails): + error_messages.append(f"Error! Input type `{type(v)}` is not `SubAccountUSDTFuturesDetails`") + else: + match += 1 + # validate data type: SubAccountCOINFuturesDetails + if not isinstance(v, SubAccountCOINFuturesDetails): + error_messages.append(f"Error! Input type `{type(v)}` is not `SubAccountCOINFuturesDetails`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SapiV2SubAccountFuturesAccountGet200Response with oneOf schemas: SubAccountCOINFuturesDetails, SubAccountUSDTFuturesDetails. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SapiV2SubAccountFuturesAccountGet200Response with oneOf schemas: SubAccountCOINFuturesDetails, SubAccountUSDTFuturesDetails. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into SubAccountUSDTFuturesDetails + try: + instance.actual_instance = SubAccountUSDTFuturesDetails.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SubAccountCOINFuturesDetails + try: + instance.actual_instance = SubAccountCOINFuturesDetails.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SapiV2SubAccountFuturesAccountGet200Response with oneOf schemas: SubAccountCOINFuturesDetails, SubAccountUSDTFuturesDetails. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SapiV2SubAccountFuturesAccountGet200Response with oneOf schemas: SubAccountCOINFuturesDetails, SubAccountUSDTFuturesDetails. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], SubAccountCOINFuturesDetails, SubAccountUSDTFuturesDetails]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_futures_account_summary_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_futures_account_summary_get200_response.py new file mode 100644 index 0000000..45a005f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_futures_account_summary_get200_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from openapi_client.models.sub_account_coin_futures_summary import SubAccountCOINFuturesSummary +from openapi_client.models.sub_account_usdt_futures_summary import SubAccountUSDTFuturesSummary +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SAPIV2SUBACCOUNTFUTURESACCOUNTSUMMARYGET200RESPONSE_ONE_OF_SCHEMAS = ["SubAccountCOINFuturesSummary", "SubAccountUSDTFuturesSummary"] + +class SapiV2SubAccountFuturesAccountSummaryGet200Response(BaseModel): + """ + SapiV2SubAccountFuturesAccountSummaryGet200Response + """ + # data type: SubAccountUSDTFuturesSummary + oneof_schema_1_validator: Optional[SubAccountUSDTFuturesSummary] = None + # data type: SubAccountCOINFuturesSummary + oneof_schema_2_validator: Optional[SubAccountCOINFuturesSummary] = None + actual_instance: Optional[Union[SubAccountCOINFuturesSummary, SubAccountUSDTFuturesSummary]] = None + one_of_schemas: Set[str] = { "SubAccountCOINFuturesSummary", "SubAccountUSDTFuturesSummary" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SapiV2SubAccountFuturesAccountSummaryGet200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: SubAccountUSDTFuturesSummary + if not isinstance(v, SubAccountUSDTFuturesSummary): + error_messages.append(f"Error! Input type `{type(v)}` is not `SubAccountUSDTFuturesSummary`") + else: + match += 1 + # validate data type: SubAccountCOINFuturesSummary + if not isinstance(v, SubAccountCOINFuturesSummary): + error_messages.append(f"Error! Input type `{type(v)}` is not `SubAccountCOINFuturesSummary`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SapiV2SubAccountFuturesAccountSummaryGet200Response with oneOf schemas: SubAccountCOINFuturesSummary, SubAccountUSDTFuturesSummary. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SapiV2SubAccountFuturesAccountSummaryGet200Response with oneOf schemas: SubAccountCOINFuturesSummary, SubAccountUSDTFuturesSummary. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into SubAccountUSDTFuturesSummary + try: + instance.actual_instance = SubAccountUSDTFuturesSummary.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SubAccountCOINFuturesSummary + try: + instance.actual_instance = SubAccountCOINFuturesSummary.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SapiV2SubAccountFuturesAccountSummaryGet200Response with oneOf schemas: SubAccountCOINFuturesSummary, SubAccountUSDTFuturesSummary. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SapiV2SubAccountFuturesAccountSummaryGet200Response with oneOf schemas: SubAccountCOINFuturesSummary, SubAccountUSDTFuturesSummary. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], SubAccountCOINFuturesSummary, SubAccountUSDTFuturesSummary]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_futures_position_risk_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_futures_position_risk_get200_response.py new file mode 100644 index 0000000..c6767fa --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_futures_position_risk_get200_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from openapi_client.models.sub_account_coin_futures_position_risk import SubAccountCOINFuturesPositionRisk +from openapi_client.models.sub_account_usdt_futures_position_risk import SubAccountUSDTFuturesPositionRisk +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SAPIV2SUBACCOUNTFUTURESPOSITIONRISKGET200RESPONSE_ONE_OF_SCHEMAS = ["SubAccountCOINFuturesPositionRisk", "SubAccountUSDTFuturesPositionRisk"] + +class SapiV2SubAccountFuturesPositionRiskGet200Response(BaseModel): + """ + SapiV2SubAccountFuturesPositionRiskGet200Response + """ + # data type: SubAccountUSDTFuturesPositionRisk + oneof_schema_1_validator: Optional[SubAccountUSDTFuturesPositionRisk] = None + # data type: SubAccountCOINFuturesPositionRisk + oneof_schema_2_validator: Optional[SubAccountCOINFuturesPositionRisk] = None + actual_instance: Optional[Union[SubAccountCOINFuturesPositionRisk, SubAccountUSDTFuturesPositionRisk]] = None + one_of_schemas: Set[str] = { "SubAccountCOINFuturesPositionRisk", "SubAccountUSDTFuturesPositionRisk" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SapiV2SubAccountFuturesPositionRiskGet200Response.model_construct() + error_messages = [] + match = 0 + # validate data type: SubAccountUSDTFuturesPositionRisk + if not isinstance(v, SubAccountUSDTFuturesPositionRisk): + error_messages.append(f"Error! Input type `{type(v)}` is not `SubAccountUSDTFuturesPositionRisk`") + else: + match += 1 + # validate data type: SubAccountCOINFuturesPositionRisk + if not isinstance(v, SubAccountCOINFuturesPositionRisk): + error_messages.append(f"Error! Input type `{type(v)}` is not `SubAccountCOINFuturesPositionRisk`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SapiV2SubAccountFuturesPositionRiskGet200Response with oneOf schemas: SubAccountCOINFuturesPositionRisk, SubAccountUSDTFuturesPositionRisk. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SapiV2SubAccountFuturesPositionRiskGet200Response with oneOf schemas: SubAccountCOINFuturesPositionRisk, SubAccountUSDTFuturesPositionRisk. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into SubAccountUSDTFuturesPositionRisk + try: + instance.actual_instance = SubAccountUSDTFuturesPositionRisk.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SubAccountCOINFuturesPositionRisk + try: + instance.actual_instance = SubAccountCOINFuturesPositionRisk.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SapiV2SubAccountFuturesPositionRiskGet200Response with oneOf schemas: SubAccountCOINFuturesPositionRisk, SubAccountUSDTFuturesPositionRisk. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SapiV2SubAccountFuturesPositionRiskGet200Response with oneOf schemas: SubAccountCOINFuturesPositionRisk, SubAccountUSDTFuturesPositionRisk. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], SubAccountCOINFuturesPositionRisk, SubAccountUSDTFuturesPositionRisk]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response.py new file mode 100644 index 0000000..22b1e36 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV2SubAccountSubAccountApiIpRestrictionPost200Response(BaseModel): + """ + SapiV2SubAccountSubAccountApiIpRestrictionPost200Response + """ # noqa: E501 + status: StrictStr + ip_list: List[StrictStr] = Field(alias="ipList") + update_time: StrictInt = Field(alias="updateTime") + api_key: StrictStr = Field(alias="apiKey") + __properties: ClassVar[List[str]] = ["status", "ipList", "updateTime", "apiKey"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV2SubAccountSubAccountApiIpRestrictionPost200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV2SubAccountSubAccountApiIpRestrictionPost200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "ipList": obj.get("ipList"), + "updateTime": obj.get("updateTime"), + "apiKey": obj.get("apiKey") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v3_asset_get_user_asset_post200_response_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v3_asset_get_user_asset_post200_response_inner.py new file mode 100644 index 0000000..270fcf9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v3_asset_get_user_asset_post200_response_inner.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV3AssetGetUserAssetPost200ResponseInner(BaseModel): + """ + SapiV3AssetGetUserAssetPost200ResponseInner + """ # noqa: E501 + asset: StrictStr + free: StrictStr + locked: StrictStr + freeze: StrictStr + withdrawing: StrictStr + ipoable: StrictStr + btc_valuation: StrictStr = Field(alias="btcValuation") + __properties: ClassVar[List[str]] = ["asset", "free", "locked", "freeze", "withdrawing", "ipoable", "btcValuation"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV3AssetGetUserAssetPost200ResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV3AssetGetUserAssetPost200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "free": obj.get("free"), + "locked": obj.get("locked"), + "freeze": obj.get("freeze"), + "withdrawing": obj.get("withdrawing"), + "ipoable": obj.get("ipoable"), + "btcValuation": obj.get("btcValuation") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v3_sub_account_assets_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v3_sub_account_assets_get200_response.py new file mode 100644 index 0000000..c747a2c --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v3_sub_account_assets_get200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v3_sub_account_assets_get200_response_balances_inner import SapiV3SubAccountAssetsGet200ResponseBalancesInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV3SubAccountAssetsGet200Response(BaseModel): + """ + SapiV3SubAccountAssetsGet200Response + """ # noqa: E501 + balances: List[SapiV3SubAccountAssetsGet200ResponseBalancesInner] + __properties: ClassVar[List[str]] = ["balances"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV3SubAccountAssetsGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in balances (list) + _items = [] + if self.balances: + for _item in self.balances: + if _item: + _items.append(_item.to_dict()) + _dict['balances'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV3SubAccountAssetsGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "balances": [SapiV3SubAccountAssetsGet200ResponseBalancesInner.from_dict(_item) for _item in obj["balances"]] if obj.get("balances") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v3_sub_account_assets_get200_response_balances_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v3_sub_account_assets_get200_response_balances_inner.py new file mode 100644 index 0000000..e9152e0 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v3_sub_account_assets_get200_response_balances_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV3SubAccountAssetsGet200ResponseBalancesInner(BaseModel): + """ + SapiV3SubAccountAssetsGet200ResponseBalancesInner + """ # noqa: E501 + asset: StrictStr + free: StrictInt + locked: StrictInt + __properties: ClassVar[List[str]] = ["asset", "free", "locked"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV3SubAccountAssetsGet200ResponseBalancesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV3SubAccountAssetsGet200ResponseBalancesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "free": obj.get("free"), + "locked": obj.get("locked") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v4_sub_account_assets_get200_response.py b/target/python/binance_openapi/openapi_client/models/sapi_v4_sub_account_assets_get200_response.py new file mode 100644 index 0000000..040aa2f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v4_sub_account_assets_get200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v4_sub_account_assets_get200_response_balances_inner import SapiV4SubAccountAssetsGet200ResponseBalancesInner +from typing import Optional, Set +from typing_extensions import Self + +class SapiV4SubAccountAssetsGet200Response(BaseModel): + """ + SapiV4SubAccountAssetsGet200Response + """ # noqa: E501 + balances: List[SapiV4SubAccountAssetsGet200ResponseBalancesInner] + __properties: ClassVar[List[str]] = ["balances"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV4SubAccountAssetsGet200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in balances (list) + _items = [] + if self.balances: + for _item in self.balances: + if _item: + _items.append(_item.to_dict()) + _dict['balances'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV4SubAccountAssetsGet200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "balances": [SapiV4SubAccountAssetsGet200ResponseBalancesInner.from_dict(_item) for _item in obj["balances"]] if obj.get("balances") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sapi_v4_sub_account_assets_get200_response_balances_inner.py b/target/python/binance_openapi/openapi_client/models/sapi_v4_sub_account_assets_get200_response_balances_inner.py new file mode 100644 index 0000000..39a3c14 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sapi_v4_sub_account_assets_get200_response_balances_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SapiV4SubAccountAssetsGet200ResponseBalancesInner(BaseModel): + """ + SapiV4SubAccountAssetsGet200ResponseBalancesInner + """ # noqa: E501 + asset: StrictStr + free: StrictStr + locked: StrictStr + __properties: ClassVar[List[str]] = ["asset", "free", "locked"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SapiV4SubAccountAssetsGet200ResponseBalancesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SapiV4SubAccountAssetsGet200ResponseBalancesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "free": obj.get("free"), + "locked": obj.get("locked") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/snapshot_futures.py b/target/python/binance_openapi/openapi_client/models/snapshot_futures.py new file mode 100644 index 0000000..79e1d9d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/snapshot_futures.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.snapshot_futures_snapshot_vos_inner import SnapshotFuturesSnapshotVosInner +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotFutures(BaseModel): + """ + SnapshotFutures + """ # noqa: E501 + code: StrictInt + msg: StrictStr + snapshot_vos: List[SnapshotFuturesSnapshotVosInner] = Field(alias="snapshotVos") + __properties: ClassVar[List[str]] = ["code", "msg", "snapshotVos"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotFutures from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in snapshot_vos (list) + _items = [] + if self.snapshot_vos: + for _item in self.snapshot_vos: + if _item: + _items.append(_item.to_dict()) + _dict['snapshotVos'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotFutures from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "snapshotVos": [SnapshotFuturesSnapshotVosInner.from_dict(_item) for _item in obj["snapshotVos"]] if obj.get("snapshotVos") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner.py b/target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner.py new file mode 100644 index 0000000..c3ab6f7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data import SnapshotFuturesSnapshotVosInnerData +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotFuturesSnapshotVosInner(BaseModel): + """ + SnapshotFuturesSnapshotVosInner + """ # noqa: E501 + data: SnapshotFuturesSnapshotVosInnerData + type: StrictStr + update_time: StrictInt = Field(alias="updateTime") + __properties: ClassVar[List[str]] = ["data", "type", "updateTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotFuturesSnapshotVosInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotFuturesSnapshotVosInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": SnapshotFuturesSnapshotVosInnerData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "type": obj.get("type"), + "updateTime": obj.get("updateTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner_data.py b/target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner_data.py new file mode 100644 index 0000000..4fa6352 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner_data.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data_assets_inner import SnapshotFuturesSnapshotVosInnerDataAssetsInner +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data_position_inner import SnapshotFuturesSnapshotVosInnerDataPositionInner +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotFuturesSnapshotVosInnerData(BaseModel): + """ + SnapshotFuturesSnapshotVosInnerData + """ # noqa: E501 + assets: List[SnapshotFuturesSnapshotVosInnerDataAssetsInner] + position: List[SnapshotFuturesSnapshotVosInnerDataPositionInner] + __properties: ClassVar[List[str]] = ["assets", "position"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotFuturesSnapshotVosInnerData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in assets (list) + _items = [] + if self.assets: + for _item in self.assets: + if _item: + _items.append(_item.to_dict()) + _dict['assets'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in position (list) + _items = [] + if self.position: + for _item in self.position: + if _item: + _items.append(_item.to_dict()) + _dict['position'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotFuturesSnapshotVosInnerData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assets": [SnapshotFuturesSnapshotVosInnerDataAssetsInner.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None, + "position": [SnapshotFuturesSnapshotVosInnerDataPositionInner.from_dict(_item) for _item in obj["position"]] if obj.get("position") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner_data_assets_inner.py b/target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner_data_assets_inner.py new file mode 100644 index 0000000..4862157 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner_data_assets_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotFuturesSnapshotVosInnerDataAssetsInner(BaseModel): + """ + SnapshotFuturesSnapshotVosInnerDataAssetsInner + """ # noqa: E501 + asset: StrictStr + margin_balance: StrictStr = Field(alias="marginBalance") + wallet_balance: StrictStr = Field(alias="walletBalance") + __properties: ClassVar[List[str]] = ["asset", "marginBalance", "walletBalance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotFuturesSnapshotVosInnerDataAssetsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotFuturesSnapshotVosInnerDataAssetsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "marginBalance": obj.get("marginBalance"), + "walletBalance": obj.get("walletBalance") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner_data_position_inner.py b/target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner_data_position_inner.py new file mode 100644 index 0000000..a634885 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/snapshot_futures_snapshot_vos_inner_data_position_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotFuturesSnapshotVosInnerDataPositionInner(BaseModel): + """ + SnapshotFuturesSnapshotVosInnerDataPositionInner + """ # noqa: E501 + entry_price: StrictStr = Field(alias="entryPrice") + mark_price: StrictStr = Field(alias="markPrice") + position_amt: StrictStr = Field(alias="positionAmt") + symbol: StrictStr + un_realized_profit: StrictStr = Field(alias="unRealizedProfit") + __properties: ClassVar[List[str]] = ["entryPrice", "markPrice", "positionAmt", "symbol", "unRealizedProfit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotFuturesSnapshotVosInnerDataPositionInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotFuturesSnapshotVosInnerDataPositionInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "entryPrice": obj.get("entryPrice"), + "markPrice": obj.get("markPrice"), + "positionAmt": obj.get("positionAmt"), + "symbol": obj.get("symbol"), + "unRealizedProfit": obj.get("unRealizedProfit") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/snapshot_margin.py b/target/python/binance_openapi/openapi_client/models/snapshot_margin.py new file mode 100644 index 0000000..b14efda --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/snapshot_margin.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.snapshot_margin_snapshot_vos_inner import SnapshotMarginSnapshotVosInner +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotMargin(BaseModel): + """ + SnapshotMargin + """ # noqa: E501 + code: StrictInt + msg: StrictStr + snapshot_vos: List[SnapshotMarginSnapshotVosInner] = Field(alias="snapshotVos") + __properties: ClassVar[List[str]] = ["code", "msg", "snapshotVos"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotMargin from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in snapshot_vos (list) + _items = [] + if self.snapshot_vos: + for _item in self.snapshot_vos: + if _item: + _items.append(_item.to_dict()) + _dict['snapshotVos'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotMargin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "snapshotVos": [SnapshotMarginSnapshotVosInner.from_dict(_item) for _item in obj["snapshotVos"]] if obj.get("snapshotVos") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/snapshot_margin_snapshot_vos_inner.py b/target/python/binance_openapi/openapi_client/models/snapshot_margin_snapshot_vos_inner.py new file mode 100644 index 0000000..98db57a --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/snapshot_margin_snapshot_vos_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.snapshot_margin_snapshot_vos_inner_data import SnapshotMarginSnapshotVosInnerData +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotMarginSnapshotVosInner(BaseModel): + """ + SnapshotMarginSnapshotVosInner + """ # noqa: E501 + data: SnapshotMarginSnapshotVosInnerData + type: StrictStr + update_time: StrictInt = Field(alias="updateTime") + __properties: ClassVar[List[str]] = ["data", "type", "updateTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotMarginSnapshotVosInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotMarginSnapshotVosInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": SnapshotMarginSnapshotVosInnerData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "type": obj.get("type"), + "updateTime": obj.get("updateTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/snapshot_margin_snapshot_vos_inner_data.py b/target/python/binance_openapi/openapi_client/models/snapshot_margin_snapshot_vos_inner_data.py new file mode 100644 index 0000000..c3707d5 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/snapshot_margin_snapshot_vos_inner_data.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.snapshot_margin_snapshot_vos_inner_data_user_assets_inner import SnapshotMarginSnapshotVosInnerDataUserAssetsInner +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotMarginSnapshotVosInnerData(BaseModel): + """ + SnapshotMarginSnapshotVosInnerData + """ # noqa: E501 + margin_level: StrictStr = Field(alias="marginLevel") + total_asset_of_btc: StrictStr = Field(alias="totalAssetOfBtc") + total_liability_of_btc: StrictStr = Field(alias="totalLiabilityOfBtc") + total_net_asset_of_btc: StrictStr = Field(alias="totalNetAssetOfBtc") + user_assets: List[SnapshotMarginSnapshotVosInnerDataUserAssetsInner] = Field(alias="userAssets") + __properties: ClassVar[List[str]] = ["marginLevel", "totalAssetOfBtc", "totalLiabilityOfBtc", "totalNetAssetOfBtc", "userAssets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotMarginSnapshotVosInnerData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in user_assets (list) + _items = [] + if self.user_assets: + for _item in self.user_assets: + if _item: + _items.append(_item.to_dict()) + _dict['userAssets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotMarginSnapshotVosInnerData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "marginLevel": obj.get("marginLevel"), + "totalAssetOfBtc": obj.get("totalAssetOfBtc"), + "totalLiabilityOfBtc": obj.get("totalLiabilityOfBtc"), + "totalNetAssetOfBtc": obj.get("totalNetAssetOfBtc"), + "userAssets": [SnapshotMarginSnapshotVosInnerDataUserAssetsInner.from_dict(_item) for _item in obj["userAssets"]] if obj.get("userAssets") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/snapshot_margin_snapshot_vos_inner_data_user_assets_inner.py b/target/python/binance_openapi/openapi_client/models/snapshot_margin_snapshot_vos_inner_data_user_assets_inner.py new file mode 100644 index 0000000..ed143c9 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/snapshot_margin_snapshot_vos_inner_data_user_assets_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotMarginSnapshotVosInnerDataUserAssetsInner(BaseModel): + """ + SnapshotMarginSnapshotVosInnerDataUserAssetsInner + """ # noqa: E501 + asset: StrictStr + borrowed: StrictStr + free: StrictStr + interest: StrictStr + locked: StrictStr + net_asset: StrictStr = Field(alias="netAsset") + __properties: ClassVar[List[str]] = ["asset", "borrowed", "free", "interest", "locked", "netAsset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotMarginSnapshotVosInnerDataUserAssetsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotMarginSnapshotVosInnerDataUserAssetsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "borrowed": obj.get("borrowed"), + "free": obj.get("free"), + "interest": obj.get("interest"), + "locked": obj.get("locked"), + "netAsset": obj.get("netAsset") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/snapshot_spot.py b/target/python/binance_openapi/openapi_client/models/snapshot_spot.py new file mode 100644 index 0000000..38ea021 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/snapshot_spot.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.snapshot_spot_snapshot_vos_inner import SnapshotSpotSnapshotVosInner +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotSpot(BaseModel): + """ + SnapshotSpot + """ # noqa: E501 + code: StrictInt + msg: StrictStr + snapshot_vos: List[SnapshotSpotSnapshotVosInner] = Field(alias="snapshotVos") + __properties: ClassVar[List[str]] = ["code", "msg", "snapshotVos"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotSpot from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in snapshot_vos (list) + _items = [] + if self.snapshot_vos: + for _item in self.snapshot_vos: + if _item: + _items.append(_item.to_dict()) + _dict['snapshotVos'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotSpot from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "msg": obj.get("msg"), + "snapshotVos": [SnapshotSpotSnapshotVosInner.from_dict(_item) for _item in obj["snapshotVos"]] if obj.get("snapshotVos") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/snapshot_spot_snapshot_vos_inner.py b/target/python/binance_openapi/openapi_client/models/snapshot_spot_snapshot_vos_inner.py new file mode 100644 index 0000000..f414453 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/snapshot_spot_snapshot_vos_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.snapshot_spot_snapshot_vos_inner_data import SnapshotSpotSnapshotVosInnerData +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotSpotSnapshotVosInner(BaseModel): + """ + SnapshotSpotSnapshotVosInner + """ # noqa: E501 + data: SnapshotSpotSnapshotVosInnerData + type: StrictStr + update_time: StrictInt = Field(alias="updateTime") + __properties: ClassVar[List[str]] = ["data", "type", "updateTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotSpotSnapshotVosInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotSpotSnapshotVosInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": SnapshotSpotSnapshotVosInnerData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "type": obj.get("type"), + "updateTime": obj.get("updateTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/snapshot_spot_snapshot_vos_inner_data.py b/target/python/binance_openapi/openapi_client/models/snapshot_spot_snapshot_vos_inner_data.py new file mode 100644 index 0000000..88fd651 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/snapshot_spot_snapshot_vos_inner_data.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.snapshot_spot_snapshot_vos_inner_data_balances_inner import SnapshotSpotSnapshotVosInnerDataBalancesInner +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotSpotSnapshotVosInnerData(BaseModel): + """ + SnapshotSpotSnapshotVosInnerData + """ # noqa: E501 + balances: List[SnapshotSpotSnapshotVosInnerDataBalancesInner] + total_asset_of_btc: StrictStr = Field(alias="totalAssetOfBtc") + __properties: ClassVar[List[str]] = ["balances", "totalAssetOfBtc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotSpotSnapshotVosInnerData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in balances (list) + _items = [] + if self.balances: + for _item in self.balances: + if _item: + _items.append(_item.to_dict()) + _dict['balances'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotSpotSnapshotVosInnerData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "balances": [SnapshotSpotSnapshotVosInnerDataBalancesInner.from_dict(_item) for _item in obj["balances"]] if obj.get("balances") is not None else None, + "totalAssetOfBtc": obj.get("totalAssetOfBtc") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/snapshot_spot_snapshot_vos_inner_data_balances_inner.py b/target/python/binance_openapi/openapi_client/models/snapshot_spot_snapshot_vos_inner_data_balances_inner.py new file mode 100644 index 0000000..eaafb42 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/snapshot_spot_snapshot_vos_inner_data_balances_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotSpotSnapshotVosInnerDataBalancesInner(BaseModel): + """ + SnapshotSpotSnapshotVosInnerDataBalancesInner + """ # noqa: E501 + asset: StrictStr + free: StrictStr + locked: StrictStr + __properties: ClassVar[List[str]] = ["asset", "free", "locked"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotSpotSnapshotVosInnerDataBalancesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotSpotSnapshotVosInnerDataBalancesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "free": obj.get("free"), + "locked": obj.get("locked") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_details.py b/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_details.py new file mode 100644 index 0000000..9a19045 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_details.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sub_account_coin_futures_details_assets_inner import SubAccountCOINFuturesDetailsAssetsInner +from typing import Optional, Set +from typing_extensions import Self + +class SubAccountCOINFuturesDetails(BaseModel): + """ + SubAccountCOINFuturesDetails + """ # noqa: E501 + email: StrictStr + assets: List[SubAccountCOINFuturesDetailsAssetsInner] + can_deposit: StrictBool = Field(alias="canDeposit") + can_trade: StrictBool = Field(alias="canTrade") + can_withdraw: StrictBool = Field(alias="canWithdraw") + fee_tier: StrictInt = Field(alias="feeTier") + update_time: StrictInt = Field(alias="updateTime") + __properties: ClassVar[List[str]] = ["email", "assets", "canDeposit", "canTrade", "canWithdraw", "feeTier", "updateTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubAccountCOINFuturesDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in assets (list) + _items = [] + if self.assets: + for _item in self.assets: + if _item: + _items.append(_item.to_dict()) + _dict['assets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubAccountCOINFuturesDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "assets": [SubAccountCOINFuturesDetailsAssetsInner.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None, + "canDeposit": obj.get("canDeposit"), + "canTrade": obj.get("canTrade"), + "canWithdraw": obj.get("canWithdraw"), + "feeTier": obj.get("feeTier"), + "updateTime": obj.get("updateTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_details_assets_inner.py b/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_details_assets_inner.py new file mode 100644 index 0000000..a186ee2 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_details_assets_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SubAccountCOINFuturesDetailsAssetsInner(BaseModel): + """ + SubAccountCOINFuturesDetailsAssetsInner + """ # noqa: E501 + asset: StrictStr + initial_margin: StrictStr = Field(alias="initialMargin") + maintenance_margin: StrictStr = Field(alias="maintenanceMargin") + margin_balance: StrictStr = Field(alias="marginBalance") + max_withdraw_amount: StrictStr = Field(alias="maxWithdrawAmount") + open_order_initial_margin: StrictStr = Field(alias="openOrderInitialMargin") + position_initial_margin: StrictStr = Field(alias="positionInitialMargin") + unrealized_profit: StrictStr = Field(alias="unrealizedProfit") + wallet_balance: StrictStr = Field(alias="walletBalance") + __properties: ClassVar[List[str]] = ["asset", "initialMargin", "maintenanceMargin", "marginBalance", "maxWithdrawAmount", "openOrderInitialMargin", "positionInitialMargin", "unrealizedProfit", "walletBalance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubAccountCOINFuturesDetailsAssetsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubAccountCOINFuturesDetailsAssetsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": obj.get("asset"), + "initialMargin": obj.get("initialMargin"), + "maintenanceMargin": obj.get("maintenanceMargin"), + "marginBalance": obj.get("marginBalance"), + "maxWithdrawAmount": obj.get("maxWithdrawAmount"), + "openOrderInitialMargin": obj.get("openOrderInitialMargin"), + "positionInitialMargin": obj.get("positionInitialMargin"), + "unrealizedProfit": obj.get("unrealizedProfit"), + "walletBalance": obj.get("walletBalance") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_position_risk.py b/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_position_risk.py new file mode 100644 index 0000000..cbf29b8 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_position_risk.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner import SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner +from typing import Optional, Set +from typing_extensions import Self + +class SubAccountCOINFuturesPositionRisk(BaseModel): + """ + SubAccountCOINFuturesPositionRisk + """ # noqa: E501 + delivery_position_risk_vos: List[SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner] = Field(alias="deliveryPositionRiskVos") + __properties: ClassVar[List[str]] = ["deliveryPositionRiskVos"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubAccountCOINFuturesPositionRisk from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in delivery_position_risk_vos (list) + _items = [] + if self.delivery_position_risk_vos: + for _item in self.delivery_position_risk_vos: + if _item: + _items.append(_item.to_dict()) + _dict['deliveryPositionRiskVos'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubAccountCOINFuturesPositionRisk from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deliveryPositionRiskVos": [SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner.from_dict(_item) for _item in obj["deliveryPositionRiskVos"]] if obj.get("deliveryPositionRiskVos") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.py b/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.py new file mode 100644 index 0000000..4a0e635 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner(BaseModel): + """ + SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner + """ # noqa: E501 + entry_price: StrictStr = Field(alias="entryPrice") + mark_price: StrictStr = Field(alias="markPrice") + leverage: StrictStr + isolated: StrictStr + isolated_wallet: StrictStr = Field(alias="isolatedWallet") + isolated_margin: StrictStr = Field(alias="isolatedMargin") + is_auto_add_margin: StrictStr = Field(alias="isAutoAddMargin") + position_side: StrictStr = Field(alias="positionSide") + position_amount: StrictStr = Field(alias="positionAmount") + symbol: StrictStr + unrealized_profit: StrictStr = Field(alias="unrealizedProfit") + __properties: ClassVar[List[str]] = ["entryPrice", "markPrice", "leverage", "isolated", "isolatedWallet", "isolatedMargin", "isAutoAddMargin", "positionSide", "positionAmount", "symbol", "unrealizedProfit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "entryPrice": obj.get("entryPrice"), + "markPrice": obj.get("markPrice"), + "leverage": obj.get("leverage"), + "isolated": obj.get("isolated"), + "isolatedWallet": obj.get("isolatedWallet"), + "isolatedMargin": obj.get("isolatedMargin"), + "isAutoAddMargin": obj.get("isAutoAddMargin"), + "positionSide": obj.get("positionSide"), + "positionAmount": obj.get("positionAmount"), + "symbol": obj.get("symbol"), + "unrealizedProfit": obj.get("unrealizedProfit") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_summary.py b/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_summary.py new file mode 100644 index 0000000..8a5fc58 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_summary.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp import SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp +from typing import Optional, Set +from typing_extensions import Self + +class SubAccountCOINFuturesSummary(BaseModel): + """ + SubAccountCOINFuturesSummary + """ # noqa: E501 + delivery_account_summary_resp: SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp = Field(alias="deliveryAccountSummaryResp") + __properties: ClassVar[List[str]] = ["deliveryAccountSummaryResp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubAccountCOINFuturesSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of delivery_account_summary_resp + if self.delivery_account_summary_resp: + _dict['deliveryAccountSummaryResp'] = self.delivery_account_summary_resp.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubAccountCOINFuturesSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deliveryAccountSummaryResp": SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp.from_dict(obj["deliveryAccountSummaryResp"]) if obj.get("deliveryAccountSummaryResp") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_summary_delivery_account_summary_resp.py b/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_summary_delivery_account_summary_resp.py new file mode 100644 index 0000000..00fce6e --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_summary_delivery_account_summary_resp.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner import SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner +from typing import Optional, Set +from typing_extensions import Self + +class SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp(BaseModel): + """ + SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp + """ # noqa: E501 + total_margin_balance_of_btc: StrictStr = Field(alias="totalMarginBalanceOfBTC") + total_unrealized_profit_of_btc: StrictStr = Field(alias="totalUnrealizedProfitOfBTC") + total_wallet_balance_of_btc: StrictStr = Field(alias="totalWalletBalanceOfBTC") + asset: StrictStr + sub_account_list: List[SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner] = Field(alias="subAccountList") + __properties: ClassVar[List[str]] = ["totalMarginBalanceOfBTC", "totalUnrealizedProfitOfBTC", "totalWalletBalanceOfBTC", "asset", "subAccountList"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in sub_account_list (list) + _items = [] + if self.sub_account_list: + for _item in self.sub_account_list: + if _item: + _items.append(_item.to_dict()) + _dict['subAccountList'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalMarginBalanceOfBTC": obj.get("totalMarginBalanceOfBTC"), + "totalUnrealizedProfitOfBTC": obj.get("totalUnrealizedProfitOfBTC"), + "totalWalletBalanceOfBTC": obj.get("totalWalletBalanceOfBTC"), + "asset": obj.get("asset"), + "subAccountList": [SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner.from_dict(_item) for _item in obj["subAccountList"]] if obj.get("subAccountList") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.py b/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.py new file mode 100644 index 0000000..aed608f --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner(BaseModel): + """ + SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner + """ # noqa: E501 + email: StrictStr + total_margin_balance: StrictStr = Field(alias="totalMarginBalance") + total_unrealized_profit: StrictStr = Field(alias="totalUnrealizedProfit") + total_wallet_balance: StrictStr = Field(alias="totalWalletBalance") + asset: StrictStr + __properties: ClassVar[List[str]] = ["email", "totalMarginBalance", "totalUnrealizedProfit", "totalWalletBalance", "asset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "totalMarginBalance": obj.get("totalMarginBalance"), + "totalUnrealizedProfit": obj.get("totalUnrealizedProfit"), + "totalWalletBalance": obj.get("totalWalletBalance"), + "asset": obj.get("asset") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_details.py b/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_details.py new file mode 100644 index 0000000..eba5412 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_details.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sub_account_usdt_futures_details_future_account_resp import SubAccountUSDTFuturesDetailsFutureAccountResp +from typing import Optional, Set +from typing_extensions import Self + +class SubAccountUSDTFuturesDetails(BaseModel): + """ + SubAccountUSDTFuturesDetails + """ # noqa: E501 + future_account_resp: SubAccountUSDTFuturesDetailsFutureAccountResp = Field(alias="futureAccountResp") + __properties: ClassVar[List[str]] = ["futureAccountResp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubAccountUSDTFuturesDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of future_account_resp + if self.future_account_resp: + _dict['futureAccountResp'] = self.future_account_resp.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubAccountUSDTFuturesDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "futureAccountResp": SubAccountUSDTFuturesDetailsFutureAccountResp.from_dict(obj["futureAccountResp"]) if obj.get("futureAccountResp") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_details_future_account_resp.py b/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_details_future_account_resp.py new file mode 100644 index 0000000..8c85e80 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_details_future_account_resp.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_sub_account_futures_account_get200_response_assets_inner import SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner +from typing import Optional, Set +from typing_extensions import Self + +class SubAccountUSDTFuturesDetailsFutureAccountResp(BaseModel): + """ + SubAccountUSDTFuturesDetailsFutureAccountResp + """ # noqa: E501 + email: StrictStr + assets: List[SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner] + can_deposit: StrictBool = Field(alias="canDeposit") + can_trade: StrictBool = Field(alias="canTrade") + can_withdraw: StrictBool = Field(alias="canWithdraw") + fee_tier: StrictInt = Field(alias="feeTier") + max_withdraw_amount: StrictStr = Field(alias="maxWithdrawAmount") + total_initial_margin: StrictStr = Field(alias="totalInitialMargin") + total_maintenance_margin: StrictStr = Field(alias="totalMaintenanceMargin") + total_margin_balance: StrictStr = Field(alias="totalMarginBalance") + total_open_order_initial_margin: StrictStr = Field(alias="totalOpenOrderInitialMargin") + total_position_initial_margin: StrictStr = Field(alias="totalPositionInitialMargin") + total_unrealized_profit: StrictStr = Field(alias="totalUnrealizedProfit") + total_wallet_balance: StrictStr = Field(alias="totalWalletBalance") + update_time: StrictInt = Field(alias="updateTime") + __properties: ClassVar[List[str]] = ["email", "assets", "canDeposit", "canTrade", "canWithdraw", "feeTier", "maxWithdrawAmount", "totalInitialMargin", "totalMaintenanceMargin", "totalMarginBalance", "totalOpenOrderInitialMargin", "totalPositionInitialMargin", "totalUnrealizedProfit", "totalWalletBalance", "updateTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubAccountUSDTFuturesDetailsFutureAccountResp from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in assets (list) + _items = [] + if self.assets: + for _item in self.assets: + if _item: + _items.append(_item.to_dict()) + _dict['assets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubAccountUSDTFuturesDetailsFutureAccountResp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "assets": [SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None, + "canDeposit": obj.get("canDeposit"), + "canTrade": obj.get("canTrade"), + "canWithdraw": obj.get("canWithdraw"), + "feeTier": obj.get("feeTier"), + "maxWithdrawAmount": obj.get("maxWithdrawAmount"), + "totalInitialMargin": obj.get("totalInitialMargin"), + "totalMaintenanceMargin": obj.get("totalMaintenanceMargin"), + "totalMarginBalance": obj.get("totalMarginBalance"), + "totalOpenOrderInitialMargin": obj.get("totalOpenOrderInitialMargin"), + "totalPositionInitialMargin": obj.get("totalPositionInitialMargin"), + "totalUnrealizedProfit": obj.get("totalUnrealizedProfit"), + "totalWalletBalance": obj.get("totalWalletBalance"), + "updateTime": obj.get("updateTime") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_position_risk.py b/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_position_risk.py new file mode 100644 index 0000000..aaebf5d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_position_risk.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sapi_v1_sub_account_futures_position_risk_get200_response_inner import SapiV1SubAccountFuturesPositionRiskGet200ResponseInner +from typing import Optional, Set +from typing_extensions import Self + +class SubAccountUSDTFuturesPositionRisk(BaseModel): + """ + SubAccountUSDTFuturesPositionRisk + """ # noqa: E501 + future_position_risk_vos: List[SapiV1SubAccountFuturesPositionRiskGet200ResponseInner] = Field(alias="futurePositionRiskVos") + __properties: ClassVar[List[str]] = ["futurePositionRiskVos"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubAccountUSDTFuturesPositionRisk from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in future_position_risk_vos (list) + _items = [] + if self.future_position_risk_vos: + for _item in self.future_position_risk_vos: + if _item: + _items.append(_item.to_dict()) + _dict['futurePositionRiskVos'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubAccountUSDTFuturesPositionRisk from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "futurePositionRiskVos": [SapiV1SubAccountFuturesPositionRiskGet200ResponseInner.from_dict(_item) for _item in obj["futurePositionRiskVos"]] if obj.get("futurePositionRiskVos") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_summary.py b/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_summary.py new file mode 100644 index 0000000..dcce854 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_summary.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp import SubAccountUSDTFuturesSummaryFutureAccountSummaryResp +from typing import Optional, Set +from typing_extensions import Self + +class SubAccountUSDTFuturesSummary(BaseModel): + """ + SubAccountUSDTFuturesSummary + """ # noqa: E501 + future_account_summary_resp: SubAccountUSDTFuturesSummaryFutureAccountSummaryResp = Field(alias="futureAccountSummaryResp") + __properties: ClassVar[List[str]] = ["futureAccountSummaryResp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubAccountUSDTFuturesSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of future_account_summary_resp + if self.future_account_summary_resp: + _dict['futureAccountSummaryResp'] = self.future_account_summary_resp.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubAccountUSDTFuturesSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "futureAccountSummaryResp": SubAccountUSDTFuturesSummaryFutureAccountSummaryResp.from_dict(obj["futureAccountSummaryResp"]) if obj.get("futureAccountSummaryResp") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_summary_future_account_summary_resp.py b/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_summary_future_account_summary_resp.py new file mode 100644 index 0000000..2ac8f8d --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_summary_future_account_summary_resp.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner import SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner +from typing import Optional, Set +from typing_extensions import Self + +class SubAccountUSDTFuturesSummaryFutureAccountSummaryResp(BaseModel): + """ + SubAccountUSDTFuturesSummaryFutureAccountSummaryResp + """ # noqa: E501 + total_initial_margin: StrictStr = Field(alias="totalInitialMargin") + total_maintenance_margin: StrictStr = Field(alias="totalMaintenanceMargin") + total_margin_balance: StrictStr = Field(alias="totalMarginBalance") + total_open_order_initial_margin: StrictStr = Field(alias="totalOpenOrderInitialMargin") + total_position_initial_margin: StrictStr = Field(alias="totalPositionInitialMargin") + total_unrealized_profit: StrictStr = Field(alias="totalUnrealizedProfit") + total_wallet_balance: StrictStr = Field(alias="totalWalletBalance") + asset: StrictStr = Field(description="The sum of BUSD and USDT") + sub_account_list: List[SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner] = Field(alias="subAccountList") + __properties: ClassVar[List[str]] = ["totalInitialMargin", "totalMaintenanceMargin", "totalMarginBalance", "totalOpenOrderInitialMargin", "totalPositionInitialMargin", "totalUnrealizedProfit", "totalWalletBalance", "asset", "subAccountList"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubAccountUSDTFuturesSummaryFutureAccountSummaryResp from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in sub_account_list (list) + _items = [] + if self.sub_account_list: + for _item in self.sub_account_list: + if _item: + _items.append(_item.to_dict()) + _dict['subAccountList'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubAccountUSDTFuturesSummaryFutureAccountSummaryResp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalInitialMargin": obj.get("totalInitialMargin"), + "totalMaintenanceMargin": obj.get("totalMaintenanceMargin"), + "totalMarginBalance": obj.get("totalMarginBalance"), + "totalOpenOrderInitialMargin": obj.get("totalOpenOrderInitialMargin"), + "totalPositionInitialMargin": obj.get("totalPositionInitialMargin"), + "totalUnrealizedProfit": obj.get("totalUnrealizedProfit"), + "totalWalletBalance": obj.get("totalWalletBalance"), + "asset": obj.get("asset"), + "subAccountList": [SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner.from_dict(_item) for _item in obj["subAccountList"]] if obj.get("subAccountList") is not None else None + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.py b/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.py new file mode 100644 index 0000000..95e5ec1 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner(BaseModel): + """ + SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner + """ # noqa: E501 + email: StrictStr + total_initial_margin: StrictStr = Field(alias="totalInitialMargin") + total_maintenance_margin: StrictStr = Field(alias="totalMaintenanceMargin") + total_margin_balance: StrictStr = Field(alias="totalMarginBalance") + total_open_order_initial_margin: StrictStr = Field(alias="totalOpenOrderInitialMargin") + total_position_initial_margin: StrictStr = Field(alias="totalPositionInitialMargin") + total_unrealized_profit: StrictStr = Field(alias="totalUnrealizedProfit") + total_wallet_balance: StrictStr = Field(alias="totalWalletBalance") + asset: StrictStr = Field(description="The sum of BUSD and USDT") + __properties: ClassVar[List[str]] = ["email", "totalInitialMargin", "totalMaintenanceMargin", "totalMarginBalance", "totalOpenOrderInitialMargin", "totalPositionInitialMargin", "totalUnrealizedProfit", "totalWalletBalance", "asset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "totalInitialMargin": obj.get("totalInitialMargin"), + "totalMaintenanceMargin": obj.get("totalMaintenanceMargin"), + "totalMarginBalance": obj.get("totalMarginBalance"), + "totalOpenOrderInitialMargin": obj.get("totalOpenOrderInitialMargin"), + "totalPositionInitialMargin": obj.get("totalPositionInitialMargin"), + "totalUnrealizedProfit": obj.get("totalUnrealizedProfit"), + "totalWalletBalance": obj.get("totalWalletBalance"), + "asset": obj.get("asset") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/ticker.py b/target/python/binance_openapi/openapi_client/models/ticker.py new file mode 100644 index 0000000..840cad4 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/ticker.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Ticker(BaseModel): + """ + Ticker + """ # noqa: E501 + symbol: StrictStr + price_change: StrictStr = Field(alias="priceChange") + price_change_percent: StrictStr = Field(alias="priceChangePercent") + prev_close_price: StrictStr = Field(alias="prevClosePrice") + last_price: StrictStr = Field(alias="lastPrice") + bid_price: StrictStr = Field(alias="bidPrice") + bid_qty: StrictStr = Field(alias="bidQty") + ask_price: StrictStr = Field(alias="askPrice") + ask_qty: StrictStr = Field(alias="askQty") + open_price: StrictStr = Field(alias="openPrice") + high_price: StrictStr = Field(alias="highPrice") + low_price: StrictStr = Field(alias="lowPrice") + volume: StrictStr + quote_volume: StrictStr = Field(alias="quoteVolume") + open_time: StrictInt = Field(alias="openTime") + close_time: StrictInt = Field(alias="closeTime") + first_id: StrictInt = Field(alias="firstId") + last_id: StrictInt = Field(alias="lastId") + count: StrictInt + __properties: ClassVar[List[str]] = ["symbol", "priceChange", "priceChangePercent", "prevClosePrice", "lastPrice", "bidPrice", "bidQty", "askPrice", "askQty", "openPrice", "highPrice", "lowPrice", "volume", "quoteVolume", "openTime", "closeTime", "firstId", "lastId", "count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Ticker from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Ticker from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "priceChange": obj.get("priceChange"), + "priceChangePercent": obj.get("priceChangePercent"), + "prevClosePrice": obj.get("prevClosePrice"), + "lastPrice": obj.get("lastPrice"), + "bidPrice": obj.get("bidPrice"), + "bidQty": obj.get("bidQty"), + "askPrice": obj.get("askPrice"), + "askQty": obj.get("askQty"), + "openPrice": obj.get("openPrice"), + "highPrice": obj.get("highPrice"), + "lowPrice": obj.get("lowPrice"), + "volume": obj.get("volume"), + "quoteVolume": obj.get("quoteVolume"), + "openTime": obj.get("openTime"), + "closeTime": obj.get("closeTime"), + "firstId": obj.get("firstId"), + "lastId": obj.get("lastId"), + "count": obj.get("count") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/trade.py b/target/python/binance_openapi/openapi_client/models/trade.py new file mode 100644 index 0000000..6590fb8 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/trade.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Trade(BaseModel): + """ + Trade + """ # noqa: E501 + id: StrictInt = Field(description="trade id") + price: StrictStr = Field(description="price") + qty: StrictStr = Field(description="amount of base asset") + quote_qty: StrictStr = Field(description="amount of quote asset", alias="quoteQty") + time: StrictInt = Field(description="Trade executed timestamp, as same as `T` in the stream") + is_buyer_maker: StrictBool = Field(alias="isBuyerMaker") + is_best_match: StrictBool = Field(alias="isBestMatch") + __properties: ClassVar[List[str]] = ["id", "price", "qty", "quoteQty", "time", "isBuyerMaker", "isBestMatch"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Trade from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Trade from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "price": obj.get("price"), + "qty": obj.get("qty"), + "quoteQty": obj.get("quoteQty"), + "time": obj.get("time"), + "isBuyerMaker": obj.get("isBuyerMaker"), + "isBestMatch": obj.get("isBestMatch") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/models/transaction.py b/target/python/binance_openapi/openapi_client/models/transaction.py new file mode 100644 index 0000000..923fcf7 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/models/transaction.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Transaction(BaseModel): + """ + Transaction + """ # noqa: E501 + tran_id: StrictInt = Field(description="transaction id", alias="tranId") + __properties: ClassVar[List[str]] = ["tranId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Transaction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Transaction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tranId": obj.get("tranId") + }) + return _obj + + diff --git a/target/python/binance_openapi/openapi_client/py.typed b/target/python/binance_openapi/openapi_client/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/target/python/binance_openapi/openapi_client/rest.py b/target/python/binance_openapi/openapi_client/rest.py new file mode 100644 index 0000000..a11f4c2 --- /dev/null +++ b/target/python/binance_openapi/openapi_client/rest.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from openapi_client.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/target/python/binance_openapi/pyproject.toml b/target/python/binance_openapi/pyproject.toml new file mode 100644 index 0000000..c0b4af7 --- /dev/null +++ b/target/python/binance_openapi/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "openapi_client" +version = "1.0.0" +description = "Binance Public Spot API" +authors = ["OpenAPI Generator Community "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Binance Public Spot API"] +include = ["openapi_client/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "openapi_client", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/target/python/binance_openapi/requirements.txt b/target/python/binance_openapi/requirements.txt new file mode 100644 index 0000000..cc85509 --- /dev/null +++ b/target/python/binance_openapi/requirements.txt @@ -0,0 +1,5 @@ +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.25.3, < 2.1.0 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/target/python/binance_openapi/setup.cfg b/target/python/binance_openapi/setup.cfg new file mode 100644 index 0000000..11433ee --- /dev/null +++ b/target/python/binance_openapi/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/target/python/binance_openapi/setup.py b/target/python/binance_openapi/setup.py new file mode 100644 index 0000000..9ecbd60 --- /dev/null +++ b/target/python/binance_openapi/setup.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "openapi-client" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Binance Public Spot API", + author="OpenAPI Generator community", + author_email="team@openapitools.org", + url="", + keywords=["OpenAPI", "OpenAPI-Generator", "Binance Public Spot API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + """, # noqa: E501 + package_data={"openapi_client": ["py.typed"]}, +) diff --git a/target/python/binance_openapi/test-requirements.txt b/target/python/binance_openapi/test-requirements.txt new file mode 100644 index 0000000..8e6d8cb --- /dev/null +++ b/target/python/binance_openapi/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/target/python/binance_openapi/test/__init__.py b/target/python/binance_openapi/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/target/python/binance_openapi/test/test_account.py b/target/python/binance_openapi/test/test_account.py new file mode 100644 index 0000000..37f4f5c --- /dev/null +++ b/target/python/binance_openapi/test/test_account.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.account import Account + +class TestAccount(unittest.TestCase): + """Account unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Account: + """Test Account + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Account` + """ + model = Account() + if include_optional: + return Account( + maker_commission = 15, + taker_commission = 15, + buyer_commission = 0, + seller_commission = 0, + commission_rates = openapi_client.models.account_commission_rates.account_commissionRates( + maker = '0.00150000', + taker = '0.00150000', + buyer = '0.00000000', + seller = '0.00000000', ), + can_trade = True, + can_withdraw = True, + can_deposit = True, + brokered = False, + require_self_trade_prevention = False, + prevent_sor = False, + update_time = 123456789, + account_type = 'SPOT', + balances = [ + openapi_client.models.account_balances_inner.account_balances_inner( + asset = 'BTC', + free = '4723846.89208129', + locked = '0.00000000', ) + ], + permissions = [ + 'SPOT' + ], + uid = 354937868 + ) + else: + return Account( + maker_commission = 15, + taker_commission = 15, + buyer_commission = 0, + seller_commission = 0, + commission_rates = openapi_client.models.account_commission_rates.account_commissionRates( + maker = '0.00150000', + taker = '0.00150000', + buyer = '0.00000000', + seller = '0.00000000', ), + can_trade = True, + can_withdraw = True, + can_deposit = True, + brokered = False, + require_self_trade_prevention = False, + prevent_sor = False, + update_time = 123456789, + account_type = 'SPOT', + balances = [ + openapi_client.models.account_balances_inner.account_balances_inner( + asset = 'BTC', + free = '4723846.89208129', + locked = '0.00000000', ) + ], + permissions = [ + 'SPOT' + ], + uid = 354937868, + ) + """ + + def testAccount(self): + """Test Account""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_account_balances_inner.py b/target/python/binance_openapi/test/test_account_balances_inner.py new file mode 100644 index 0000000..50042b8 --- /dev/null +++ b/target/python/binance_openapi/test/test_account_balances_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.account_balances_inner import AccountBalancesInner + +class TestAccountBalancesInner(unittest.TestCase): + """AccountBalancesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountBalancesInner: + """Test AccountBalancesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountBalancesInner` + """ + model = AccountBalancesInner() + if include_optional: + return AccountBalancesInner( + asset = 'BTC', + free = '4723846.89208129', + locked = '0.00000000' + ) + else: + return AccountBalancesInner( + asset = 'BTC', + free = '4723846.89208129', + locked = '0.00000000', + ) + """ + + def testAccountBalancesInner(self): + """Test AccountBalancesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_account_commission_rates.py b/target/python/binance_openapi/test/test_account_commission_rates.py new file mode 100644 index 0000000..c097ceb --- /dev/null +++ b/target/python/binance_openapi/test/test_account_commission_rates.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.account_commission_rates import AccountCommissionRates + +class TestAccountCommissionRates(unittest.TestCase): + """AccountCommissionRates unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountCommissionRates: + """Test AccountCommissionRates + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountCommissionRates` + """ + model = AccountCommissionRates() + if include_optional: + return AccountCommissionRates( + maker = '0.00150000', + taker = '0.00150000', + buyer = '0.00000000', + seller = '0.00000000' + ) + else: + return AccountCommissionRates( + maker = '0.00150000', + taker = '0.00150000', + buyer = '0.00000000', + seller = '0.00000000', + ) + """ + + def testAccountCommissionRates(self): + """Test AccountCommissionRates""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_agg_trade.py b/target/python/binance_openapi/test/test_agg_trade.py new file mode 100644 index 0000000..a0a7398 --- /dev/null +++ b/target/python/binance_openapi/test/test_agg_trade.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.agg_trade import AggTrade + +class TestAggTrade(unittest.TestCase): + """AggTrade unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AggTrade: + """Test AggTrade + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AggTrade` + """ + model = AggTrade() + if include_optional: + return AggTrade( + a = 26129, + p = '0.01633102', + q = '4.70443515', + f = 27781, + l = 27781, + t = False, + m = True, + m = True + ) + else: + return AggTrade( + a = 26129, + p = '0.01633102', + q = '4.70443515', + f = 27781, + l = 27781, + t = False, + m = True, + m = True, + ) + """ + + def testAggTrade(self): + """Test AggTrade""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_account_commission_get200_response.py b/target/python/binance_openapi/test/test_api_v3_account_commission_get200_response.py new file mode 100644 index 0000000..cd9dd01 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_account_commission_get200_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_account_commission_get200_response import ApiV3AccountCommissionGet200Response + +class TestApiV3AccountCommissionGet200Response(unittest.TestCase): + """ApiV3AccountCommissionGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3AccountCommissionGet200Response: + """Test ApiV3AccountCommissionGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3AccountCommissionGet200Response` + """ + model = ApiV3AccountCommissionGet200Response() + if include_optional: + return ApiV3AccountCommissionGet200Response( + symbol = 'BTCUSDT', + standard_commission = openapi_client.models._api_v3_account_commission_get_200_response_standard_commission._api_v3_account_commission_get_200_response_standardCommission( + maker = '0.00000010', + taker = '0.00000020', + buyer = '0.00000030', + seller = '0.00000040', ), + tax_commission = openapi_client.models._api_v3_account_commission_get_200_response_tax_commission._api_v3_account_commission_get_200_response_taxCommission( + maker = '0.00000112', + taker = '0.00000114', + buyer = '0.00000118', + seller = '0.00000116', ), + discount = openapi_client.models._api_v3_account_commission_get_200_response_discount._api_v3_account_commission_get_200_response_discount( + enabled_for_account = True, + enabled_for_symbol = True, + discount_asset = 'BNB', + discount = '0.25000000', ) + ) + else: + return ApiV3AccountCommissionGet200Response( + symbol = 'BTCUSDT', + standard_commission = openapi_client.models._api_v3_account_commission_get_200_response_standard_commission._api_v3_account_commission_get_200_response_standardCommission( + maker = '0.00000010', + taker = '0.00000020', + buyer = '0.00000030', + seller = '0.00000040', ), + tax_commission = openapi_client.models._api_v3_account_commission_get_200_response_tax_commission._api_v3_account_commission_get_200_response_taxCommission( + maker = '0.00000112', + taker = '0.00000114', + buyer = '0.00000118', + seller = '0.00000116', ), + discount = openapi_client.models._api_v3_account_commission_get_200_response_discount._api_v3_account_commission_get_200_response_discount( + enabled_for_account = True, + enabled_for_symbol = True, + discount_asset = 'BNB', + discount = '0.25000000', ), + ) + """ + + def testApiV3AccountCommissionGet200Response(self): + """Test ApiV3AccountCommissionGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_account_commission_get200_response_discount.py b/target/python/binance_openapi/test/test_api_v3_account_commission_get200_response_discount.py new file mode 100644 index 0000000..875ccf8 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_account_commission_get200_response_discount.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_account_commission_get200_response_discount import ApiV3AccountCommissionGet200ResponseDiscount + +class TestApiV3AccountCommissionGet200ResponseDiscount(unittest.TestCase): + """ApiV3AccountCommissionGet200ResponseDiscount unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3AccountCommissionGet200ResponseDiscount: + """Test ApiV3AccountCommissionGet200ResponseDiscount + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3AccountCommissionGet200ResponseDiscount` + """ + model = ApiV3AccountCommissionGet200ResponseDiscount() + if include_optional: + return ApiV3AccountCommissionGet200ResponseDiscount( + enabled_for_account = True, + enabled_for_symbol = True, + discount_asset = 'BNB', + discount = '0.25000000' + ) + else: + return ApiV3AccountCommissionGet200ResponseDiscount( + ) + """ + + def testApiV3AccountCommissionGet200ResponseDiscount(self): + """Test ApiV3AccountCommissionGet200ResponseDiscount""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_account_commission_get200_response_standard_commission.py b/target/python/binance_openapi/test/test_api_v3_account_commission_get200_response_standard_commission.py new file mode 100644 index 0000000..2a944ab --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_account_commission_get200_response_standard_commission.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_account_commission_get200_response_standard_commission import ApiV3AccountCommissionGet200ResponseStandardCommission + +class TestApiV3AccountCommissionGet200ResponseStandardCommission(unittest.TestCase): + """ApiV3AccountCommissionGet200ResponseStandardCommission unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3AccountCommissionGet200ResponseStandardCommission: + """Test ApiV3AccountCommissionGet200ResponseStandardCommission + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3AccountCommissionGet200ResponseStandardCommission` + """ + model = ApiV3AccountCommissionGet200ResponseStandardCommission() + if include_optional: + return ApiV3AccountCommissionGet200ResponseStandardCommission( + maker = '0.00000010', + taker = '0.00000020', + buyer = '0.00000030', + seller = '0.00000040' + ) + else: + return ApiV3AccountCommissionGet200ResponseStandardCommission( + maker = '0.00000010', + taker = '0.00000020', + buyer = '0.00000030', + seller = '0.00000040', + ) + """ + + def testApiV3AccountCommissionGet200ResponseStandardCommission(self): + """Test ApiV3AccountCommissionGet200ResponseStandardCommission""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_account_commission_get200_response_tax_commission.py b/target/python/binance_openapi/test/test_api_v3_account_commission_get200_response_tax_commission.py new file mode 100644 index 0000000..4591053 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_account_commission_get200_response_tax_commission.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_account_commission_get200_response_tax_commission import ApiV3AccountCommissionGet200ResponseTaxCommission + +class TestApiV3AccountCommissionGet200ResponseTaxCommission(unittest.TestCase): + """ApiV3AccountCommissionGet200ResponseTaxCommission unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3AccountCommissionGet200ResponseTaxCommission: + """Test ApiV3AccountCommissionGet200ResponseTaxCommission + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3AccountCommissionGet200ResponseTaxCommission` + """ + model = ApiV3AccountCommissionGet200ResponseTaxCommission() + if include_optional: + return ApiV3AccountCommissionGet200ResponseTaxCommission( + maker = '0.00000112', + taker = '0.00000114', + buyer = '0.00000118', + seller = '0.00000116' + ) + else: + return ApiV3AccountCommissionGet200ResponseTaxCommission( + maker = '0.00000112', + taker = '0.00000114', + buyer = '0.00000118', + seller = '0.00000116', + ) + """ + + def testApiV3AccountCommissionGet200ResponseTaxCommission(self): + """Test ApiV3AccountCommissionGet200ResponseTaxCommission""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_all_order_list_get200_response_inner.py b/target/python/binance_openapi/test/test_api_v3_all_order_list_get200_response_inner.py new file mode 100644 index 0000000..3fbc9b3 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_all_order_list_get200_response_inner.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_all_order_list_get200_response_inner import ApiV3AllOrderListGet200ResponseInner + +class TestApiV3AllOrderListGet200ResponseInner(unittest.TestCase): + """ApiV3AllOrderListGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3AllOrderListGet200ResponseInner: + """Test ApiV3AllOrderListGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3AllOrderListGet200ResponseInner` + """ + model = ApiV3AllOrderListGet200ResponseInner() + if include_optional: + return ApiV3AllOrderListGet200ResponseInner( + order_list_id = 29, + contingency_type = 'OCO', + list_status_type = 'EXEC_STARTED', + list_order_status = 'EXECUTING', + list_client_order_id = 'amEEAXryFzFwYF1FeRpUoZ', + transaction_time = 1565245913483, + symbol = 'LTCBTC', + is_isolated = True, + orders = [ + [{"symbol":"LTCBTC","orderId":4,"clientOrderId":"oD7aesZqjEGlZrbtRpy5zB"},{"symbol":"LTCBTC","orderId":5,"clientOrderId":"Jr1h6xirOxgeJOUuYQS7V3"}] + ] + ) + else: + return ApiV3AllOrderListGet200ResponseInner( + order_list_id = 29, + contingency_type = 'OCO', + list_status_type = 'EXEC_STARTED', + list_order_status = 'EXECUTING', + list_client_order_id = 'amEEAXryFzFwYF1FeRpUoZ', + transaction_time = 1565245913483, + symbol = 'LTCBTC', + is_isolated = True, + orders = [ + [{"symbol":"LTCBTC","orderId":4,"clientOrderId":"oD7aesZqjEGlZrbtRpy5zB"},{"symbol":"LTCBTC","orderId":5,"clientOrderId":"Jr1h6xirOxgeJOUuYQS7V3"}] + ], + ) + """ + + def testApiV3AllOrderListGet200ResponseInner(self): + """Test ApiV3AllOrderListGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_all_order_list_get200_response_inner_orders_inner.py b/target/python/binance_openapi/test/test_api_v3_all_order_list_get200_response_inner_orders_inner.py new file mode 100644 index 0000000..a78bdc4 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_all_order_list_get200_response_inner_orders_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_all_order_list_get200_response_inner_orders_inner import ApiV3AllOrderListGet200ResponseInnerOrdersInner + +class TestApiV3AllOrderListGet200ResponseInnerOrdersInner(unittest.TestCase): + """ApiV3AllOrderListGet200ResponseInnerOrdersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3AllOrderListGet200ResponseInnerOrdersInner: + """Test ApiV3AllOrderListGet200ResponseInnerOrdersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3AllOrderListGet200ResponseInnerOrdersInner` + """ + model = ApiV3AllOrderListGet200ResponseInnerOrdersInner() + if include_optional: + return ApiV3AllOrderListGet200ResponseInnerOrdersInner( + symbol = '', + order_id = 56, + client_order_id = '' + ) + else: + return ApiV3AllOrderListGet200ResponseInnerOrdersInner( + symbol = '', + order_id = 56, + client_order_id = '', + ) + """ + + def testApiV3AllOrderListGet200ResponseInnerOrdersInner(self): + """Test ApiV3AllOrderListGet200ResponseInnerOrdersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_avg_price_get200_response.py b/target/python/binance_openapi/test/test_api_v3_avg_price_get200_response.py new file mode 100644 index 0000000..d0411ca --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_avg_price_get200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_avg_price_get200_response import ApiV3AvgPriceGet200Response + +class TestApiV3AvgPriceGet200Response(unittest.TestCase): + """ApiV3AvgPriceGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3AvgPriceGet200Response: + """Test ApiV3AvgPriceGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3AvgPriceGet200Response` + """ + model = ApiV3AvgPriceGet200Response() + if include_optional: + return ApiV3AvgPriceGet200Response( + mins = 5, + price = '9.35751834', + close_time = 1694061154503 + ) + else: + return ApiV3AvgPriceGet200Response( + mins = 5, + price = '9.35751834', + close_time = 1694061154503, + ) + """ + + def testApiV3AvgPriceGet200Response(self): + """Test ApiV3AvgPriceGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_depth_get200_response.py b/target/python/binance_openapi/test/test_api_v3_depth_get200_response.py new file mode 100644 index 0000000..49c8101 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_depth_get200_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_depth_get200_response import ApiV3DepthGet200Response + +class TestApiV3DepthGet200Response(unittest.TestCase): + """ApiV3DepthGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3DepthGet200Response: + """Test ApiV3DepthGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3DepthGet200Response` + """ + model = ApiV3DepthGet200Response() + if include_optional: + return ApiV3DepthGet200Response( + last_update_id = 56, + bids = [ + [ + '' + ] + ], + asks = [ + [ + '' + ] + ] + ) + else: + return ApiV3DepthGet200Response( + last_update_id = 56, + bids = [ + [ + '' + ] + ], + asks = [ + [ + '' + ] + ], + ) + """ + + def testApiV3DepthGet200Response(self): + """Test ApiV3DepthGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response.py b/target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response.py new file mode 100644 index 0000000..ff141f8 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_exchange_info_get200_response import ApiV3ExchangeInfoGet200Response + +class TestApiV3ExchangeInfoGet200Response(unittest.TestCase): + """ApiV3ExchangeInfoGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3ExchangeInfoGet200Response: + """Test ApiV3ExchangeInfoGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3ExchangeInfoGet200Response` + """ + model = ApiV3ExchangeInfoGet200Response() + if include_optional: + return ApiV3ExchangeInfoGet200Response( + timezone = 'UTC', + server_time = 1592882214236, + rate_limits = [ + openapi_client.models._api_v3_exchange_info_get_200_response_rate_limits_inner._api_v3_exchangeInfo_get_200_response_rateLimits_inner( + rate_limit_type = 'REQUEST_WEIGHT', + interval = 'MINUTE', + interval_num = 1, + limit = 1200, ) + ], + exchange_filters = [ + None + ], + symbols = [ + openapi_client.models._api_v3_exchange_info_get_200_response_symbols_inner._api_v3_exchangeInfo_get_200_response_symbols_inner( + symbol = 'ETHBTC', + status = 'TRADING', + base_asset = 'ETH', + base_asset_precision = 8, + quote_asset = 'BTC', + quote_asset_precision = 8, + base_commission_precision = 8, + quote_commission_precision = 8, + order_types = [ + 'LIMIT' + ], + iceberg_allowed = True, + oco_allowed = True, + oto_allowed = False, + quote_order_qty_market_allowed = True, + allow_trailing_stop = False, + cancel_replace_allowed = True, + is_spot_trading_allowed = True, + is_margin_trading_allowed = True, + filters = [ + openapi_client.models._api_v3_exchange_info_get_200_response_symbols_inner_filters_inner._api_v3_exchangeInfo_get_200_response_symbols_inner_filters_inner( + filter_type = 'PRICE_FILTER', + min_price = '0.00000100', + max_price = '100000.00000000', + tick_size = '0.00000100', ) + ], + permissions = [ + 'SPOT' + ], + permission_sets = [ + [ + '["SPOT","MARGIN"]' + ] + ], + default_self_trade_prevention_mode = 'NONE', + allowed_self_trade_prevention_modes = [ + 'NONE' + ], ) + ] + ) + else: + return ApiV3ExchangeInfoGet200Response( + timezone = 'UTC', + server_time = 1592882214236, + rate_limits = [ + openapi_client.models._api_v3_exchange_info_get_200_response_rate_limits_inner._api_v3_exchangeInfo_get_200_response_rateLimits_inner( + rate_limit_type = 'REQUEST_WEIGHT', + interval = 'MINUTE', + interval_num = 1, + limit = 1200, ) + ], + exchange_filters = [ + None + ], + symbols = [ + openapi_client.models._api_v3_exchange_info_get_200_response_symbols_inner._api_v3_exchangeInfo_get_200_response_symbols_inner( + symbol = 'ETHBTC', + status = 'TRADING', + base_asset = 'ETH', + base_asset_precision = 8, + quote_asset = 'BTC', + quote_asset_precision = 8, + base_commission_precision = 8, + quote_commission_precision = 8, + order_types = [ + 'LIMIT' + ], + iceberg_allowed = True, + oco_allowed = True, + oto_allowed = False, + quote_order_qty_market_allowed = True, + allow_trailing_stop = False, + cancel_replace_allowed = True, + is_spot_trading_allowed = True, + is_margin_trading_allowed = True, + filters = [ + openapi_client.models._api_v3_exchange_info_get_200_response_symbols_inner_filters_inner._api_v3_exchangeInfo_get_200_response_symbols_inner_filters_inner( + filter_type = 'PRICE_FILTER', + min_price = '0.00000100', + max_price = '100000.00000000', + tick_size = '0.00000100', ) + ], + permissions = [ + 'SPOT' + ], + permission_sets = [ + [ + '["SPOT","MARGIN"]' + ] + ], + default_self_trade_prevention_mode = 'NONE', + allowed_self_trade_prevention_modes = [ + 'NONE' + ], ) + ], + ) + """ + + def testApiV3ExchangeInfoGet200Response(self): + """Test ApiV3ExchangeInfoGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response_rate_limits_inner.py b/target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response_rate_limits_inner.py new file mode 100644 index 0000000..d5f3e97 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response_rate_limits_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_exchange_info_get200_response_rate_limits_inner import ApiV3ExchangeInfoGet200ResponseRateLimitsInner + +class TestApiV3ExchangeInfoGet200ResponseRateLimitsInner(unittest.TestCase): + """ApiV3ExchangeInfoGet200ResponseRateLimitsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3ExchangeInfoGet200ResponseRateLimitsInner: + """Test ApiV3ExchangeInfoGet200ResponseRateLimitsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3ExchangeInfoGet200ResponseRateLimitsInner` + """ + model = ApiV3ExchangeInfoGet200ResponseRateLimitsInner() + if include_optional: + return ApiV3ExchangeInfoGet200ResponseRateLimitsInner( + rate_limit_type = 'REQUEST_WEIGHT', + interval = 'MINUTE', + interval_num = 1, + limit = 1200 + ) + else: + return ApiV3ExchangeInfoGet200ResponseRateLimitsInner( + rate_limit_type = 'REQUEST_WEIGHT', + interval = 'MINUTE', + interval_num = 1, + limit = 1200, + ) + """ + + def testApiV3ExchangeInfoGet200ResponseRateLimitsInner(self): + """Test ApiV3ExchangeInfoGet200ResponseRateLimitsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response_symbols_inner.py b/target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response_symbols_inner.py new file mode 100644 index 0000000..70244ca --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response_symbols_inner.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_exchange_info_get200_response_symbols_inner import ApiV3ExchangeInfoGet200ResponseSymbolsInner + +class TestApiV3ExchangeInfoGet200ResponseSymbolsInner(unittest.TestCase): + """ApiV3ExchangeInfoGet200ResponseSymbolsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3ExchangeInfoGet200ResponseSymbolsInner: + """Test ApiV3ExchangeInfoGet200ResponseSymbolsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3ExchangeInfoGet200ResponseSymbolsInner` + """ + model = ApiV3ExchangeInfoGet200ResponseSymbolsInner() + if include_optional: + return ApiV3ExchangeInfoGet200ResponseSymbolsInner( + symbol = 'ETHBTC', + status = 'TRADING', + base_asset = 'ETH', + base_asset_precision = 8, + quote_asset = 'BTC', + quote_asset_precision = 8, + base_commission_precision = 8, + quote_commission_precision = 8, + order_types = [ + 'LIMIT' + ], + iceberg_allowed = True, + oco_allowed = True, + oto_allowed = False, + quote_order_qty_market_allowed = True, + allow_trailing_stop = False, + cancel_replace_allowed = True, + is_spot_trading_allowed = True, + is_margin_trading_allowed = True, + filters = [ + openapi_client.models._api_v3_exchange_info_get_200_response_symbols_inner_filters_inner._api_v3_exchangeInfo_get_200_response_symbols_inner_filters_inner( + filter_type = 'PRICE_FILTER', + min_price = '0.00000100', + max_price = '100000.00000000', + tick_size = '0.00000100', ) + ], + permissions = [ + 'SPOT' + ], + permission_sets = [ + [ + '["SPOT","MARGIN"]' + ] + ], + default_self_trade_prevention_mode = 'NONE', + allowed_self_trade_prevention_modes = [ + 'NONE' + ] + ) + else: + return ApiV3ExchangeInfoGet200ResponseSymbolsInner( + symbol = 'ETHBTC', + status = 'TRADING', + base_asset = 'ETH', + base_asset_precision = 8, + quote_asset = 'BTC', + quote_asset_precision = 8, + base_commission_precision = 8, + quote_commission_precision = 8, + order_types = [ + 'LIMIT' + ], + iceberg_allowed = True, + oco_allowed = True, + oto_allowed = False, + quote_order_qty_market_allowed = True, + allow_trailing_stop = False, + cancel_replace_allowed = True, + is_spot_trading_allowed = True, + is_margin_trading_allowed = True, + filters = [ + openapi_client.models._api_v3_exchange_info_get_200_response_symbols_inner_filters_inner._api_v3_exchangeInfo_get_200_response_symbols_inner_filters_inner( + filter_type = 'PRICE_FILTER', + min_price = '0.00000100', + max_price = '100000.00000000', + tick_size = '0.00000100', ) + ], + permissions = [ + 'SPOT' + ], + permission_sets = [ + [ + '["SPOT","MARGIN"]' + ] + ], + default_self_trade_prevention_mode = 'NONE', + allowed_self_trade_prevention_modes = [ + 'NONE' + ], + ) + """ + + def testApiV3ExchangeInfoGet200ResponseSymbolsInner(self): + """Test ApiV3ExchangeInfoGet200ResponseSymbolsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response_symbols_inner_filters_inner.py b/target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response_symbols_inner_filters_inner.py new file mode 100644 index 0000000..59d8d0a --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_exchange_info_get200_response_symbols_inner_filters_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_exchange_info_get200_response_symbols_inner_filters_inner import ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner + +class TestApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner(unittest.TestCase): + """ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner: + """Test ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner` + """ + model = ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner() + if include_optional: + return ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner( + filter_type = 'PRICE_FILTER', + min_price = '0.00000100', + max_price = '100000.00000000', + tick_size = '0.00000100' + ) + else: + return ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner( + filter_type = 'PRICE_FILTER', + min_price = '0.00000100', + max_price = '100000.00000000', + tick_size = '0.00000100', + ) + """ + + def testApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner(self): + """Test ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_klines_get200_response_inner_inner.py b/target/python/binance_openapi/test/test_api_v3_klines_get200_response_inner_inner.py new file mode 100644 index 0000000..aebae8d --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_klines_get200_response_inner_inner.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_klines_get200_response_inner_inner import ApiV3KlinesGet200ResponseInnerInner + +class TestApiV3KlinesGet200ResponseInnerInner(unittest.TestCase): + """ApiV3KlinesGet200ResponseInnerInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3KlinesGet200ResponseInnerInner: + """Test ApiV3KlinesGet200ResponseInnerInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3KlinesGet200ResponseInnerInner` + """ + model = ApiV3KlinesGet200ResponseInnerInner() + if include_optional: + return ApiV3KlinesGet200ResponseInnerInner( + ) + else: + return ApiV3KlinesGet200ResponseInnerInner( + ) + """ + + def testApiV3KlinesGet200ResponseInnerInner(self): + """Test ApiV3KlinesGet200ResponseInnerInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_my_allocations_get200_response_inner.py b/target/python/binance_openapi/test/test_api_v3_my_allocations_get200_response_inner.py new file mode 100644 index 0000000..c248797 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_my_allocations_get200_response_inner.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_my_allocations_get200_response_inner import ApiV3MyAllocationsGet200ResponseInner + +class TestApiV3MyAllocationsGet200ResponseInner(unittest.TestCase): + """ApiV3MyAllocationsGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3MyAllocationsGet200ResponseInner: + """Test ApiV3MyAllocationsGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3MyAllocationsGet200ResponseInner` + """ + model = ApiV3MyAllocationsGet200ResponseInner() + if include_optional: + return ApiV3MyAllocationsGet200ResponseInner( + symbol = 'BTCUSDT', + allocation_id = 0, + allocation_type = 'SOR', + order_id = 1, + order_list_id = -1, + price = '1.00000000', + qty = '5.00000000', + quote_qty = '5.00000000', + commission = '0.00000000', + commission_asset = 'BTC', + time = 1687506878118, + is_buyer = True, + is_maker = False, + is_allocator = False + ) + else: + return ApiV3MyAllocationsGet200ResponseInner( + symbol = 'BTCUSDT', + allocation_id = 0, + allocation_type = 'SOR', + order_id = 1, + order_list_id = -1, + price = '1.00000000', + qty = '5.00000000', + quote_qty = '5.00000000', + commission = '0.00000000', + commission_asset = 'BTC', + time = 1687506878118, + is_buyer = True, + is_maker = False, + is_allocator = False, + ) + """ + + def testApiV3MyAllocationsGet200ResponseInner(self): + """Test ApiV3MyAllocationsGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_my_prevented_matches_get200_response_inner.py b/target/python/binance_openapi/test/test_api_v3_my_prevented_matches_get200_response_inner.py new file mode 100644 index 0000000..0a6e012 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_my_prevented_matches_get200_response_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_my_prevented_matches_get200_response_inner import ApiV3MyPreventedMatchesGet200ResponseInner + +class TestApiV3MyPreventedMatchesGet200ResponseInner(unittest.TestCase): + """ApiV3MyPreventedMatchesGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3MyPreventedMatchesGet200ResponseInner: + """Test ApiV3MyPreventedMatchesGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3MyPreventedMatchesGet200ResponseInner` + """ + model = ApiV3MyPreventedMatchesGet200ResponseInner() + if include_optional: + return ApiV3MyPreventedMatchesGet200ResponseInner( + symbol = 'BTCUSDT', + prevented_match_id = 1, + taker_order_id = 5, + maker_order_id = 3, + trade_group_id = 1, + self_trade_prevention_mode = 'EXPIRE_MAKER', + price = '1.100000', + maker_prevented_quantity = '1.300000', + transact_time = 1669101687094 + ) + else: + return ApiV3MyPreventedMatchesGet200ResponseInner( + symbol = 'BTCUSDT', + prevented_match_id = 1, + taker_order_id = 5, + maker_order_id = 3, + trade_group_id = 1, + self_trade_prevention_mode = 'EXPIRE_MAKER', + price = '1.100000', + maker_prevented_quantity = '1.300000', + transact_time = 1669101687094, + ) + """ + + def testApiV3MyPreventedMatchesGet200ResponseInner(self): + """Test ApiV3MyPreventedMatchesGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_open_order_list_get200_response_inner.py b/target/python/binance_openapi/test/test_api_v3_open_order_list_get200_response_inner.py new file mode 100644 index 0000000..7d1d569 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_open_order_list_get200_response_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_open_order_list_get200_response_inner import ApiV3OpenOrderListGet200ResponseInner + +class TestApiV3OpenOrderListGet200ResponseInner(unittest.TestCase): + """ApiV3OpenOrderListGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3OpenOrderListGet200ResponseInner: + """Test ApiV3OpenOrderListGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3OpenOrderListGet200ResponseInner` + """ + model = ApiV3OpenOrderListGet200ResponseInner() + if include_optional: + return ApiV3OpenOrderListGet200ResponseInner( + order_list_id = 31, + contingency_type = 'OCO', + list_status_type = 'EXEC_STARTED', + list_order_status = 'EXECUTING', + list_client_order_id = 'wuB13fmulKj3YjdqWEcsnp', + transaction_time = 1565246080644, + symbol = 'LTCBTC', + orders = [ + [{"symbol":"LTCBTC","orderId":4,"clientOrderId":"r3EH2N76dHfLoSZWIUw1bT"},{"symbol":"LTCBTC","orderId":5,"clientOrderId":"Cv1SnyPD3qhqpbjpYEHbd2"}] + ] + ) + else: + return ApiV3OpenOrderListGet200ResponseInner( + order_list_id = 31, + contingency_type = 'OCO', + list_status_type = 'EXEC_STARTED', + list_order_status = 'EXECUTING', + list_client_order_id = 'wuB13fmulKj3YjdqWEcsnp', + transaction_time = 1565246080644, + symbol = 'LTCBTC', + orders = [ + [{"symbol":"LTCBTC","orderId":4,"clientOrderId":"r3EH2N76dHfLoSZWIUw1bT"},{"symbol":"LTCBTC","orderId":5,"clientOrderId":"Cv1SnyPD3qhqpbjpYEHbd2"}] + ], + ) + """ + + def testApiV3OpenOrderListGet200ResponseInner(self): + """Test ApiV3OpenOrderListGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_open_order_list_get200_response_inner_orders_inner.py b/target/python/binance_openapi/test/test_api_v3_open_order_list_get200_response_inner_orders_inner.py new file mode 100644 index 0000000..cbc808d --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_open_order_list_get200_response_inner_orders_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_open_order_list_get200_response_inner_orders_inner import ApiV3OpenOrderListGet200ResponseInnerOrdersInner + +class TestApiV3OpenOrderListGet200ResponseInnerOrdersInner(unittest.TestCase): + """ApiV3OpenOrderListGet200ResponseInnerOrdersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3OpenOrderListGet200ResponseInnerOrdersInner: + """Test ApiV3OpenOrderListGet200ResponseInnerOrdersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3OpenOrderListGet200ResponseInnerOrdersInner` + """ + model = ApiV3OpenOrderListGet200ResponseInnerOrdersInner() + if include_optional: + return ApiV3OpenOrderListGet200ResponseInnerOrdersInner( + symbol = '', + order_id = 56, + client_order_id = '' + ) + else: + return ApiV3OpenOrderListGet200ResponseInnerOrdersInner( + symbol = '', + order_id = 56, + client_order_id = '', + ) + """ + + def testApiV3OpenOrderListGet200ResponseInnerOrdersInner(self): + """Test ApiV3OpenOrderListGet200ResponseInnerOrdersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_open_orders_delete200_response_inner.py b/target/python/binance_openapi/test/test_api_v3_open_orders_delete200_response_inner.py new file mode 100644 index 0000000..15ea964 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_open_orders_delete200_response_inner.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_open_orders_delete200_response_inner import ApiV3OpenOrdersDelete200ResponseInner + +class TestApiV3OpenOrdersDelete200ResponseInner(unittest.TestCase): + """ApiV3OpenOrdersDelete200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3OpenOrdersDelete200ResponseInner: + """Test ApiV3OpenOrdersDelete200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3OpenOrdersDelete200ResponseInner` + """ + model = ApiV3OpenOrdersDelete200ResponseInner() + if include_optional: + return ApiV3OpenOrdersDelete200ResponseInner( + symbol = 'BNBBTC', + orig_client_order_id = 'msXkySR3u5uYwpvRMFsi3u', + order_id = 28, + order_list_id = 1929, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + price = '1.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'SELL', + self_trade_prevention_mode = 'NONE', + contingency_type = 'OCO', + list_status_type = 'ALL_DONE', + list_order_status = 'ALL_DONE', + list_client_order_id = 'C3wyj4WVEktd7u9aVBRXcN', + transaction_time = 1574040868128, + orders = [{symbol=BNBBTC, orderId=2, clientOrderId=pO9ufTiFGg3nw2fOdgeOXa}, {symbol=BNBBTC, orderId=3, clientOrderId=TXOvglzXuaubXAaENpaRCB}], + order_reports = [{symbol=BNBBTC, origClientOrderId=pO9ufTiFGg3nw2fOdgeOXa, orderId=2, orderListId=0, clientOrderId=unfWT8ig8i0uj6lPuYLez6, price=1.00000000, origQty=10.00000000, executedQty=0.00000000, cummulativeQuoteQty=0.00000000, status=CANCELED, timeInForce=GTC, type=STOP_LOSS_LIMIT, side=SELL, stopPrice=1.00000000, transactTime=1688005070874}, {symbol=BNBBTC, origClientOrderId=TXOvglzXuaubXAaENpaRCB, orderId=3, orderListId=0, clientOrderId=unfWT8ig8i0uj6lPuYLez6, price=3.00000000, origQty=10.00000000, executedQty=0.00000000, cummulativeQuoteQty=0.00000000, status=CANCELED, timeInForce=GTC, type=LIMIT_MAKER, side=SELL, selfTradePreventionMode=NONE, transactTime=1688005070874}] + ) + else: + return ApiV3OpenOrdersDelete200ResponseInner( + symbol = 'BNBBTC', + orig_client_order_id = 'msXkySR3u5uYwpvRMFsi3u', + order_id = 28, + order_list_id = 1929, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + price = '1.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'SELL', + self_trade_prevention_mode = 'NONE', + contingency_type = 'OCO', + list_status_type = 'ALL_DONE', + list_order_status = 'ALL_DONE', + list_client_order_id = 'C3wyj4WVEktd7u9aVBRXcN', + transaction_time = 1574040868128, + orders = [{symbol=BNBBTC, orderId=2, clientOrderId=pO9ufTiFGg3nw2fOdgeOXa}, {symbol=BNBBTC, orderId=3, clientOrderId=TXOvglzXuaubXAaENpaRCB}], + order_reports = [{symbol=BNBBTC, origClientOrderId=pO9ufTiFGg3nw2fOdgeOXa, orderId=2, orderListId=0, clientOrderId=unfWT8ig8i0uj6lPuYLez6, price=1.00000000, origQty=10.00000000, executedQty=0.00000000, cummulativeQuoteQty=0.00000000, status=CANCELED, timeInForce=GTC, type=STOP_LOSS_LIMIT, side=SELL, stopPrice=1.00000000, transactTime=1688005070874}, {symbol=BNBBTC, origClientOrderId=TXOvglzXuaubXAaENpaRCB, orderId=3, orderListId=0, clientOrderId=unfWT8ig8i0uj6lPuYLez6, price=3.00000000, origQty=10.00000000, executedQty=0.00000000, cummulativeQuoteQty=0.00000000, status=CANCELED, timeInForce=GTC, type=LIMIT_MAKER, side=SELL, selfTradePreventionMode=NONE, transactTime=1688005070874}], + ) + """ + + def testApiV3OpenOrdersDelete200ResponseInner(self): + """Test ApiV3OpenOrdersDelete200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_order_cancel_replace_post200_response.py b/target/python/binance_openapi/test/test_api_v3_order_cancel_replace_post200_response.py new file mode 100644 index 0000000..66e2e31 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_order_cancel_replace_post200_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_order_cancel_replace_post200_response import ApiV3OrderCancelReplacePost200Response + +class TestApiV3OrderCancelReplacePost200Response(unittest.TestCase): + """ApiV3OrderCancelReplacePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3OrderCancelReplacePost200Response: + """Test ApiV3OrderCancelReplacePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3OrderCancelReplacePost200Response` + """ + model = ApiV3OrderCancelReplacePost200Response() + if include_optional: + return ApiV3OrderCancelReplacePost200Response( + cancel_result = 'SUCCESS', + new_order_result = 'SUCCESS', + cancel_response = openapi_client.models._api_v3_order_cancel_replace_post_200_response_cancel_response._api_v3_order_cancelReplace_post_200_response_cancelResponse( + symbol = 'BTCUSDT', + orig_client_order_id = 'DnLo3vTAQcjha43lAZhZ0y', + order_id = 9, + order_list_id = -1, + client_order_id = 'osxN3JXAtJvKvCqGeMWMVR', + price = '0.01000000', + orig_qty = '0.000100', + executed_qty = '0.00000000', + cummulative_quote_qty = '0.00000000', + status = 'CANCELED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'SELL', + self_trade_prevention_mode = 'NONE', + transact_time = 1507725176595, ), + new_order_response = openapi_client.models._api_v3_order_cancel_replace_post_200_response_new_order_response._api_v3_order_cancelReplace_post_200_response_newOrderResponse( + symbol = 'BTCUSDT', + order_id = 10, + order_list_id = -1, + client_order_id = 'wOceeeOzNORyLiQfw7jd8S', + transact_time = 1652928801803, + price = '0.02000000', + orig_qty = '0.040000', + executed_qty = '0.00000000', + cummulative_quote_qty = '0.00000000', + status = 'NEW', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'BUY', + working_time = 1669277163808, + fills = [ + '' + ], + self_trade_prevention_mode = 'NONE', ) + ) + else: + return ApiV3OrderCancelReplacePost200Response( + cancel_result = 'SUCCESS', + new_order_result = 'SUCCESS', + cancel_response = openapi_client.models._api_v3_order_cancel_replace_post_200_response_cancel_response._api_v3_order_cancelReplace_post_200_response_cancelResponse( + symbol = 'BTCUSDT', + orig_client_order_id = 'DnLo3vTAQcjha43lAZhZ0y', + order_id = 9, + order_list_id = -1, + client_order_id = 'osxN3JXAtJvKvCqGeMWMVR', + price = '0.01000000', + orig_qty = '0.000100', + executed_qty = '0.00000000', + cummulative_quote_qty = '0.00000000', + status = 'CANCELED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'SELL', + self_trade_prevention_mode = 'NONE', + transact_time = 1507725176595, ), + new_order_response = openapi_client.models._api_v3_order_cancel_replace_post_200_response_new_order_response._api_v3_order_cancelReplace_post_200_response_newOrderResponse( + symbol = 'BTCUSDT', + order_id = 10, + order_list_id = -1, + client_order_id = 'wOceeeOzNORyLiQfw7jd8S', + transact_time = 1652928801803, + price = '0.02000000', + orig_qty = '0.040000', + executed_qty = '0.00000000', + cummulative_quote_qty = '0.00000000', + status = 'NEW', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'BUY', + working_time = 1669277163808, + fills = [ + '' + ], + self_trade_prevention_mode = 'NONE', ), + ) + """ + + def testApiV3OrderCancelReplacePost200Response(self): + """Test ApiV3OrderCancelReplacePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_order_cancel_replace_post200_response_cancel_response.py b/target/python/binance_openapi/test/test_api_v3_order_cancel_replace_post200_response_cancel_response.py new file mode 100644 index 0000000..6f5ed08 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_order_cancel_replace_post200_response_cancel_response.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_order_cancel_replace_post200_response_cancel_response import ApiV3OrderCancelReplacePost200ResponseCancelResponse + +class TestApiV3OrderCancelReplacePost200ResponseCancelResponse(unittest.TestCase): + """ApiV3OrderCancelReplacePost200ResponseCancelResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3OrderCancelReplacePost200ResponseCancelResponse: + """Test ApiV3OrderCancelReplacePost200ResponseCancelResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3OrderCancelReplacePost200ResponseCancelResponse` + """ + model = ApiV3OrderCancelReplacePost200ResponseCancelResponse() + if include_optional: + return ApiV3OrderCancelReplacePost200ResponseCancelResponse( + symbol = 'BTCUSDT', + orig_client_order_id = 'DnLo3vTAQcjha43lAZhZ0y', + order_id = 9, + order_list_id = -1, + client_order_id = 'osxN3JXAtJvKvCqGeMWMVR', + price = '0.01000000', + orig_qty = '0.000100', + executed_qty = '0.00000000', + cummulative_quote_qty = '0.00000000', + status = 'CANCELED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'SELL', + self_trade_prevention_mode = 'NONE', + transact_time = 1507725176595 + ) + else: + return ApiV3OrderCancelReplacePost200ResponseCancelResponse( + symbol = 'BTCUSDT', + orig_client_order_id = 'DnLo3vTAQcjha43lAZhZ0y', + order_id = 9, + order_list_id = -1, + client_order_id = 'osxN3JXAtJvKvCqGeMWMVR', + price = '0.01000000', + orig_qty = '0.000100', + executed_qty = '0.00000000', + cummulative_quote_qty = '0.00000000', + status = 'CANCELED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'SELL', + self_trade_prevention_mode = 'NONE', + ) + """ + + def testApiV3OrderCancelReplacePost200ResponseCancelResponse(self): + """Test ApiV3OrderCancelReplacePost200ResponseCancelResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_order_cancel_replace_post200_response_new_order_response.py b/target/python/binance_openapi/test/test_api_v3_order_cancel_replace_post200_response_new_order_response.py new file mode 100644 index 0000000..9b21d39 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_order_cancel_replace_post200_response_new_order_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_order_cancel_replace_post200_response_new_order_response import ApiV3OrderCancelReplacePost200ResponseNewOrderResponse + +class TestApiV3OrderCancelReplacePost200ResponseNewOrderResponse(unittest.TestCase): + """ApiV3OrderCancelReplacePost200ResponseNewOrderResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3OrderCancelReplacePost200ResponseNewOrderResponse: + """Test ApiV3OrderCancelReplacePost200ResponseNewOrderResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3OrderCancelReplacePost200ResponseNewOrderResponse` + """ + model = ApiV3OrderCancelReplacePost200ResponseNewOrderResponse() + if include_optional: + return ApiV3OrderCancelReplacePost200ResponseNewOrderResponse( + symbol = 'BTCUSDT', + order_id = 10, + order_list_id = -1, + client_order_id = 'wOceeeOzNORyLiQfw7jd8S', + transact_time = 1652928801803, + price = '0.02000000', + orig_qty = '0.040000', + executed_qty = '0.00000000', + cummulative_quote_qty = '0.00000000', + status = 'NEW', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'BUY', + working_time = 1669277163808, + fills = [ + '' + ], + self_trade_prevention_mode = 'NONE' + ) + else: + return ApiV3OrderCancelReplacePost200ResponseNewOrderResponse( + symbol = 'BTCUSDT', + order_id = 10, + order_list_id = -1, + client_order_id = 'wOceeeOzNORyLiQfw7jd8S', + transact_time = 1652928801803, + price = '0.02000000', + orig_qty = '0.040000', + executed_qty = '0.00000000', + cummulative_quote_qty = '0.00000000', + status = 'NEW', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'BUY', + working_time = 1669277163808, + fills = [ + '' + ], + self_trade_prevention_mode = 'NONE', + ) + """ + + def testApiV3OrderCancelReplacePost200ResponseNewOrderResponse(self): + """Test ApiV3OrderCancelReplacePost200ResponseNewOrderResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_order_list_get200_response.py b/target/python/binance_openapi/test/test_api_v3_order_list_get200_response.py new file mode 100644 index 0000000..0989980 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_order_list_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_order_list_get200_response import ApiV3OrderListGet200Response + +class TestApiV3OrderListGet200Response(unittest.TestCase): + """ApiV3OrderListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3OrderListGet200Response: + """Test ApiV3OrderListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3OrderListGet200Response` + """ + model = ApiV3OrderListGet200Response() + if include_optional: + return ApiV3OrderListGet200Response( + order_list_id = 27, + contingency_type = 'OCO', + list_status_type = 'EXEC_STARTED', + list_order_status = 'EXECUTING', + list_client_order_id = 'h2USkA5YQpaXHPIrkd96xE', + transaction_time = 1565245656253, + symbol = 'LTCBTC', + orders = [ + [{"symbol":"LTCBTC","orderId":4,"clientOrderId":"qD1gy3kc3Gx0rihm9Y3xwS"},{"symbol":"LTCBTC","orderId":5,"clientOrderId":"ARzZ9I00CPM8i3NhmU9Ega"}] + ] + ) + else: + return ApiV3OrderListGet200Response( + order_list_id = 27, + contingency_type = 'OCO', + list_status_type = 'EXEC_STARTED', + list_order_status = 'EXECUTING', + list_client_order_id = 'h2USkA5YQpaXHPIrkd96xE', + transaction_time = 1565245656253, + symbol = 'LTCBTC', + orders = [ + [{"symbol":"LTCBTC","orderId":4,"clientOrderId":"qD1gy3kc3Gx0rihm9Y3xwS"},{"symbol":"LTCBTC","orderId":5,"clientOrderId":"ARzZ9I00CPM8i3NhmU9Ega"}] + ], + ) + """ + + def testApiV3OrderListGet200Response(self): + """Test ApiV3OrderListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_order_list_get200_response_orders_inner.py b/target/python/binance_openapi/test/test_api_v3_order_list_get200_response_orders_inner.py new file mode 100644 index 0000000..cf4fbc2 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_order_list_get200_response_orders_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_order_list_get200_response_orders_inner import ApiV3OrderListGet200ResponseOrdersInner + +class TestApiV3OrderListGet200ResponseOrdersInner(unittest.TestCase): + """ApiV3OrderListGet200ResponseOrdersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3OrderListGet200ResponseOrdersInner: + """Test ApiV3OrderListGet200ResponseOrdersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3OrderListGet200ResponseOrdersInner` + """ + model = ApiV3OrderListGet200ResponseOrdersInner() + if include_optional: + return ApiV3OrderListGet200ResponseOrdersInner( + symbol = '', + order_id = 56, + client_order_id = '' + ) + else: + return ApiV3OrderListGet200ResponseOrdersInner( + symbol = '', + order_id = 56, + client_order_id = '', + ) + """ + + def testApiV3OrderListGet200ResponseOrdersInner(self): + """Test ApiV3OrderListGet200ResponseOrdersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_order_oco_post200_response.py b/target/python/binance_openapi/test/test_api_v3_order_oco_post200_response.py new file mode 100644 index 0000000..73ce410 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_order_oco_post200_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_order_oco_post200_response import ApiV3OrderOcoPost200Response + +class TestApiV3OrderOcoPost200Response(unittest.TestCase): + """ApiV3OrderOcoPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3OrderOcoPost200Response: + """Test ApiV3OrderOcoPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3OrderOcoPost200Response` + """ + model = ApiV3OrderOcoPost200Response() + if include_optional: + return ApiV3OrderOcoPost200Response( + order_list_id = 0, + contingency_type = 'OCO', + list_status_type = 'EXEC_STARTED', + list_order_status = 'EXECUTING', + list_client_order_id = 'JYVpp3F0f5CAG15DhtrqLp', + transaction_time = 1563417480525, + symbol = 'LTCBTC', + orders = [ + [{"symbol":"LTCBTC","orderId":2,"clientOrderId":"Kk7sqHb9J6mJWTMDVW7Vos"},{"symbol":"LTCBTC","orderId":3,"clientOrderId":"xTXKaGYd4bluPVp78IVRvl"}] + ], + order_reports = [{"symbol":"LTCBTC","orderId":2,"orderListId":0,"clientOrderId":"Kk7sqHb9J6mJWTMDVW7Vos","transactTime":1563417480525,"price":"0.000000","origQty":"0.624363","executedQty":"0.000000","cummulativeQuoteQty":"0.000000","status":"NEW","timeInForce":"GTC","type":"STOP_LOSS","side":"BUY","stopPrice":"0.960664","workingTime":-1,"selfTradePreventionMode":"NONE"},{"symbol":"LTCBTC","orderId":3,"orderListId":0,"clientOrderId":"xTXKaGYd4bluPVp78IVRvl","transactTime":1563417480525,"price":"0.036435","origQty":"0.624363","executedQty":"0.000000","cummulativeQuoteQty":"0.000000","status":"NEW","timeInForce":"GTC","type":"LIMIT_MAKER","side":"BUY","workingTime":1563417480525,"selfTradePreventionMode":"NONE"}] + ) + else: + return ApiV3OrderOcoPost200Response( + order_list_id = 0, + contingency_type = 'OCO', + list_status_type = 'EXEC_STARTED', + list_order_status = 'EXECUTING', + list_client_order_id = 'JYVpp3F0f5CAG15DhtrqLp', + transaction_time = 1563417480525, + symbol = 'LTCBTC', + orders = [ + [{"symbol":"LTCBTC","orderId":2,"clientOrderId":"Kk7sqHb9J6mJWTMDVW7Vos"},{"symbol":"LTCBTC","orderId":3,"clientOrderId":"xTXKaGYd4bluPVp78IVRvl"}] + ], + order_reports = [{"symbol":"LTCBTC","orderId":2,"orderListId":0,"clientOrderId":"Kk7sqHb9J6mJWTMDVW7Vos","transactTime":1563417480525,"price":"0.000000","origQty":"0.624363","executedQty":"0.000000","cummulativeQuoteQty":"0.000000","status":"NEW","timeInForce":"GTC","type":"STOP_LOSS","side":"BUY","stopPrice":"0.960664","workingTime":-1,"selfTradePreventionMode":"NONE"},{"symbol":"LTCBTC","orderId":3,"orderListId":0,"clientOrderId":"xTXKaGYd4bluPVp78IVRvl","transactTime":1563417480525,"price":"0.036435","origQty":"0.624363","executedQty":"0.000000","cummulativeQuoteQty":"0.000000","status":"NEW","timeInForce":"GTC","type":"LIMIT_MAKER","side":"BUY","workingTime":1563417480525,"selfTradePreventionMode":"NONE"}], + ) + """ + + def testApiV3OrderOcoPost200Response(self): + """Test ApiV3OrderOcoPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_order_oco_post200_response_order_reports_inner.py b/target/python/binance_openapi/test/test_api_v3_order_oco_post200_response_order_reports_inner.py new file mode 100644 index 0000000..b5bd738 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_order_oco_post200_response_order_reports_inner.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_order_oco_post200_response_order_reports_inner import ApiV3OrderOcoPost200ResponseOrderReportsInner + +class TestApiV3OrderOcoPost200ResponseOrderReportsInner(unittest.TestCase): + """ApiV3OrderOcoPost200ResponseOrderReportsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3OrderOcoPost200ResponseOrderReportsInner: + """Test ApiV3OrderOcoPost200ResponseOrderReportsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3OrderOcoPost200ResponseOrderReportsInner` + """ + model = ApiV3OrderOcoPost200ResponseOrderReportsInner() + if include_optional: + return ApiV3OrderOcoPost200ResponseOrderReportsInner( + symbol = '', + order_id = 56, + order_list_id = 56, + client_order_id = '', + transact_time = 56, + price = '', + orig_qty = '', + executed_qty = '', + cummulative_quote_qty = '', + status = '', + time_in_force = '', + type = '', + side = '', + stop_price = '', + working_time = '', + self_trade_prevention_mode = '' + ) + else: + return ApiV3OrderOcoPost200ResponseOrderReportsInner( + symbol = '', + order_id = 56, + order_list_id = 56, + client_order_id = '', + transact_time = 56, + price = '', + orig_qty = '', + executed_qty = '', + cummulative_quote_qty = '', + status = '', + time_in_force = '', + type = '', + side = '', + stop_price = '', + working_time = '', + self_trade_prevention_mode = '', + ) + """ + + def testApiV3OrderOcoPost200ResponseOrderReportsInner(self): + """Test ApiV3OrderOcoPost200ResponseOrderReportsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_order_oco_post200_response_orders_inner.py b/target/python/binance_openapi/test/test_api_v3_order_oco_post200_response_orders_inner.py new file mode 100644 index 0000000..92b26ba --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_order_oco_post200_response_orders_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_order_oco_post200_response_orders_inner import ApiV3OrderOcoPost200ResponseOrdersInner + +class TestApiV3OrderOcoPost200ResponseOrdersInner(unittest.TestCase): + """ApiV3OrderOcoPost200ResponseOrdersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3OrderOcoPost200ResponseOrdersInner: + """Test ApiV3OrderOcoPost200ResponseOrdersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3OrderOcoPost200ResponseOrdersInner` + """ + model = ApiV3OrderOcoPost200ResponseOrdersInner() + if include_optional: + return ApiV3OrderOcoPost200ResponseOrdersInner( + symbol = '', + order_id = 56, + client_order_id = '' + ) + else: + return ApiV3OrderOcoPost200ResponseOrdersInner( + symbol = '', + order_id = 56, + client_order_id = '', + ) + """ + + def testApiV3OrderOcoPost200ResponseOrdersInner(self): + """Test ApiV3OrderOcoPost200ResponseOrdersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_order_post200_response.py b/target/python/binance_openapi/test/test_api_v3_order_post200_response.py new file mode 100644 index 0000000..b1a7b25 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_order_post200_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_order_post200_response import ApiV3OrderPost200Response + +class TestApiV3OrderPost200Response(unittest.TestCase): + """ApiV3OrderPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3OrderPost200Response: + """Test ApiV3OrderPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3OrderPost200Response` + """ + model = ApiV3OrderPost200Response() + if include_optional: + return ApiV3OrderPost200Response( + symbol = 'BTCUSDT', + order_id = 28, + order_list_id = -1, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + price = '0.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'MARKET', + side = 'SELL', + strategy_id = 1, + strategy_type = 1000000, + working_time = 1507725176595, + self_trade_prevention_mode = 'NONE', + fills = [ + openapi_client.models.order_response_full_fills_inner.orderResponseFull_fills_inner( + price = '4000.00000000', + qty = '1.00000000', + commission = '4.00000000', + commission_asset = 'USDT', ) + ] + ) + else: + return ApiV3OrderPost200Response( + symbol = 'BTCUSDT', + order_id = 28, + order_list_id = -1, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + price = '0.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'MARKET', + side = 'SELL', + working_time = 1507725176595, + self_trade_prevention_mode = 'NONE', + fills = [ + openapi_client.models.order_response_full_fills_inner.orderResponseFull_fills_inner( + price = '4000.00000000', + qty = '1.00000000', + commission = '4.00000000', + commission_asset = 'USDT', ) + ], + ) + """ + + def testApiV3OrderPost200Response(self): + """Test ApiV3OrderPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_rate_limit_order_get200_response_inner.py b/target/python/binance_openapi/test/test_api_v3_rate_limit_order_get200_response_inner.py new file mode 100644 index 0000000..a55cd9a --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_rate_limit_order_get200_response_inner.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_rate_limit_order_get200_response_inner import ApiV3RateLimitOrderGet200ResponseInner + +class TestApiV3RateLimitOrderGet200ResponseInner(unittest.TestCase): + """ApiV3RateLimitOrderGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3RateLimitOrderGet200ResponseInner: + """Test ApiV3RateLimitOrderGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3RateLimitOrderGet200ResponseInner` + """ + model = ApiV3RateLimitOrderGet200ResponseInner() + if include_optional: + return ApiV3RateLimitOrderGet200ResponseInner( + rate_limit_type = '', + interval = '', + interval_num = 56, + limit = 56, + count = 56 + ) + else: + return ApiV3RateLimitOrderGet200ResponseInner( + rate_limit_type = '', + interval = '', + interval_num = 56, + limit = 56, + ) + """ + + def testApiV3RateLimitOrderGet200ResponseInner(self): + """Test ApiV3RateLimitOrderGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_sor_order_post200_response.py b/target/python/binance_openapi/test/test_api_v3_sor_order_post200_response.py new file mode 100644 index 0000000..a970580 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_sor_order_post200_response.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_sor_order_post200_response import ApiV3SorOrderPost200Response + +class TestApiV3SorOrderPost200Response(unittest.TestCase): + """ApiV3SorOrderPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3SorOrderPost200Response: + """Test ApiV3SorOrderPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3SorOrderPost200Response` + """ + model = ApiV3SorOrderPost200Response() + if include_optional: + return ApiV3SorOrderPost200Response( + symbol = 'BTCUSDT', + order_id = 2, + order_list_id = -1, + client_order_id = 'sBI1KM6nNtOfj5tccZSKly', + transact_time = 1689149087774, + price = '31000.00000000', + orig_qty = '0.50000000', + executed_qty = '0.50000000', + cummulative_quote_qty = '14000.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'BUY', + working_time = 1689149087774, + fills = [ + openapi_client.models._api_v3_sor_order_post_200_response_fills_inner._api_v3_sor_order_post_200_response_fills_inner( + match_type = 'ONE_PARTY_TRADE_REPORT', + price = '28000.00000000', + qty = '0.50000000', + commission = '0.00000000', + commission_asset = 'BTC', + trade_id = -1, + alloc_id = 0, ) + ], + working_floor = 'SOR', + self_trade_prevention_mode = 'NONE', + used_sor = True + ) + else: + return ApiV3SorOrderPost200Response( + symbol = 'BTCUSDT', + order_id = 2, + order_list_id = -1, + client_order_id = 'sBI1KM6nNtOfj5tccZSKly', + transact_time = 1689149087774, + price = '31000.00000000', + orig_qty = '0.50000000', + executed_qty = '0.50000000', + cummulative_quote_qty = '14000.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'BUY', + working_time = 1689149087774, + fills = [ + openapi_client.models._api_v3_sor_order_post_200_response_fills_inner._api_v3_sor_order_post_200_response_fills_inner( + match_type = 'ONE_PARTY_TRADE_REPORT', + price = '28000.00000000', + qty = '0.50000000', + commission = '0.00000000', + commission_asset = 'BTC', + trade_id = -1, + alloc_id = 0, ) + ], + working_floor = 'SOR', + self_trade_prevention_mode = 'NONE', + used_sor = True, + ) + """ + + def testApiV3SorOrderPost200Response(self): + """Test ApiV3SorOrderPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_sor_order_post200_response_fills_inner.py b/target/python/binance_openapi/test/test_api_v3_sor_order_post200_response_fills_inner.py new file mode 100644 index 0000000..74caf3a --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_sor_order_post200_response_fills_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_sor_order_post200_response_fills_inner import ApiV3SorOrderPost200ResponseFillsInner + +class TestApiV3SorOrderPost200ResponseFillsInner(unittest.TestCase): + """ApiV3SorOrderPost200ResponseFillsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3SorOrderPost200ResponseFillsInner: + """Test ApiV3SorOrderPost200ResponseFillsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3SorOrderPost200ResponseFillsInner` + """ + model = ApiV3SorOrderPost200ResponseFillsInner() + if include_optional: + return ApiV3SorOrderPost200ResponseFillsInner( + match_type = 'ONE_PARTY_TRADE_REPORT', + price = '28000.00000000', + qty = '0.50000000', + commission = '0.00000000', + commission_asset = 'BTC', + trade_id = -1, + alloc_id = 0 + ) + else: + return ApiV3SorOrderPost200ResponseFillsInner( + match_type = 'ONE_PARTY_TRADE_REPORT', + price = '28000.00000000', + qty = '0.50000000', + commission = '0.00000000', + commission_asset = 'BTC', + trade_id = -1, + alloc_id = 0, + ) + """ + + def testApiV3SorOrderPost200ResponseFillsInner(self): + """Test ApiV3SorOrderPost200ResponseFillsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_ticker24hr_get200_response.py b/target/python/binance_openapi/test/test_api_v3_ticker24hr_get200_response.py new file mode 100644 index 0000000..9d61dec --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_ticker24hr_get200_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_ticker24hr_get200_response import ApiV3Ticker24hrGet200Response + +class TestApiV3Ticker24hrGet200Response(unittest.TestCase): + """ApiV3Ticker24hrGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3Ticker24hrGet200Response: + """Test ApiV3Ticker24hrGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3Ticker24hrGet200Response` + """ + model = ApiV3Ticker24hrGet200Response() + if include_optional: + return ApiV3Ticker24hrGet200Response( + symbol = 'BNBBTC', + price_change = '0.17160000', + price_change_percent = '1.060', + prev_close_price = '16.35920000', + last_price = '27.84000000', + bid_price = '16.34488284', + bid_qty = '16.34488284', + ask_price = '16.35920000', + ask_qty = '25.06000000', + open_price = '16.18760000', + high_price = '16.55000000', + low_price = '16.16940000', + volume = '1678279.95000000', + quote_volume = '27431289.14792300', + open_time = 1592808788637, + close_time = 1592895188637, + first_id = 62683296, + last_id = 62739253, + count = 55958 + ) + else: + return ApiV3Ticker24hrGet200Response( + symbol = 'BNBBTC', + price_change = '0.17160000', + price_change_percent = '1.060', + prev_close_price = '16.35920000', + last_price = '27.84000000', + bid_price = '16.34488284', + bid_qty = '16.34488284', + ask_price = '16.35920000', + ask_qty = '25.06000000', + open_price = '16.18760000', + high_price = '16.55000000', + low_price = '16.16940000', + volume = '1678279.95000000', + quote_volume = '27431289.14792300', + open_time = 1592808788637, + close_time = 1592895188637, + first_id = 62683296, + last_id = 62739253, + count = 55958, + ) + """ + + def testApiV3Ticker24hrGet200Response(self): + """Test ApiV3Ticker24hrGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_ticker_book_ticker_get200_response.py b/target/python/binance_openapi/test/test_api_v3_ticker_book_ticker_get200_response.py new file mode 100644 index 0000000..96fd89d --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_ticker_book_ticker_get200_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_ticker_book_ticker_get200_response import ApiV3TickerBookTickerGet200Response + +class TestApiV3TickerBookTickerGet200Response(unittest.TestCase): + """ApiV3TickerBookTickerGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3TickerBookTickerGet200Response: + """Test ApiV3TickerBookTickerGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3TickerBookTickerGet200Response` + """ + model = ApiV3TickerBookTickerGet200Response() + if include_optional: + return ApiV3TickerBookTickerGet200Response( + symbol = 'BNBBTC', + bid_price = '16.36240000', + bid_qty = '256.78000000', + ask_price = '16.36450000', + ask_qty = '12.56000000' + ) + else: + return ApiV3TickerBookTickerGet200Response( + symbol = 'BNBBTC', + bid_price = '16.36240000', + bid_qty = '256.78000000', + ask_price = '16.36450000', + ask_qty = '12.56000000', + ) + """ + + def testApiV3TickerBookTickerGet200Response(self): + """Test ApiV3TickerBookTickerGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_ticker_get200_response.py b/target/python/binance_openapi/test/test_api_v3_ticker_get200_response.py new file mode 100644 index 0000000..5bd407e --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_ticker_get200_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_ticker_get200_response import ApiV3TickerGet200Response + +class TestApiV3TickerGet200Response(unittest.TestCase): + """ApiV3TickerGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3TickerGet200Response: + """Test ApiV3TickerGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3TickerGet200Response` + """ + model = ApiV3TickerGet200Response() + if include_optional: + return ApiV3TickerGet200Response( + symbol = 'BNBBTC', + price_change = '-8.00000000', + price_change_percent = '-88.889', + weighted_avg_price = '2.60427807', + open_price = '9.00000000', + high_price = '9.00000000', + low_price = '1.00000000', + last_price = '1.00000000', + volume = '187.00000000', + quote_volume = '487.00000000', + open_time = 1641859200000, + close_time = 1642031999999, + first_id = 0, + last_id = 60, + count = 61 + ) + else: + return ApiV3TickerGet200Response( + symbol = 'BNBBTC', + price_change = '-8.00000000', + price_change_percent = '-88.889', + weighted_avg_price = '2.60427807', + open_price = '9.00000000', + high_price = '9.00000000', + low_price = '1.00000000', + last_price = '1.00000000', + volume = '187.00000000', + quote_volume = '487.00000000', + open_time = 1641859200000, + close_time = 1642031999999, + first_id = 0, + last_id = 60, + count = 61, + ) + """ + + def testApiV3TickerGet200Response(self): + """Test ApiV3TickerGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_ticker_price_get200_response.py b/target/python/binance_openapi/test/test_api_v3_ticker_price_get200_response.py new file mode 100644 index 0000000..72e72bb --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_ticker_price_get200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_ticker_price_get200_response import ApiV3TickerPriceGet200Response + +class TestApiV3TickerPriceGet200Response(unittest.TestCase): + """ApiV3TickerPriceGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3TickerPriceGet200Response: + """Test ApiV3TickerPriceGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3TickerPriceGet200Response` + """ + model = ApiV3TickerPriceGet200Response() + if include_optional: + return ApiV3TickerPriceGet200Response( + symbol = 'BNBBTC', + price = '0.17160000' + ) + else: + return ApiV3TickerPriceGet200Response( + symbol = 'BNBBTC', + price = '0.17160000', + ) + """ + + def testApiV3TickerPriceGet200Response(self): + """Test ApiV3TickerPriceGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_ticker_trading_day_get200_response.py b/target/python/binance_openapi/test/test_api_v3_ticker_trading_day_get200_response.py new file mode 100644 index 0000000..ff1831a --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_ticker_trading_day_get200_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_ticker_trading_day_get200_response import ApiV3TickerTradingDayGet200Response + +class TestApiV3TickerTradingDayGet200Response(unittest.TestCase): + """ApiV3TickerTradingDayGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3TickerTradingDayGet200Response: + """Test ApiV3TickerTradingDayGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3TickerTradingDayGet200Response` + """ + model = ApiV3TickerTradingDayGet200Response() + if include_optional: + return ApiV3TickerTradingDayGet200Response( + symbol = 'BTCUSDT', + price_change = '-83.13000000', + price_change_percent = '-0.317', + weighted_avg_price = '26234.58803036', + open_price = '26304.80000000', + high_price = '26397.46000000', + low_price = '26088.34000000', + last_price = '26221.67000000', + volume = '18495.35066000', + quote_volume = '485217905.04210480', + open_time = 1695686400000, + close_time = 1695772799999, + first_id = 3220151555, + last_id = 3220849281, + count = 697727 + ) + else: + return ApiV3TickerTradingDayGet200Response( + symbol = 'BTCUSDT', + price_change = '-83.13000000', + price_change_percent = '-0.317', + weighted_avg_price = '26234.58803036', + open_price = '26304.80000000', + high_price = '26397.46000000', + low_price = '26088.34000000', + last_price = '26221.67000000', + volume = '18495.35066000', + quote_volume = '485217905.04210480', + open_time = 1695686400000, + close_time = 1695772799999, + first_id = 3220151555, + last_id = 3220849281, + count = 697727, + ) + """ + + def testApiV3TickerTradingDayGet200Response(self): + """Test ApiV3TickerTradingDayGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_time_get200_response.py b/target/python/binance_openapi/test/test_api_v3_time_get200_response.py new file mode 100644 index 0000000..3fc4c37 --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_time_get200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_time_get200_response import ApiV3TimeGet200Response + +class TestApiV3TimeGet200Response(unittest.TestCase): + """ApiV3TimeGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3TimeGet200Response: + """Test ApiV3TimeGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3TimeGet200Response` + """ + model = ApiV3TimeGet200Response() + if include_optional: + return ApiV3TimeGet200Response( + server_time = 1499827319559 + ) + else: + return ApiV3TimeGet200Response( + server_time = 1499827319559, + ) + """ + + def testApiV3TimeGet200Response(self): + """Test ApiV3TimeGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_api_v3_user_data_stream_post200_response.py b/target/python/binance_openapi/test/test_api_v3_user_data_stream_post200_response.py new file mode 100644 index 0000000..51bd25b --- /dev/null +++ b/target/python/binance_openapi/test/test_api_v3_user_data_stream_post200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.api_v3_user_data_stream_post200_response import ApiV3UserDataStreamPost200Response + +class TestApiV3UserDataStreamPost200Response(unittest.TestCase): + """ApiV3UserDataStreamPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiV3UserDataStreamPost200Response: + """Test ApiV3UserDataStreamPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiV3UserDataStreamPost200Response` + """ + model = ApiV3UserDataStreamPost200Response() + if include_optional: + return ApiV3UserDataStreamPost200Response( + listen_key = 'pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1' + ) + else: + return ApiV3UserDataStreamPost200Response( + listen_key = 'pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1', + ) + """ + + def testApiV3UserDataStreamPost200Response(self): + """Test ApiV3UserDataStreamPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_auto_invest_api.py b/target/python/binance_openapi/test/test_auto_invest_api.py new file mode 100644 index 0000000..15b14fe --- /dev/null +++ b/target/python/binance_openapi/test/test_auto_invest_api.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.auto_invest_api import AutoInvestApi + + +class TestAutoInvestApi(unittest.TestCase): + """AutoInvestApi unit test stubs""" + + def setUp(self) -> None: + self.api = AutoInvestApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_lending_auto_invest_all_asset_get(self) -> None: + """Test case for sapi_v1_lending_auto_invest_all_asset_get + + Query all source asset and target asset (USER_DATA) + """ + pass + + def test_sapi_v1_lending_auto_invest_history_list_get(self) -> None: + """Test case for sapi_v1_lending_auto_invest_history_list_get + + Query subscription transaction history + """ + pass + + def test_sapi_v1_lending_auto_invest_index_info_get(self) -> None: + """Test case for sapi_v1_lending_auto_invest_index_info_get + + Query Index Details(USER_DATA) + """ + pass + + def test_sapi_v1_lending_auto_invest_index_user_summary_get(self) -> None: + """Test case for sapi_v1_lending_auto_invest_index_user_summary_get + + Query Index Linked Plan Position Details(USER_DATA) + """ + pass + + def test_sapi_v1_lending_auto_invest_one_off_post(self) -> None: + """Test case for sapi_v1_lending_auto_invest_one_off_post + + One Time Transaction(TRADE) + """ + pass + + def test_sapi_v1_lending_auto_invest_one_off_status_get(self) -> None: + """Test case for sapi_v1_lending_auto_invest_one_off_status_get + + Query One-Time Transaction Status (USER_DATA) + """ + pass + + def test_sapi_v1_lending_auto_invest_plan_add_post(self) -> None: + """Test case for sapi_v1_lending_auto_invest_plan_add_post + + Investment plan creation (USER_DATA) + """ + pass + + def test_sapi_v1_lending_auto_invest_plan_edit_post(self) -> None: + """Test case for sapi_v1_lending_auto_invest_plan_edit_post + + Investment plan adjustment + """ + pass + + def test_sapi_v1_lending_auto_invest_plan_edit_status_post(self) -> None: + """Test case for sapi_v1_lending_auto_invest_plan_edit_status_post + + Change Plan Status + """ + pass + + def test_sapi_v1_lending_auto_invest_plan_id_get(self) -> None: + """Test case for sapi_v1_lending_auto_invest_plan_id_get + + Query holding details of the plan + """ + pass + + def test_sapi_v1_lending_auto_invest_plan_list_get(self) -> None: + """Test case for sapi_v1_lending_auto_invest_plan_list_get + + Get list of plans + """ + pass + + def test_sapi_v1_lending_auto_invest_rebalance_history_get(self) -> None: + """Test case for sapi_v1_lending_auto_invest_rebalance_history_get + + Index Linked Plan Rebalance Details (USER_DATA) + """ + pass + + def test_sapi_v1_lending_auto_invest_redeem_history_get(self) -> None: + """Test case for sapi_v1_lending_auto_invest_redeem_history_get + + Index Linked Plan Redemption History (USER_DATA) + """ + pass + + def test_sapi_v1_lending_auto_invest_redeem_post(self) -> None: + """Test case for sapi_v1_lending_auto_invest_redeem_post + + Index Linked Plan Redemption (TRADE) + """ + pass + + def test_sapi_v1_lending_auto_invest_source_asset_list_get(self) -> None: + """Test case for sapi_v1_lending_auto_invest_source_asset_list_get + + Query source asset list (USER_DATA) + """ + pass + + def test_sapi_v1_lending_auto_invest_target_asset_list_get(self) -> None: + """Test case for sapi_v1_lending_auto_invest_target_asset_list_get + + Get target asset list (USER_DATA) + """ + pass + + def test_sapi_v1_lending_auto_invest_target_asset_roi_list_get(self) -> None: + """Test case for sapi_v1_lending_auto_invest_target_asset_roi_list_get + + Get target asset ROI data (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_blvt_api.py b/target/python/binance_openapi/test/test_blvt_api.py new file mode 100644 index 0000000..905df0c --- /dev/null +++ b/target/python/binance_openapi/test/test_blvt_api.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.blvt_api import BLVTApi + + +class TestBLVTApi(unittest.TestCase): + """BLVTApi unit test stubs""" + + def setUp(self) -> None: + self.api = BLVTApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_blvt_redeem_post(self) -> None: + """Test case for sapi_v1_blvt_redeem_post + + Redeem BLVT (USER_DATA) + """ + pass + + def test_sapi_v1_blvt_redeem_record_get(self) -> None: + """Test case for sapi_v1_blvt_redeem_record_get + + Redemption Record (USER_DATA) + """ + pass + + def test_sapi_v1_blvt_subscribe_post(self) -> None: + """Test case for sapi_v1_blvt_subscribe_post + + Subscribe BLVT (USER_DATA) + """ + pass + + def test_sapi_v1_blvt_subscribe_record_get(self) -> None: + """Test case for sapi_v1_blvt_subscribe_record_get + + Query Subscription Record (USER_DATA) + """ + pass + + def test_sapi_v1_blvt_token_info_get(self) -> None: + """Test case for sapi_v1_blvt_token_info_get + + BLVT Info (MARKET_DATA) + """ + pass + + def test_sapi_v1_blvt_user_limit_get(self) -> None: + """Test case for sapi_v1_blvt_user_limit_get + + BLVT User Limit Info (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_bnb_burn_status.py b/target/python/binance_openapi/test/test_bnb_burn_status.py new file mode 100644 index 0000000..1ffc0cd --- /dev/null +++ b/target/python/binance_openapi/test/test_bnb_burn_status.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.bnb_burn_status import BnbBurnStatus + +class TestBnbBurnStatus(unittest.TestCase): + """BnbBurnStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BnbBurnStatus: + """Test BnbBurnStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BnbBurnStatus` + """ + model = BnbBurnStatus() + if include_optional: + return BnbBurnStatus( + spot_bnb_burn = True, + interest_bnb_burn = False + ) + else: + return BnbBurnStatus( + spot_bnb_burn = True, + interest_bnb_burn = False, + ) + """ + + def testBnbBurnStatus(self): + """Test BnbBurnStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_book_ticker.py b/target/python/binance_openapi/test/test_book_ticker.py new file mode 100644 index 0000000..1d6a82b --- /dev/null +++ b/target/python/binance_openapi/test/test_book_ticker.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.book_ticker import BookTicker + +class TestBookTicker(unittest.TestCase): + """BookTicker unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BookTicker: + """Test BookTicker + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BookTicker` + """ + model = BookTicker() + if include_optional: + return BookTicker( + symbol = 'BNBBTC', + bid_price = '16.36240000', + bid_qty = '256.78000000', + ask_price = '16.36450000', + ask_qty = '12.56000000' + ) + else: + return BookTicker( + symbol = 'BNBBTC', + bid_price = '16.36240000', + bid_qty = '256.78000000', + ask_price = '16.36450000', + ask_qty = '12.56000000', + ) + """ + + def testBookTicker(self): + """Test BookTicker""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_c2_c_api.py b/target/python/binance_openapi/test/test_c2_c_api.py new file mode 100644 index 0000000..3961688 --- /dev/null +++ b/target/python/binance_openapi/test/test_c2_c_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.c2_c_api import C2CApi + + +class TestC2CApi(unittest.TestCase): + """C2CApi unit test stubs""" + + def setUp(self) -> None: + self.api = C2CApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_c2c_order_match_list_user_order_history_get(self) -> None: + """Test case for sapi_v1_c2c_order_match_list_user_order_history_get + + Get C2C Trade History (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_canceled_margin_order_detail.py b/target/python/binance_openapi/test/test_canceled_margin_order_detail.py new file mode 100644 index 0000000..4cb3e55 --- /dev/null +++ b/target/python/binance_openapi/test/test_canceled_margin_order_detail.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.canceled_margin_order_detail import CanceledMarginOrderDetail + +class TestCanceledMarginOrderDetail(unittest.TestCase): + """CanceledMarginOrderDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CanceledMarginOrderDetail: + """Test CanceledMarginOrderDetail + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CanceledMarginOrderDetail` + """ + model = CanceledMarginOrderDetail() + if include_optional: + return CanceledMarginOrderDetail( + symbol = 'BNBUSDT', + is_isolated = True, + orig_client_order_id = 'E6APeyTJvkMvLMYMqu1KQ4', + order_id = 11, + order_list_id = -1, + client_order_id = 'pXLV6Hz6mprAcVYpVMTGgx', + price = '0.089853', + orig_qty = '0.178622', + executed_qty = '0.000000', + cummulative_quote_qty = '0.000000', + status = 'CANCELED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'BUY' + ) + else: + return CanceledMarginOrderDetail( + symbol = 'BNBUSDT', + is_isolated = True, + orig_client_order_id = 'E6APeyTJvkMvLMYMqu1KQ4', + order_id = 11, + order_list_id = -1, + client_order_id = 'pXLV6Hz6mprAcVYpVMTGgx', + price = '0.089853', + orig_qty = '0.178622', + executed_qty = '0.000000', + cummulative_quote_qty = '0.000000', + status = 'CANCELED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'BUY', + ) + """ + + def testCanceledMarginOrderDetail(self): + """Test CanceledMarginOrderDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_convert_api.py b/target/python/binance_openapi/test/test_convert_api.py new file mode 100644 index 0000000..f896a9a --- /dev/null +++ b/target/python/binance_openapi/test/test_convert_api.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.convert_api import ConvertApi + + +class TestConvertApi(unittest.TestCase): + """ConvertApi unit test stubs""" + + def setUp(self) -> None: + self.api = ConvertApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_convert_accept_quote_post(self) -> None: + """Test case for sapi_v1_convert_accept_quote_post + + Accept Quote (TRADE) + """ + pass + + def test_sapi_v1_convert_asset_info_get(self) -> None: + """Test case for sapi_v1_convert_asset_info_get + + Query order quantity precision per asset (USER_DATA) + """ + pass + + def test_sapi_v1_convert_exchange_info_get(self) -> None: + """Test case for sapi_v1_convert_exchange_info_get + + List All Convert Pairs + """ + pass + + def test_sapi_v1_convert_get_quote_post(self) -> None: + """Test case for sapi_v1_convert_get_quote_post + + Send quote request (USER_DATA) + """ + pass + + def test_sapi_v1_convert_limit_cancel_order_post(self) -> None: + """Test case for sapi_v1_convert_limit_cancel_order_post + + Cancel limit order (USER_DATA) + """ + pass + + def test_sapi_v1_convert_limit_place_order_post(self) -> None: + """Test case for sapi_v1_convert_limit_place_order_post + + Place limit order (USER_DATA) + """ + pass + + def test_sapi_v1_convert_limit_query_open_orders_get(self) -> None: + """Test case for sapi_v1_convert_limit_query_open_orders_get + + Query limit open orders (USER_DATA) + """ + pass + + def test_sapi_v1_convert_order_status_get(self) -> None: + """Test case for sapi_v1_convert_order_status_get + + Order status (USER_DATA) + """ + pass + + def test_sapi_v1_convert_trade_flow_get(self) -> None: + """Test case for sapi_v1_convert_trade_flow_get + + Get Convert Trade History (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_crypto_loans_api.py b/target/python/binance_openapi/test/test_crypto_loans_api.py new file mode 100644 index 0000000..cd59796 --- /dev/null +++ b/target/python/binance_openapi/test/test_crypto_loans_api.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.crypto_loans_api import CryptoLoansApi + + +class TestCryptoLoansApi(unittest.TestCase): + """CryptoLoansApi unit test stubs""" + + def setUp(self) -> None: + self.api = CryptoLoansApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_loan_adjust_ltv_post(self) -> None: + """Test case for sapi_v1_loan_adjust_ltv_post + + Crypto Loan Adjust LTV (TRADE) + """ + pass + + def test_sapi_v1_loan_borrow_history_get(self) -> None: + """Test case for sapi_v1_loan_borrow_history_get + + Get Crypto Loans Borrow History (USER_DATA) + """ + pass + + def test_sapi_v1_loan_borrow_post(self) -> None: + """Test case for sapi_v1_loan_borrow_post + + Crypto Loan Borrow (TRADE) + """ + pass + + def test_sapi_v1_loan_collateral_data_get(self) -> None: + """Test case for sapi_v1_loan_collateral_data_get + + Get Collateral Assets Data (USER_DATA) + """ + pass + + def test_sapi_v1_loan_customize_margin_call_post(self) -> None: + """Test case for sapi_v1_loan_customize_margin_call_post + + Crypto Loan Customize Margin Call (TRADE) + """ + pass + + def test_sapi_v1_loan_income_get(self) -> None: + """Test case for sapi_v1_loan_income_get + + Get Crypto Loans Income History (USER_DATA) + """ + pass + + def test_sapi_v1_loan_loanable_data_get(self) -> None: + """Test case for sapi_v1_loan_loanable_data_get + + Get Loanable Assets Data (USER_DATA) + """ + pass + + def test_sapi_v1_loan_ltv_adjustment_history_get(self) -> None: + """Test case for sapi_v1_loan_ltv_adjustment_history_get + + Get Loan LTV Adjustment History (USER_DATA) + """ + pass + + def test_sapi_v1_loan_ongoing_orders_get(self) -> None: + """Test case for sapi_v1_loan_ongoing_orders_get + + Get Loan Ongoing Orders (USER_DATA) + """ + pass + + def test_sapi_v1_loan_repay_collateral_rate_get(self) -> None: + """Test case for sapi_v1_loan_repay_collateral_rate_get + + Check Collateral Repay Rate (USER_DATA) + """ + pass + + def test_sapi_v1_loan_repay_history_get(self) -> None: + """Test case for sapi_v1_loan_repay_history_get + + Get Loan Repayment History (USER_DATA) + """ + pass + + def test_sapi_v1_loan_repay_post(self) -> None: + """Test case for sapi_v1_loan_repay_post + + Crypto Loan Repay (TRADE) + """ + pass + + def test_sapi_v2_loan_flexible_adjust_ltv_post(self) -> None: + """Test case for sapi_v2_loan_flexible_adjust_ltv_post + + Adjust LTV - Flexible Loan Adjust LTV (TRADE) + """ + pass + + def test_sapi_v2_loan_flexible_borrow_history_get(self) -> None: + """Test case for sapi_v2_loan_flexible_borrow_history_get + + Borrow - Get Flexible Loan Borrow History (USER_DATA) + """ + pass + + def test_sapi_v2_loan_flexible_borrow_post(self) -> None: + """Test case for sapi_v2_loan_flexible_borrow_post + + Borrow - Flexible Loan Borrow (TRADE) + """ + pass + + def test_sapi_v2_loan_flexible_collateral_data_get(self) -> None: + """Test case for sapi_v2_loan_flexible_collateral_data_get + + Get Flexible Loan Collateral Assets Data (USER_DATA) + """ + pass + + def test_sapi_v2_loan_flexible_loanable_data_get(self) -> None: + """Test case for sapi_v2_loan_flexible_loanable_data_get + + Get Flexible Loan Assets Data (USER_DATA) + """ + pass + + def test_sapi_v2_loan_flexible_ltv_adjustment_history_get(self) -> None: + """Test case for sapi_v2_loan_flexible_ltv_adjustment_history_get + + Adjust LTV - Get Flexible Loan LTV Adjustment History (USER_DATA) + """ + pass + + def test_sapi_v2_loan_flexible_ongoing_orders_get(self) -> None: + """Test case for sapi_v2_loan_flexible_ongoing_orders_get + + Borrow - Get Flexible Loan Ongoing Orders (USER_DATA) + """ + pass + + def test_sapi_v2_loan_flexible_repay_history_get(self) -> None: + """Test case for sapi_v2_loan_flexible_repay_history_get + + Repay - Get Flexible Loan Repayment History (USER_DATA) + """ + pass + + def test_sapi_v2_loan_flexible_repay_post(self) -> None: + """Test case for sapi_v2_loan_flexible_repay_post + + Repay - Flexible Loan Repay (TRADE) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_day_ticker.py b/target/python/binance_openapi/test/test_day_ticker.py new file mode 100644 index 0000000..a573e7f --- /dev/null +++ b/target/python/binance_openapi/test/test_day_ticker.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.day_ticker import DayTicker + +class TestDayTicker(unittest.TestCase): + """DayTicker unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DayTicker: + """Test DayTicker + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DayTicker` + """ + model = DayTicker() + if include_optional: + return DayTicker( + symbol = 'BTCUSDT', + price_change = '-83.13000000', + price_change_percent = '-0.317', + weighted_avg_price = '26234.58803036', + open_price = '26304.80000000', + high_price = '26397.46000000', + low_price = '26088.34000000', + last_price = '26221.67000000', + volume = '18495.35066000', + quote_volume = '485217905.04210480', + open_time = 1695686400000, + close_time = 1695772799999, + first_id = 3220151555, + last_id = 3220849281, + count = 697727 + ) + else: + return DayTicker( + symbol = 'BTCUSDT', + price_change = '-83.13000000', + price_change_percent = '-0.317', + weighted_avg_price = '26234.58803036', + open_price = '26304.80000000', + high_price = '26397.46000000', + low_price = '26088.34000000', + last_price = '26221.67000000', + volume = '18495.35066000', + quote_volume = '485217905.04210480', + open_time = 1695686400000, + close_time = 1695772799999, + first_id = 3220151555, + last_id = 3220849281, + count = 697727, + ) + """ + + def testDayTicker(self): + """Test DayTicker""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_dual_investment_api.py b/target/python/binance_openapi/test/test_dual_investment_api.py new file mode 100644 index 0000000..3583571 --- /dev/null +++ b/target/python/binance_openapi/test/test_dual_investment_api.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.dual_investment_api import DualInvestmentApi + + +class TestDualInvestmentApi(unittest.TestCase): + """DualInvestmentApi unit test stubs""" + + def setUp(self) -> None: + self.api = DualInvestmentApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_dci_product_accounts_get(self) -> None: + """Test case for sapi_v1_dci_product_accounts_get + + Check Dual Investment accounts(USER_DATA) + """ + pass + + def test_sapi_v1_dci_product_auto_compound_edit_status_post(self) -> None: + """Test case for sapi_v1_dci_product_auto_compound_edit_status_post + + Change Auto-Compound status(USER_DATA) + """ + pass + + def test_sapi_v1_dci_product_list_get(self) -> None: + """Test case for sapi_v1_dci_product_list_get + + Get Dual Investment product list(USER_DATA) + """ + pass + + def test_sapi_v1_dci_product_positions_get(self) -> None: + """Test case for sapi_v1_dci_product_positions_get + + Get Dual Investment positions(USER_DATA) + """ + pass + + def test_sapi_v1_dci_product_subscribe_post(self) -> None: + """Test case for sapi_v1_dci_product_subscribe_post + + Subscribe Dual Investment products(USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_error.py b/target/python/binance_openapi/test/test_error.py new file mode 100644 index 0000000..a9ec6a3 --- /dev/null +++ b/target/python/binance_openapi/test/test_error.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + code = 56, + msg = 'error message' + ) + else: + return Error( + code = 56, + msg = 'error message', + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_fiat_api.py b/target/python/binance_openapi/test/test_fiat_api.py new file mode 100644 index 0000000..c4d0404 --- /dev/null +++ b/target/python/binance_openapi/test/test_fiat_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.fiat_api import FiatApi + + +class TestFiatApi(unittest.TestCase): + """FiatApi unit test stubs""" + + def setUp(self) -> None: + self.api = FiatApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_fiat_orders_get(self) -> None: + """Test case for sapi_v1_fiat_orders_get + + Fiat Deposit/Withdraw History (USER_DATA) + """ + pass + + def test_sapi_v1_fiat_payments_get(self) -> None: + """Test case for sapi_v1_fiat_payments_get + + Fiat Payments History (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_futures_algo_api.py b/target/python/binance_openapi/test/test_futures_algo_api.py new file mode 100644 index 0000000..dcde3b4 --- /dev/null +++ b/target/python/binance_openapi/test/test_futures_algo_api.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.futures_algo_api import FuturesAlgoApi + + +class TestFuturesAlgoApi(unittest.TestCase): + """FuturesAlgoApi unit test stubs""" + + def setUp(self) -> None: + self.api = FuturesAlgoApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_algo_futures_historical_orders_get(self) -> None: + """Test case for sapi_v1_algo_futures_historical_orders_get + + Query Historical Algo Orders (USER_DATA) + """ + pass + + def test_sapi_v1_algo_futures_new_order_twap_post(self) -> None: + """Test case for sapi_v1_algo_futures_new_order_twap_post + + Time-Weighted Average Price(Twap) New Order (TRADE) + """ + pass + + def test_sapi_v1_algo_futures_new_order_vp_post(self) -> None: + """Test case for sapi_v1_algo_futures_new_order_vp_post + + Volume Participation(VP) New Order (TRADE) + """ + pass + + def test_sapi_v1_algo_futures_open_orders_get(self) -> None: + """Test case for sapi_v1_algo_futures_open_orders_get + + Query Current Algo Open Orders (USER_DATA) + """ + pass + + def test_sapi_v1_algo_futures_order_delete(self) -> None: + """Test case for sapi_v1_algo_futures_order_delete + + Cancel Algo Order(TRADE) + """ + pass + + def test_sapi_v1_algo_futures_sub_orders_get(self) -> None: + """Test case for sapi_v1_algo_futures_sub_orders_get + + Query Sub Orders (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_futures_api.py b/target/python/binance_openapi/test/test_futures_api.py new file mode 100644 index 0000000..208f9e3 --- /dev/null +++ b/target/python/binance_openapi/test/test_futures_api.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.futures_api import FuturesApi + + +class TestFuturesApi(unittest.TestCase): + """FuturesApi unit test stubs""" + + def setUp(self) -> None: + self.api = FuturesApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_futures_hist_data_link_get(self) -> None: + """Test case for sapi_v1_futures_hist_data_link_get + + Get Future TickLevel Orderbook Historical Data Download Link (USER_DATA) + """ + pass + + def test_sapi_v1_futures_transfer_get(self) -> None: + """Test case for sapi_v1_futures_transfer_get + + Get Future Account Transaction History List (USER_DATA) + """ + pass + + def test_sapi_v1_futures_transfer_post(self) -> None: + """Test case for sapi_v1_futures_transfer_post + + New Future Account Transfer (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_gift_card_api.py b/target/python/binance_openapi/test/test_gift_card_api.py new file mode 100644 index 0000000..9b6e375 --- /dev/null +++ b/target/python/binance_openapi/test/test_gift_card_api.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.gift_card_api import GiftCardApi + + +class TestGiftCardApi(unittest.TestCase): + """GiftCardApi unit test stubs""" + + def setUp(self) -> None: + self.api = GiftCardApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_giftcard_buy_code_post(self) -> None: + """Test case for sapi_v1_giftcard_buy_code_post + + Buy a Binance Code (TRADE) + """ + pass + + def test_sapi_v1_giftcard_buy_code_token_limit_get(self) -> None: + """Test case for sapi_v1_giftcard_buy_code_token_limit_get + + Fetch Token Limit (USER_DATA) + """ + pass + + def test_sapi_v1_giftcard_create_code_post(self) -> None: + """Test case for sapi_v1_giftcard_create_code_post + + Create a Binance Code (USER_DATA) + """ + pass + + def test_sapi_v1_giftcard_cryptography_rsa_public_key_get(self) -> None: + """Test case for sapi_v1_giftcard_cryptography_rsa_public_key_get + + Fetch RSA Public Key (USER_DATA) + """ + pass + + def test_sapi_v1_giftcard_redeem_code_post(self) -> None: + """Test case for sapi_v1_giftcard_redeem_code_post + + Redeem a Binance Code (USER_DATA) + """ + pass + + def test_sapi_v1_giftcard_verify_get(self) -> None: + """Test case for sapi_v1_giftcard_verify_get + + Verify a Binance Code (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_isolated_margin_account_info.py b/target/python/binance_openapi/test/test_isolated_margin_account_info.py new file mode 100644 index 0000000..539ec47 --- /dev/null +++ b/target/python/binance_openapi/test/test_isolated_margin_account_info.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.isolated_margin_account_info import IsolatedMarginAccountInfo + +class TestIsolatedMarginAccountInfo(unittest.TestCase): + """IsolatedMarginAccountInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IsolatedMarginAccountInfo: + """Test IsolatedMarginAccountInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IsolatedMarginAccountInfo` + """ + model = IsolatedMarginAccountInfo() + if include_optional: + return IsolatedMarginAccountInfo( + assets = [ + openapi_client.models.isolated_margin_account_info_assets_inner.isolatedMarginAccountInfo_assets_inner( + base_asset = openapi_client.models.isolated_margin_account_info_assets_inner_base_asset.isolatedMarginAccountInfo_assets_inner_baseAsset( + asset = 'BTC', + borrow_enabled = True, + borrowed = '0.00000000', + free = '0.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00000000', + net_asset_of_btc = '0.00000000', + repay_enabled = True, + total_asset = '0.00000000', ), + quote_asset = openapi_client.models.isolated_margin_account_info_assets_inner_quote_asset.isolatedMarginAccountInfo_assets_inner_quoteAsset( + asset = 'USDT', + borrow_enabled = True, + borrowed = '0.00000000', + free = '0.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00000000', + net_asset_of_btc = '0.00000000', + repay_enabled = True, + total_asset = '0.00000000', ), + symbol = 'BTCUSDT', + isolated_created = True, + enabled = True, + margin_level = '0.00000000', + margin_level_status = 'EXCESSIVE', + margin_ratio = '0.00000000', + index_price = '10000.00000000', + liquidate_price = '1000.00000000', + liquidate_rate = '1.00000000', + trade_enabled = True, ) + ], + total_asset_of_btc = '0.00000000', + total_liability_of_btc = '0.00000000', + total_net_asset_of_btc = '0.00000000' + ) + else: + return IsolatedMarginAccountInfo( + assets = [ + openapi_client.models.isolated_margin_account_info_assets_inner.isolatedMarginAccountInfo_assets_inner( + base_asset = openapi_client.models.isolated_margin_account_info_assets_inner_base_asset.isolatedMarginAccountInfo_assets_inner_baseAsset( + asset = 'BTC', + borrow_enabled = True, + borrowed = '0.00000000', + free = '0.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00000000', + net_asset_of_btc = '0.00000000', + repay_enabled = True, + total_asset = '0.00000000', ), + quote_asset = openapi_client.models.isolated_margin_account_info_assets_inner_quote_asset.isolatedMarginAccountInfo_assets_inner_quoteAsset( + asset = 'USDT', + borrow_enabled = True, + borrowed = '0.00000000', + free = '0.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00000000', + net_asset_of_btc = '0.00000000', + repay_enabled = True, + total_asset = '0.00000000', ), + symbol = 'BTCUSDT', + isolated_created = True, + enabled = True, + margin_level = '0.00000000', + margin_level_status = 'EXCESSIVE', + margin_ratio = '0.00000000', + index_price = '10000.00000000', + liquidate_price = '1000.00000000', + liquidate_rate = '1.00000000', + trade_enabled = True, ) + ], + total_asset_of_btc = '0.00000000', + total_liability_of_btc = '0.00000000', + total_net_asset_of_btc = '0.00000000', + ) + """ + + def testIsolatedMarginAccountInfo(self): + """Test IsolatedMarginAccountInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_isolated_margin_account_info_assets_inner.py b/target/python/binance_openapi/test/test_isolated_margin_account_info_assets_inner.py new file mode 100644 index 0000000..3af6c96 --- /dev/null +++ b/target/python/binance_openapi/test/test_isolated_margin_account_info_assets_inner.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.isolated_margin_account_info_assets_inner import IsolatedMarginAccountInfoAssetsInner + +class TestIsolatedMarginAccountInfoAssetsInner(unittest.TestCase): + """IsolatedMarginAccountInfoAssetsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IsolatedMarginAccountInfoAssetsInner: + """Test IsolatedMarginAccountInfoAssetsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IsolatedMarginAccountInfoAssetsInner` + """ + model = IsolatedMarginAccountInfoAssetsInner() + if include_optional: + return IsolatedMarginAccountInfoAssetsInner( + base_asset = openapi_client.models.isolated_margin_account_info_assets_inner_base_asset.isolatedMarginAccountInfo_assets_inner_baseAsset( + asset = 'BTC', + borrow_enabled = True, + borrowed = '0.00000000', + free = '0.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00000000', + net_asset_of_btc = '0.00000000', + repay_enabled = True, + total_asset = '0.00000000', ), + quote_asset = openapi_client.models.isolated_margin_account_info_assets_inner_quote_asset.isolatedMarginAccountInfo_assets_inner_quoteAsset( + asset = 'USDT', + borrow_enabled = True, + borrowed = '0.00000000', + free = '0.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00000000', + net_asset_of_btc = '0.00000000', + repay_enabled = True, + total_asset = '0.00000000', ), + symbol = 'BTCUSDT', + isolated_created = True, + enabled = True, + margin_level = '0.00000000', + margin_level_status = 'EXCESSIVE', + margin_ratio = '0.00000000', + index_price = '10000.00000000', + liquidate_price = '1000.00000000', + liquidate_rate = '1.00000000', + trade_enabled = True + ) + else: + return IsolatedMarginAccountInfoAssetsInner( + base_asset = openapi_client.models.isolated_margin_account_info_assets_inner_base_asset.isolatedMarginAccountInfo_assets_inner_baseAsset( + asset = 'BTC', + borrow_enabled = True, + borrowed = '0.00000000', + free = '0.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00000000', + net_asset_of_btc = '0.00000000', + repay_enabled = True, + total_asset = '0.00000000', ), + quote_asset = openapi_client.models.isolated_margin_account_info_assets_inner_quote_asset.isolatedMarginAccountInfo_assets_inner_quoteAsset( + asset = 'USDT', + borrow_enabled = True, + borrowed = '0.00000000', + free = '0.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00000000', + net_asset_of_btc = '0.00000000', + repay_enabled = True, + total_asset = '0.00000000', ), + symbol = 'BTCUSDT', + isolated_created = True, + enabled = True, + margin_level = '0.00000000', + margin_level_status = 'EXCESSIVE', + margin_ratio = '0.00000000', + index_price = '10000.00000000', + liquidate_price = '1000.00000000', + liquidate_rate = '1.00000000', + trade_enabled = True, + ) + """ + + def testIsolatedMarginAccountInfoAssetsInner(self): + """Test IsolatedMarginAccountInfoAssetsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_isolated_margin_account_info_assets_inner_base_asset.py b/target/python/binance_openapi/test/test_isolated_margin_account_info_assets_inner_base_asset.py new file mode 100644 index 0000000..bc1ca9c --- /dev/null +++ b/target/python/binance_openapi/test/test_isolated_margin_account_info_assets_inner_base_asset.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.isolated_margin_account_info_assets_inner_base_asset import IsolatedMarginAccountInfoAssetsInnerBaseAsset + +class TestIsolatedMarginAccountInfoAssetsInnerBaseAsset(unittest.TestCase): + """IsolatedMarginAccountInfoAssetsInnerBaseAsset unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IsolatedMarginAccountInfoAssetsInnerBaseAsset: + """Test IsolatedMarginAccountInfoAssetsInnerBaseAsset + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IsolatedMarginAccountInfoAssetsInnerBaseAsset` + """ + model = IsolatedMarginAccountInfoAssetsInnerBaseAsset() + if include_optional: + return IsolatedMarginAccountInfoAssetsInnerBaseAsset( + asset = 'BTC', + borrow_enabled = True, + borrowed = '0.00000000', + free = '0.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00000000', + net_asset_of_btc = '0.00000000', + repay_enabled = True, + total_asset = '0.00000000' + ) + else: + return IsolatedMarginAccountInfoAssetsInnerBaseAsset( + asset = 'BTC', + borrow_enabled = True, + borrowed = '0.00000000', + free = '0.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00000000', + net_asset_of_btc = '0.00000000', + repay_enabled = True, + total_asset = '0.00000000', + ) + """ + + def testIsolatedMarginAccountInfoAssetsInnerBaseAsset(self): + """Test IsolatedMarginAccountInfoAssetsInnerBaseAsset""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_isolated_margin_account_info_assets_inner_quote_asset.py b/target/python/binance_openapi/test/test_isolated_margin_account_info_assets_inner_quote_asset.py new file mode 100644 index 0000000..5803c53 --- /dev/null +++ b/target/python/binance_openapi/test/test_isolated_margin_account_info_assets_inner_quote_asset.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.isolated_margin_account_info_assets_inner_quote_asset import IsolatedMarginAccountInfoAssetsInnerQuoteAsset + +class TestIsolatedMarginAccountInfoAssetsInnerQuoteAsset(unittest.TestCase): + """IsolatedMarginAccountInfoAssetsInnerQuoteAsset unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IsolatedMarginAccountInfoAssetsInnerQuoteAsset: + """Test IsolatedMarginAccountInfoAssetsInnerQuoteAsset + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IsolatedMarginAccountInfoAssetsInnerQuoteAsset` + """ + model = IsolatedMarginAccountInfoAssetsInnerQuoteAsset() + if include_optional: + return IsolatedMarginAccountInfoAssetsInnerQuoteAsset( + asset = 'USDT', + borrow_enabled = True, + borrowed = '0.00000000', + free = '0.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00000000', + net_asset_of_btc = '0.00000000', + repay_enabled = True, + total_asset = '0.00000000' + ) + else: + return IsolatedMarginAccountInfoAssetsInnerQuoteAsset( + asset = 'USDT', + borrow_enabled = True, + borrowed = '0.00000000', + free = '0.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00000000', + net_asset_of_btc = '0.00000000', + repay_enabled = True, + total_asset = '0.00000000', + ) + """ + + def testIsolatedMarginAccountInfoAssetsInnerQuoteAsset(self): + """Test IsolatedMarginAccountInfoAssetsInnerQuoteAsset""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_isolated_margin_stream_api.py b/target/python/binance_openapi/test/test_isolated_margin_stream_api.py new file mode 100644 index 0000000..45f6028 --- /dev/null +++ b/target/python/binance_openapi/test/test_isolated_margin_stream_api.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.isolated_margin_stream_api import IsolatedMarginStreamApi + + +class TestIsolatedMarginStreamApi(unittest.TestCase): + """IsolatedMarginStreamApi unit test stubs""" + + def setUp(self) -> None: + self.api = IsolatedMarginStreamApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_user_data_stream_isolated_delete(self) -> None: + """Test case for sapi_v1_user_data_stream_isolated_delete + + Close a ListenKey (USER_STREAM) + """ + pass + + def test_sapi_v1_user_data_stream_isolated_post(self) -> None: + """Test case for sapi_v1_user_data_stream_isolated_post + + Generate a Listen Key (USER_STREAM) + """ + pass + + def test_sapi_v1_user_data_stream_isolated_put(self) -> None: + """Test case for sapi_v1_user_data_stream_isolated_put + + Ping/Keep-alive a Listen Key (USER_STREAM) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_margin_api.py b/target/python/binance_openapi/test/test_margin_api.py new file mode 100644 index 0000000..8c82d09 --- /dev/null +++ b/target/python/binance_openapi/test/test_margin_api.py @@ -0,0 +1,353 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.margin_api import MarginApi + + +class TestMarginApi(unittest.TestCase): + """MarginApi unit test stubs""" + + def setUp(self) -> None: + self.api = MarginApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_bnb_burn_get(self) -> None: + """Test case for sapi_v1_bnb_burn_get + + Get BNB Burn Status(USER_DATA) + """ + pass + + def test_sapi_v1_bnb_burn_post(self) -> None: + """Test case for sapi_v1_bnb_burn_post + + Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) + """ + pass + + def test_sapi_v1_margin_account_get(self) -> None: + """Test case for sapi_v1_margin_account_get + + Query Cross Margin Account Details (USER_DATA) + """ + pass + + def test_sapi_v1_margin_all_assets_get(self) -> None: + """Test case for sapi_v1_margin_all_assets_get + + Get All Margin Assets (MARKET_DATA) + """ + pass + + def test_sapi_v1_margin_all_order_list_get(self) -> None: + """Test case for sapi_v1_margin_all_order_list_get + + Query Margin Account's all OCO (USER_DATA) + """ + pass + + def test_sapi_v1_margin_all_orders_get(self) -> None: + """Test case for sapi_v1_margin_all_orders_get + + Query Margin Account's All Orders (USER_DATA) + """ + pass + + def test_sapi_v1_margin_all_pairs_get(self) -> None: + """Test case for sapi_v1_margin_all_pairs_get + + Get All Cross Margin Pairs (MARKET_DATA) + """ + pass + + def test_sapi_v1_margin_available_inventory_get(self) -> None: + """Test case for sapi_v1_margin_available_inventory_get + + Query Margin Available Inventory (USER_DATA) + """ + pass + + def test_sapi_v1_margin_borrow_repay_get(self) -> None: + """Test case for sapi_v1_margin_borrow_repay_get + + Query borrow/repay records in Margin account(USER_DATA) + """ + pass + + def test_sapi_v1_margin_borrow_repay_post(self) -> None: + """Test case for sapi_v1_margin_borrow_repay_post + + Margin account borrow/repay(MARGIN) + """ + pass + + def test_sapi_v1_margin_capital_flow_get(self) -> None: + """Test case for sapi_v1_margin_capital_flow_get + + Get cross or isolated margin capital flow(USER_DATA) + """ + pass + + def test_sapi_v1_margin_cross_margin_collateral_ratio_get(self) -> None: + """Test case for sapi_v1_margin_cross_margin_collateral_ratio_get + + Cross margin collateral ratio (MARKET_DATA) + """ + pass + + def test_sapi_v1_margin_cross_margin_data_get(self) -> None: + """Test case for sapi_v1_margin_cross_margin_data_get + + Query Cross Margin Fee Data (USER_DATA) + """ + pass + + def test_sapi_v1_margin_delist_schedule_get(self) -> None: + """Test case for sapi_v1_margin_delist_schedule_get + + Get tokens or symbols delist schedule for cross margin and isolated margin (MARKET_DATA) + """ + pass + + def test_sapi_v1_margin_exchange_small_liability_get(self) -> None: + """Test case for sapi_v1_margin_exchange_small_liability_get + + Get Small Liability Exchange Coin List (USER_DATA) + """ + pass + + def test_sapi_v1_margin_exchange_small_liability_history_get(self) -> None: + """Test case for sapi_v1_margin_exchange_small_liability_history_get + + Get Small Liability Exchange History (USER_DATA) + """ + pass + + def test_sapi_v1_margin_force_liquidation_rec_get(self) -> None: + """Test case for sapi_v1_margin_force_liquidation_rec_get + + Get Force Liquidation Record (USER_DATA) + """ + pass + + def test_sapi_v1_margin_interest_history_get(self) -> None: + """Test case for sapi_v1_margin_interest_history_get + + Get Interest History (USER_DATA) + """ + pass + + def test_sapi_v1_margin_interest_rate_history_get(self) -> None: + """Test case for sapi_v1_margin_interest_rate_history_get + + Margin Interest Rate History (USER_DATA) + """ + pass + + def test_sapi_v1_margin_isolated_account_delete(self) -> None: + """Test case for sapi_v1_margin_isolated_account_delete + + Disable Isolated Margin Account (TRADE) + """ + pass + + def test_sapi_v1_margin_isolated_account_get(self) -> None: + """Test case for sapi_v1_margin_isolated_account_get + + Query Isolated Margin Account Info (USER_DATA) + """ + pass + + def test_sapi_v1_margin_isolated_account_limit_get(self) -> None: + """Test case for sapi_v1_margin_isolated_account_limit_get + + Query Enabled Isolated Margin Account Limit (USER_DATA) + """ + pass + + def test_sapi_v1_margin_isolated_account_post(self) -> None: + """Test case for sapi_v1_margin_isolated_account_post + + Enable Isolated Margin Account (TRADE) + """ + pass + + def test_sapi_v1_margin_isolated_all_pairs_get(self) -> None: + """Test case for sapi_v1_margin_isolated_all_pairs_get + + Get All Isolated Margin Symbol(USER_DATA) + """ + pass + + def test_sapi_v1_margin_isolated_margin_data_get(self) -> None: + """Test case for sapi_v1_margin_isolated_margin_data_get + + Query Isolated Margin Fee Data (USER_DATA) + """ + pass + + def test_sapi_v1_margin_isolated_margin_tier_get(self) -> None: + """Test case for sapi_v1_margin_isolated_margin_tier_get + + Query Isolated Margin Tier Data (USER_DATA) + """ + pass + + def test_sapi_v1_margin_leverage_bracket_get(self) -> None: + """Test case for sapi_v1_margin_leverage_bracket_get + + Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) + """ + pass + + def test_sapi_v1_margin_manual_liquidation_post(self) -> None: + """Test case for sapi_v1_margin_manual_liquidation_post + + Margin manual liquidation(MARGIN) + """ + pass + + def test_sapi_v1_margin_max_borrowable_get(self) -> None: + """Test case for sapi_v1_margin_max_borrowable_get + + Query Max Borrow (USER_DATA) + """ + pass + + def test_sapi_v1_margin_max_leverage_post(self) -> None: + """Test case for sapi_v1_margin_max_leverage_post + + Adjust cross margin max leverage (USER_DATA) + """ + pass + + def test_sapi_v1_margin_max_transferable_get(self) -> None: + """Test case for sapi_v1_margin_max_transferable_get + + Query Max Transfer-Out Amount (USER_DATA) + """ + pass + + def test_sapi_v1_margin_my_trades_get(self) -> None: + """Test case for sapi_v1_margin_my_trades_get + + Query Margin Account's Trade List (USER_DATA) + """ + pass + + def test_sapi_v1_margin_next_hourly_interest_rate_get(self) -> None: + """Test case for sapi_v1_margin_next_hourly_interest_rate_get + + Get a future hourly interest rate (USER_DATA) + """ + pass + + def test_sapi_v1_margin_open_order_list_get(self) -> None: + """Test case for sapi_v1_margin_open_order_list_get + + Query Margin Account's Open OCO (USER_DATA) + """ + pass + + def test_sapi_v1_margin_open_orders_delete(self) -> None: + """Test case for sapi_v1_margin_open_orders_delete + + Margin Account Cancel all Open Orders on a Symbol (TRADE) + """ + pass + + def test_sapi_v1_margin_open_orders_get(self) -> None: + """Test case for sapi_v1_margin_open_orders_get + + Query Margin Account's Open Orders (USER_DATA) + """ + pass + + def test_sapi_v1_margin_order_delete(self) -> None: + """Test case for sapi_v1_margin_order_delete + + Margin Account Cancel Order (TRADE) + """ + pass + + def test_sapi_v1_margin_order_get(self) -> None: + """Test case for sapi_v1_margin_order_get + + Query Margin Account's Order (USER_DATA) + """ + pass + + def test_sapi_v1_margin_order_list_delete(self) -> None: + """Test case for sapi_v1_margin_order_list_delete + + Margin Account Cancel OCO (TRADE) + """ + pass + + def test_sapi_v1_margin_order_list_get(self) -> None: + """Test case for sapi_v1_margin_order_list_get + + Query Margin Account's OCO (USER_DATA) + """ + pass + + def test_sapi_v1_margin_order_oco_post(self) -> None: + """Test case for sapi_v1_margin_order_oco_post + + Margin Account New OCO (TRADE) + """ + pass + + def test_sapi_v1_margin_order_post(self) -> None: + """Test case for sapi_v1_margin_order_post + + Margin Account New Order (TRADE) + """ + pass + + def test_sapi_v1_margin_price_index_get(self) -> None: + """Test case for sapi_v1_margin_price_index_get + + Query Margin PriceIndex (MARKET_DATA) + """ + pass + + def test_sapi_v1_margin_rate_limit_order_get(self) -> None: + """Test case for sapi_v1_margin_rate_limit_order_get + + Query Current Margin Order Count Usage (TRADE) + """ + pass + + def test_sapi_v1_margin_trade_coeff_get(self) -> None: + """Test case for sapi_v1_margin_trade_coeff_get + + Get Summary of Margin account (USER_DATA) + """ + pass + + def test_sapi_v1_margin_transfer_get(self) -> None: + """Test case for sapi_v1_margin_transfer_get + + Get Cross Margin Transfer History (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_margin_oco_order.py b/target/python/binance_openapi/test/test_margin_oco_order.py new file mode 100644 index 0000000..603e0df --- /dev/null +++ b/target/python/binance_openapi/test/test_margin_oco_order.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.margin_oco_order import MarginOcoOrder + +class TestMarginOcoOrder(unittest.TestCase): + """MarginOcoOrder unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MarginOcoOrder: + """Test MarginOcoOrder + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MarginOcoOrder` + """ + model = MarginOcoOrder() + if include_optional: + return MarginOcoOrder( + order_list_id = 0, + contingency_type = 'OCO', + list_status_type = 'ALL_DONE', + list_order_status = 'ALL_DONE', + list_client_order_id = 'C3wyj4WVEktd7u9aVBRXcN', + transaction_time = 1574040868128, + symbol = 'BNBUSDT', + is_isolated = False, + orders = [ + [{"symbol":"BNBUSDT","orderId":2,"clientOrderId":"pO9ufTiFGg3nw2fOdgeOXa"},{"symbol":"BNBUSDT","orderId":3,"clientOrderId":"TXOvglzXuaubXAaENpaRCB"}] + ], + order_reports = [ + [{"symbol":"BNBUSDT","origClientOrderId":"pO9ufTiFGg3nw2fOdgeOXa","orderId":2,"orderListId":0,"clientOrderId":"unfWT8ig8i0uj6lPuYLez6","price":"1.00000000","origQty":"10.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"CANCELED","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"1.00000000"},{"symbol":"BNBUSDT","origClientOrderId":"TXOvglzXuaubXAaENpaRCB","orderId":3,"orderListId":0,"clientOrderId":"unfWT8ig8i0uj6lPuYLez6","price":"3.00000000","origQty":"10.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"CANCELED","timeInForce":"GTC","type":"LIMIT_MAKER","side":"SELL"}] + ] + ) + else: + return MarginOcoOrder( + order_list_id = 0, + contingency_type = 'OCO', + list_status_type = 'ALL_DONE', + list_order_status = 'ALL_DONE', + list_client_order_id = 'C3wyj4WVEktd7u9aVBRXcN', + transaction_time = 1574040868128, + symbol = 'BNBUSDT', + is_isolated = False, + orders = [ + [{"symbol":"BNBUSDT","orderId":2,"clientOrderId":"pO9ufTiFGg3nw2fOdgeOXa"},{"symbol":"BNBUSDT","orderId":3,"clientOrderId":"TXOvglzXuaubXAaENpaRCB"}] + ], + order_reports = [ + [{"symbol":"BNBUSDT","origClientOrderId":"pO9ufTiFGg3nw2fOdgeOXa","orderId":2,"orderListId":0,"clientOrderId":"unfWT8ig8i0uj6lPuYLez6","price":"1.00000000","origQty":"10.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"CANCELED","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"1.00000000"},{"symbol":"BNBUSDT","origClientOrderId":"TXOvglzXuaubXAaENpaRCB","orderId":3,"orderListId":0,"clientOrderId":"unfWT8ig8i0uj6lPuYLez6","price":"3.00000000","origQty":"10.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"CANCELED","timeInForce":"GTC","type":"LIMIT_MAKER","side":"SELL"}] + ], + ) + """ + + def testMarginOcoOrder(self): + """Test MarginOcoOrder""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_margin_oco_order_order_reports_inner.py b/target/python/binance_openapi/test/test_margin_oco_order_order_reports_inner.py new file mode 100644 index 0000000..117f930 --- /dev/null +++ b/target/python/binance_openapi/test/test_margin_oco_order_order_reports_inner.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.margin_oco_order_order_reports_inner import MarginOcoOrderOrderReportsInner + +class TestMarginOcoOrderOrderReportsInner(unittest.TestCase): + """MarginOcoOrderOrderReportsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MarginOcoOrderOrderReportsInner: + """Test MarginOcoOrderOrderReportsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MarginOcoOrderOrderReportsInner` + """ + model = MarginOcoOrderOrderReportsInner() + if include_optional: + return MarginOcoOrderOrderReportsInner( + symbol = '', + orig_client_order_id = '', + order_id = 56, + order_list_id = 56, + client_order_id = '', + price = '', + orig_qty = '', + executed_qty = '', + cummulative_quote_qty = '', + status = '', + time_in_force = '', + type = '', + side = '', + stop_price = '' + ) + else: + return MarginOcoOrderOrderReportsInner( + symbol = '', + orig_client_order_id = '', + order_id = 56, + order_list_id = 56, + client_order_id = '', + price = '', + orig_qty = '', + executed_qty = '', + cummulative_quote_qty = '', + status = '', + time_in_force = '', + type = '', + side = '', + stop_price = '', + ) + """ + + def testMarginOcoOrderOrderReportsInner(self): + """Test MarginOcoOrderOrderReportsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_margin_oco_order_orders_inner.py b/target/python/binance_openapi/test/test_margin_oco_order_orders_inner.py new file mode 100644 index 0000000..79a21b6 --- /dev/null +++ b/target/python/binance_openapi/test/test_margin_oco_order_orders_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.margin_oco_order_orders_inner import MarginOcoOrderOrdersInner + +class TestMarginOcoOrderOrdersInner(unittest.TestCase): + """MarginOcoOrderOrdersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MarginOcoOrderOrdersInner: + """Test MarginOcoOrderOrdersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MarginOcoOrderOrdersInner` + """ + model = MarginOcoOrderOrdersInner() + if include_optional: + return MarginOcoOrderOrdersInner( + symbol = '', + order_id = 56, + client_order_id = '' + ) + else: + return MarginOcoOrderOrdersInner( + symbol = '', + order_id = 56, + client_order_id = '', + ) + """ + + def testMarginOcoOrderOrdersInner(self): + """Test MarginOcoOrderOrdersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_margin_order.py b/target/python/binance_openapi/test/test_margin_order.py new file mode 100644 index 0000000..57987c1 --- /dev/null +++ b/target/python/binance_openapi/test/test_margin_order.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.margin_order import MarginOrder + +class TestMarginOrder(unittest.TestCase): + """MarginOrder unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MarginOrder: + """Test MarginOrder + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MarginOrder` + """ + model = MarginOrder() + if include_optional: + return MarginOrder( + symbol = 'LTCBTC', + order_id = 28, + orig_client_order_id = 'msXkySR3u5uYwpvRMFsi3u', + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + price = '1.00000000', + orig_qty = '10.00000000', + executed_qty = '8.00000000', + cummulative_quote_qty = '8.00000000', + status = 'CANCELED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'SELL' + ) + else: + return MarginOrder( + symbol = 'LTCBTC', + order_id = 28, + orig_client_order_id = 'msXkySR3u5uYwpvRMFsi3u', + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + price = '1.00000000', + orig_qty = '10.00000000', + executed_qty = '8.00000000', + cummulative_quote_qty = '8.00000000', + status = 'CANCELED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'SELL', + ) + """ + + def testMarginOrder(self): + """Test MarginOrder""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_margin_order_detail.py b/target/python/binance_openapi/test/test_margin_order_detail.py new file mode 100644 index 0000000..3e3bbb2 --- /dev/null +++ b/target/python/binance_openapi/test/test_margin_order_detail.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.margin_order_detail import MarginOrderDetail + +class TestMarginOrderDetail(unittest.TestCase): + """MarginOrderDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MarginOrderDetail: + """Test MarginOrderDetail + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MarginOrderDetail` + """ + model = MarginOrderDetail() + if include_optional: + return MarginOrderDetail( + client_order_id = 'ZwfQzuDIGpceVhKW5DvCmO', + cummulative_quote_qty = '0.00000000', + executed_qty = '0.00000000', + iceberg_qty = '0.00000000', + is_working = True, + order_id = 213205622, + orig_qty = '0.30000000', + price = '0.00493630', + side = 'SELL', + status = 'NEW', + stop_price = '0.00000000', + symbol = 'BNBBTC', + is_isolated = True, + time = 1562133008725, + time_in_force = 'GTC', + type = 'LIMIT', + update_time = 1562133008725, + self_trade_prevention_mode = 'NONE' + ) + else: + return MarginOrderDetail( + client_order_id = 'ZwfQzuDIGpceVhKW5DvCmO', + cummulative_quote_qty = '0.00000000', + executed_qty = '0.00000000', + iceberg_qty = '0.00000000', + is_working = True, + order_id = 213205622, + orig_qty = '0.30000000', + price = '0.00493630', + side = 'SELL', + status = 'NEW', + stop_price = '0.00000000', + symbol = 'BNBBTC', + is_isolated = True, + time = 1562133008725, + time_in_force = 'GTC', + type = 'LIMIT', + update_time = 1562133008725, + self_trade_prevention_mode = 'NONE', + ) + """ + + def testMarginOrderDetail(self): + """Test MarginOrderDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_margin_order_response_ack.py b/target/python/binance_openapi/test/test_margin_order_response_ack.py new file mode 100644 index 0000000..eae5635 --- /dev/null +++ b/target/python/binance_openapi/test/test_margin_order_response_ack.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.margin_order_response_ack import MarginOrderResponseAck + +class TestMarginOrderResponseAck(unittest.TestCase): + """MarginOrderResponseAck unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MarginOrderResponseAck: + """Test MarginOrderResponseAck + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MarginOrderResponseAck` + """ + model = MarginOrderResponseAck() + if include_optional: + return MarginOrderResponseAck( + symbol = 'BTCUSDT', + order_id = 28, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + is_isolated = True, + transact_time = 1507725176595 + ) + else: + return MarginOrderResponseAck( + symbol = 'BTCUSDT', + order_id = 28, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + is_isolated = True, + transact_time = 1507725176595, + ) + """ + + def testMarginOrderResponseAck(self): + """Test MarginOrderResponseAck""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_margin_order_response_full.py b/target/python/binance_openapi/test/test_margin_order_response_full.py new file mode 100644 index 0000000..0692b51 --- /dev/null +++ b/target/python/binance_openapi/test/test_margin_order_response_full.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.margin_order_response_full import MarginOrderResponseFull + +class TestMarginOrderResponseFull(unittest.TestCase): + """MarginOrderResponseFull unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MarginOrderResponseFull: + """Test MarginOrderResponseFull + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MarginOrderResponseFull` + """ + model = MarginOrderResponseFull() + if include_optional: + return MarginOrderResponseFull( + symbol = 'BTCUSDT', + order_id = 28, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + price = '1.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'MARKET', + side = 'SELL', + margin_buy_borrow_amount = 5, + margin_buy_borrow_asset = 'BTC', + is_isolated = True, + fills = [ + openapi_client.models.order_response_full_fills_inner.orderResponseFull_fills_inner( + price = '4000.00000000', + qty = '1.00000000', + commission = '4.00000000', + commission_asset = 'USDT', ) + ] + ) + else: + return MarginOrderResponseFull( + symbol = 'BTCUSDT', + order_id = 28, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + price = '1.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'MARKET', + side = 'SELL', + margin_buy_borrow_amount = 5, + margin_buy_borrow_asset = 'BTC', + is_isolated = True, + fills = [ + openapi_client.models.order_response_full_fills_inner.orderResponseFull_fills_inner( + price = '4000.00000000', + qty = '1.00000000', + commission = '4.00000000', + commission_asset = 'USDT', ) + ], + ) + """ + + def testMarginOrderResponseFull(self): + """Test MarginOrderResponseFull""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_margin_order_response_result.py b/target/python/binance_openapi/test/test_margin_order_response_result.py new file mode 100644 index 0000000..6d64a49 --- /dev/null +++ b/target/python/binance_openapi/test/test_margin_order_response_result.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.margin_order_response_result import MarginOrderResponseResult + +class TestMarginOrderResponseResult(unittest.TestCase): + """MarginOrderResponseResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MarginOrderResponseResult: + """Test MarginOrderResponseResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MarginOrderResponseResult` + """ + model = MarginOrderResponseResult() + if include_optional: + return MarginOrderResponseResult( + symbol = 'BTCUSDT', + order_id = 28, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + price = '1.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'MARKET', + is_isolated = True, + side = 'SELL' + ) + else: + return MarginOrderResponseResult( + symbol = 'BTCUSDT', + order_id = 28, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + price = '1.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'MARKET', + is_isolated = True, + side = 'SELL', + ) + """ + + def testMarginOrderResponseResult(self): + """Test MarginOrderResponseResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_margin_stream_api.py b/target/python/binance_openapi/test/test_margin_stream_api.py new file mode 100644 index 0000000..0c550ed --- /dev/null +++ b/target/python/binance_openapi/test/test_margin_stream_api.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.margin_stream_api import MarginStreamApi + + +class TestMarginStreamApi(unittest.TestCase): + """MarginStreamApi unit test stubs""" + + def setUp(self) -> None: + self.api = MarginStreamApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_user_data_stream_delete(self) -> None: + """Test case for sapi_v1_user_data_stream_delete + + Close a ListenKey (USER_STREAM) + """ + pass + + def test_sapi_v1_user_data_stream_post(self) -> None: + """Test case for sapi_v1_user_data_stream_post + + Create a ListenKey (USER_STREAM) + """ + pass + + def test_sapi_v1_user_data_stream_put(self) -> None: + """Test case for sapi_v1_user_data_stream_put + + Ping/Keep-alive a ListenKey (USER_STREAM) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_margin_trade.py b/target/python/binance_openapi/test/test_margin_trade.py new file mode 100644 index 0000000..d40738a --- /dev/null +++ b/target/python/binance_openapi/test/test_margin_trade.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.margin_trade import MarginTrade + +class TestMarginTrade(unittest.TestCase): + """MarginTrade unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MarginTrade: + """Test MarginTrade + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MarginTrade` + """ + model = MarginTrade() + if include_optional: + return MarginTrade( + commission = '0.00006000', + commission_asset = 'BTC', + id = 28, + is_best_match = True, + is_buyer = True, + is_maker = True, + order_id = 28, + price = '0.02000000', + qty = '1.02000000', + symbol = 'BNBBTC', + is_isolated = False, + time = 1507725176595 + ) + else: + return MarginTrade( + commission = '0.00006000', + commission_asset = 'BTC', + id = 28, + is_best_match = True, + is_buyer = True, + is_maker = True, + order_id = 28, + price = '0.02000000', + qty = '1.02000000', + symbol = 'BNBBTC', + is_isolated = False, + time = 1507725176595, + ) + """ + + def testMarginTrade(self): + """Test MarginTrade""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_margin_transfer_details.py b/target/python/binance_openapi/test/test_margin_transfer_details.py new file mode 100644 index 0000000..31ea764 --- /dev/null +++ b/target/python/binance_openapi/test/test_margin_transfer_details.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.margin_transfer_details import MarginTransferDetails + +class TestMarginTransferDetails(unittest.TestCase): + """MarginTransferDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MarginTransferDetails: + """Test MarginTransferDetails + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MarginTransferDetails` + """ + model = MarginTransferDetails() + if include_optional: + return MarginTransferDetails( + rows = [ + openapi_client.models.margin_transfer_details_rows_inner.marginTransferDetails_rows_inner( + amount = '0.10000000', + asset = 'BNB', + status = 'CONFIRMED', + timestamp = 1566898617000, + tx_id = 5240372201, + type = 'ROLL_IN', + trans_from = 'SPOT', + trans_to = 'ISOLATED_MARGIN', ) + ], + total = 1 + ) + else: + return MarginTransferDetails( + rows = [ + openapi_client.models.margin_transfer_details_rows_inner.marginTransferDetails_rows_inner( + amount = '0.10000000', + asset = 'BNB', + status = 'CONFIRMED', + timestamp = 1566898617000, + tx_id = 5240372201, + type = 'ROLL_IN', + trans_from = 'SPOT', + trans_to = 'ISOLATED_MARGIN', ) + ], + total = 1, + ) + """ + + def testMarginTransferDetails(self): + """Test MarginTransferDetails""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_margin_transfer_details_rows_inner.py b/target/python/binance_openapi/test/test_margin_transfer_details_rows_inner.py new file mode 100644 index 0000000..81b9f89 --- /dev/null +++ b/target/python/binance_openapi/test/test_margin_transfer_details_rows_inner.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.margin_transfer_details_rows_inner import MarginTransferDetailsRowsInner + +class TestMarginTransferDetailsRowsInner(unittest.TestCase): + """MarginTransferDetailsRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MarginTransferDetailsRowsInner: + """Test MarginTransferDetailsRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MarginTransferDetailsRowsInner` + """ + model = MarginTransferDetailsRowsInner() + if include_optional: + return MarginTransferDetailsRowsInner( + amount = '0.10000000', + asset = 'BNB', + status = 'CONFIRMED', + timestamp = 1566898617000, + tx_id = 5240372201, + type = 'ROLL_IN', + trans_from = 'SPOT', + trans_to = 'ISOLATED_MARGIN' + ) + else: + return MarginTransferDetailsRowsInner( + amount = '0.10000000', + asset = 'BNB', + status = 'CONFIRMED', + timestamp = 1566898617000, + tx_id = 5240372201, + trans_from = 'SPOT', + trans_to = 'ISOLATED_MARGIN', + ) + """ + + def testMarginTransferDetailsRowsInner(self): + """Test MarginTransferDetailsRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_market_api.py b/target/python/binance_openapi/test/test_market_api.py new file mode 100644 index 0000000..f46212f --- /dev/null +++ b/target/python/binance_openapi/test/test_market_api.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.market_api import MarketApi + + +class TestMarketApi(unittest.TestCase): + """MarketApi unit test stubs""" + + def setUp(self) -> None: + self.api = MarketApi() + + def tearDown(self) -> None: + pass + + def test_api_v3_agg_trades_get(self) -> None: + """Test case for api_v3_agg_trades_get + + Compressed/Aggregate Trades List + """ + pass + + def test_api_v3_avg_price_get(self) -> None: + """Test case for api_v3_avg_price_get + + Current Average Price + """ + pass + + def test_api_v3_depth_get(self) -> None: + """Test case for api_v3_depth_get + + Order Book + """ + pass + + def test_api_v3_exchange_info_get(self) -> None: + """Test case for api_v3_exchange_info_get + + Exchange Information + """ + pass + + def test_api_v3_historical_trades_get(self) -> None: + """Test case for api_v3_historical_trades_get + + Old Trade Lookup + """ + pass + + def test_api_v3_klines_get(self) -> None: + """Test case for api_v3_klines_get + + Kline/Candlestick Data + """ + pass + + def test_api_v3_ping_get(self) -> None: + """Test case for api_v3_ping_get + + Test Connectivity + """ + pass + + def test_api_v3_ticker24hr_get(self) -> None: + """Test case for api_v3_ticker24hr_get + + 24hr Ticker Price Change Statistics + """ + pass + + def test_api_v3_ticker_book_ticker_get(self) -> None: + """Test case for api_v3_ticker_book_ticker_get + + Symbol Order Book Ticker + """ + pass + + def test_api_v3_ticker_get(self) -> None: + """Test case for api_v3_ticker_get + + Rolling window price change statistics + """ + pass + + def test_api_v3_ticker_price_get(self) -> None: + """Test case for api_v3_ticker_price_get + + Symbol Price Ticker + """ + pass + + def test_api_v3_ticker_trading_day_get(self) -> None: + """Test case for api_v3_ticker_trading_day_get + + Trading Day Ticker + """ + pass + + def test_api_v3_time_get(self) -> None: + """Test case for api_v3_time_get + + Check Server Time + """ + pass + + def test_api_v3_trades_get(self) -> None: + """Test case for api_v3_trades_get + + Recent Trades List + """ + pass + + def test_api_v3_ui_klines_get(self) -> None: + """Test case for api_v3_ui_klines_get + + UIKlines + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_mining_api.py b/target/python/binance_openapi/test/test_mining_api.py new file mode 100644 index 0000000..71e38db --- /dev/null +++ b/target/python/binance_openapi/test/test_mining_api.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.mining_api import MiningApi + + +class TestMiningApi(unittest.TestCase): + """MiningApi unit test stubs""" + + def setUp(self) -> None: + self.api = MiningApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_mining_hash_transfer_config_cancel_post(self) -> None: + """Test case for sapi_v1_mining_hash_transfer_config_cancel_post + + Cancel Hashrate Resale configuration (USER_DATA) + """ + pass + + def test_sapi_v1_mining_hash_transfer_config_details_list_get(self) -> None: + """Test case for sapi_v1_mining_hash_transfer_config_details_list_get + + Hashrate Resale List (USER_DATA) + """ + pass + + def test_sapi_v1_mining_hash_transfer_config_post(self) -> None: + """Test case for sapi_v1_mining_hash_transfer_config_post + + Hashrate Resale Request (USER_DATA) + """ + pass + + def test_sapi_v1_mining_hash_transfer_profit_details_get(self) -> None: + """Test case for sapi_v1_mining_hash_transfer_profit_details_get + + Hashrate Resale Details (USER_DATA) + """ + pass + + def test_sapi_v1_mining_payment_list_get(self) -> None: + """Test case for sapi_v1_mining_payment_list_get + + Earnings List (USER_DATA) + """ + pass + + def test_sapi_v1_mining_payment_other_get(self) -> None: + """Test case for sapi_v1_mining_payment_other_get + + Extra Bonus List (USER_DATA) + """ + pass + + def test_sapi_v1_mining_payment_uid_get(self) -> None: + """Test case for sapi_v1_mining_payment_uid_get + + Mining Account Earning (USER_DATA) + """ + pass + + def test_sapi_v1_mining_pub_algo_list_get(self) -> None: + """Test case for sapi_v1_mining_pub_algo_list_get + + Acquiring Algorithm (MARKET_DATA) + """ + pass + + def test_sapi_v1_mining_pub_coin_list_get(self) -> None: + """Test case for sapi_v1_mining_pub_coin_list_get + + Acquiring CoinName (MARKET_DATA) + """ + pass + + def test_sapi_v1_mining_statistics_user_list_get(self) -> None: + """Test case for sapi_v1_mining_statistics_user_list_get + + Account List (USER_DATA) + """ + pass + + def test_sapi_v1_mining_statistics_user_status_get(self) -> None: + """Test case for sapi_v1_mining_statistics_user_status_get + + Statistic List (USER_DATA) + """ + pass + + def test_sapi_v1_mining_worker_detail_get(self) -> None: + """Test case for sapi_v1_mining_worker_detail_get + + Request for Detail Miner List (USER_DATA) + """ + pass + + def test_sapi_v1_mining_worker_list_get(self) -> None: + """Test case for sapi_v1_mining_worker_list_get + + Request for Miner List (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_my_trade.py b/target/python/binance_openapi/test/test_my_trade.py new file mode 100644 index 0000000..516d775 --- /dev/null +++ b/target/python/binance_openapi/test/test_my_trade.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.my_trade import MyTrade + +class TestMyTrade(unittest.TestCase): + """MyTrade unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MyTrade: + """Test MyTrade + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MyTrade` + """ + model = MyTrade() + if include_optional: + return MyTrade( + symbol = 'BNBBTC', + id = 28457, + order_id = 100234, + order_list_id = -1, + price = '4.00000100', + qty = '12.00000000', + quote_qty = '48.000012', + commission = '10.10000000', + commission_asset = 'BNB', + time = 1499865549590, + is_buyer = False, + is_maker = False, + is_best_match = True + ) + else: + return MyTrade( + symbol = 'BNBBTC', + id = 28457, + order_id = 100234, + order_list_id = -1, + price = '4.00000100', + qty = '12.00000000', + quote_qty = '48.000012', + commission = '10.10000000', + commission_asset = 'BNB', + time = 1499865549590, + is_buyer = False, + is_maker = False, + is_best_match = True, + ) + """ + + def testMyTrade(self): + """Test MyTrade""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_nft_api.py b/target/python/binance_openapi/test/test_nft_api.py new file mode 100644 index 0000000..6e51369 --- /dev/null +++ b/target/python/binance_openapi/test/test_nft_api.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.nft_api import NFTApi + + +class TestNFTApi(unittest.TestCase): + """NFTApi unit test stubs""" + + def setUp(self) -> None: + self.api = NFTApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_nft_history_deposit_get(self) -> None: + """Test case for sapi_v1_nft_history_deposit_get + + Get NFT Deposit History(USER_DATA) + """ + pass + + def test_sapi_v1_nft_history_transactions_get(self) -> None: + """Test case for sapi_v1_nft_history_transactions_get + + Get NFT Transaction History (USER_DATA) + """ + pass + + def test_sapi_v1_nft_history_withdraw_get(self) -> None: + """Test case for sapi_v1_nft_history_withdraw_get + + Get NFT Withdraw History (USER_DATA) + """ + pass + + def test_sapi_v1_nft_user_get_asset_get(self) -> None: + """Test case for sapi_v1_nft_user_get_asset_get + + Get NFT Asset (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_oco_order.py b/target/python/binance_openapi/test/test_oco_order.py new file mode 100644 index 0000000..cbcb701 --- /dev/null +++ b/target/python/binance_openapi/test/test_oco_order.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.oco_order import OcoOrder + +class TestOcoOrder(unittest.TestCase): + """OcoOrder unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OcoOrder: + """Test OcoOrder + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OcoOrder` + """ + model = OcoOrder() + if include_optional: + return OcoOrder( + order_list_id = 1929, + contingency_type = 'OCO', + list_status_type = 'ALL_DONE', + list_order_status = 'ALL_DONE', + list_client_order_id = 'C3wyj4WVEktd7u9aVBRXcN', + transaction_time = 1574040868128, + symbol = 'BNBBTC', + orders = [{"symbol":"BNBBTC","orderId":2,"clientOrderId":"pO9ufTiFGg3nw2fOdgeOXa"},{"symbol":"BNBBTC","orderId":3,"clientOrderId":"TXOvglzXuaubXAaENpaRCB"}], + order_reports = [{"symbol":"BNBBTC","origClientOrderId":"pO9ufTiFGg3nw2fOdgeOXa","orderId":2,"orderListId":0,"clientOrderId":"unfWT8ig8i0uj6lPuYLez6","price":"1.00000000","origQty":"10.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"CANCELED","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"1.00000000","transactTime":1688005070874},{"symbol":"BNBBTC","origClientOrderId":"TXOvglzXuaubXAaENpaRCB","orderId":3,"orderListId":0,"clientOrderId":"unfWT8ig8i0uj6lPuYLez6","price":"3.00000000","origQty":"10.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"CANCELED","timeInForce":"GTC","type":"LIMIT_MAKER","side":"SELL","selfTradePreventionMode":"NONE","transactTime":1688005070874}] + ) + else: + return OcoOrder( + order_list_id = 1929, + contingency_type = 'OCO', + list_status_type = 'ALL_DONE', + list_order_status = 'ALL_DONE', + list_client_order_id = 'C3wyj4WVEktd7u9aVBRXcN', + transaction_time = 1574040868128, + symbol = 'BNBBTC', + orders = [{"symbol":"BNBBTC","orderId":2,"clientOrderId":"pO9ufTiFGg3nw2fOdgeOXa"},{"symbol":"BNBBTC","orderId":3,"clientOrderId":"TXOvglzXuaubXAaENpaRCB"}], + order_reports = [{"symbol":"BNBBTC","origClientOrderId":"pO9ufTiFGg3nw2fOdgeOXa","orderId":2,"orderListId":0,"clientOrderId":"unfWT8ig8i0uj6lPuYLez6","price":"1.00000000","origQty":"10.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"CANCELED","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"1.00000000","transactTime":1688005070874},{"symbol":"BNBBTC","origClientOrderId":"TXOvglzXuaubXAaENpaRCB","orderId":3,"orderListId":0,"clientOrderId":"unfWT8ig8i0uj6lPuYLez6","price":"3.00000000","origQty":"10.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"CANCELED","timeInForce":"GTC","type":"LIMIT_MAKER","side":"SELL","selfTradePreventionMode":"NONE","transactTime":1688005070874}], + ) + """ + + def testOcoOrder(self): + """Test OcoOrder""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_oco_order_order_reports_inner.py b/target/python/binance_openapi/test/test_oco_order_order_reports_inner.py new file mode 100644 index 0000000..fda45bd --- /dev/null +++ b/target/python/binance_openapi/test/test_oco_order_order_reports_inner.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.oco_order_order_reports_inner import OcoOrderOrderReportsInner + +class TestOcoOrderOrderReportsInner(unittest.TestCase): + """OcoOrderOrderReportsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OcoOrderOrderReportsInner: + """Test OcoOrderOrderReportsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OcoOrderOrderReportsInner` + """ + model = OcoOrderOrderReportsInner() + if include_optional: + return OcoOrderOrderReportsInner( + symbol = '', + orig_client_order_id = '', + order_id = 56, + order_list_id = 56, + client_order_id = '', + price = '', + orig_qty = '', + executed_qty = '', + cummulative_quote_qty = '', + status = '', + time_in_force = '', + type = '', + side = '', + stop_price = '', + self_trade_prevention_mode = '', + transact_time = 56 + ) + else: + return OcoOrderOrderReportsInner( + symbol = '', + orig_client_order_id = '', + order_id = 56, + order_list_id = 56, + client_order_id = '', + price = '', + orig_qty = '', + executed_qty = '', + cummulative_quote_qty = '', + status = '', + time_in_force = '', + type = '', + side = '', + stop_price = '', + self_trade_prevention_mode = '', + transact_time = 56, + ) + """ + + def testOcoOrderOrderReportsInner(self): + """Test OcoOrderOrderReportsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_order.py b/target/python/binance_openapi/test/test_order.py new file mode 100644 index 0000000..3509f79 --- /dev/null +++ b/target/python/binance_openapi/test/test_order.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.order import Order + +class TestOrder(unittest.TestCase): + """Order unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Order: + """Test Order + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Order` + """ + model = Order() + if include_optional: + return Order( + symbol = 'BNBBTC', + orig_client_order_id = 'msXkySR3u5uYwpvRMFsi3u', + order_id = 28, + order_list_id = -1, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + price = '1.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'SELL', + self_trade_prevention_mode = 'NONE' + ) + else: + return Order( + symbol = 'BNBBTC', + orig_client_order_id = 'msXkySR3u5uYwpvRMFsi3u', + order_id = 28, + order_list_id = -1, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + price = '1.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'SELL', + self_trade_prevention_mode = 'NONE', + ) + """ + + def testOrder(self): + """Test Order""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_order_details.py b/target/python/binance_openapi/test/test_order_details.py new file mode 100644 index 0000000..053e972 --- /dev/null +++ b/target/python/binance_openapi/test/test_order_details.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.order_details import OrderDetails + +class TestOrderDetails(unittest.TestCase): + """OrderDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OrderDetails: + """Test OrderDetails + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OrderDetails` + """ + model = OrderDetails() + if include_optional: + return OrderDetails( + symbol = 'LTCBTC', + order_id = 1, + order_list_id = -1, + client_order_id = 'myOrder1', + price = '0.1', + orig_qty = '1.0', + executed_qty = '0.0', + cummulative_quote_qty = '0.0', + status = 'NEW', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'BUY', + stop_price = '0.0', + iceberg_qty = '0.0', + time = 1499827319559, + update_time = 1499827319559, + is_working = True, + working_time = 1499827319559, + orig_quote_order_qty = '0.00000000', + self_trade_prevention_mode = 'NONE', + prevented_match_id = 0, + prevented_quantity = '1.200000' + ) + else: + return OrderDetails( + symbol = 'LTCBTC', + order_id = 1, + order_list_id = -1, + client_order_id = 'myOrder1', + price = '0.1', + orig_qty = '1.0', + executed_qty = '0.0', + cummulative_quote_qty = '0.0', + status = 'NEW', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'BUY', + stop_price = '0.0', + iceberg_qty = '0.0', + time = 1499827319559, + update_time = 1499827319559, + is_working = True, + working_time = 1499827319559, + orig_quote_order_qty = '0.00000000', + self_trade_prevention_mode = 'NONE', + ) + """ + + def testOrderDetails(self): + """Test OrderDetails""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_order_response_ack.py b/target/python/binance_openapi/test/test_order_response_ack.py new file mode 100644 index 0000000..220757a --- /dev/null +++ b/target/python/binance_openapi/test/test_order_response_ack.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.order_response_ack import OrderResponseAck + +class TestOrderResponseAck(unittest.TestCase): + """OrderResponseAck unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OrderResponseAck: + """Test OrderResponseAck + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OrderResponseAck` + """ + model = OrderResponseAck() + if include_optional: + return OrderResponseAck( + symbol = 'BTCUSDT', + order_id = 28, + order_list_id = -1, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595 + ) + else: + return OrderResponseAck( + symbol = 'BTCUSDT', + order_id = 28, + order_list_id = -1, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + ) + """ + + def testOrderResponseAck(self): + """Test OrderResponseAck""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_order_response_full.py b/target/python/binance_openapi/test/test_order_response_full.py new file mode 100644 index 0000000..ee57295 --- /dev/null +++ b/target/python/binance_openapi/test/test_order_response_full.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.order_response_full import OrderResponseFull + +class TestOrderResponseFull(unittest.TestCase): + """OrderResponseFull unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OrderResponseFull: + """Test OrderResponseFull + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OrderResponseFull` + """ + model = OrderResponseFull() + if include_optional: + return OrderResponseFull( + symbol = 'BTCUSDT', + order_id = 28, + order_list_id = -1, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + price = '0.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'MARKET', + side = 'SELL', + strategy_id = 1, + strategy_type = 1000000, + working_time = 1507725176595, + self_trade_prevention_mode = 'NONE', + fills = [ + openapi_client.models.order_response_full_fills_inner.orderResponseFull_fills_inner( + price = '4000.00000000', + qty = '1.00000000', + commission = '4.00000000', + commission_asset = 'USDT', ) + ] + ) + else: + return OrderResponseFull( + symbol = 'BTCUSDT', + order_id = 28, + order_list_id = -1, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + price = '0.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'MARKET', + side = 'SELL', + working_time = 1507725176595, + self_trade_prevention_mode = 'NONE', + fills = [ + openapi_client.models.order_response_full_fills_inner.orderResponseFull_fills_inner( + price = '4000.00000000', + qty = '1.00000000', + commission = '4.00000000', + commission_asset = 'USDT', ) + ], + ) + """ + + def testOrderResponseFull(self): + """Test OrderResponseFull""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_order_response_full_fills_inner.py b/target/python/binance_openapi/test/test_order_response_full_fills_inner.py new file mode 100644 index 0000000..0824e95 --- /dev/null +++ b/target/python/binance_openapi/test/test_order_response_full_fills_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.order_response_full_fills_inner import OrderResponseFullFillsInner + +class TestOrderResponseFullFillsInner(unittest.TestCase): + """OrderResponseFullFillsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OrderResponseFullFillsInner: + """Test OrderResponseFullFillsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OrderResponseFullFillsInner` + """ + model = OrderResponseFullFillsInner() + if include_optional: + return OrderResponseFullFillsInner( + price = '4000.00000000', + qty = '1.00000000', + commission = '4.00000000', + commission_asset = 'USDT' + ) + else: + return OrderResponseFullFillsInner( + price = '4000.00000000', + qty = '1.00000000', + commission = '4.00000000', + commission_asset = 'USDT', + ) + """ + + def testOrderResponseFullFillsInner(self): + """Test OrderResponseFullFillsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_order_response_result.py b/target/python/binance_openapi/test/test_order_response_result.py new file mode 100644 index 0000000..c9da7f0 --- /dev/null +++ b/target/python/binance_openapi/test/test_order_response_result.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.order_response_result import OrderResponseResult + +class TestOrderResponseResult(unittest.TestCase): + """OrderResponseResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OrderResponseResult: + """Test OrderResponseResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OrderResponseResult` + """ + model = OrderResponseResult() + if include_optional: + return OrderResponseResult( + symbol = 'BTCUSDT', + order_id = 28, + order_list_id = -1, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + price = '0.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'MARKET', + side = 'SELL', + strategy_id = 1, + strategy_type = 1000000, + working_time = 1507725176595, + self_trade_prevention_mode = 'NONE' + ) + else: + return OrderResponseResult( + symbol = 'BTCUSDT', + order_id = 28, + order_list_id = -1, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + transact_time = 1507725176595, + price = '0.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'MARKET', + side = 'SELL', + working_time = 1507725176595, + self_trade_prevention_mode = 'NONE', + ) + """ + + def testOrderResponseResult(self): + """Test OrderResponseResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_pay_api.py b/target/python/binance_openapi/test/test_pay_api.py new file mode 100644 index 0000000..03b04c2 --- /dev/null +++ b/target/python/binance_openapi/test/test_pay_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.pay_api import PayApi + + +class TestPayApi(unittest.TestCase): + """PayApi unit test stubs""" + + def setUp(self) -> None: + self.api = PayApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_pay_transactions_get(self) -> None: + """Test case for sapi_v1_pay_transactions_get + + Get Pay Trade History (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_portfolio_margin_api.py b/target/python/binance_openapi/test/test_portfolio_margin_api.py new file mode 100644 index 0000000..95cbd6e --- /dev/null +++ b/target/python/binance_openapi/test/test_portfolio_margin_api.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.portfolio_margin_api import PortfolioMarginApi + + +class TestPortfolioMarginApi(unittest.TestCase): + """PortfolioMarginApi unit test stubs""" + + def setUp(self) -> None: + self.api = PortfolioMarginApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_portfolio_account_get(self) -> None: + """Test case for sapi_v1_portfolio_account_get + + Portfolio Margin Account (USER_DATA) + """ + pass + + def test_sapi_v1_portfolio_asset_collection_post(self) -> None: + """Test case for sapi_v1_portfolio_asset_collection_post + + Fund Collection by Asset (USER_DATA) + """ + pass + + def test_sapi_v1_portfolio_asset_index_price_get(self) -> None: + """Test case for sapi_v1_portfolio_asset_index_price_get + + Query Portfolio Margin Asset Index Price (MARKET_DATA) + """ + pass + + def test_sapi_v1_portfolio_auto_collection_post(self) -> None: + """Test case for sapi_v1_portfolio_auto_collection_post + + Fund Auto-collection (USER_DATA) + """ + pass + + def test_sapi_v1_portfolio_bnb_transfer_post(self) -> None: + """Test case for sapi_v1_portfolio_bnb_transfer_post + + BNB Transfer (USER_DATA) + """ + pass + + def test_sapi_v1_portfolio_collateral_rate_get(self) -> None: + """Test case for sapi_v1_portfolio_collateral_rate_get + + Portfolio Margin Collateral Rate (MARKET_DATA) + """ + pass + + def test_sapi_v1_portfolio_interest_history_get(self) -> None: + """Test case for sapi_v1_portfolio_interest_history_get + + Query Classic Portfolio Margin Negative Balance Interest History (USER_DATA) + """ + pass + + def test_sapi_v1_portfolio_margin_asset_leverage_get(self) -> None: + """Test case for sapi_v1_portfolio_margin_asset_leverage_get + + Get Portfolio Margin Asset Leverage (USER_DATA) + """ + pass + + def test_sapi_v1_portfolio_pm_loan_get(self) -> None: + """Test case for sapi_v1_portfolio_pm_loan_get + + Portfolio Margin Bankruptcy Loan Amount (USER_DATA) + """ + pass + + def test_sapi_v1_portfolio_repay_futures_negative_balance_post(self) -> None: + """Test case for sapi_v1_portfolio_repay_futures_negative_balance_post + + Repay futures Negative Balance (USER_DATA) + """ + pass + + def test_sapi_v1_portfolio_repay_futures_switch_get(self) -> None: + """Test case for sapi_v1_portfolio_repay_futures_switch_get + + Get Auto-repay-futures Status (USER_DATA) + """ + pass + + def test_sapi_v1_portfolio_repay_futures_switch_post(self) -> None: + """Test case for sapi_v1_portfolio_repay_futures_switch_post + + Change Auto-repay-futures Status (USER_DATA) + """ + pass + + def test_sapi_v1_portfolio_repay_post(self) -> None: + """Test case for sapi_v1_portfolio_repay_post + + Portfolio Margin Bankruptcy Loan Repay (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_price_ticker.py b/target/python/binance_openapi/test/test_price_ticker.py new file mode 100644 index 0000000..7e89902 --- /dev/null +++ b/target/python/binance_openapi/test/test_price_ticker.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.price_ticker import PriceTicker + +class TestPriceTicker(unittest.TestCase): + """PriceTicker unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PriceTicker: + """Test PriceTicker + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PriceTicker` + """ + model = PriceTicker() + if include_optional: + return PriceTicker( + symbol = 'BNBBTC', + price = '0.17160000' + ) + else: + return PriceTicker( + symbol = 'BNBBTC', + price = '0.17160000', + ) + """ + + def testPriceTicker(self): + """Test PriceTicker""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_rebate_api.py b/target/python/binance_openapi/test/test_rebate_api.py new file mode 100644 index 0000000..2889e6a --- /dev/null +++ b/target/python/binance_openapi/test/test_rebate_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.rebate_api import RebateApi + + +class TestRebateApi(unittest.TestCase): + """RebateApi unit test stubs""" + + def setUp(self) -> None: + self.api = RebateApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_rebate_tax_query_get(self) -> None: + """Test case for sapi_v1_rebate_tax_query_get + + Get Spot Rebate History Records (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_repayment_info.py b/target/python/binance_openapi/test/test_repayment_info.py new file mode 100644 index 0000000..98852a9 --- /dev/null +++ b/target/python/binance_openapi/test/test_repayment_info.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.repayment_info import RepaymentInfo + +class TestRepaymentInfo(unittest.TestCase): + """RepaymentInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RepaymentInfo: + """Test RepaymentInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RepaymentInfo` + """ + model = RepaymentInfo() + if include_optional: + return RepaymentInfo( + loan_coin = 'BUSD', + remaining_principal = '100.5', + remaining_interest = '0', + collateral_coin = 'BNB', + remaining_collateral = '5.253', + current_ltv = '0.25', + repay_status = 'Repaying' + ) + else: + return RepaymentInfo( + loan_coin = 'BUSD', + remaining_principal = '100.5', + remaining_interest = '0', + collateral_coin = 'BNB', + remaining_collateral = '5.253', + current_ltv = '0.25', + repay_status = 'Repaying', + ) + """ + + def testRepaymentInfo(self): + """Test RepaymentInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_repayment_info2.py b/target/python/binance_openapi/test/test_repayment_info2.py new file mode 100644 index 0000000..1935675 --- /dev/null +++ b/target/python/binance_openapi/test/test_repayment_info2.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.repayment_info2 import RepaymentInfo2 + +class TestRepaymentInfo2(unittest.TestCase): + """RepaymentInfo2 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RepaymentInfo2: + """Test RepaymentInfo2 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RepaymentInfo2` + """ + model = RepaymentInfo2() + if include_optional: + return RepaymentInfo2( + loan_coin = 'BUSD', + collateral_coin = 'BNB', + repay_status = 'Repaying' + ) + else: + return RepaymentInfo2( + loan_coin = 'BUSD', + collateral_coin = 'BNB', + repay_status = 'Repaying', + ) + """ + + def testRepaymentInfo2(self): + """Test RepaymentInfo2""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_account_api_restrictions_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_account_api_restrictions_get200_response.py new file mode 100644 index 0000000..9698079 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_account_api_restrictions_get200_response.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_account_api_restrictions_get200_response import SapiV1AccountApiRestrictionsGet200Response + +class TestSapiV1AccountApiRestrictionsGet200Response(unittest.TestCase): + """SapiV1AccountApiRestrictionsGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AccountApiRestrictionsGet200Response: + """Test SapiV1AccountApiRestrictionsGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AccountApiRestrictionsGet200Response` + """ + model = SapiV1AccountApiRestrictionsGet200Response() + if include_optional: + return SapiV1AccountApiRestrictionsGet200Response( + ip_restrict = False, + create_time = 1623840271000, + enable_internal_transfer = True, + enable_futures = False, + enable_portfolio_margin_trading = False, + enable_vanilla_options = False, + permits_universal_transfer = True, + enable_reading = True, + enable_spot_and_margin_trading = False, + enable_withdrawals = False, + enable_margin = False, + trading_authority_expiration_time = 1628985600000 + ) + else: + return SapiV1AccountApiRestrictionsGet200Response( + ip_restrict = False, + create_time = 1623840271000, + enable_internal_transfer = True, + enable_futures = False, + enable_vanilla_options = False, + permits_universal_transfer = True, + enable_reading = True, + enable_spot_and_margin_trading = False, + enable_withdrawals = False, + enable_margin = False, + trading_authority_expiration_time = 1628985600000, + ) + """ + + def testSapiV1AccountApiRestrictionsGet200Response(self): + """Test SapiV1AccountApiRestrictionsGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response.py new file mode 100644 index 0000000..ae77219 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response import SapiV1AccountApiTradingStatusGet200Response + +class TestSapiV1AccountApiTradingStatusGet200Response(unittest.TestCase): + """SapiV1AccountApiTradingStatusGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AccountApiTradingStatusGet200Response: + """Test SapiV1AccountApiTradingStatusGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AccountApiTradingStatusGet200Response` + """ + model = SapiV1AccountApiTradingStatusGet200Response() + if include_optional: + return SapiV1AccountApiTradingStatusGet200Response( + data = openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data._sapi_v1_account_apiTradingStatus_get_200_response_data( + is_locked = False, + planned_recover_time = 0, + trigger_condition = openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data_trigger_condition._sapi_v1_account_apiTradingStatus_get_200_response_data_triggerCondition( + gcr = 150, + ifer = 150, + ufr = 300, ), + indicators = openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data_indicators._sapi_v1_account_apiTradingStatus_get_200_response_data_indicators( + btcusdt = [ + openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data_indicators_btcusdt_inner._sapi_v1_account_apiTradingStatus_get_200_response_data_indicators_BTCUSDT_inner( + i = 'UFR', + c = 20, + v = 0.05, + t = 0.99, ) + ], ), + update_time = 1547630471725, ) + ) + else: + return SapiV1AccountApiTradingStatusGet200Response( + data = openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data._sapi_v1_account_apiTradingStatus_get_200_response_data( + is_locked = False, + planned_recover_time = 0, + trigger_condition = openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data_trigger_condition._sapi_v1_account_apiTradingStatus_get_200_response_data_triggerCondition( + gcr = 150, + ifer = 150, + ufr = 300, ), + indicators = openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data_indicators._sapi_v1_account_apiTradingStatus_get_200_response_data_indicators( + btcusdt = [ + openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data_indicators_btcusdt_inner._sapi_v1_account_apiTradingStatus_get_200_response_data_indicators_BTCUSDT_inner( + i = 'UFR', + c = 20, + v = 0.05, + t = 0.99, ) + ], ), + update_time = 1547630471725, ), + ) + """ + + def testSapiV1AccountApiTradingStatusGet200Response(self): + """Test SapiV1AccountApiTradingStatusGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data.py b/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data.py new file mode 100644 index 0000000..0c633e0 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data import SapiV1AccountApiTradingStatusGet200ResponseData + +class TestSapiV1AccountApiTradingStatusGet200ResponseData(unittest.TestCase): + """SapiV1AccountApiTradingStatusGet200ResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AccountApiTradingStatusGet200ResponseData: + """Test SapiV1AccountApiTradingStatusGet200ResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AccountApiTradingStatusGet200ResponseData` + """ + model = SapiV1AccountApiTradingStatusGet200ResponseData() + if include_optional: + return SapiV1AccountApiTradingStatusGet200ResponseData( + is_locked = False, + planned_recover_time = 0, + trigger_condition = openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data_trigger_condition._sapi_v1_account_apiTradingStatus_get_200_response_data_triggerCondition( + gcr = 150, + ifer = 150, + ufr = 300, ), + indicators = openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data_indicators._sapi_v1_account_apiTradingStatus_get_200_response_data_indicators( + btcusdt = [ + openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data_indicators_btcusdt_inner._sapi_v1_account_apiTradingStatus_get_200_response_data_indicators_BTCUSDT_inner( + i = 'UFR', + c = 20, + v = 0.05, + t = 0.99, ) + ], ), + update_time = 1547630471725 + ) + else: + return SapiV1AccountApiTradingStatusGet200ResponseData( + is_locked = False, + planned_recover_time = 0, + trigger_condition = openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data_trigger_condition._sapi_v1_account_apiTradingStatus_get_200_response_data_triggerCondition( + gcr = 150, + ifer = 150, + ufr = 300, ), + indicators = openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data_indicators._sapi_v1_account_apiTradingStatus_get_200_response_data_indicators( + btcusdt = [ + openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data_indicators_btcusdt_inner._sapi_v1_account_apiTradingStatus_get_200_response_data_indicators_BTCUSDT_inner( + i = 'UFR', + c = 20, + v = 0.05, + t = 0.99, ) + ], ), + update_time = 1547630471725, + ) + """ + + def testSapiV1AccountApiTradingStatusGet200ResponseData(self): + """Test SapiV1AccountApiTradingStatusGet200ResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data_indicators.py b/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data_indicators.py new file mode 100644 index 0000000..06a1cd3 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data_indicators.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_indicators import SapiV1AccountApiTradingStatusGet200ResponseDataIndicators + +class TestSapiV1AccountApiTradingStatusGet200ResponseDataIndicators(unittest.TestCase): + """SapiV1AccountApiTradingStatusGet200ResponseDataIndicators unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AccountApiTradingStatusGet200ResponseDataIndicators: + """Test SapiV1AccountApiTradingStatusGet200ResponseDataIndicators + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AccountApiTradingStatusGet200ResponseDataIndicators` + """ + model = SapiV1AccountApiTradingStatusGet200ResponseDataIndicators() + if include_optional: + return SapiV1AccountApiTradingStatusGet200ResponseDataIndicators( + btcusdt = [ + openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data_indicators_btcusdt_inner._sapi_v1_account_apiTradingStatus_get_200_response_data_indicators_BTCUSDT_inner( + i = 'UFR', + c = 20, + v = 0.05, + t = 0.99, ) + ] + ) + else: + return SapiV1AccountApiTradingStatusGet200ResponseDataIndicators( + btcusdt = [ + openapi_client.models._sapi_v1_account_api_trading_status_get_200_response_data_indicators_btcusdt_inner._sapi_v1_account_apiTradingStatus_get_200_response_data_indicators_BTCUSDT_inner( + i = 'UFR', + c = 20, + v = 0.05, + t = 0.99, ) + ], + ) + """ + + def testSapiV1AccountApiTradingStatusGet200ResponseDataIndicators(self): + """Test SapiV1AccountApiTradingStatusGet200ResponseDataIndicators""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner.py b/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner.py new file mode 100644 index 0000000..7e7d546 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_indicators_btcusdt_inner import SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner + +class TestSapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner(unittest.TestCase): + """SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner: + """Test SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner` + """ + model = SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner() + if include_optional: + return SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner( + i = 'UFR', + c = 20, + v = 0.05, + t = 0.99 + ) + else: + return SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner( + i = 'UFR', + c = 20, + v = 0.05, + t = 0.99, + ) + """ + + def testSapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner(self): + """Test SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBTCUSDTInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data_trigger_condition.py b/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data_trigger_condition.py new file mode 100644 index 0000000..8145cd5 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_account_api_trading_status_get200_response_data_trigger_condition.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_account_api_trading_status_get200_response_data_trigger_condition import SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition + +class TestSapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition(unittest.TestCase): + """SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition: + """Test SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition` + """ + model = SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition() + if include_optional: + return SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition( + gcr = 150, + ifer = 150, + ufr = 300 + ) + else: + return SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition( + gcr = 150, + ifer = 150, + ufr = 300, + ) + """ + + def testSapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition(self): + """Test SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_account_info_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_account_info_get200_response.py new file mode 100644 index 0000000..8abfcd4 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_account_info_get200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_account_info_get200_response import SapiV1AccountInfoGet200Response + +class TestSapiV1AccountInfoGet200Response(unittest.TestCase): + """SapiV1AccountInfoGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AccountInfoGet200Response: + """Test SapiV1AccountInfoGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AccountInfoGet200Response` + """ + model = SapiV1AccountInfoGet200Response() + if include_optional: + return SapiV1AccountInfoGet200Response( + vip_level = 0, + is_margin_enabled = True, + is_future_enabled = True + ) + else: + return SapiV1AccountInfoGet200Response( + vip_level = 0, + is_margin_enabled = True, + is_future_enabled = True, + ) + """ + + def testSapiV1AccountInfoGet200Response(self): + """Test SapiV1AccountInfoGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_account_snapshot_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_account_snapshot_get200_response.py new file mode 100644 index 0000000..606758b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_account_snapshot_get200_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_account_snapshot_get200_response import SapiV1AccountSnapshotGet200Response + +class TestSapiV1AccountSnapshotGet200Response(unittest.TestCase): + """SapiV1AccountSnapshotGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AccountSnapshotGet200Response: + """Test SapiV1AccountSnapshotGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AccountSnapshotGet200Response` + """ + model = SapiV1AccountSnapshotGet200Response() + if include_optional: + return SapiV1AccountSnapshotGet200Response( + code = 200, + msg = '', + snapshot_vos = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner.snapshotFutures_snapshotVos_inner( + data = openapi_client.models.snapshot_futures_snapshot_vos_inner_data.snapshotFutures_snapshotVos_inner_data( + assets = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_assets_inner.snapshotFutures_snapshotVos_inner_data_assets_inner( + asset = 'USDT', + margin_balance = '118.99782335', + wallet_balance = '120.23811389', ) + ], + position = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_position_inner.snapshotFutures_snapshotVos_inner_data_position_inner( + entry_price = '7130.41000000', + mark_price = '7257.66239673', + position_amt = '0.01000000', + symbol = 'BTCUSDT', + un_realized_profit = '1.24029054', ) + ], ), + type = 'futures', + update_time = 1576281599000, ) + ] + ) + else: + return SapiV1AccountSnapshotGet200Response( + code = 200, + msg = '', + snapshot_vos = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner.snapshotFutures_snapshotVos_inner( + data = openapi_client.models.snapshot_futures_snapshot_vos_inner_data.snapshotFutures_snapshotVos_inner_data( + assets = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_assets_inner.snapshotFutures_snapshotVos_inner_data_assets_inner( + asset = 'USDT', + margin_balance = '118.99782335', + wallet_balance = '120.23811389', ) + ], + position = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_position_inner.snapshotFutures_snapshotVos_inner_data_position_inner( + entry_price = '7130.41000000', + mark_price = '7257.66239673', + position_amt = '0.01000000', + symbol = 'BTCUSDT', + un_realized_profit = '1.24029054', ) + ], ), + type = 'futures', + update_time = 1576281599000, ) + ], + ) + """ + + def testSapiV1AccountSnapshotGet200Response(self): + """Test SapiV1AccountSnapshotGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_account_status_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_account_status_get200_response.py new file mode 100644 index 0000000..fea0a5c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_account_status_get200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_account_status_get200_response import SapiV1AccountStatusGet200Response + +class TestSapiV1AccountStatusGet200Response(unittest.TestCase): + """SapiV1AccountStatusGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AccountStatusGet200Response: + """Test SapiV1AccountStatusGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AccountStatusGet200Response` + """ + model = SapiV1AccountStatusGet200Response() + if include_optional: + return SapiV1AccountStatusGet200Response( + data = 'Normal' + ) + else: + return SapiV1AccountStatusGet200Response( + data = 'Normal', + ) + """ + + def testSapiV1AccountStatusGet200Response(self): + """Test SapiV1AccountStatusGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_futures_historical_orders_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_historical_orders_get200_response.py new file mode 100644 index 0000000..3b21532 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_historical_orders_get200_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_futures_historical_orders_get200_response import SapiV1AlgoFuturesHistoricalOrdersGet200Response + +class TestSapiV1AlgoFuturesHistoricalOrdersGet200Response(unittest.TestCase): + """SapiV1AlgoFuturesHistoricalOrdersGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoFuturesHistoricalOrdersGet200Response: + """Test SapiV1AlgoFuturesHistoricalOrdersGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoFuturesHistoricalOrdersGet200Response` + """ + model = SapiV1AlgoFuturesHistoricalOrdersGet200Response() + if include_optional: + return SapiV1AlgoFuturesHistoricalOrdersGet200Response( + total = 1, + orders = [ + openapi_client.models._sapi_v1_algo_futures_historical_orders_get_200_response_orders_inner._sapi_v1_algo_futures_historicalOrders_get_200_response_orders_inner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + position_side = 'SHORT', + total_qty = '5.00', + executed_qty = '0.000', + executed_amt = '0.00000000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 1649757088101, + algo_status = 'WORKING', + algo_type = 'VP', + urgency = 'LOW', ) + ] + ) + else: + return SapiV1AlgoFuturesHistoricalOrdersGet200Response( + total = 1, + orders = [ + openapi_client.models._sapi_v1_algo_futures_historical_orders_get_200_response_orders_inner._sapi_v1_algo_futures_historicalOrders_get_200_response_orders_inner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + position_side = 'SHORT', + total_qty = '5.00', + executed_qty = '0.000', + executed_amt = '0.00000000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 1649757088101, + algo_status = 'WORKING', + algo_type = 'VP', + urgency = 'LOW', ) + ], + ) + """ + + def testSapiV1AlgoFuturesHistoricalOrdersGet200Response(self): + """Test SapiV1AlgoFuturesHistoricalOrdersGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_futures_historical_orders_get200_response_orders_inner.py b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_historical_orders_get200_response_orders_inner.py new file mode 100644 index 0000000..2c28780 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_historical_orders_get200_response_orders_inner.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_futures_historical_orders_get200_response_orders_inner import SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner + +class TestSapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner(unittest.TestCase): + """SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner: + """Test SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner` + """ + model = SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner() + if include_optional: + return SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + position_side = 'SHORT', + total_qty = '5.00', + executed_qty = '0.000', + executed_amt = '0.00000000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 1649757088101, + algo_status = 'WORKING', + algo_type = 'VP', + urgency = 'LOW' + ) + else: + return SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + position_side = 'SHORT', + total_qty = '5.00', + executed_qty = '0.000', + executed_amt = '0.00000000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 1649757088101, + algo_status = 'WORKING', + algo_type = 'VP', + urgency = 'LOW', + ) + """ + + def testSapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner(self): + """Test SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_futures_new_order_vp_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_new_order_vp_post200_response.py new file mode 100644 index 0000000..cf8b8f1 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_new_order_vp_post200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_futures_new_order_vp_post200_response import SapiV1AlgoFuturesNewOrderVpPost200Response + +class TestSapiV1AlgoFuturesNewOrderVpPost200Response(unittest.TestCase): + """SapiV1AlgoFuturesNewOrderVpPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoFuturesNewOrderVpPost200Response: + """Test SapiV1AlgoFuturesNewOrderVpPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoFuturesNewOrderVpPost200Response` + """ + model = SapiV1AlgoFuturesNewOrderVpPost200Response() + if include_optional: + return SapiV1AlgoFuturesNewOrderVpPost200Response( + client_algo_id = '00358ce6a268403398bd34eaa36dffe7', + success = True, + code = 0, + msg = 'OK' + ) + else: + return SapiV1AlgoFuturesNewOrderVpPost200Response( + client_algo_id = '00358ce6a268403398bd34eaa36dffe7', + success = True, + code = 0, + msg = 'OK', + ) + """ + + def testSapiV1AlgoFuturesNewOrderVpPost200Response(self): + """Test SapiV1AlgoFuturesNewOrderVpPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_futures_open_orders_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_open_orders_get200_response.py new file mode 100644 index 0000000..53b43bd --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_open_orders_get200_response.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_futures_open_orders_get200_response import SapiV1AlgoFuturesOpenOrdersGet200Response + +class TestSapiV1AlgoFuturesOpenOrdersGet200Response(unittest.TestCase): + """SapiV1AlgoFuturesOpenOrdersGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoFuturesOpenOrdersGet200Response: + """Test SapiV1AlgoFuturesOpenOrdersGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoFuturesOpenOrdersGet200Response` + """ + model = SapiV1AlgoFuturesOpenOrdersGet200Response() + if include_optional: + return SapiV1AlgoFuturesOpenOrdersGet200Response( + total = 1, + orders = [ + openapi_client.models._sapi_v1_algo_futures_open_orders_get_200_response_orders_inner._sapi_v1_algo_futures_openOrders_get_200_response_orders_inner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + position_side = 'SHORT', + total_qty = '5.00', + executed_qty = '0.000', + executed_amt = '0.00000000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 0, + algo_status = 'WORKING', + algo_type = 'VP', + urgency = 'LOW', ) + ] + ) + else: + return SapiV1AlgoFuturesOpenOrdersGet200Response( + total = 1, + ) + """ + + def testSapiV1AlgoFuturesOpenOrdersGet200Response(self): + """Test SapiV1AlgoFuturesOpenOrdersGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_futures_open_orders_get200_response_orders_inner.py b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_open_orders_get200_response_orders_inner.py new file mode 100644 index 0000000..fbf99c6 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_open_orders_get200_response_orders_inner.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_futures_open_orders_get200_response_orders_inner import SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner + +class TestSapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner(unittest.TestCase): + """SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner: + """Test SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner` + """ + model = SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner() + if include_optional: + return SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + position_side = 'SHORT', + total_qty = '5.00', + executed_qty = '0.000', + executed_amt = '0.00000000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 0, + algo_status = 'WORKING', + algo_type = 'VP', + urgency = 'LOW' + ) + else: + return SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + position_side = 'SHORT', + total_qty = '5.00', + executed_qty = '0.000', + executed_amt = '0.00000000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 0, + algo_status = 'WORKING', + algo_type = 'VP', + urgency = 'LOW', + ) + """ + + def testSapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner(self): + """Test SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_futures_order_delete200_response.py b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_order_delete200_response.py new file mode 100644 index 0000000..184b3bd --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_order_delete200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_futures_order_delete200_response import SapiV1AlgoFuturesOrderDelete200Response + +class TestSapiV1AlgoFuturesOrderDelete200Response(unittest.TestCase): + """SapiV1AlgoFuturesOrderDelete200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoFuturesOrderDelete200Response: + """Test SapiV1AlgoFuturesOrderDelete200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoFuturesOrderDelete200Response` + """ + model = SapiV1AlgoFuturesOrderDelete200Response() + if include_optional: + return SapiV1AlgoFuturesOrderDelete200Response( + algo_id = 14511, + success = True, + code = 0, + msg = 'OK' + ) + else: + return SapiV1AlgoFuturesOrderDelete200Response( + algo_id = 14511, + success = True, + code = 0, + msg = 'OK', + ) + """ + + def testSapiV1AlgoFuturesOrderDelete200Response(self): + """Test SapiV1AlgoFuturesOrderDelete200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_futures_sub_orders_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_sub_orders_get200_response.py new file mode 100644 index 0000000..455a0e8 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_sub_orders_get200_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_futures_sub_orders_get200_response import SapiV1AlgoFuturesSubOrdersGet200Response + +class TestSapiV1AlgoFuturesSubOrdersGet200Response(unittest.TestCase): + """SapiV1AlgoFuturesSubOrdersGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoFuturesSubOrdersGet200Response: + """Test SapiV1AlgoFuturesSubOrdersGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoFuturesSubOrdersGet200Response` + """ + model = SapiV1AlgoFuturesSubOrdersGet200Response() + if include_optional: + return SapiV1AlgoFuturesSubOrdersGet200Response( + total = 1, + executed_qty = '1.000', + executed_amt = '3229.44000000', + sub_orders = [ + openapi_client.models._sapi_v1_algo_futures_sub_orders_get_200_response_sub_orders_inner._sapi_v1_algo_futures_subOrders_get_200_response_subOrders_inner( + algo_id = 13723, + order_id = 8389765519993908929, + order_status = 'FILLED', + executed_qty = '1.000', + executed_amt = '3229.44000000', + fee_amt = '-1.61471999', + fee_asset = 'USDT', + book_time = 1649756817004, + avg_price = '3229.44', + side = 'SELL', + symbol = 'ETHUSDT', + sub_id = 1, + time_in_force = 'IMMEDIATE_OR_CANCEL', + orig_qty = '1.000', ) + ] + ) + else: + return SapiV1AlgoFuturesSubOrdersGet200Response( + total = 1, + executed_qty = '1.000', + executed_amt = '3229.44000000', + sub_orders = [ + openapi_client.models._sapi_v1_algo_futures_sub_orders_get_200_response_sub_orders_inner._sapi_v1_algo_futures_subOrders_get_200_response_subOrders_inner( + algo_id = 13723, + order_id = 8389765519993908929, + order_status = 'FILLED', + executed_qty = '1.000', + executed_amt = '3229.44000000', + fee_amt = '-1.61471999', + fee_asset = 'USDT', + book_time = 1649756817004, + avg_price = '3229.44', + side = 'SELL', + symbol = 'ETHUSDT', + sub_id = 1, + time_in_force = 'IMMEDIATE_OR_CANCEL', + orig_qty = '1.000', ) + ], + ) + """ + + def testSapiV1AlgoFuturesSubOrdersGet200Response(self): + """Test SapiV1AlgoFuturesSubOrdersGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner.py b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner.py new file mode 100644 index 0000000..2c6036a --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_futures_sub_orders_get200_response_sub_orders_inner import SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner + +class TestSapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner(unittest.TestCase): + """SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner: + """Test SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner` + """ + model = SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner() + if include_optional: + return SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner( + algo_id = 13723, + order_id = 8389765519993908929, + order_status = 'FILLED', + executed_qty = '1.000', + executed_amt = '3229.44000000', + fee_amt = '-1.61471999', + fee_asset = 'USDT', + book_time = 1649756817004, + avg_price = '3229.44', + side = 'SELL', + symbol = 'ETHUSDT', + sub_id = 1, + time_in_force = 'IMMEDIATE_OR_CANCEL', + orig_qty = '1.000' + ) + else: + return SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner( + algo_id = 13723, + order_id = 8389765519993908929, + order_status = 'FILLED', + executed_amt = '3229.44000000', + fee_amt = '-1.61471999', + fee_asset = 'USDT', + book_time = 1649756817004, + avg_price = '3229.44', + side = 'SELL', + symbol = 'ETHUSDT', + sub_id = 1, + time_in_force = 'IMMEDIATE_OR_CANCEL', + orig_qty = '1.000', + ) + """ + + def testSapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner(self): + """Test SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_spot_historical_orders_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_historical_orders_get200_response.py new file mode 100644 index 0000000..448d4e8 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_historical_orders_get200_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_spot_historical_orders_get200_response import SapiV1AlgoSpotHistoricalOrdersGet200Response + +class TestSapiV1AlgoSpotHistoricalOrdersGet200Response(unittest.TestCase): + """SapiV1AlgoSpotHistoricalOrdersGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoSpotHistoricalOrdersGet200Response: + """Test SapiV1AlgoSpotHistoricalOrdersGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoSpotHistoricalOrdersGet200Response` + """ + model = SapiV1AlgoSpotHistoricalOrdersGet200Response() + if include_optional: + return SapiV1AlgoSpotHistoricalOrdersGet200Response( + total = 1, + orders = [ + openapi_client.models._sapi_v1_algo_spot_historical_orders_get_200_response_orders_inner._sapi_v1_algo_spot_historicalOrders_get_200_response_orders_inner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + total_qty = '5.000', + executed_qty = '0.000', + executed_amt = '0.000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 1649756817004, + algo_status = 'WORKING', + algo_type = 'VP', + urgency = 'LOW', ) + ] + ) + else: + return SapiV1AlgoSpotHistoricalOrdersGet200Response( + total = 1, + orders = [ + openapi_client.models._sapi_v1_algo_spot_historical_orders_get_200_response_orders_inner._sapi_v1_algo_spot_historicalOrders_get_200_response_orders_inner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + total_qty = '5.000', + executed_qty = '0.000', + executed_amt = '0.000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 1649756817004, + algo_status = 'WORKING', + algo_type = 'VP', + urgency = 'LOW', ) + ], + ) + """ + + def testSapiV1AlgoSpotHistoricalOrdersGet200Response(self): + """Test SapiV1AlgoSpotHistoricalOrdersGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_spot_historical_orders_get200_response_orders_inner.py b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_historical_orders_get200_response_orders_inner.py new file mode 100644 index 0000000..708c272 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_historical_orders_get200_response_orders_inner.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_spot_historical_orders_get200_response_orders_inner import SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner + +class TestSapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner(unittest.TestCase): + """SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner: + """Test SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner` + """ + model = SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner() + if include_optional: + return SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + total_qty = '5.000', + executed_qty = '0.000', + executed_amt = '0.000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 1649756817004, + algo_status = 'WORKING', + algo_type = 'VP', + urgency = 'LOW' + ) + else: + return SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + total_qty = '5.000', + executed_qty = '0.000', + executed_amt = '0.000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 1649756817004, + algo_status = 'WORKING', + algo_type = 'VP', + urgency = 'LOW', + ) + """ + + def testSapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner(self): + """Test SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_spot_new_order_twap_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_new_order_twap_post200_response.py new file mode 100644 index 0000000..d526b56 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_new_order_twap_post200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_spot_new_order_twap_post200_response import SapiV1AlgoSpotNewOrderTwapPost200Response + +class TestSapiV1AlgoSpotNewOrderTwapPost200Response(unittest.TestCase): + """SapiV1AlgoSpotNewOrderTwapPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoSpotNewOrderTwapPost200Response: + """Test SapiV1AlgoSpotNewOrderTwapPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoSpotNewOrderTwapPost200Response` + """ + model = SapiV1AlgoSpotNewOrderTwapPost200Response() + if include_optional: + return SapiV1AlgoSpotNewOrderTwapPost200Response( + client_algo_id = '65ce1630101a480b85915d7e11fd5078', + success = True, + code = 0, + msg = 'OK' + ) + else: + return SapiV1AlgoSpotNewOrderTwapPost200Response( + client_algo_id = '65ce1630101a480b85915d7e11fd5078', + success = True, + code = 0, + msg = 'OK', + ) + """ + + def testSapiV1AlgoSpotNewOrderTwapPost200Response(self): + """Test SapiV1AlgoSpotNewOrderTwapPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_spot_open_orders_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_open_orders_get200_response.py new file mode 100644 index 0000000..3c5abc7 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_open_orders_get200_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_spot_open_orders_get200_response import SapiV1AlgoSpotOpenOrdersGet200Response + +class TestSapiV1AlgoSpotOpenOrdersGet200Response(unittest.TestCase): + """SapiV1AlgoSpotOpenOrdersGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoSpotOpenOrdersGet200Response: + """Test SapiV1AlgoSpotOpenOrdersGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoSpotOpenOrdersGet200Response` + """ + model = SapiV1AlgoSpotOpenOrdersGet200Response() + if include_optional: + return SapiV1AlgoSpotOpenOrdersGet200Response( + total = 1, + orders = [ + openapi_client.models._sapi_v1_algo_spot_open_orders_get_200_response_orders_inner._sapi_v1_algo_spot_openOrders_get_200_response_orders_inner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + total_qty = '5.000', + executed_qty = '0.000', + executed_amt = '0.000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 1649756817004, + algo_status = 'WORKING', + algo_type = 'TWAP', + urgency = 'LOW', ) + ] + ) + else: + return SapiV1AlgoSpotOpenOrdersGet200Response( + total = 1, + orders = [ + openapi_client.models._sapi_v1_algo_spot_open_orders_get_200_response_orders_inner._sapi_v1_algo_spot_openOrders_get_200_response_orders_inner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + total_qty = '5.000', + executed_qty = '0.000', + executed_amt = '0.000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 1649756817004, + algo_status = 'WORKING', + algo_type = 'TWAP', + urgency = 'LOW', ) + ], + ) + """ + + def testSapiV1AlgoSpotOpenOrdersGet200Response(self): + """Test SapiV1AlgoSpotOpenOrdersGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_spot_open_orders_get200_response_orders_inner.py b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_open_orders_get200_response_orders_inner.py new file mode 100644 index 0000000..7d7ca74 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_open_orders_get200_response_orders_inner.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_spot_open_orders_get200_response_orders_inner import SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner + +class TestSapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner(unittest.TestCase): + """SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner: + """Test SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner` + """ + model = SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner() + if include_optional: + return SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + total_qty = '5.000', + executed_qty = '0.000', + executed_amt = '0.000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 1649756817004, + algo_status = 'WORKING', + algo_type = 'TWAP', + urgency = 'LOW' + ) + else: + return SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner( + algo_id = 14517, + symbol = 'ETHUSDT', + side = 'SELL', + total_qty = '5.000', + executed_qty = '0.000', + executed_amt = '0.000', + avg_price = '0.00', + client_algo_id = 'd7096549481642f8a0bb69e9e2e31f2e', + book_time = 1649756817004, + end_time = 1649756817004, + algo_status = 'WORKING', + algo_type = 'TWAP', + urgency = 'LOW', + ) + """ + + def testSapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner(self): + """Test SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_spot_order_delete200_response.py b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_order_delete200_response.py new file mode 100644 index 0000000..1accb50 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_order_delete200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_spot_order_delete200_response import SapiV1AlgoSpotOrderDelete200Response + +class TestSapiV1AlgoSpotOrderDelete200Response(unittest.TestCase): + """SapiV1AlgoSpotOrderDelete200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoSpotOrderDelete200Response: + """Test SapiV1AlgoSpotOrderDelete200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoSpotOrderDelete200Response` + """ + model = SapiV1AlgoSpotOrderDelete200Response() + if include_optional: + return SapiV1AlgoSpotOrderDelete200Response( + algo_id = 14511, + success = True, + code = 0, + msg = 'OK' + ) + else: + return SapiV1AlgoSpotOrderDelete200Response( + algo_id = 14511, + success = True, + code = 0, + msg = 'OK', + ) + """ + + def testSapiV1AlgoSpotOrderDelete200Response(self): + """Test SapiV1AlgoSpotOrderDelete200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_spot_sub_orders_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_sub_orders_get200_response.py new file mode 100644 index 0000000..4c6178a --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_sub_orders_get200_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_spot_sub_orders_get200_response import SapiV1AlgoSpotSubOrdersGet200Response + +class TestSapiV1AlgoSpotSubOrdersGet200Response(unittest.TestCase): + """SapiV1AlgoSpotSubOrdersGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoSpotSubOrdersGet200Response: + """Test SapiV1AlgoSpotSubOrdersGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoSpotSubOrdersGet200Response` + """ + model = SapiV1AlgoSpotSubOrdersGet200Response() + if include_optional: + return SapiV1AlgoSpotSubOrdersGet200Response( + total = 1, + executed_qty = '1.000', + executed_amt = '3229.44000000', + sub_orders = [ + openapi_client.models._sapi_v1_algo_spot_sub_orders_get_200_response_sub_orders_inner._sapi_v1_algo_spot_subOrders_get_200_response_subOrders_inner( + algo_id = 14517, + order_id = 8389765519993908929, + order_status = 'FILLED', + executed_qty = '0.000', + executed_amt = '0.000', + fee_amt = '-1.61471999', + fee_asset = 'USDT', + book_time = 1649319001964, + avg_price = '3229.44', + side = 'SELL', + symbol = 'ETHUSDT', + sub_id = 1, + time_in_force = 'IMMEDIATE_OR_CANCEL', + orig_qty = '1.000', ) + ] + ) + else: + return SapiV1AlgoSpotSubOrdersGet200Response( + total = 1, + executed_qty = '1.000', + executed_amt = '3229.44000000', + sub_orders = [ + openapi_client.models._sapi_v1_algo_spot_sub_orders_get_200_response_sub_orders_inner._sapi_v1_algo_spot_subOrders_get_200_response_subOrders_inner( + algo_id = 14517, + order_id = 8389765519993908929, + order_status = 'FILLED', + executed_qty = '0.000', + executed_amt = '0.000', + fee_amt = '-1.61471999', + fee_asset = 'USDT', + book_time = 1649319001964, + avg_price = '3229.44', + side = 'SELL', + symbol = 'ETHUSDT', + sub_id = 1, + time_in_force = 'IMMEDIATE_OR_CANCEL', + orig_qty = '1.000', ) + ], + ) + """ + + def testSapiV1AlgoSpotSubOrdersGet200Response(self): + """Test SapiV1AlgoSpotSubOrdersGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner.py b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner.py new file mode 100644 index 0000000..64c22d5 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_algo_spot_sub_orders_get200_response_sub_orders_inner import SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner + +class TestSapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner(unittest.TestCase): + """SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner: + """Test SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner` + """ + model = SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner() + if include_optional: + return SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner( + algo_id = 14517, + order_id = 8389765519993908929, + order_status = 'FILLED', + executed_qty = '0.000', + executed_amt = '0.000', + fee_amt = '-1.61471999', + fee_asset = 'USDT', + book_time = 1649319001964, + avg_price = '3229.44', + side = 'SELL', + symbol = 'ETHUSDT', + sub_id = 1, + time_in_force = 'IMMEDIATE_OR_CANCEL', + orig_qty = '1.000' + ) + else: + return SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner( + algo_id = 14517, + order_id = 8389765519993908929, + order_status = 'FILLED', + executed_qty = '0.000', + executed_amt = '0.000', + fee_amt = '-1.61471999', + fee_asset = 'USDT', + book_time = 1649319001964, + avg_price = '3229.44', + side = 'SELL', + symbol = 'ETHUSDT', + sub_id = 1, + time_in_force = 'IMMEDIATE_OR_CANCEL', + orig_qty = '1.000', + ) + """ + + def testSapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner(self): + """Test SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_asset_detail_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_asset_asset_detail_get200_response.py new file mode 100644 index 0000000..9502f5d --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_asset_detail_get200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_asset_detail_get200_response import SapiV1AssetAssetDetailGet200Response + +class TestSapiV1AssetAssetDetailGet200Response(unittest.TestCase): + """SapiV1AssetAssetDetailGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetAssetDetailGet200Response: + """Test SapiV1AssetAssetDetailGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetAssetDetailGet200Response` + """ + model = SapiV1AssetAssetDetailGet200Response() + if include_optional: + return SapiV1AssetAssetDetailGet200Response( + ctr = openapi_client.models._sapi_v1_asset_asset_detail_get_200_response_ctr._sapi_v1_asset_assetDetail_get_200_response_CTR( + min_withdraw_amount = '70.00000000', + deposit_status = False, + withdraw_fee = 35, + withdraw_status = True, + deposit_tip = 'Delisted, Deposit Suspended', ) + ) + else: + return SapiV1AssetAssetDetailGet200Response( + ctr = openapi_client.models._sapi_v1_asset_asset_detail_get_200_response_ctr._sapi_v1_asset_assetDetail_get_200_response_CTR( + min_withdraw_amount = '70.00000000', + deposit_status = False, + withdraw_fee = 35, + withdraw_status = True, + deposit_tip = 'Delisted, Deposit Suspended', ), + ) + """ + + def testSapiV1AssetAssetDetailGet200Response(self): + """Test SapiV1AssetAssetDetailGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_asset_detail_get200_response_ctr.py b/target/python/binance_openapi/test/test_sapi_v1_asset_asset_detail_get200_response_ctr.py new file mode 100644 index 0000000..85de8c6 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_asset_detail_get200_response_ctr.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_asset_detail_get200_response_ctr import SapiV1AssetAssetDetailGet200ResponseCTR + +class TestSapiV1AssetAssetDetailGet200ResponseCTR(unittest.TestCase): + """SapiV1AssetAssetDetailGet200ResponseCTR unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetAssetDetailGet200ResponseCTR: + """Test SapiV1AssetAssetDetailGet200ResponseCTR + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetAssetDetailGet200ResponseCTR` + """ + model = SapiV1AssetAssetDetailGet200ResponseCTR() + if include_optional: + return SapiV1AssetAssetDetailGet200ResponseCTR( + min_withdraw_amount = '70.00000000', + deposit_status = False, + withdraw_fee = 35, + withdraw_status = True, + deposit_tip = 'Delisted, Deposit Suspended' + ) + else: + return SapiV1AssetAssetDetailGet200ResponseCTR( + min_withdraw_amount = '70.00000000', + deposit_status = False, + withdraw_fee = 35, + withdraw_status = True, + deposit_tip = 'Delisted, Deposit Suspended', + ) + """ + + def testSapiV1AssetAssetDetailGet200ResponseCTR(self): + """Test SapiV1AssetAssetDetailGet200ResponseCTR""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_asset_dividend_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_asset_asset_dividend_get200_response.py new file mode 100644 index 0000000..c35335c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_asset_dividend_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_asset_dividend_get200_response import SapiV1AssetAssetDividendGet200Response + +class TestSapiV1AssetAssetDividendGet200Response(unittest.TestCase): + """SapiV1AssetAssetDividendGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetAssetDividendGet200Response: + """Test SapiV1AssetAssetDividendGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetAssetDividendGet200Response` + """ + model = SapiV1AssetAssetDividendGet200Response() + if include_optional: + return SapiV1AssetAssetDividendGet200Response( + rows = [ + openapi_client.models._sapi_v1_asset_asset_dividend_get_200_response_rows_inner._sapi_v1_asset_assetDividend_get_200_response_rows_inner( + id = 242006910, + amount = '10.00000000', + asset = 'BHFT', + div_time = 1563189166000, + en_info = 'BHFT distribution', + tran_id = 2968885920, ) + ], + total = 1 + ) + else: + return SapiV1AssetAssetDividendGet200Response( + rows = [ + openapi_client.models._sapi_v1_asset_asset_dividend_get_200_response_rows_inner._sapi_v1_asset_assetDividend_get_200_response_rows_inner( + id = 242006910, + amount = '10.00000000', + asset = 'BHFT', + div_time = 1563189166000, + en_info = 'BHFT distribution', + tran_id = 2968885920, ) + ], + total = 1, + ) + """ + + def testSapiV1AssetAssetDividendGet200Response(self): + """Test SapiV1AssetAssetDividendGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_asset_dividend_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_asset_asset_dividend_get200_response_rows_inner.py new file mode 100644 index 0000000..a5fa4ca --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_asset_dividend_get200_response_rows_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_asset_dividend_get200_response_rows_inner import SapiV1AssetAssetDividendGet200ResponseRowsInner + +class TestSapiV1AssetAssetDividendGet200ResponseRowsInner(unittest.TestCase): + """SapiV1AssetAssetDividendGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetAssetDividendGet200ResponseRowsInner: + """Test SapiV1AssetAssetDividendGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetAssetDividendGet200ResponseRowsInner` + """ + model = SapiV1AssetAssetDividendGet200ResponseRowsInner() + if include_optional: + return SapiV1AssetAssetDividendGet200ResponseRowsInner( + id = 242006910, + amount = '10.00000000', + asset = 'BHFT', + div_time = 1563189166000, + en_info = 'BHFT distribution', + tran_id = 2968885920 + ) + else: + return SapiV1AssetAssetDividendGet200ResponseRowsInner( + id = 242006910, + amount = '10.00000000', + asset = 'BHFT', + div_time = 1563189166000, + en_info = 'BHFT distribution', + tran_id = 2968885920, + ) + """ + + def testSapiV1AssetAssetDividendGet200ResponseRowsInner(self): + """Test SapiV1AssetAssetDividendGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_convert_transfer_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_asset_convert_transfer_post200_response.py new file mode 100644 index 0000000..dc26f46 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_convert_transfer_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_convert_transfer_post200_response import SapiV1AssetConvertTransferPost200Response + +class TestSapiV1AssetConvertTransferPost200Response(unittest.TestCase): + """SapiV1AssetConvertTransferPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetConvertTransferPost200Response: + """Test SapiV1AssetConvertTransferPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetConvertTransferPost200Response` + """ + model = SapiV1AssetConvertTransferPost200Response() + if include_optional: + return SapiV1AssetConvertTransferPost200Response( + tran_id = 118263407119, + status = 'S' + ) + else: + return SapiV1AssetConvertTransferPost200Response( + tran_id = 118263407119, + status = 'S', + ) + """ + + def testSapiV1AssetConvertTransferPost200Response(self): + """Test SapiV1AssetConvertTransferPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_convert_transfer_query_by_page_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_asset_convert_transfer_query_by_page_get200_response.py new file mode 100644 index 0000000..bae1bba --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_convert_transfer_query_by_page_get200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_convert_transfer_query_by_page_get200_response import SapiV1AssetConvertTransferQueryByPageGet200Response + +class TestSapiV1AssetConvertTransferQueryByPageGet200Response(unittest.TestCase): + """SapiV1AssetConvertTransferQueryByPageGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetConvertTransferQueryByPageGet200Response: + """Test SapiV1AssetConvertTransferQueryByPageGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetConvertTransferQueryByPageGet200Response` + """ + model = SapiV1AssetConvertTransferQueryByPageGet200Response() + if include_optional: + return SapiV1AssetConvertTransferQueryByPageGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v1_asset_convert_transfer_query_by_page_get_200_response_rows_inner._sapi_v1_asset_convert_transfer_queryByPage_get_200_response_rows_inner( + tran_id = 118263407119, + type = 244, + time = 1664442078000, + deducted_asset = 'BUSD', + deducted_amount = '1', + target_asset = 'USDC', + target_amount = '1', + status = 'S', + account_type = 'MAIN', ) + ] + ) + else: + return SapiV1AssetConvertTransferQueryByPageGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v1_asset_convert_transfer_query_by_page_get_200_response_rows_inner._sapi_v1_asset_convert_transfer_queryByPage_get_200_response_rows_inner( + tran_id = 118263407119, + type = 244, + time = 1664442078000, + deducted_asset = 'BUSD', + deducted_amount = '1', + target_asset = 'USDC', + target_amount = '1', + status = 'S', + account_type = 'MAIN', ) + ], + ) + """ + + def testSapiV1AssetConvertTransferQueryByPageGet200Response(self): + """Test SapiV1AssetConvertTransferQueryByPageGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner.py new file mode 100644 index 0000000..a8b6f9c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_convert_transfer_query_by_page_get200_response_rows_inner import SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner + +class TestSapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner(unittest.TestCase): + """SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner: + """Test SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner` + """ + model = SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner() + if include_optional: + return SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner( + tran_id = 118263407119, + type = 244, + time = 1664442078000, + deducted_asset = 'BUSD', + deducted_amount = '1', + target_asset = 'USDC', + target_amount = '1', + status = 'S', + account_type = 'MAIN' + ) + else: + return SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner( + tran_id = 118263407119, + type = 244, + time = 1664442078000, + deducted_asset = 'BUSD', + deducted_amount = '1', + target_asset = 'USDC', + target_amount = '1', + status = 'S', + account_type = 'MAIN', + ) + """ + + def testSapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner(self): + """Test SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_custody_transfer_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_asset_custody_transfer_history_get200_response.py new file mode 100644 index 0000000..c8e8357 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_custody_transfer_history_get200_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_custody_transfer_history_get200_response import SapiV1AssetCustodyTransferHistoryGet200Response + +class TestSapiV1AssetCustodyTransferHistoryGet200Response(unittest.TestCase): + """SapiV1AssetCustodyTransferHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetCustodyTransferHistoryGet200Response: + """Test SapiV1AssetCustodyTransferHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetCustodyTransferHistoryGet200Response` + """ + model = SapiV1AssetCustodyTransferHistoryGet200Response() + if include_optional: + return SapiV1AssetCustodyTransferHistoryGet200Response( + total = 3316, + rows = [ + openapi_client.models._sapi_v1_asset_custody_transfer_history_get_200_response_rows_inner._sapi_v1_asset_custody_transfer_history_get_200_response_rows_inner( + client_tran_id = '293915932290879488', + transfer_type = 'Undelegate', + asset = 'ETH', + amount = '1', + time = 1695205406000, ) + ] + ) + else: + return SapiV1AssetCustodyTransferHistoryGet200Response( + total = 3316, + rows = [ + openapi_client.models._sapi_v1_asset_custody_transfer_history_get_200_response_rows_inner._sapi_v1_asset_custody_transfer_history_get_200_response_rows_inner( + client_tran_id = '293915932290879488', + transfer_type = 'Undelegate', + asset = 'ETH', + amount = '1', + time = 1695205406000, ) + ], + ) + """ + + def testSapiV1AssetCustodyTransferHistoryGet200Response(self): + """Test SapiV1AssetCustodyTransferHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_custody_transfer_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_asset_custody_transfer_history_get200_response_rows_inner.py new file mode 100644 index 0000000..3eeddb9 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_custody_transfer_history_get200_response_rows_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_custody_transfer_history_get200_response_rows_inner import SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner + +class TestSapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner: + """Test SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner` + """ + model = SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner( + client_tran_id = '293915932290879488', + transfer_type = 'Undelegate', + asset = 'ETH', + amount = '1', + time = 1695205406000 + ) + else: + return SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner( + client_tran_id = '293915932290879488', + transfer_type = 'Undelegate', + asset = 'ETH', + amount = '1', + time = 1695205406000, + ) + """ + + def testSapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner(self): + """Test SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_dribblet_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_asset_dribblet_get200_response.py new file mode 100644 index 0000000..7027db5 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_dribblet_get200_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_dribblet_get200_response import SapiV1AssetDribbletGet200Response + +class TestSapiV1AssetDribbletGet200Response(unittest.TestCase): + """SapiV1AssetDribbletGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetDribbletGet200Response: + """Test SapiV1AssetDribbletGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetDribbletGet200Response` + """ + model = SapiV1AssetDribbletGet200Response() + if include_optional: + return SapiV1AssetDribbletGet200Response( + total = 8, + user_asset_dribblets = [ + openapi_client.models._sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner._sapi_v1_asset_dribblet_get_200_response_userAssetDribblets_inner( + operate_time = 1615985535000, + total_transfered_amount = '0.00132256', + total_service_charge_amount = '0.00002699', + trans_id = 45178372831, + user_asset_dribblet_details = [ + openapi_client.models._sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner._sapi_v1_asset_dribblet_get_200_response_userAssetDribblets_inner_userAssetDribbletDetails_inner( + trans_id = 4359321, + service_charge_amount = '0.000009', + amount = '0.0009', + operate_time = 1615985535000, + transfered_amount = '0.000441', + from_asset = 'USDT', ) + ], ) + ] + ) + else: + return SapiV1AssetDribbletGet200Response( + total = 8, + user_asset_dribblets = [ + openapi_client.models._sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner._sapi_v1_asset_dribblet_get_200_response_userAssetDribblets_inner( + operate_time = 1615985535000, + total_transfered_amount = '0.00132256', + total_service_charge_amount = '0.00002699', + trans_id = 45178372831, + user_asset_dribblet_details = [ + openapi_client.models._sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner._sapi_v1_asset_dribblet_get_200_response_userAssetDribblets_inner_userAssetDribbletDetails_inner( + trans_id = 4359321, + service_charge_amount = '0.000009', + amount = '0.0009', + operate_time = 1615985535000, + transfered_amount = '0.000441', + from_asset = 'USDT', ) + ], ) + ], + ) + """ + + def testSapiV1AssetDribbletGet200Response(self): + """Test SapiV1AssetDribbletGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner.py b/target/python/binance_openapi/test/test_sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner.py new file mode 100644 index 0000000..a134c7f --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner import SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner + +class TestSapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner(unittest.TestCase): + """SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner: + """Test SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner` + """ + model = SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner() + if include_optional: + return SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner( + operate_time = 1615985535000, + total_transfered_amount = '0.00132256', + total_service_charge_amount = '0.00002699', + trans_id = 45178372831, + user_asset_dribblet_details = [ + openapi_client.models._sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner._sapi_v1_asset_dribblet_get_200_response_userAssetDribblets_inner_userAssetDribbletDetails_inner( + trans_id = 4359321, + service_charge_amount = '0.000009', + amount = '0.0009', + operate_time = 1615985535000, + transfered_amount = '0.000441', + from_asset = 'USDT', ) + ] + ) + else: + return SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner( + operate_time = 1615985535000, + total_transfered_amount = '0.00132256', + total_service_charge_amount = '0.00002699', + trans_id = 45178372831, + user_asset_dribblet_details = [ + openapi_client.models._sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner._sapi_v1_asset_dribblet_get_200_response_userAssetDribblets_inner_userAssetDribbletDetails_inner( + trans_id = 4359321, + service_charge_amount = '0.000009', + amount = '0.0009', + operate_time = 1615985535000, + transfered_amount = '0.000441', + from_asset = 'USDT', ) + ], + ) + """ + + def testSapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner(self): + """Test SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner.py b/target/python/binance_openapi/test/test_sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner.py new file mode 100644 index 0000000..b07e1ac --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_dribblet_get200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner import SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner + +class TestSapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner(unittest.TestCase): + """SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner: + """Test SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner` + """ + model = SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner() + if include_optional: + return SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner( + trans_id = 4359321, + service_charge_amount = '0.000009', + amount = '0.0009', + operate_time = 1615985535000, + transfered_amount = '0.000441', + from_asset = 'USDT' + ) + else: + return SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner( + trans_id = 4359321, + service_charge_amount = '0.000009', + amount = '0.0009', + operate_time = 1615985535000, + transfered_amount = '0.000441', + from_asset = 'USDT', + ) + """ + + def testSapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner(self): + """Test SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_dust_btc_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_asset_dust_btc_post200_response.py new file mode 100644 index 0000000..68971c8 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_dust_btc_post200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_dust_btc_post200_response import SapiV1AssetDustBtcPost200Response + +class TestSapiV1AssetDustBtcPost200Response(unittest.TestCase): + """SapiV1AssetDustBtcPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetDustBtcPost200Response: + """Test SapiV1AssetDustBtcPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetDustBtcPost200Response` + """ + model = SapiV1AssetDustBtcPost200Response() + if include_optional: + return SapiV1AssetDustBtcPost200Response( + details = [ + openapi_client.models._sapi_v1_asset_dust_btc_post_200_response_details_inner._sapi_v1_asset_dust_btc_post_200_response_details_inner( + asset = 'ADA', + asset_full_name = 'ADA', + amount_free = '6.21', + to_btc = '0.00016848', + to_bnb = '0.01777302', + to_bnb_off_exchange = '0.01741756', + exchange = '0.00035546', ) + ], + total_transfer_btc = '0.00016848', + total_transfer_bnb = '0.01777302', + dribblet_percentage = '0.02' + ) + else: + return SapiV1AssetDustBtcPost200Response( + details = [ + openapi_client.models._sapi_v1_asset_dust_btc_post_200_response_details_inner._sapi_v1_asset_dust_btc_post_200_response_details_inner( + asset = 'ADA', + asset_full_name = 'ADA', + amount_free = '6.21', + to_btc = '0.00016848', + to_bnb = '0.01777302', + to_bnb_off_exchange = '0.01741756', + exchange = '0.00035546', ) + ], + total_transfer_btc = '0.00016848', + total_transfer_bnb = '0.01777302', + dribblet_percentage = '0.02', + ) + """ + + def testSapiV1AssetDustBtcPost200Response(self): + """Test SapiV1AssetDustBtcPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_dust_btc_post200_response_details_inner.py b/target/python/binance_openapi/test/test_sapi_v1_asset_dust_btc_post200_response_details_inner.py new file mode 100644 index 0000000..c94948d --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_dust_btc_post200_response_details_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_dust_btc_post200_response_details_inner import SapiV1AssetDustBtcPost200ResponseDetailsInner + +class TestSapiV1AssetDustBtcPost200ResponseDetailsInner(unittest.TestCase): + """SapiV1AssetDustBtcPost200ResponseDetailsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetDustBtcPost200ResponseDetailsInner: + """Test SapiV1AssetDustBtcPost200ResponseDetailsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetDustBtcPost200ResponseDetailsInner` + """ + model = SapiV1AssetDustBtcPost200ResponseDetailsInner() + if include_optional: + return SapiV1AssetDustBtcPost200ResponseDetailsInner( + asset = 'ADA', + asset_full_name = 'ADA', + amount_free = '6.21', + to_btc = '0.00016848', + to_bnb = '0.01777302', + to_bnb_off_exchange = '0.01741756', + exchange = '0.00035546' + ) + else: + return SapiV1AssetDustBtcPost200ResponseDetailsInner( + asset = 'ADA', + asset_full_name = 'ADA', + amount_free = '6.21', + to_btc = '0.00016848', + to_bnb = '0.01777302', + to_bnb_off_exchange = '0.01741756', + exchange = '0.00035546', + ) + """ + + def testSapiV1AssetDustBtcPost200ResponseDetailsInner(self): + """Test SapiV1AssetDustBtcPost200ResponseDetailsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_dust_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_asset_dust_post200_response.py new file mode 100644 index 0000000..1288a78 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_dust_post200_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_dust_post200_response import SapiV1AssetDustPost200Response + +class TestSapiV1AssetDustPost200Response(unittest.TestCase): + """SapiV1AssetDustPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetDustPost200Response: + """Test SapiV1AssetDustPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetDustPost200Response` + """ + model = SapiV1AssetDustPost200Response() + if include_optional: + return SapiV1AssetDustPost200Response( + total_service_charge = '0.02102542', + total_transfered = '1.05127099', + transfer_result = [ + openapi_client.models._sapi_v1_asset_dust_post_200_response_transfer_result_inner._sapi_v1_asset_dust_post_200_response_transferResult_inner( + amount = '0.03000000', + from_asset = 'ETH', + operate_time = 1563368549307, + service_charge_amount = '0.00500000', + tran_id = 2970932918, + transfered_amount = '0.25000000', ) + ] + ) + else: + return SapiV1AssetDustPost200Response( + total_service_charge = '0.02102542', + total_transfered = '1.05127099', + transfer_result = [ + openapi_client.models._sapi_v1_asset_dust_post_200_response_transfer_result_inner._sapi_v1_asset_dust_post_200_response_transferResult_inner( + amount = '0.03000000', + from_asset = 'ETH', + operate_time = 1563368549307, + service_charge_amount = '0.00500000', + tran_id = 2970932918, + transfered_amount = '0.25000000', ) + ], + ) + """ + + def testSapiV1AssetDustPost200Response(self): + """Test SapiV1AssetDustPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_dust_post200_response_transfer_result_inner.py b/target/python/binance_openapi/test/test_sapi_v1_asset_dust_post200_response_transfer_result_inner.py new file mode 100644 index 0000000..e35e1e4 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_dust_post200_response_transfer_result_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_dust_post200_response_transfer_result_inner import SapiV1AssetDustPost200ResponseTransferResultInner + +class TestSapiV1AssetDustPost200ResponseTransferResultInner(unittest.TestCase): + """SapiV1AssetDustPost200ResponseTransferResultInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetDustPost200ResponseTransferResultInner: + """Test SapiV1AssetDustPost200ResponseTransferResultInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetDustPost200ResponseTransferResultInner` + """ + model = SapiV1AssetDustPost200ResponseTransferResultInner() + if include_optional: + return SapiV1AssetDustPost200ResponseTransferResultInner( + amount = '0.03000000', + from_asset = 'ETH', + operate_time = 1563368549307, + service_charge_amount = '0.00500000', + tran_id = 2970932918, + transfered_amount = '0.25000000' + ) + else: + return SapiV1AssetDustPost200ResponseTransferResultInner( + amount = '0.03000000', + from_asset = 'ETH', + operate_time = 1563368549307, + service_charge_amount = '0.00500000', + tran_id = 2970932918, + transfered_amount = '0.25000000', + ) + """ + + def testSapiV1AssetDustPost200ResponseTransferResultInner(self): + """Test SapiV1AssetDustPost200ResponseTransferResultInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_get_funding_asset_post200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_asset_get_funding_asset_post200_response_inner.py new file mode 100644 index 0000000..9c5240b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_get_funding_asset_post200_response_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_get_funding_asset_post200_response_inner import SapiV1AssetGetFundingAssetPost200ResponseInner + +class TestSapiV1AssetGetFundingAssetPost200ResponseInner(unittest.TestCase): + """SapiV1AssetGetFundingAssetPost200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetGetFundingAssetPost200ResponseInner: + """Test SapiV1AssetGetFundingAssetPost200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetGetFundingAssetPost200ResponseInner` + """ + model = SapiV1AssetGetFundingAssetPost200ResponseInner() + if include_optional: + return SapiV1AssetGetFundingAssetPost200ResponseInner( + asset = 'USDT', + free = '1', + locked = '0', + freeze = '0', + withdrawing = '0', + btc_valuation = '0.00000091' + ) + else: + return SapiV1AssetGetFundingAssetPost200ResponseInner( + asset = 'USDT', + free = '1', + locked = '0', + freeze = '0', + withdrawing = '0', + btc_valuation = '0.00000091', + ) + """ + + def testSapiV1AssetGetFundingAssetPost200ResponseInner(self): + """Test SapiV1AssetGetFundingAssetPost200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response.py new file mode 100644 index 0000000..ed05341 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response import SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response + +class TestSapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response(unittest.TestCase): + """SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response: + """Test SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response` + """ + model = SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response() + if include_optional: + return SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response_rows_inner._sapi_v1_asset_ledger_transfer_cloud_mining_queryByPage_get_200_response_rows_inner( + create_time = 1667880112000, + tran_id = 121230610120, + type = 248, + asset = 'USDT', + amount = '1', + status = 'S', ) + ] + ) + else: + return SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response_rows_inner._sapi_v1_asset_ledger_transfer_cloud_mining_queryByPage_get_200_response_rows_inner( + create_time = 1667880112000, + tran_id = 121230610120, + type = 248, + asset = 'USDT', + amount = '1', + status = 'S', ) + ], + ) + """ + + def testSapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response(self): + """Test SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner.py new file mode 100644 index 0000000..5901de3 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get200_response_rows_inner import SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner + +class TestSapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner(unittest.TestCase): + """SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner: + """Test SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner` + """ + model = SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner() + if include_optional: + return SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner( + create_time = 1667880112000, + tran_id = 121230610120, + type = 248, + asset = 'USDT', + amount = '1', + status = 'S' + ) + else: + return SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner( + create_time = 1667880112000, + tran_id = 121230610120, + type = 248, + asset = 'USDT', + amount = '1', + status = 'S', + ) + """ + + def testSapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner(self): + """Test SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_trade_fee_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_asset_trade_fee_get200_response_inner.py new file mode 100644 index 0000000..fcbd0be --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_trade_fee_get200_response_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_trade_fee_get200_response_inner import SapiV1AssetTradeFeeGet200ResponseInner + +class TestSapiV1AssetTradeFeeGet200ResponseInner(unittest.TestCase): + """SapiV1AssetTradeFeeGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetTradeFeeGet200ResponseInner: + """Test SapiV1AssetTradeFeeGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetTradeFeeGet200ResponseInner` + """ + model = SapiV1AssetTradeFeeGet200ResponseInner() + if include_optional: + return SapiV1AssetTradeFeeGet200ResponseInner( + symbol = 'ADABNB', + maker_commission = '0.001', + taker_commission = '0.001' + ) + else: + return SapiV1AssetTradeFeeGet200ResponseInner( + symbol = 'ADABNB', + maker_commission = '0.001', + taker_commission = '0.001', + ) + """ + + def testSapiV1AssetTradeFeeGet200ResponseInner(self): + """Test SapiV1AssetTradeFeeGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_transfer_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_asset_transfer_get200_response.py new file mode 100644 index 0000000..0d758f0 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_transfer_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_transfer_get200_response import SapiV1AssetTransferGet200Response + +class TestSapiV1AssetTransferGet200Response(unittest.TestCase): + """SapiV1AssetTransferGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetTransferGet200Response: + """Test SapiV1AssetTransferGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetTransferGet200Response` + """ + model = SapiV1AssetTransferGet200Response() + if include_optional: + return SapiV1AssetTransferGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v1_asset_transfer_get_200_response_rows_inner._sapi_v1_asset_transfer_get_200_response_rows_inner( + asset = 'USDT', + amount = '1', + type = 'MAIN_UMFUTUR', + status = 'CONFIRMED', + tran_id = 11415955596, + timestamp = 1544433328000, ) + ] + ) + else: + return SapiV1AssetTransferGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v1_asset_transfer_get_200_response_rows_inner._sapi_v1_asset_transfer_get_200_response_rows_inner( + asset = 'USDT', + amount = '1', + type = 'MAIN_UMFUTUR', + status = 'CONFIRMED', + tran_id = 11415955596, + timestamp = 1544433328000, ) + ], + ) + """ + + def testSapiV1AssetTransferGet200Response(self): + """Test SapiV1AssetTransferGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_transfer_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_asset_transfer_get200_response_rows_inner.py new file mode 100644 index 0000000..2941f91 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_transfer_get200_response_rows_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_transfer_get200_response_rows_inner import SapiV1AssetTransferGet200ResponseRowsInner + +class TestSapiV1AssetTransferGet200ResponseRowsInner(unittest.TestCase): + """SapiV1AssetTransferGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetTransferGet200ResponseRowsInner: + """Test SapiV1AssetTransferGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetTransferGet200ResponseRowsInner` + """ + model = SapiV1AssetTransferGet200ResponseRowsInner() + if include_optional: + return SapiV1AssetTransferGet200ResponseRowsInner( + asset = 'USDT', + amount = '1', + type = 'MAIN_UMFUTUR', + status = 'CONFIRMED', + tran_id = 11415955596, + timestamp = 1544433328000 + ) + else: + return SapiV1AssetTransferGet200ResponseRowsInner( + asset = 'USDT', + amount = '1', + type = 'MAIN_UMFUTUR', + status = 'CONFIRMED', + tran_id = 11415955596, + timestamp = 1544433328000, + ) + """ + + def testSapiV1AssetTransferGet200ResponseRowsInner(self): + """Test SapiV1AssetTransferGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_transfer_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_asset_transfer_post200_response.py new file mode 100644 index 0000000..d706f51 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_transfer_post200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_transfer_post200_response import SapiV1AssetTransferPost200Response + +class TestSapiV1AssetTransferPost200Response(unittest.TestCase): + """SapiV1AssetTransferPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetTransferPost200Response: + """Test SapiV1AssetTransferPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetTransferPost200Response` + """ + model = SapiV1AssetTransferPost200Response() + if include_optional: + return SapiV1AssetTransferPost200Response( + tran_id = 13526853623 + ) + else: + return SapiV1AssetTransferPost200Response( + tran_id = 13526853623, + ) + """ + + def testSapiV1AssetTransferPost200Response(self): + """Test SapiV1AssetTransferPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_asset_wallet_balance_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_asset_wallet_balance_get200_response_inner.py new file mode 100644 index 0000000..08f69f4 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_asset_wallet_balance_get200_response_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_asset_wallet_balance_get200_response_inner import SapiV1AssetWalletBalanceGet200ResponseInner + +class TestSapiV1AssetWalletBalanceGet200ResponseInner(unittest.TestCase): + """SapiV1AssetWalletBalanceGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1AssetWalletBalanceGet200ResponseInner: + """Test SapiV1AssetWalletBalanceGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1AssetWalletBalanceGet200ResponseInner` + """ + model = SapiV1AssetWalletBalanceGet200ResponseInner() + if include_optional: + return SapiV1AssetWalletBalanceGet200ResponseInner( + activate = True, + balance = '0', + wallet_name = 'Spot' + ) + else: + return SapiV1AssetWalletBalanceGet200ResponseInner( + activate = True, + balance = '0', + wallet_name = 'Spot', + ) + """ + + def testSapiV1AssetWalletBalanceGet200ResponseInner(self): + """Test SapiV1AssetWalletBalanceGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_blvt_redeem_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_blvt_redeem_post200_response.py new file mode 100644 index 0000000..aeb7cfe --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_blvt_redeem_post200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_blvt_redeem_post200_response import SapiV1BlvtRedeemPost200Response + +class TestSapiV1BlvtRedeemPost200Response(unittest.TestCase): + """SapiV1BlvtRedeemPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1BlvtRedeemPost200Response: + """Test SapiV1BlvtRedeemPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1BlvtRedeemPost200Response` + """ + model = SapiV1BlvtRedeemPost200Response() + if include_optional: + return SapiV1BlvtRedeemPost200Response( + id = 123, + status = 'S', + token_name = 'LINKUP', + redeem_amount = '0.95590905', + amount = '10.05022099', + timestamp = 1600250279614 + ) + else: + return SapiV1BlvtRedeemPost200Response( + id = 123, + status = 'S', + token_name = 'LINKUP', + redeem_amount = '0.95590905', + amount = '10.05022099', + timestamp = 1600250279614, + ) + """ + + def testSapiV1BlvtRedeemPost200Response(self): + """Test SapiV1BlvtRedeemPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_blvt_redeem_record_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_blvt_redeem_record_get200_response_inner.py new file mode 100644 index 0000000..b45d96b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_blvt_redeem_record_get200_response_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_blvt_redeem_record_get200_response_inner import SapiV1BlvtRedeemRecordGet200ResponseInner + +class TestSapiV1BlvtRedeemRecordGet200ResponseInner(unittest.TestCase): + """SapiV1BlvtRedeemRecordGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1BlvtRedeemRecordGet200ResponseInner: + """Test SapiV1BlvtRedeemRecordGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1BlvtRedeemRecordGet200ResponseInner` + """ + model = SapiV1BlvtRedeemRecordGet200ResponseInner() + if include_optional: + return SapiV1BlvtRedeemRecordGet200ResponseInner( + id = 1, + token_name = 'LINKUP', + amount = '0.54216292', + nav = '18.36345064', + fee = '0.00995598', + net_proceed = '9.94602604', + timestamp = 1599128003050 + ) + else: + return SapiV1BlvtRedeemRecordGet200ResponseInner( + id = 1, + token_name = 'LINKUP', + amount = '0.54216292', + nav = '18.36345064', + fee = '0.00995598', + net_proceed = '9.94602604', + timestamp = 1599128003050, + ) + """ + + def testSapiV1BlvtRedeemRecordGet200ResponseInner(self): + """Test SapiV1BlvtRedeemRecordGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_blvt_subscribe_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_blvt_subscribe_post200_response.py new file mode 100644 index 0000000..e315993 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_blvt_subscribe_post200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_blvt_subscribe_post200_response import SapiV1BlvtSubscribePost200Response + +class TestSapiV1BlvtSubscribePost200Response(unittest.TestCase): + """SapiV1BlvtSubscribePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1BlvtSubscribePost200Response: + """Test SapiV1BlvtSubscribePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1BlvtSubscribePost200Response` + """ + model = SapiV1BlvtSubscribePost200Response() + if include_optional: + return SapiV1BlvtSubscribePost200Response( + id = 123, + status = 'S', + token_name = 'LINKUP', + amount = '0.9559090500', + cost = '9.99999995', + timestamp = 1600249972899 + ) + else: + return SapiV1BlvtSubscribePost200Response( + id = 123, + status = 'S', + token_name = 'LINKUP', + amount = '0.9559090500', + cost = '9.99999995', + timestamp = 1600249972899, + ) + """ + + def testSapiV1BlvtSubscribePost200Response(self): + """Test SapiV1BlvtSubscribePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_blvt_subscribe_record_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_blvt_subscribe_record_get200_response.py new file mode 100644 index 0000000..fd1fa66 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_blvt_subscribe_record_get200_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_blvt_subscribe_record_get200_response import SapiV1BlvtSubscribeRecordGet200Response + +class TestSapiV1BlvtSubscribeRecordGet200Response(unittest.TestCase): + """SapiV1BlvtSubscribeRecordGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1BlvtSubscribeRecordGet200Response: + """Test SapiV1BlvtSubscribeRecordGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1BlvtSubscribeRecordGet200Response` + """ + model = SapiV1BlvtSubscribeRecordGet200Response() + if include_optional: + return SapiV1BlvtSubscribeRecordGet200Response( + id = 1, + token_name = 'LINKUP', + amount = '0.54216292', + nav = '18.42621386', + fee = '0.00999000', + total_charge = '9.99999991', + timestamp = 1599127217916 + ) + else: + return SapiV1BlvtSubscribeRecordGet200Response( + id = 1, + token_name = 'LINKUP', + amount = '0.54216292', + nav = '18.42621386', + fee = '0.00999000', + total_charge = '9.99999991', + timestamp = 1599127217916, + ) + """ + + def testSapiV1BlvtSubscribeRecordGet200Response(self): + """Test SapiV1BlvtSubscribeRecordGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_blvt_token_info_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_blvt_token_info_get200_response_inner.py new file mode 100644 index 0000000..ba5ddd5 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_blvt_token_info_get200_response_inner.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_blvt_token_info_get200_response_inner import SapiV1BlvtTokenInfoGet200ResponseInner + +class TestSapiV1BlvtTokenInfoGet200ResponseInner(unittest.TestCase): + """SapiV1BlvtTokenInfoGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1BlvtTokenInfoGet200ResponseInner: + """Test SapiV1BlvtTokenInfoGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1BlvtTokenInfoGet200ResponseInner` + """ + model = SapiV1BlvtTokenInfoGet200ResponseInner() + if include_optional: + return SapiV1BlvtTokenInfoGet200ResponseInner( + token_name = 'BTCDOWN', + description = '3X Short Bitcoin Token', + underlying = 'BTC', + token_issued = '717953.95', + basket = '-821.474 BTCUSDT Futures', + current_baskets = [ + openapi_client.models._sapi_v1_blvt_token_info_get_200_response_inner_current_baskets_inner._sapi_v1_blvt_tokenInfo_get_200_response_inner_currentBaskets_inner( + symbol = 'BTCUSDT', + amount = '-1183.984', + notional_value = '-22871089.96704', ) + ], + nav = '4.79', + real_leverage = '-2.316', + funding_rate = '0.001020', + daily_management_fee = '0.0001', + purchase_fee_pct = '0.0010', + daily_purchase_limit = '100000.00', + redeem_fee_pct = '0.0010', + daily_redeem_limit = '1000000.00', + timestamp = 1583127900000 + ) + else: + return SapiV1BlvtTokenInfoGet200ResponseInner( + token_name = 'BTCDOWN', + description = '3X Short Bitcoin Token', + underlying = 'BTC', + token_issued = '717953.95', + basket = '-821.474 BTCUSDT Futures', + current_baskets = [ + openapi_client.models._sapi_v1_blvt_token_info_get_200_response_inner_current_baskets_inner._sapi_v1_blvt_tokenInfo_get_200_response_inner_currentBaskets_inner( + symbol = 'BTCUSDT', + amount = '-1183.984', + notional_value = '-22871089.96704', ) + ], + nav = '4.79', + real_leverage = '-2.316', + funding_rate = '0.001020', + daily_management_fee = '0.0001', + purchase_fee_pct = '0.0010', + daily_purchase_limit = '100000.00', + redeem_fee_pct = '0.0010', + daily_redeem_limit = '1000000.00', + timestamp = 1583127900000, + ) + """ + + def testSapiV1BlvtTokenInfoGet200ResponseInner(self): + """Test SapiV1BlvtTokenInfoGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner.py b/target/python/binance_openapi/test/test_sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner.py new file mode 100644 index 0000000..ca48ba8 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_blvt_token_info_get200_response_inner_current_baskets_inner import SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner + +class TestSapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner(unittest.TestCase): + """SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner: + """Test SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner` + """ + model = SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner() + if include_optional: + return SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner( + symbol = 'BTCUSDT', + amount = '-1183.984', + notional_value = '-22871089.96704' + ) + else: + return SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner( + symbol = 'BTCUSDT', + amount = '-1183.984', + notional_value = '-22871089.96704', + ) + """ + + def testSapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner(self): + """Test SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_blvt_user_limit_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_blvt_user_limit_get200_response_inner.py new file mode 100644 index 0000000..b1671b2 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_blvt_user_limit_get200_response_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_blvt_user_limit_get200_response_inner import SapiV1BlvtUserLimitGet200ResponseInner + +class TestSapiV1BlvtUserLimitGet200ResponseInner(unittest.TestCase): + """SapiV1BlvtUserLimitGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1BlvtUserLimitGet200ResponseInner: + """Test SapiV1BlvtUserLimitGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1BlvtUserLimitGet200ResponseInner` + """ + model = SapiV1BlvtUserLimitGet200ResponseInner() + if include_optional: + return SapiV1BlvtUserLimitGet200ResponseInner( + token_name = 'LINKUP', + user_daily_total_purchase_limit = '1000', + user_daily_total_redeem_limit = '1000' + ) + else: + return SapiV1BlvtUserLimitGet200ResponseInner( + token_name = 'LINKUP', + user_daily_total_purchase_limit = '1000', + user_daily_total_redeem_limit = '1000', + ) + """ + + def testSapiV1BlvtUserLimitGet200ResponseInner(self): + """Test SapiV1BlvtUserLimitGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_c2c_order_match_list_user_order_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_c2c_order_match_list_user_order_history_get200_response.py new file mode 100644 index 0000000..1112d6d --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_c2c_order_match_list_user_order_history_get200_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_c2c_order_match_list_user_order_history_get200_response import SapiV1C2cOrderMatchListUserOrderHistoryGet200Response + +class TestSapiV1C2cOrderMatchListUserOrderHistoryGet200Response(unittest.TestCase): + """SapiV1C2cOrderMatchListUserOrderHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1C2cOrderMatchListUserOrderHistoryGet200Response: + """Test SapiV1C2cOrderMatchListUserOrderHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1C2cOrderMatchListUserOrderHistoryGet200Response` + """ + model = SapiV1C2cOrderMatchListUserOrderHistoryGet200Response() + if include_optional: + return SapiV1C2cOrderMatchListUserOrderHistoryGet200Response( + code = '000000', + message = 'success', + data = [ + openapi_client.models._sapi_v1_c2c_order_match_list_user_order_history_get_200_response_data_inner._sapi_v1_c2c_orderMatch_listUserOrderHistory_get_200_response_data_inner( + order_number = '20219644646554779648', + adv_no = '11218246497340923904', + trade_type = 'SELL', + asset = 'BUSD', + fiat = 'CNY', + fiat_symbol = '¥', + amount = '5000.00000000', + total_price = '33400.00000000', + unit_price = '6.68', + order_status = 'COMPLETED', + create_time = 1619361369000, + commission = '0', + counter_part_nick_name = 'ab***', + advertisement_role = 'TAKER', ) + ], + total = 1, + success = True + ) + else: + return SapiV1C2cOrderMatchListUserOrderHistoryGet200Response( + code = '000000', + message = 'success', + data = [ + openapi_client.models._sapi_v1_c2c_order_match_list_user_order_history_get_200_response_data_inner._sapi_v1_c2c_orderMatch_listUserOrderHistory_get_200_response_data_inner( + order_number = '20219644646554779648', + adv_no = '11218246497340923904', + trade_type = 'SELL', + asset = 'BUSD', + fiat = 'CNY', + fiat_symbol = '¥', + amount = '5000.00000000', + total_price = '33400.00000000', + unit_price = '6.68', + order_status = 'COMPLETED', + create_time = 1619361369000, + commission = '0', + counter_part_nick_name = 'ab***', + advertisement_role = 'TAKER', ) + ], + total = 1, + success = True, + ) + """ + + def testSapiV1C2cOrderMatchListUserOrderHistoryGet200Response(self): + """Test SapiV1C2cOrderMatchListUserOrderHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner.py b/target/python/binance_openapi/test/test_sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner.py new file mode 100644 index 0000000..3dce0c6 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_c2c_order_match_list_user_order_history_get200_response_data_inner import SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner + +class TestSapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner(unittest.TestCase): + """SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner: + """Test SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner` + """ + model = SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner() + if include_optional: + return SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner( + order_number = '20219644646554779648', + adv_no = '11218246497340923904', + trade_type = 'SELL', + asset = 'BUSD', + fiat = 'CNY', + fiat_symbol = '¥', + amount = '5000.00000000', + total_price = '33400.00000000', + unit_price = '6.68', + order_status = 'COMPLETED', + create_time = 1619361369000, + commission = '0', + counter_part_nick_name = 'ab***', + advertisement_role = 'TAKER' + ) + else: + return SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner( + order_number = '20219644646554779648', + adv_no = '11218246497340923904', + trade_type = 'SELL', + asset = 'BUSD', + fiat = 'CNY', + fiat_symbol = '¥', + amount = '5000.00000000', + total_price = '33400.00000000', + unit_price = '6.68', + order_status = 'COMPLETED', + create_time = 1619361369000, + commission = '0', + counter_part_nick_name = 'ab***', + advertisement_role = 'TAKER', + ) + """ + + def testSapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner(self): + """Test SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_capital_config_getall_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_capital_config_getall_get200_response_inner.py new file mode 100644 index 0000000..00973fe --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_capital_config_getall_get200_response_inner.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_capital_config_getall_get200_response_inner import SapiV1CapitalConfigGetallGet200ResponseInner + +class TestSapiV1CapitalConfigGetallGet200ResponseInner(unittest.TestCase): + """SapiV1CapitalConfigGetallGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1CapitalConfigGetallGet200ResponseInner: + """Test SapiV1CapitalConfigGetallGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1CapitalConfigGetallGet200ResponseInner` + """ + model = SapiV1CapitalConfigGetallGet200ResponseInner() + if include_optional: + return SapiV1CapitalConfigGetallGet200ResponseInner( + coin = 'BTC', + deposit_all_enable = True, + free = '0.00000000', + freeze = '0.00000000', + ipoable = '0.00000000', + ipoing = '0.00000000', + is_legal_money = False, + locked = '0.00000000', + name = 'Bitcoin', + network_list = [ + openapi_client.models._sapi_v1_capital_config_getall_get_200_response_inner_network_list_inner._sapi_v1_capital_config_getall_get_200_response_inner_networkList_inner( + address_regex = '^(bnb1)[0-9a-z]{38}$', + coin = 'BTC', + deposit_desc = 'Wallet Maintenance, Deposit Suspended', + deposit_enable = False, + is_default = False, + memo_regex = '^[0-9A-Za-z\-_]{1,120}$', + min_confirm = 1, + name = 'BEP2', + network = 'ETH', + special_tips = 'Both a MEMO and an Address are required to successfully deposit your BEP2-BTCB tokens to Binance.', + un_lock_confirm = 0, + withdraw_desc = 'Wallet Maintenance, Withdrawal Suspended', + withdraw_enable = False, + withdraw_fee = '0.00000220', + withdraw_integer_multiple = '0.00000001', + withdraw_max = '9999999999.99999999', + withdraw_min = '0.00000440', + same_address = True, ) + ], + storage = '0.00000000', + trading = True, + withdraw_all_enable = True, + withdrawing = '0.00000000' + ) + else: + return SapiV1CapitalConfigGetallGet200ResponseInner( + coin = 'BTC', + deposit_all_enable = True, + free = '0.00000000', + freeze = '0.00000000', + ipoable = '0.00000000', + ipoing = '0.00000000', + is_legal_money = False, + locked = '0.00000000', + name = 'Bitcoin', + network_list = [ + openapi_client.models._sapi_v1_capital_config_getall_get_200_response_inner_network_list_inner._sapi_v1_capital_config_getall_get_200_response_inner_networkList_inner( + address_regex = '^(bnb1)[0-9a-z]{38}$', + coin = 'BTC', + deposit_desc = 'Wallet Maintenance, Deposit Suspended', + deposit_enable = False, + is_default = False, + memo_regex = '^[0-9A-Za-z\-_]{1,120}$', + min_confirm = 1, + name = 'BEP2', + network = 'ETH', + special_tips = 'Both a MEMO and an Address are required to successfully deposit your BEP2-BTCB tokens to Binance.', + un_lock_confirm = 0, + withdraw_desc = 'Wallet Maintenance, Withdrawal Suspended', + withdraw_enable = False, + withdraw_fee = '0.00000220', + withdraw_integer_multiple = '0.00000001', + withdraw_max = '9999999999.99999999', + withdraw_min = '0.00000440', + same_address = True, ) + ], + storage = '0.00000000', + trading = True, + withdraw_all_enable = True, + withdrawing = '0.00000000', + ) + """ + + def testSapiV1CapitalConfigGetallGet200ResponseInner(self): + """Test SapiV1CapitalConfigGetallGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_capital_config_getall_get200_response_inner_network_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_capital_config_getall_get200_response_inner_network_list_inner.py new file mode 100644 index 0000000..24a053c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_capital_config_getall_get200_response_inner_network_list_inner.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_capital_config_getall_get200_response_inner_network_list_inner import SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner + +class TestSapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner(unittest.TestCase): + """SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner: + """Test SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner` + """ + model = SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner() + if include_optional: + return SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner( + address_regex = '^(bnb1)[0-9a-z]{38}$', + coin = 'BTC', + deposit_desc = 'Wallet Maintenance, Deposit Suspended', + deposit_enable = False, + is_default = False, + memo_regex = '^[0-9A-Za-z\-_]{1,120}$', + min_confirm = 1, + name = 'BEP2', + network = 'ETH', + special_tips = 'Both a MEMO and an Address are required to successfully deposit your BEP2-BTCB tokens to Binance.', + un_lock_confirm = 0, + withdraw_desc = 'Wallet Maintenance, Withdrawal Suspended', + withdraw_enable = False, + withdraw_fee = '0.00000220', + withdraw_integer_multiple = '0.00000001', + withdraw_max = '9999999999.99999999', + withdraw_min = '0.00000440', + same_address = True + ) + else: + return SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner( + address_regex = '^(bnb1)[0-9a-z]{38}$', + coin = 'BTC', + deposit_desc = 'Wallet Maintenance, Deposit Suspended', + deposit_enable = False, + is_default = False, + memo_regex = '^[0-9A-Za-z\-_]{1,120}$', + min_confirm = 1, + name = 'BEP2', + network = 'ETH', + special_tips = 'Both a MEMO and an Address are required to successfully deposit your BEP2-BTCB tokens to Binance.', + un_lock_confirm = 0, + withdraw_desc = 'Wallet Maintenance, Withdrawal Suspended', + withdraw_enable = False, + withdraw_fee = '0.00000220', + withdraw_integer_multiple = '0.00000001', + withdraw_max = '9999999999.99999999', + withdraw_min = '0.00000440', + same_address = True, + ) + """ + + def testSapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner(self): + """Test SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_capital_contract_convertible_coins_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_capital_contract_convertible_coins_get200_response.py new file mode 100644 index 0000000..c0c7b7f --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_capital_contract_convertible_coins_get200_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_capital_contract_convertible_coins_get200_response import SapiV1CapitalContractConvertibleCoinsGet200Response + +class TestSapiV1CapitalContractConvertibleCoinsGet200Response(unittest.TestCase): + """SapiV1CapitalContractConvertibleCoinsGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1CapitalContractConvertibleCoinsGet200Response: + """Test SapiV1CapitalContractConvertibleCoinsGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1CapitalContractConvertibleCoinsGet200Response` + """ + model = SapiV1CapitalContractConvertibleCoinsGet200Response() + if include_optional: + return SapiV1CapitalContractConvertibleCoinsGet200Response( + convert_enabled = True, + coins = [ + 'USDC' + ], + exchange_rates = openapi_client.models._sapi_v1_capital_contract_convertible_coins_get_200_response_exchange_rates._sapi_v1_capital_contract_convertible_coins_get_200_response_exchangeRates( + usdc = '1', + tusd = '1', + usdp = '1', ) + ) + else: + return SapiV1CapitalContractConvertibleCoinsGet200Response( + convert_enabled = True, + coins = [ + 'USDC' + ], + exchange_rates = openapi_client.models._sapi_v1_capital_contract_convertible_coins_get_200_response_exchange_rates._sapi_v1_capital_contract_convertible_coins_get_200_response_exchangeRates( + usdc = '1', + tusd = '1', + usdp = '1', ), + ) + """ + + def testSapiV1CapitalContractConvertibleCoinsGet200Response(self): + """Test SapiV1CapitalContractConvertibleCoinsGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates.py b/target/python/binance_openapi/test/test_sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates.py new file mode 100644 index 0000000..0a4d1fe --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_capital_contract_convertible_coins_get200_response_exchange_rates import SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates + +class TestSapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates(unittest.TestCase): + """SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates: + """Test SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates` + """ + model = SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates() + if include_optional: + return SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates( + usdc = '1', + tusd = '1', + usdp = '1' + ) + else: + return SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates( + usdc = '1', + tusd = '1', + usdp = '1', + ) + """ + + def testSapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates(self): + """Test SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_address_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_address_get200_response.py new file mode 100644 index 0000000..6c517b7 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_address_get200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_capital_deposit_address_get200_response import SapiV1CapitalDepositAddressGet200Response + +class TestSapiV1CapitalDepositAddressGet200Response(unittest.TestCase): + """SapiV1CapitalDepositAddressGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1CapitalDepositAddressGet200Response: + """Test SapiV1CapitalDepositAddressGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1CapitalDepositAddressGet200Response` + """ + model = SapiV1CapitalDepositAddressGet200Response() + if include_optional: + return SapiV1CapitalDepositAddressGet200Response( + address = '1HPn8Rx2y6nNSfagQBKy27GB99Vbzg89wv', + coin = 'BTC', + tag = '', + url = 'https://btc.com/1HPn8Rx2y6nNSfagQBKy27GB99Vbzg89wv' + ) + else: + return SapiV1CapitalDepositAddressGet200Response( + address = '1HPn8Rx2y6nNSfagQBKy27GB99Vbzg89wv', + coin = 'BTC', + tag = '', + url = 'https://btc.com/1HPn8Rx2y6nNSfagQBKy27GB99Vbzg89wv', + ) + """ + + def testSapiV1CapitalDepositAddressGet200Response(self): + """Test SapiV1CapitalDepositAddressGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_address_list_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_address_list_get200_response_inner.py new file mode 100644 index 0000000..102429b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_address_list_get200_response_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_capital_deposit_address_list_get200_response_inner import SapiV1CapitalDepositAddressListGet200ResponseInner + +class TestSapiV1CapitalDepositAddressListGet200ResponseInner(unittest.TestCase): + """SapiV1CapitalDepositAddressListGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1CapitalDepositAddressListGet200ResponseInner: + """Test SapiV1CapitalDepositAddressListGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1CapitalDepositAddressListGet200ResponseInner` + """ + model = SapiV1CapitalDepositAddressListGet200ResponseInner() + if include_optional: + return SapiV1CapitalDepositAddressListGet200ResponseInner( + coin = 'ETH', + address = '0xD316E95Fd9E8E237Cb11f8200Babbc5D8D177BA4', + is_default = 1 + ) + else: + return SapiV1CapitalDepositAddressListGet200ResponseInner( + coin = 'ETH', + address = '0xD316E95Fd9E8E237Cb11f8200Babbc5D8D177BA4', + is_default = 1, + ) + """ + + def testSapiV1CapitalDepositAddressListGet200ResponseInner(self): + """Test SapiV1CapitalDepositAddressListGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_credit_apply_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_credit_apply_post200_response.py new file mode 100644 index 0000000..395ddaf --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_credit_apply_post200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_capital_deposit_credit_apply_post200_response import SapiV1CapitalDepositCreditApplyPost200Response + +class TestSapiV1CapitalDepositCreditApplyPost200Response(unittest.TestCase): + """SapiV1CapitalDepositCreditApplyPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1CapitalDepositCreditApplyPost200Response: + """Test SapiV1CapitalDepositCreditApplyPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1CapitalDepositCreditApplyPost200Response` + """ + model = SapiV1CapitalDepositCreditApplyPost200Response() + if include_optional: + return SapiV1CapitalDepositCreditApplyPost200Response( + code = '000000', + message = 'success', + data = True, + success = True + ) + else: + return SapiV1CapitalDepositCreditApplyPost200Response( + code = '000000', + message = 'success', + data = True, + success = True, + ) + """ + + def testSapiV1CapitalDepositCreditApplyPost200Response(self): + """Test SapiV1CapitalDepositCreditApplyPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_hisrec_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_hisrec_get200_response_inner.py new file mode 100644 index 0000000..03efdfe --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_hisrec_get200_response_inner.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_capital_deposit_hisrec_get200_response_inner import SapiV1CapitalDepositHisrecGet200ResponseInner + +class TestSapiV1CapitalDepositHisrecGet200ResponseInner(unittest.TestCase): + """SapiV1CapitalDepositHisrecGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1CapitalDepositHisrecGet200ResponseInner: + """Test SapiV1CapitalDepositHisrecGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1CapitalDepositHisrecGet200ResponseInner` + """ + model = SapiV1CapitalDepositHisrecGet200ResponseInner() + if include_optional: + return SapiV1CapitalDepositHisrecGet200ResponseInner( + amount = '0.00999800', + coin = 'PAXG', + network = 'ETH', + status = 1, + address = '0x788cabe9236ce061e5a892e1a59395a81fc8d62c', + address_tag = '', + tx_id = '0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3', + insert_time = 1599621997000, + transfer_type = 0, + unlock_confirm = '12/12', + confirm_times = '12/12' + ) + else: + return SapiV1CapitalDepositHisrecGet200ResponseInner( + amount = '0.00999800', + coin = 'PAXG', + network = 'ETH', + status = 1, + address = '0x788cabe9236ce061e5a892e1a59395a81fc8d62c', + address_tag = '', + tx_id = '0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3', + insert_time = 1599621997000, + transfer_type = 0, + unlock_confirm = '12/12', + confirm_times = '12/12', + ) + """ + + def testSapiV1CapitalDepositHisrecGet200ResponseInner(self): + """Test SapiV1CapitalDepositHisrecGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_sub_address_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_sub_address_get200_response.py new file mode 100644 index 0000000..c53625d --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_sub_address_get200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_capital_deposit_sub_address_get200_response import SapiV1CapitalDepositSubAddressGet200Response + +class TestSapiV1CapitalDepositSubAddressGet200Response(unittest.TestCase): + """SapiV1CapitalDepositSubAddressGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1CapitalDepositSubAddressGet200Response: + """Test SapiV1CapitalDepositSubAddressGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1CapitalDepositSubAddressGet200Response` + """ + model = SapiV1CapitalDepositSubAddressGet200Response() + if include_optional: + return SapiV1CapitalDepositSubAddressGet200Response( + address = 'TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV', + coin = 'USDT', + tag = '', + url = 'https://tronscan.org/#/address/TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV' + ) + else: + return SapiV1CapitalDepositSubAddressGet200Response( + address = 'TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV', + coin = 'USDT', + tag = '', + url = 'https://tronscan.org/#/address/TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV', + ) + """ + + def testSapiV1CapitalDepositSubAddressGet200Response(self): + """Test SapiV1CapitalDepositSubAddressGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_sub_hisrec_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_sub_hisrec_get200_response_inner.py new file mode 100644 index 0000000..f50f375 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_capital_deposit_sub_hisrec_get200_response_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_capital_deposit_sub_hisrec_get200_response_inner import SapiV1CapitalDepositSubHisrecGet200ResponseInner + +class TestSapiV1CapitalDepositSubHisrecGet200ResponseInner(unittest.TestCase): + """SapiV1CapitalDepositSubHisrecGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1CapitalDepositSubHisrecGet200ResponseInner: + """Test SapiV1CapitalDepositSubHisrecGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1CapitalDepositSubHisrecGet200ResponseInner` + """ + model = SapiV1CapitalDepositSubHisrecGet200ResponseInner() + if include_optional: + return SapiV1CapitalDepositSubHisrecGet200ResponseInner( + amount = '0.00999800', + coin = 'PAXG', + network = 'ETH', + status = 1, + address = '0x788cabe9236ce061e5a892e1a59395a81fc8d62c', + address_tag = '', + tx_id = '0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3', + insert_time = 1599621997000, + transfer_type = 0, + confirm_times = '12/12' + ) + else: + return SapiV1CapitalDepositSubHisrecGet200ResponseInner( + amount = '0.00999800', + coin = 'PAXG', + network = 'ETH', + status = 1, + address = '0x788cabe9236ce061e5a892e1a59395a81fc8d62c', + address_tag = '', + tx_id = '0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3', + insert_time = 1599621997000, + transfer_type = 0, + confirm_times = '12/12', + ) + """ + + def testSapiV1CapitalDepositSubHisrecGet200ResponseInner(self): + """Test SapiV1CapitalDepositSubHisrecGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_capital_withdraw_address_list_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_capital_withdraw_address_list_get200_response_inner.py new file mode 100644 index 0000000..2b5dc8c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_capital_withdraw_address_list_get200_response_inner.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_capital_withdraw_address_list_get200_response_inner import SapiV1CapitalWithdrawAddressListGet200ResponseInner + +class TestSapiV1CapitalWithdrawAddressListGet200ResponseInner(unittest.TestCase): + """SapiV1CapitalWithdrawAddressListGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1CapitalWithdrawAddressListGet200ResponseInner: + """Test SapiV1CapitalWithdrawAddressListGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1CapitalWithdrawAddressListGet200ResponseInner` + """ + model = SapiV1CapitalWithdrawAddressListGet200ResponseInner() + if include_optional: + return SapiV1CapitalWithdrawAddressListGet200ResponseInner( + address = '0xD316E95Fd9E8E237Cb11f8200Babbc5D8D177BA4', + address_tag = '101764890', + coin = 'BNB', + name = '', + network = 'BNB', + origin = '', + origin_type = '', + white_status = True + ) + else: + return SapiV1CapitalWithdrawAddressListGet200ResponseInner( + address = '0xD316E95Fd9E8E237Cb11f8200Babbc5D8D177BA4', + address_tag = '101764890', + coin = 'BNB', + name = '', + network = 'BNB', + origin = '', + origin_type = '', + white_status = True, + ) + """ + + def testSapiV1CapitalWithdrawAddressListGet200ResponseInner(self): + """Test SapiV1CapitalWithdrawAddressListGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_capital_withdraw_apply_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_capital_withdraw_apply_post200_response.py new file mode 100644 index 0000000..568a151 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_capital_withdraw_apply_post200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_capital_withdraw_apply_post200_response import SapiV1CapitalWithdrawApplyPost200Response + +class TestSapiV1CapitalWithdrawApplyPost200Response(unittest.TestCase): + """SapiV1CapitalWithdrawApplyPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1CapitalWithdrawApplyPost200Response: + """Test SapiV1CapitalWithdrawApplyPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1CapitalWithdrawApplyPost200Response` + """ + model = SapiV1CapitalWithdrawApplyPost200Response() + if include_optional: + return SapiV1CapitalWithdrawApplyPost200Response( + id = '7213fea8e94b4a5593d507237e5a555b' + ) + else: + return SapiV1CapitalWithdrawApplyPost200Response( + id = '7213fea8e94b4a5593d507237e5a555b', + ) + """ + + def testSapiV1CapitalWithdrawApplyPost200Response(self): + """Test SapiV1CapitalWithdrawApplyPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_capital_withdraw_history_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_capital_withdraw_history_get200_response_inner.py new file mode 100644 index 0000000..962ff7d --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_capital_withdraw_history_get200_response_inner.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_capital_withdraw_history_get200_response_inner import SapiV1CapitalWithdrawHistoryGet200ResponseInner + +class TestSapiV1CapitalWithdrawHistoryGet200ResponseInner(unittest.TestCase): + """SapiV1CapitalWithdrawHistoryGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1CapitalWithdrawHistoryGet200ResponseInner: + """Test SapiV1CapitalWithdrawHistoryGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1CapitalWithdrawHistoryGet200ResponseInner` + """ + model = SapiV1CapitalWithdrawHistoryGet200ResponseInner() + if include_optional: + return SapiV1CapitalWithdrawHistoryGet200ResponseInner( + address = '0x94df8b352de7f46f64b01d3666bf6e936e44ce60', + amount = '8.91000000', + apply_time = '2019-10-12 11:12:02', + coin = 'USDT', + id = 'b6ae22b3aa844210a7041aee7589627c', + withdraw_order_id = 'WITHDRAWtest123', + network = 'ETH', + transfer_type = 0, + status = 6, + transaction_fee = '0.004', + confirm_no = 3, + info = 'The address is not valid. Please confirm with the recipient', + tx_id = '0xb5ef8c13b968a406cc62a93a8bd80f9e9a906ef1b3fcf20a2e48573c17659268' + ) + else: + return SapiV1CapitalWithdrawHistoryGet200ResponseInner( + address = '0x94df8b352de7f46f64b01d3666bf6e936e44ce60', + amount = '8.91000000', + apply_time = '2019-10-12 11:12:02', + coin = 'USDT', + id = 'b6ae22b3aa844210a7041aee7589627c', + withdraw_order_id = 'WITHDRAWtest123', + network = 'ETH', + transfer_type = 0, + status = 6, + transaction_fee = '0.004', + tx_id = '0xb5ef8c13b968a406cc62a93a8bd80f9e9a906ef1b3fcf20a2e48573c17659268', + ) + """ + + def testSapiV1CapitalWithdrawHistoryGet200ResponseInner(self): + """Test SapiV1CapitalWithdrawHistoryGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_convert_accept_quote_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_convert_accept_quote_post200_response.py new file mode 100644 index 0000000..ba5ba55 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_convert_accept_quote_post200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_convert_accept_quote_post200_response import SapiV1ConvertAcceptQuotePost200Response + +class TestSapiV1ConvertAcceptQuotePost200Response(unittest.TestCase): + """SapiV1ConvertAcceptQuotePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ConvertAcceptQuotePost200Response: + """Test SapiV1ConvertAcceptQuotePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ConvertAcceptQuotePost200Response` + """ + model = SapiV1ConvertAcceptQuotePost200Response() + if include_optional: + return SapiV1ConvertAcceptQuotePost200Response( + order_id = '933256278426274426', + create_time = 1623381330472, + order_status = 'PROCESS' + ) + else: + return SapiV1ConvertAcceptQuotePost200Response( + order_id = '933256278426274426', + create_time = 1623381330472, + order_status = 'PROCESS', + ) + """ + + def testSapiV1ConvertAcceptQuotePost200Response(self): + """Test SapiV1ConvertAcceptQuotePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_convert_asset_info_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_convert_asset_info_get200_response_inner.py new file mode 100644 index 0000000..f3d73c2 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_convert_asset_info_get200_response_inner.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_convert_asset_info_get200_response_inner import SapiV1ConvertAssetInfoGet200ResponseInner + +class TestSapiV1ConvertAssetInfoGet200ResponseInner(unittest.TestCase): + """SapiV1ConvertAssetInfoGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ConvertAssetInfoGet200ResponseInner: + """Test SapiV1ConvertAssetInfoGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ConvertAssetInfoGet200ResponseInner` + """ + model = SapiV1ConvertAssetInfoGet200ResponseInner() + if include_optional: + return SapiV1ConvertAssetInfoGet200ResponseInner( + asset = 'BTC', + fraction = 8 + ) + else: + return SapiV1ConvertAssetInfoGet200ResponseInner( + asset = 'BTC', + fraction = 8, + ) + """ + + def testSapiV1ConvertAssetInfoGet200ResponseInner(self): + """Test SapiV1ConvertAssetInfoGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_convert_exchange_info_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_convert_exchange_info_get200_response_inner.py new file mode 100644 index 0000000..42121d3 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_convert_exchange_info_get200_response_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_convert_exchange_info_get200_response_inner import SapiV1ConvertExchangeInfoGet200ResponseInner + +class TestSapiV1ConvertExchangeInfoGet200ResponseInner(unittest.TestCase): + """SapiV1ConvertExchangeInfoGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ConvertExchangeInfoGet200ResponseInner: + """Test SapiV1ConvertExchangeInfoGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ConvertExchangeInfoGet200ResponseInner` + """ + model = SapiV1ConvertExchangeInfoGet200ResponseInner() + if include_optional: + return SapiV1ConvertExchangeInfoGet200ResponseInner( + from_asset = 'BTC', + to_asset = 'USDT', + from_asset_min_amount = '0.0004', + from_asset_max_amount = '50', + to_asset_min_amount = '20', + to_asset_max_amount = '2500000' + ) + else: + return SapiV1ConvertExchangeInfoGet200ResponseInner( + from_asset = 'BTC', + to_asset = 'USDT', + from_asset_min_amount = '0.0004', + from_asset_max_amount = '50', + to_asset_min_amount = '20', + to_asset_max_amount = '2500000', + ) + """ + + def testSapiV1ConvertExchangeInfoGet200ResponseInner(self): + """Test SapiV1ConvertExchangeInfoGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_convert_get_quote_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_convert_get_quote_post200_response.py new file mode 100644 index 0000000..ae93812 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_convert_get_quote_post200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_convert_get_quote_post200_response import SapiV1ConvertGetQuotePost200Response + +class TestSapiV1ConvertGetQuotePost200Response(unittest.TestCase): + """SapiV1ConvertGetQuotePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ConvertGetQuotePost200Response: + """Test SapiV1ConvertGetQuotePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ConvertGetQuotePost200Response` + """ + model = SapiV1ConvertGetQuotePost200Response() + if include_optional: + return SapiV1ConvertGetQuotePost200Response( + quote_id = '12415572564', + ratio = '38163.7', + inverse_ratio = '0.0000262', + valid_timestamp = 1623319461670, + to_amount = '3816.37', + from_amount = '0.1' + ) + else: + return SapiV1ConvertGetQuotePost200Response( + quote_id = '12415572564', + ratio = '38163.7', + inverse_ratio = '0.0000262', + valid_timestamp = 1623319461670, + to_amount = '3816.37', + from_amount = '0.1', + ) + """ + + def testSapiV1ConvertGetQuotePost200Response(self): + """Test SapiV1ConvertGetQuotePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_convert_limit_cancel_order_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_convert_limit_cancel_order_post200_response.py new file mode 100644 index 0000000..ff3fc4d --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_convert_limit_cancel_order_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_convert_limit_cancel_order_post200_response import SapiV1ConvertLimitCancelOrderPost200Response + +class TestSapiV1ConvertLimitCancelOrderPost200Response(unittest.TestCase): + """SapiV1ConvertLimitCancelOrderPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ConvertLimitCancelOrderPost200Response: + """Test SapiV1ConvertLimitCancelOrderPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ConvertLimitCancelOrderPost200Response` + """ + model = SapiV1ConvertLimitCancelOrderPost200Response() + if include_optional: + return SapiV1ConvertLimitCancelOrderPost200Response( + order_id = 1603680255057330400, + status = 'CANCELED' + ) + else: + return SapiV1ConvertLimitCancelOrderPost200Response( + order_id = 1603680255057330400, + status = 'CANCELED', + ) + """ + + def testSapiV1ConvertLimitCancelOrderPost200Response(self): + """Test SapiV1ConvertLimitCancelOrderPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_convert_limit_place_order_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_convert_limit_place_order_post200_response.py new file mode 100644 index 0000000..48cf924 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_convert_limit_place_order_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_convert_limit_place_order_post200_response import SapiV1ConvertLimitPlaceOrderPost200Response + +class TestSapiV1ConvertLimitPlaceOrderPost200Response(unittest.TestCase): + """SapiV1ConvertLimitPlaceOrderPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ConvertLimitPlaceOrderPost200Response: + """Test SapiV1ConvertLimitPlaceOrderPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ConvertLimitPlaceOrderPost200Response` + """ + model = SapiV1ConvertLimitPlaceOrderPost200Response() + if include_optional: + return SapiV1ConvertLimitPlaceOrderPost200Response( + order_id = 1603680255057330400, + status = 'PROCESS' + ) + else: + return SapiV1ConvertLimitPlaceOrderPost200Response( + order_id = 1603680255057330400, + status = 'PROCESS', + ) + """ + + def testSapiV1ConvertLimitPlaceOrderPost200Response(self): + """Test SapiV1ConvertLimitPlaceOrderPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_convert_limit_query_open_orders_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_convert_limit_query_open_orders_get200_response.py new file mode 100644 index 0000000..05a8c19 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_convert_limit_query_open_orders_get200_response.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_convert_limit_query_open_orders_get200_response import SapiV1ConvertLimitQueryOpenOrdersGet200Response + +class TestSapiV1ConvertLimitQueryOpenOrdersGet200Response(unittest.TestCase): + """SapiV1ConvertLimitQueryOpenOrdersGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ConvertLimitQueryOpenOrdersGet200Response: + """Test SapiV1ConvertLimitQueryOpenOrdersGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ConvertLimitQueryOpenOrdersGet200Response` + """ + model = SapiV1ConvertLimitQueryOpenOrdersGet200Response() + if include_optional: + return SapiV1ConvertLimitQueryOpenOrdersGet200Response( + list = [ + openapi_client.models._sapi_v1_convert_limit_query_open_orders_get_200_response_list_inner._sapi_v1_convert_limit_queryOpenOrders_get_200_response_list_inner( + quote_id = '18sdf87kh9df', + order_id = 1603680255057330400, + order_status = 'SUCCESS', + from_asset = 'BNB', + from_amount = '10', + to_asset = 'USDT', + to_amount = '2317.89', + ratio = '231.789', + inverse_ratio = '0.00431427', + create_time = 1614089498000, + expired_timestamp = 1614099498000, ) + ] + ) + else: + return SapiV1ConvertLimitQueryOpenOrdersGet200Response( + list = [ + openapi_client.models._sapi_v1_convert_limit_query_open_orders_get_200_response_list_inner._sapi_v1_convert_limit_queryOpenOrders_get_200_response_list_inner( + quote_id = '18sdf87kh9df', + order_id = 1603680255057330400, + order_status = 'SUCCESS', + from_asset = 'BNB', + from_amount = '10', + to_asset = 'USDT', + to_amount = '2317.89', + ratio = '231.789', + inverse_ratio = '0.00431427', + create_time = 1614089498000, + expired_timestamp = 1614099498000, ) + ], + ) + """ + + def testSapiV1ConvertLimitQueryOpenOrdersGet200Response(self): + """Test SapiV1ConvertLimitQueryOpenOrdersGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_convert_limit_query_open_orders_get200_response_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_convert_limit_query_open_orders_get200_response_list_inner.py new file mode 100644 index 0000000..76c910c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_convert_limit_query_open_orders_get200_response_list_inner.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_convert_limit_query_open_orders_get200_response_list_inner import SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner + +class TestSapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner(unittest.TestCase): + """SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner: + """Test SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner` + """ + model = SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner() + if include_optional: + return SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner( + quote_id = '18sdf87kh9df', + order_id = 1603680255057330400, + order_status = 'SUCCESS', + from_asset = 'BNB', + from_amount = '10', + to_asset = 'USDT', + to_amount = '2317.89', + ratio = '231.789', + inverse_ratio = '0.00431427', + create_time = 1614089498000, + expired_timestamp = 1614099498000 + ) + else: + return SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner( + quote_id = '18sdf87kh9df', + order_id = 1603680255057330400, + order_status = 'SUCCESS', + from_asset = 'BNB', + from_amount = '10', + to_asset = 'USDT', + to_amount = '2317.89', + ratio = '231.789', + inverse_ratio = '0.00431427', + create_time = 1614089498000, + expired_timestamp = 1614099498000, + ) + """ + + def testSapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner(self): + """Test SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_convert_order_status_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_convert_order_status_get200_response.py new file mode 100644 index 0000000..810827b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_convert_order_status_get200_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_convert_order_status_get200_response import SapiV1ConvertOrderStatusGet200Response + +class TestSapiV1ConvertOrderStatusGet200Response(unittest.TestCase): + """SapiV1ConvertOrderStatusGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ConvertOrderStatusGet200Response: + """Test SapiV1ConvertOrderStatusGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ConvertOrderStatusGet200Response` + """ + model = SapiV1ConvertOrderStatusGet200Response() + if include_optional: + return SapiV1ConvertOrderStatusGet200Response( + order_id = 933256278426274426, + order_status = 'SUCCESS', + from_asset = 'BTC', + from_amount = '0.00054414', + to_asset = 'USDT', + to_amount = '20', + ratio = '36755', + inverse_ratio = '0.00002721', + create_time = 1623381330472 + ) + else: + return SapiV1ConvertOrderStatusGet200Response( + order_id = 933256278426274426, + order_status = 'SUCCESS', + from_asset = 'BTC', + from_amount = '0.00054414', + to_asset = 'USDT', + to_amount = '20', + ratio = '36755', + inverse_ratio = '0.00002721', + create_time = 1623381330472, + ) + """ + + def testSapiV1ConvertOrderStatusGet200Response(self): + """Test SapiV1ConvertOrderStatusGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_convert_trade_flow_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_convert_trade_flow_get200_response.py new file mode 100644 index 0000000..8528234 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_convert_trade_flow_get200_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_convert_trade_flow_get200_response import SapiV1ConvertTradeFlowGet200Response + +class TestSapiV1ConvertTradeFlowGet200Response(unittest.TestCase): + """SapiV1ConvertTradeFlowGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ConvertTradeFlowGet200Response: + """Test SapiV1ConvertTradeFlowGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ConvertTradeFlowGet200Response` + """ + model = SapiV1ConvertTradeFlowGet200Response() + if include_optional: + return SapiV1ConvertTradeFlowGet200Response( + list = [ + openapi_client.models._sapi_v1_convert_trade_flow_get_200_response_list_inner._sapi_v1_convert_tradeFlow_get_200_response_list_inner( + quote_id = 'f3b91c525b2644c7bc1e1cd31b6e1aa6', + order_id = 940708407462087200, + order_status = 'SUCCESS', + from_asset = 'USDT', + from_amount = '20', + to_asset = 'BNB', + to_amount = '0.06154036', + ratio = '0.00307702', + inverse_ratio = '324.99', + create_time = 1624248872184, ) + ], + start_time = 1623824139000, + end_time = 1626416139000, + limit = 100, + more_data = False + ) + else: + return SapiV1ConvertTradeFlowGet200Response( + list = [ + openapi_client.models._sapi_v1_convert_trade_flow_get_200_response_list_inner._sapi_v1_convert_tradeFlow_get_200_response_list_inner( + quote_id = 'f3b91c525b2644c7bc1e1cd31b6e1aa6', + order_id = 940708407462087200, + order_status = 'SUCCESS', + from_asset = 'USDT', + from_amount = '20', + to_asset = 'BNB', + to_amount = '0.06154036', + ratio = '0.00307702', + inverse_ratio = '324.99', + create_time = 1624248872184, ) + ], + start_time = 1623824139000, + end_time = 1626416139000, + limit = 100, + more_data = False, + ) + """ + + def testSapiV1ConvertTradeFlowGet200Response(self): + """Test SapiV1ConvertTradeFlowGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_convert_trade_flow_get200_response_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_convert_trade_flow_get200_response_list_inner.py new file mode 100644 index 0000000..742312a --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_convert_trade_flow_get200_response_list_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_convert_trade_flow_get200_response_list_inner import SapiV1ConvertTradeFlowGet200ResponseListInner + +class TestSapiV1ConvertTradeFlowGet200ResponseListInner(unittest.TestCase): + """SapiV1ConvertTradeFlowGet200ResponseListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ConvertTradeFlowGet200ResponseListInner: + """Test SapiV1ConvertTradeFlowGet200ResponseListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ConvertTradeFlowGet200ResponseListInner` + """ + model = SapiV1ConvertTradeFlowGet200ResponseListInner() + if include_optional: + return SapiV1ConvertTradeFlowGet200ResponseListInner( + quote_id = 'f3b91c525b2644c7bc1e1cd31b6e1aa6', + order_id = 940708407462087200, + order_status = 'SUCCESS', + from_asset = 'USDT', + from_amount = '20', + to_asset = 'BNB', + to_amount = '0.06154036', + ratio = '0.00307702', + inverse_ratio = '324.99', + create_time = 1624248872184 + ) + else: + return SapiV1ConvertTradeFlowGet200ResponseListInner( + quote_id = 'f3b91c525b2644c7bc1e1cd31b6e1aa6', + order_id = 940708407462087200, + order_status = 'SUCCESS', + from_asset = 'USDT', + from_amount = '20', + to_asset = 'BNB', + to_amount = '0.06154036', + ratio = '0.00307702', + inverse_ratio = '324.99', + create_time = 1624248872184, + ) + """ + + def testSapiV1ConvertTradeFlowGet200ResponseListInner(self): + """Test SapiV1ConvertTradeFlowGet200ResponseListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_dci_product_accounts_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_dci_product_accounts_get200_response.py new file mode 100644 index 0000000..4e80274 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_dci_product_accounts_get200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_dci_product_accounts_get200_response import SapiV1DciProductAccountsGet200Response + +class TestSapiV1DciProductAccountsGet200Response(unittest.TestCase): + """SapiV1DciProductAccountsGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1DciProductAccountsGet200Response: + """Test SapiV1DciProductAccountsGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1DciProductAccountsGet200Response` + """ + model = SapiV1DciProductAccountsGet200Response() + if include_optional: + return SapiV1DciProductAccountsGet200Response( + total_amount_in_btc = '0.01067982', + total_amount_in_usdt = '77.13289230' + ) + else: + return SapiV1DciProductAccountsGet200Response( + total_amount_in_btc = '0.01067982', + total_amount_in_usdt = '77.13289230', + ) + """ + + def testSapiV1DciProductAccountsGet200Response(self): + """Test SapiV1DciProductAccountsGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_dci_product_auto_compound_edit_status_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_dci_product_auto_compound_edit_status_post200_response.py new file mode 100644 index 0000000..ba2ce45 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_dci_product_auto_compound_edit_status_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_dci_product_auto_compound_edit_status_post200_response import SapiV1DciProductAutoCompoundEditStatusPost200Response + +class TestSapiV1DciProductAutoCompoundEditStatusPost200Response(unittest.TestCase): + """SapiV1DciProductAutoCompoundEditStatusPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1DciProductAutoCompoundEditStatusPost200Response: + """Test SapiV1DciProductAutoCompoundEditStatusPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1DciProductAutoCompoundEditStatusPost200Response` + """ + model = SapiV1DciProductAutoCompoundEditStatusPost200Response() + if include_optional: + return SapiV1DciProductAutoCompoundEditStatusPost200Response( + position_id = '123456789', + auto_compound_plan = 'ADVANCED' + ) + else: + return SapiV1DciProductAutoCompoundEditStatusPost200Response( + position_id = '123456789', + auto_compound_plan = 'ADVANCED', + ) + """ + + def testSapiV1DciProductAutoCompoundEditStatusPost200Response(self): + """Test SapiV1DciProductAutoCompoundEditStatusPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_dci_product_list_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_dci_product_list_get200_response.py new file mode 100644 index 0000000..4b6d1de --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_dci_product_list_get200_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_dci_product_list_get200_response import SapiV1DciProductListGet200Response + +class TestSapiV1DciProductListGet200Response(unittest.TestCase): + """SapiV1DciProductListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1DciProductListGet200Response: + """Test SapiV1DciProductListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1DciProductListGet200Response` + """ + model = SapiV1DciProductListGet200Response() + if include_optional: + return SapiV1DciProductListGet200Response( + total = 1, + list = [ + openapi_client.models._sapi_v1_dci_product_list_get_200_response_list_inner._sapi_v1_dci_product_list_get_200_response_list_inner( + id = '741590', + invest_coin = 'USDT', + exercised_coin = 'BNB', + strike_price = '380', + duration = 4, + settle_date = 1709020800000, + purchase_decimal = 8, + purchase_end_time = 1708934400000, + can_purchase = True, + apr = '0.6076', + order_id = 8257205859, + min_amount = '0.1', + max_amount = '25265.7', + create_timestamp = 1708560084000, + option_type = 'PUT', + is_auto_compound_enable = True, + auto_compound_plan_list = ["STANDARD","ADVANCE"], ) + ] + ) + else: + return SapiV1DciProductListGet200Response( + total = 1, + list = [ + openapi_client.models._sapi_v1_dci_product_list_get_200_response_list_inner._sapi_v1_dci_product_list_get_200_response_list_inner( + id = '741590', + invest_coin = 'USDT', + exercised_coin = 'BNB', + strike_price = '380', + duration = 4, + settle_date = 1709020800000, + purchase_decimal = 8, + purchase_end_time = 1708934400000, + can_purchase = True, + apr = '0.6076', + order_id = 8257205859, + min_amount = '0.1', + max_amount = '25265.7', + create_timestamp = 1708560084000, + option_type = 'PUT', + is_auto_compound_enable = True, + auto_compound_plan_list = ["STANDARD","ADVANCE"], ) + ], + ) + """ + + def testSapiV1DciProductListGet200Response(self): + """Test SapiV1DciProductListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_dci_product_list_get200_response_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_dci_product_list_get200_response_list_inner.py new file mode 100644 index 0000000..87185e5 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_dci_product_list_get200_response_list_inner.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_dci_product_list_get200_response_list_inner import SapiV1DciProductListGet200ResponseListInner + +class TestSapiV1DciProductListGet200ResponseListInner(unittest.TestCase): + """SapiV1DciProductListGet200ResponseListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1DciProductListGet200ResponseListInner: + """Test SapiV1DciProductListGet200ResponseListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1DciProductListGet200ResponseListInner` + """ + model = SapiV1DciProductListGet200ResponseListInner() + if include_optional: + return SapiV1DciProductListGet200ResponseListInner( + id = '741590', + invest_coin = 'USDT', + exercised_coin = 'BNB', + strike_price = '380', + duration = 4, + settle_date = 1709020800000, + purchase_decimal = 8, + purchase_end_time = 1708934400000, + can_purchase = True, + apr = '0.6076', + order_id = 8257205859, + min_amount = '0.1', + max_amount = '25265.7', + create_timestamp = 1708560084000, + option_type = 'PUT', + is_auto_compound_enable = True, + auto_compound_plan_list = ["STANDARD","ADVANCE"] + ) + else: + return SapiV1DciProductListGet200ResponseListInner( + id = '741590', + invest_coin = 'USDT', + exercised_coin = 'BNB', + strike_price = '380', + duration = 4, + settle_date = 1709020800000, + purchase_decimal = 8, + purchase_end_time = 1708934400000, + can_purchase = True, + apr = '0.6076', + order_id = 8257205859, + min_amount = '0.1', + max_amount = '25265.7', + create_timestamp = 1708560084000, + option_type = 'PUT', + is_auto_compound_enable = True, + auto_compound_plan_list = ["STANDARD","ADVANCE"], + ) + """ + + def testSapiV1DciProductListGet200ResponseListInner(self): + """Test SapiV1DciProductListGet200ResponseListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_dci_product_positions_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_dci_product_positions_get200_response.py new file mode 100644 index 0000000..f793c6e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_dci_product_positions_get200_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_dci_product_positions_get200_response import SapiV1DciProductPositionsGet200Response + +class TestSapiV1DciProductPositionsGet200Response(unittest.TestCase): + """SapiV1DciProductPositionsGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1DciProductPositionsGet200Response: + """Test SapiV1DciProductPositionsGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1DciProductPositionsGet200Response` + """ + model = SapiV1DciProductPositionsGet200Response() + if include_optional: + return SapiV1DciProductPositionsGet200Response( + total = 1, + list = [ + openapi_client.models._sapi_v1_dci_product_positions_get_200_response_list_inner._sapi_v1_dci_product_positions_get_200_response_list_inner( + id = '741590', + invest_coin = 'USDT', + exercised_coin = 'BNB', + subscription_amount = '0.5', + strike_price = '380', + duration = 4, + settle_date = 1709020800000, + purchase_status = 'PURCHASE_SUCCESS', + apr = '0.0365', + order_id = 7973677530, + purchase_end_time = 1708329600000, + option_type = 'PUT', + auto_compound_plan = 'STANDARD', ) + ] + ) + else: + return SapiV1DciProductPositionsGet200Response( + total = 1, + list = [ + openapi_client.models._sapi_v1_dci_product_positions_get_200_response_list_inner._sapi_v1_dci_product_positions_get_200_response_list_inner( + id = '741590', + invest_coin = 'USDT', + exercised_coin = 'BNB', + subscription_amount = '0.5', + strike_price = '380', + duration = 4, + settle_date = 1709020800000, + purchase_status = 'PURCHASE_SUCCESS', + apr = '0.0365', + order_id = 7973677530, + purchase_end_time = 1708329600000, + option_type = 'PUT', + auto_compound_plan = 'STANDARD', ) + ], + ) + """ + + def testSapiV1DciProductPositionsGet200Response(self): + """Test SapiV1DciProductPositionsGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_dci_product_positions_get200_response_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_dci_product_positions_get200_response_list_inner.py new file mode 100644 index 0000000..52f81ec --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_dci_product_positions_get200_response_list_inner.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_dci_product_positions_get200_response_list_inner import SapiV1DciProductPositionsGet200ResponseListInner + +class TestSapiV1DciProductPositionsGet200ResponseListInner(unittest.TestCase): + """SapiV1DciProductPositionsGet200ResponseListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1DciProductPositionsGet200ResponseListInner: + """Test SapiV1DciProductPositionsGet200ResponseListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1DciProductPositionsGet200ResponseListInner` + """ + model = SapiV1DciProductPositionsGet200ResponseListInner() + if include_optional: + return SapiV1DciProductPositionsGet200ResponseListInner( + id = '741590', + invest_coin = 'USDT', + exercised_coin = 'BNB', + subscription_amount = '0.5', + strike_price = '380', + duration = 4, + settle_date = 1709020800000, + purchase_status = 'PURCHASE_SUCCESS', + apr = '0.0365', + order_id = 7973677530, + purchase_end_time = 1708329600000, + option_type = 'PUT', + auto_compound_plan = 'STANDARD' + ) + else: + return SapiV1DciProductPositionsGet200ResponseListInner( + id = '741590', + invest_coin = 'USDT', + exercised_coin = 'BNB', + subscription_amount = '0.5', + strike_price = '380', + duration = 4, + settle_date = 1709020800000, + purchase_status = 'PURCHASE_SUCCESS', + apr = '0.0365', + order_id = 7973677530, + purchase_end_time = 1708329600000, + option_type = 'PUT', + auto_compound_plan = 'STANDARD', + ) + """ + + def testSapiV1DciProductPositionsGet200ResponseListInner(self): + """Test SapiV1DciProductPositionsGet200ResponseListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_dci_product_subscribe_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_dci_product_subscribe_post200_response.py new file mode 100644 index 0000000..c907ae9 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_dci_product_subscribe_post200_response.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_dci_product_subscribe_post200_response import SapiV1DciProductSubscribePost200Response + +class TestSapiV1DciProductSubscribePost200Response(unittest.TestCase): + """SapiV1DciProductSubscribePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1DciProductSubscribePost200Response: + """Test SapiV1DciProductSubscribePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1DciProductSubscribePost200Response` + """ + model = SapiV1DciProductSubscribePost200Response() + if include_optional: + return SapiV1DciProductSubscribePost200Response( + position_id = 10208824, + invest_coin = 'BNB', + exercised_coin = 'USDT', + subscription_amount = '0.002', + duration = 4, + auto_compound_plan = 'STANDARD', + strike_price = '380', + settle_date = 1709020800000, + purchase_status = 'PURCHASE_SUCCESS', + apr = '0.7397', + order_id = 8259117597, + purchase_time = 1708677583874, + option_type = 'CALL' + ) + else: + return SapiV1DciProductSubscribePost200Response( + position_id = 10208824, + invest_coin = 'BNB', + exercised_coin = 'USDT', + subscription_amount = '0.002', + duration = 4, + auto_compound_plan = 'STANDARD', + strike_price = '380', + settle_date = 1709020800000, + purchase_status = 'PURCHASE_SUCCESS', + apr = '0.7397', + order_id = 8259117597, + purchase_time = 1708677583874, + ) + """ + + def testSapiV1DciProductSubscribePost200Response(self): + """Test SapiV1DciProductSubscribePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rate_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rate_history_get200_response.py new file mode 100644 index 0000000..63dc13a --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rate_history_get200_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_eth_history_rate_history_get200_response import SapiV1EthStakingEthHistoryRateHistoryGet200Response + +class TestSapiV1EthStakingEthHistoryRateHistoryGet200Response(unittest.TestCase): + """SapiV1EthStakingEthHistoryRateHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingEthHistoryRateHistoryGet200Response: + """Test SapiV1EthStakingEthHistoryRateHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingEthHistoryRateHistoryGet200Response` + """ + model = SapiV1EthStakingEthHistoryRateHistoryGet200Response() + if include_optional: + return SapiV1EthStakingEthHistoryRateHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_eth_staking_eth_history_rate_history_get_200_response_rows_inner._sapi_v1_eth_staking_eth_history_rateHistory_get_200_response_rows_inner( + annual_percentage_rate = '0.5', + exchange_rate = '1.00121234', + time = 1575018510000, ) + ], + total = 1 + ) + else: + return SapiV1EthStakingEthHistoryRateHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_eth_staking_eth_history_rate_history_get_200_response_rows_inner._sapi_v1_eth_staking_eth_history_rateHistory_get_200_response_rows_inner( + annual_percentage_rate = '0.5', + exchange_rate = '1.00121234', + time = 1575018510000, ) + ], + total = 1, + ) + """ + + def testSapiV1EthStakingEthHistoryRateHistoryGet200Response(self): + """Test SapiV1EthStakingEthHistoryRateHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner.py new file mode 100644 index 0000000..8d2eb19 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_eth_history_rate_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner + +class TestSapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner: + """Test SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner` + """ + model = SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner( + annual_percentage_rate = '0.5', + exchange_rate = '1.00121234', + time = 1575018510000 + ) + else: + return SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner( + annual_percentage_rate = '0.5', + exchange_rate = '1.00121234', + time = 1575018510000, + ) + """ + + def testSapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner(self): + """Test SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_redemption_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_redemption_history_get200_response.py new file mode 100644 index 0000000..5461d1c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_redemption_history_get200_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_eth_history_redemption_history_get200_response import SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response + +class TestSapiV1EthStakingEthHistoryRedemptionHistoryGet200Response(unittest.TestCase): + """SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response: + """Test SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response` + """ + model = SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response() + if include_optional: + return SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_eth_staking_eth_history_redemption_history_get_200_response_rows_inner._sapi_v1_eth_staking_eth_history_redemptionHistory_get_200_response_rows_inner( + time = 1575018510000, + arrival_time = 1575018510000, + asset = 'BETH', + amount = '21312.23223', + status = 'SUCCESS', + distribute_asset = 'ETH', + distribute_amount = '21338.0699', + conversion_ratio = '1.00121234', ) + ], + total = 1 + ) + else: + return SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_eth_staking_eth_history_redemption_history_get_200_response_rows_inner._sapi_v1_eth_staking_eth_history_redemptionHistory_get_200_response_rows_inner( + time = 1575018510000, + arrival_time = 1575018510000, + asset = 'BETH', + amount = '21312.23223', + status = 'SUCCESS', + distribute_asset = 'ETH', + distribute_amount = '21338.0699', + conversion_ratio = '1.00121234', ) + ], + total = 1, + ) + """ + + def testSapiV1EthStakingEthHistoryRedemptionHistoryGet200Response(self): + """Test SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner.py new file mode 100644 index 0000000..d3deed4 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_eth_history_redemption_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner + +class TestSapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner: + """Test SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner` + """ + model = SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner( + time = 1575018510000, + arrival_time = 1575018510000, + asset = 'BETH', + amount = '21312.23223', + status = 'SUCCESS', + distribute_asset = 'ETH', + distribute_amount = '21338.0699', + conversion_ratio = '1.00121234' + ) + else: + return SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner( + time = 1575018510000, + arrival_time = 1575018510000, + asset = 'BETH', + amount = '21312.23223', + status = 'SUCCESS', + distribute_asset = 'ETH', + distribute_amount = '21338.0699', + conversion_ratio = '1.00121234', + ) + """ + + def testSapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner(self): + """Test SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rewards_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rewards_history_get200_response.py new file mode 100644 index 0000000..7731144 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rewards_history_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_eth_history_rewards_history_get200_response import SapiV1EthStakingEthHistoryRewardsHistoryGet200Response + +class TestSapiV1EthStakingEthHistoryRewardsHistoryGet200Response(unittest.TestCase): + """SapiV1EthStakingEthHistoryRewardsHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingEthHistoryRewardsHistoryGet200Response: + """Test SapiV1EthStakingEthHistoryRewardsHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingEthHistoryRewardsHistoryGet200Response` + """ + model = SapiV1EthStakingEthHistoryRewardsHistoryGet200Response() + if include_optional: + return SapiV1EthStakingEthHistoryRewardsHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_eth_staking_eth_history_rewards_history_get_200_response_rows_inner._sapi_v1_eth_staking_eth_history_rewardsHistory_get_200_response_rows_inner( + time = 1575018510000, + asset = 'ETH', + holding = '2.3223', + amount = '0.23223', + annual_percentage_rate = '0.5', + status = 'SUCCESS', ) + ], + total = 1 + ) + else: + return SapiV1EthStakingEthHistoryRewardsHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_eth_staking_eth_history_rewards_history_get_200_response_rows_inner._sapi_v1_eth_staking_eth_history_rewardsHistory_get_200_response_rows_inner( + time = 1575018510000, + asset = 'ETH', + holding = '2.3223', + amount = '0.23223', + annual_percentage_rate = '0.5', + status = 'SUCCESS', ) + ], + total = 1, + ) + """ + + def testSapiV1EthStakingEthHistoryRewardsHistoryGet200Response(self): + """Test SapiV1EthStakingEthHistoryRewardsHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner.py new file mode 100644 index 0000000..cde900b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_eth_history_rewards_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner + +class TestSapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner: + """Test SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner` + """ + model = SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner( + time = 1575018510000, + asset = 'ETH', + holding = '2.3223', + amount = '0.23223', + annual_percentage_rate = '0.5', + status = 'SUCCESS' + ) + else: + return SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner( + time = 1575018510000, + asset = 'ETH', + holding = '2.3223', + amount = '0.23223', + annual_percentage_rate = '0.5', + status = 'SUCCESS', + ) + """ + + def testSapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner(self): + """Test SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_staking_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_staking_history_get200_response.py new file mode 100644 index 0000000..4d4ded7 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_staking_history_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_eth_history_staking_history_get200_response import SapiV1EthStakingEthHistoryStakingHistoryGet200Response + +class TestSapiV1EthStakingEthHistoryStakingHistoryGet200Response(unittest.TestCase): + """SapiV1EthStakingEthHistoryStakingHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingEthHistoryStakingHistoryGet200Response: + """Test SapiV1EthStakingEthHistoryStakingHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingEthHistoryStakingHistoryGet200Response` + """ + model = SapiV1EthStakingEthHistoryStakingHistoryGet200Response() + if include_optional: + return SapiV1EthStakingEthHistoryStakingHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_eth_staking_eth_history_staking_history_get_200_response_rows_inner._sapi_v1_eth_staking_eth_history_stakingHistory_get_200_response_rows_inner( + time = 1575018510000, + asset = 'ETH', + amount = '21312.23223', + status = 'SUCCESS', + distribute_amount = '21286.42584', + conversion_ratio = '1.00121234', ) + ], + total = 1 + ) + else: + return SapiV1EthStakingEthHistoryStakingHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_eth_staking_eth_history_staking_history_get_200_response_rows_inner._sapi_v1_eth_staking_eth_history_stakingHistory_get_200_response_rows_inner( + time = 1575018510000, + asset = 'ETH', + amount = '21312.23223', + status = 'SUCCESS', + distribute_amount = '21286.42584', + conversion_ratio = '1.00121234', ) + ], + total = 1, + ) + """ + + def testSapiV1EthStakingEthHistoryStakingHistoryGet200Response(self): + """Test SapiV1EthStakingEthHistoryStakingHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner.py new file mode 100644 index 0000000..119fe95 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_eth_history_staking_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner + +class TestSapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner: + """Test SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner` + """ + model = SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner( + time = 1575018510000, + asset = 'ETH', + amount = '21312.23223', + status = 'SUCCESS', + distribute_amount = '21286.42584', + conversion_ratio = '1.00121234' + ) + else: + return SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner( + time = 1575018510000, + asset = 'ETH', + amount = '21312.23223', + status = 'SUCCESS', + distribute_amount = '21286.42584', + conversion_ratio = '1.00121234', + ) + """ + + def testSapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner(self): + """Test SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response.py new file mode 100644 index 0000000..8d705e6 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response import SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response + +class TestSapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response(unittest.TestCase): + """SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response: + """Test SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response` + """ + model = SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response() + if include_optional: + return SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response( + est_rewards_in_eth = '1.23230920', + rows = [ + openapi_client.models._sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response_rows_inner._sapi_v1_eth_staking_eth_history_wbethRewardsHistory_get_200_response_rows_inner( + time = 1575018510000, + amount_in_eth = '0.23223', + holding = '2.3223', + holding_in_eth = '2.4231', + annual_percentage_rate = '0.5', ) + ], + total = 1 + ) + else: + return SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response( + est_rewards_in_eth = '1.23230920', + rows = [ + openapi_client.models._sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response_rows_inner._sapi_v1_eth_staking_eth_history_wbethRewardsHistory_get_200_response_rows_inner( + time = 1575018510000, + amount_in_eth = '0.23223', + holding = '2.3223', + holding_in_eth = '2.4231', + annual_percentage_rate = '0.5', ) + ], + total = 1, + ) + """ + + def testSapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response(self): + """Test SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner.py new file mode 100644 index 0000000..05503ad --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get200_response_rows_inner import SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner + +class TestSapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner: + """Test SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner` + """ + model = SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner( + time = 1575018510000, + amount_in_eth = '0.23223', + holding = '2.3223', + holding_in_eth = '2.4231', + annual_percentage_rate = '0.5' + ) + else: + return SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner( + time = 1575018510000, + amount_in_eth = '0.23223', + holding = '2.3223', + holding_in_eth = '2.4231', + annual_percentage_rate = '0.5', + ) + """ + + def testSapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner(self): + """Test SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_quota_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_quota_get200_response.py new file mode 100644 index 0000000..57dc11b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_quota_get200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_eth_quota_get200_response import SapiV1EthStakingEthQuotaGet200Response + +class TestSapiV1EthStakingEthQuotaGet200Response(unittest.TestCase): + """SapiV1EthStakingEthQuotaGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingEthQuotaGet200Response: + """Test SapiV1EthStakingEthQuotaGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingEthQuotaGet200Response` + """ + model = SapiV1EthStakingEthQuotaGet200Response() + if include_optional: + return SapiV1EthStakingEthQuotaGet200Response( + left_staking_personal_quota = '1000', + left_redemption_personal_quota = '1000' + ) + else: + return SapiV1EthStakingEthQuotaGet200Response( + left_staking_personal_quota = '1000', + left_redemption_personal_quota = '1000', + ) + """ + + def testSapiV1EthStakingEthQuotaGet200Response(self): + """Test SapiV1EthStakingEthQuotaGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_redeem_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_redeem_post200_response.py new file mode 100644 index 0000000..3224b63 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_eth_redeem_post200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_eth_redeem_post200_response import SapiV1EthStakingEthRedeemPost200Response + +class TestSapiV1EthStakingEthRedeemPost200Response(unittest.TestCase): + """SapiV1EthStakingEthRedeemPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingEthRedeemPost200Response: + """Test SapiV1EthStakingEthRedeemPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingEthRedeemPost200Response` + """ + model = SapiV1EthStakingEthRedeemPost200Response() + if include_optional: + return SapiV1EthStakingEthRedeemPost200Response( + success = True, + arrival_time = 1575018510000, + eth_amount = '0.23092091', + conversion_ratio = '1.00121234' + ) + else: + return SapiV1EthStakingEthRedeemPost200Response( + success = True, + arrival_time = 1575018510000, + eth_amount = '0.23092091', + conversion_ratio = '1.00121234', + ) + """ + + def testSapiV1EthStakingEthRedeemPost200Response(self): + """Test SapiV1EthStakingEthRedeemPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response.py new file mode 100644 index 0000000..138b634 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response import SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response + +class TestSapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response(unittest.TestCase): + """SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response: + """Test SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response` + """ + model = SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response() + if include_optional: + return SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response_rows_inner._sapi_v1_eth_staking_wbeth_history_unwrapHistory_get_200_response_rows_inner( + time = 1575018510000, + from_asset = 'WBETH', + from_amount = '21312.23223', + to_asset = 'BETH', + to_amount = '21312.23223', + exchange_rate = '1.01243253', + status = 'SUCCESS', ) + ], + total = 1 + ) + else: + return SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response_rows_inner._sapi_v1_eth_staking_wbeth_history_unwrapHistory_get_200_response_rows_inner( + time = 1575018510000, + from_asset = 'WBETH', + from_amount = '21312.23223', + to_asset = 'BETH', + to_amount = '21312.23223', + exchange_rate = '1.01243253', + status = 'SUCCESS', ) + ], + total = 1, + ) + """ + + def testSapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response(self): + """Test SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner.py new file mode 100644 index 0000000..f2e2e5b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_unwrap_history_get200_response_rows_inner import SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner + +class TestSapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner: + """Test SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner` + """ + model = SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner( + time = 1575018510000, + from_asset = 'WBETH', + from_amount = '21312.23223', + to_asset = 'BETH', + to_amount = '21312.23223', + exchange_rate = '1.01243253', + status = 'SUCCESS' + ) + else: + return SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner( + time = 1575018510000, + from_asset = 'WBETH', + from_amount = '21312.23223', + to_asset = 'BETH', + to_amount = '21312.23223', + exchange_rate = '1.01243253', + status = 'SUCCESS', + ) + """ + + def testSapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner(self): + """Test SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response.py new file mode 100644 index 0000000..efe60c3 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response import SapiV1EthStakingWbethHistoryWrapHistoryGet200Response + +class TestSapiV1EthStakingWbethHistoryWrapHistoryGet200Response(unittest.TestCase): + """SapiV1EthStakingWbethHistoryWrapHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingWbethHistoryWrapHistoryGet200Response: + """Test SapiV1EthStakingWbethHistoryWrapHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingWbethHistoryWrapHistoryGet200Response` + """ + model = SapiV1EthStakingWbethHistoryWrapHistoryGet200Response() + if include_optional: + return SapiV1EthStakingWbethHistoryWrapHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response_rows_inner._sapi_v1_eth_staking_wbeth_history_wrapHistory_get_200_response_rows_inner( + time = 1575018510000, + from_asset = 'BETH', + from_amount = '21312.23223', + to_asset = 'WBETH', + to_amount = '21312.23223', + exchange_rate = '1.01243253', + status = 'SUCCESS', ) + ], + total = 1 + ) + else: + return SapiV1EthStakingWbethHistoryWrapHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response_rows_inner._sapi_v1_eth_staking_wbeth_history_wrapHistory_get_200_response_rows_inner( + time = 1575018510000, + from_asset = 'BETH', + from_amount = '21312.23223', + to_asset = 'WBETH', + to_amount = '21312.23223', + exchange_rate = '1.01243253', + status = 'SUCCESS', ) + ], + total = 1, + ) + """ + + def testSapiV1EthStakingWbethHistoryWrapHistoryGet200Response(self): + """Test SapiV1EthStakingWbethHistoryWrapHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner.py new file mode 100644 index 0000000..ec41b15 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_wbeth_history_wrap_history_get200_response_rows_inner import SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner + +class TestSapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner: + """Test SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner` + """ + model = SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner( + time = 1575018510000, + from_asset = 'BETH', + from_amount = '21312.23223', + to_asset = 'WBETH', + to_amount = '21312.23223', + exchange_rate = '1.01243253', + status = 'SUCCESS' + ) + else: + return SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner( + time = 1575018510000, + from_asset = 'BETH', + from_amount = '21312.23223', + to_asset = 'WBETH', + to_amount = '21312.23223', + exchange_rate = '1.01243253', + status = 'SUCCESS', + ) + """ + + def testSapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner(self): + """Test SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_wrap_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_wrap_post200_response.py new file mode 100644 index 0000000..6ae0900 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_eth_staking_wbeth_wrap_post200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_eth_staking_wbeth_wrap_post200_response import SapiV1EthStakingWbethWrapPost200Response + +class TestSapiV1EthStakingWbethWrapPost200Response(unittest.TestCase): + """SapiV1EthStakingWbethWrapPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1EthStakingWbethWrapPost200Response: + """Test SapiV1EthStakingWbethWrapPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1EthStakingWbethWrapPost200Response` + """ + model = SapiV1EthStakingWbethWrapPost200Response() + if include_optional: + return SapiV1EthStakingWbethWrapPost200Response( + success = True, + wbeth_amount = '0.22330928', + exchange_rate = '1.001212343432' + ) + else: + return SapiV1EthStakingWbethWrapPost200Response( + success = True, + wbeth_amount = '0.22330928', + exchange_rate = '1.001212343432', + ) + """ + + def testSapiV1EthStakingWbethWrapPost200Response(self): + """Test SapiV1EthStakingWbethWrapPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_fiat_orders_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_fiat_orders_get200_response.py new file mode 100644 index 0000000..ffeddcb --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_fiat_orders_get200_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_fiat_orders_get200_response import SapiV1FiatOrdersGet200Response + +class TestSapiV1FiatOrdersGet200Response(unittest.TestCase): + """SapiV1FiatOrdersGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1FiatOrdersGet200Response: + """Test SapiV1FiatOrdersGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1FiatOrdersGet200Response` + """ + model = SapiV1FiatOrdersGet200Response() + if include_optional: + return SapiV1FiatOrdersGet200Response( + code = '000000', + message = 'success', + data = [ + openapi_client.models._sapi_v1_fiat_orders_get_200_response_data_inner._sapi_v1_fiat_orders_get_200_response_data_inner( + order_no = '7d76d611-0568-4f43-afb6-24cac7767365', + fiat_currency = 'BRL', + indicated_amount = '10.00', + amount = '10.00', + total_fee = '0.00', + method = 'BankAccount', + status = 'Expired', + create_time = 1626144956000, + update_time = 1626400907000, ) + ], + total = 1, + success = True + ) + else: + return SapiV1FiatOrdersGet200Response( + code = '000000', + message = 'success', + data = [ + openapi_client.models._sapi_v1_fiat_orders_get_200_response_data_inner._sapi_v1_fiat_orders_get_200_response_data_inner( + order_no = '7d76d611-0568-4f43-afb6-24cac7767365', + fiat_currency = 'BRL', + indicated_amount = '10.00', + amount = '10.00', + total_fee = '0.00', + method = 'BankAccount', + status = 'Expired', + create_time = 1626144956000, + update_time = 1626400907000, ) + ], + total = 1, + success = True, + ) + """ + + def testSapiV1FiatOrdersGet200Response(self): + """Test SapiV1FiatOrdersGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_fiat_orders_get200_response_data_inner.py b/target/python/binance_openapi/test/test_sapi_v1_fiat_orders_get200_response_data_inner.py new file mode 100644 index 0000000..8beaad0 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_fiat_orders_get200_response_data_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_fiat_orders_get200_response_data_inner import SapiV1FiatOrdersGet200ResponseDataInner + +class TestSapiV1FiatOrdersGet200ResponseDataInner(unittest.TestCase): + """SapiV1FiatOrdersGet200ResponseDataInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1FiatOrdersGet200ResponseDataInner: + """Test SapiV1FiatOrdersGet200ResponseDataInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1FiatOrdersGet200ResponseDataInner` + """ + model = SapiV1FiatOrdersGet200ResponseDataInner() + if include_optional: + return SapiV1FiatOrdersGet200ResponseDataInner( + order_no = '7d76d611-0568-4f43-afb6-24cac7767365', + fiat_currency = 'BRL', + indicated_amount = '10.00', + amount = '10.00', + total_fee = '0.00', + method = 'BankAccount', + status = 'Expired', + create_time = 1626144956000, + update_time = 1626400907000 + ) + else: + return SapiV1FiatOrdersGet200ResponseDataInner( + order_no = '7d76d611-0568-4f43-afb6-24cac7767365', + fiat_currency = 'BRL', + indicated_amount = '10.00', + amount = '10.00', + total_fee = '0.00', + method = 'BankAccount', + status = 'Expired', + create_time = 1626144956000, + update_time = 1626400907000, + ) + """ + + def testSapiV1FiatOrdersGet200ResponseDataInner(self): + """Test SapiV1FiatOrdersGet200ResponseDataInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_fiat_payments_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_fiat_payments_get200_response.py new file mode 100644 index 0000000..d894ac4 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_fiat_payments_get200_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_fiat_payments_get200_response import SapiV1FiatPaymentsGet200Response + +class TestSapiV1FiatPaymentsGet200Response(unittest.TestCase): + """SapiV1FiatPaymentsGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1FiatPaymentsGet200Response: + """Test SapiV1FiatPaymentsGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1FiatPaymentsGet200Response` + """ + model = SapiV1FiatPaymentsGet200Response() + if include_optional: + return SapiV1FiatPaymentsGet200Response( + code = '000000', + message = 'success', + data = [ + openapi_client.models._sapi_v1_fiat_payments_get_200_response_data_inner._sapi_v1_fiat_payments_get_200_response_data_inner( + order_no = '353fca443f06466db0c4dc89f94f027a', + source_amount = '20.00', + fiat_currency = 'EUR', + obtain_amount = '4.462', + crypto_currency = 'LUNA', + total_fee = '0.2', + price = '4.437472', + status = 'Failed', + create_time = 1624529919000, + update_time = 1624529919000, ) + ], + total = 1, + success = True + ) + else: + return SapiV1FiatPaymentsGet200Response( + code = '000000', + message = 'success', + data = [ + openapi_client.models._sapi_v1_fiat_payments_get_200_response_data_inner._sapi_v1_fiat_payments_get_200_response_data_inner( + order_no = '353fca443f06466db0c4dc89f94f027a', + source_amount = '20.00', + fiat_currency = 'EUR', + obtain_amount = '4.462', + crypto_currency = 'LUNA', + total_fee = '0.2', + price = '4.437472', + status = 'Failed', + create_time = 1624529919000, + update_time = 1624529919000, ) + ], + total = 1, + success = True, + ) + """ + + def testSapiV1FiatPaymentsGet200Response(self): + """Test SapiV1FiatPaymentsGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_fiat_payments_get200_response_data_inner.py b/target/python/binance_openapi/test/test_sapi_v1_fiat_payments_get200_response_data_inner.py new file mode 100644 index 0000000..3483f7c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_fiat_payments_get200_response_data_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_fiat_payments_get200_response_data_inner import SapiV1FiatPaymentsGet200ResponseDataInner + +class TestSapiV1FiatPaymentsGet200ResponseDataInner(unittest.TestCase): + """SapiV1FiatPaymentsGet200ResponseDataInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1FiatPaymentsGet200ResponseDataInner: + """Test SapiV1FiatPaymentsGet200ResponseDataInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1FiatPaymentsGet200ResponseDataInner` + """ + model = SapiV1FiatPaymentsGet200ResponseDataInner() + if include_optional: + return SapiV1FiatPaymentsGet200ResponseDataInner( + order_no = '353fca443f06466db0c4dc89f94f027a', + source_amount = '20.00', + fiat_currency = 'EUR', + obtain_amount = '4.462', + crypto_currency = 'LUNA', + total_fee = '0.2', + price = '4.437472', + status = 'Failed', + create_time = 1624529919000, + update_time = 1624529919000 + ) + else: + return SapiV1FiatPaymentsGet200ResponseDataInner( + order_no = '353fca443f06466db0c4dc89f94f027a', + source_amount = '20.00', + fiat_currency = 'EUR', + obtain_amount = '4.462', + crypto_currency = 'LUNA', + total_fee = '0.2', + price = '4.437472', + status = 'Failed', + create_time = 1624529919000, + update_time = 1624529919000, + ) + """ + + def testSapiV1FiatPaymentsGet200ResponseDataInner(self): + """Test SapiV1FiatPaymentsGet200ResponseDataInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_futures_hist_data_link_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_futures_hist_data_link_get200_response.py new file mode 100644 index 0000000..3b29e2f --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_futures_hist_data_link_get200_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_futures_hist_data_link_get200_response import SapiV1FuturesHistDataLinkGet200Response + +class TestSapiV1FuturesHistDataLinkGet200Response(unittest.TestCase): + """SapiV1FuturesHistDataLinkGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1FuturesHistDataLinkGet200Response: + """Test SapiV1FuturesHistDataLinkGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1FuturesHistDataLinkGet200Response` + """ + model = SapiV1FuturesHistDataLinkGet200Response() + if include_optional: + return SapiV1FuturesHistDataLinkGet200Response( + data = [ + openapi_client.models._sapi_v1_futures_hist_data_link_get_200_response_data_inner._sapi_v1_futures_histDataLink_get_200_response_data_inner( + day = '2023-06-30', + url = 'https://bin-prod-user-rebate-bucket.s3.ap-northeast-1.amazonaws.com/xxx', ) + ] + ) + else: + return SapiV1FuturesHistDataLinkGet200Response( + data = [ + openapi_client.models._sapi_v1_futures_hist_data_link_get_200_response_data_inner._sapi_v1_futures_histDataLink_get_200_response_data_inner( + day = '2023-06-30', + url = 'https://bin-prod-user-rebate-bucket.s3.ap-northeast-1.amazonaws.com/xxx', ) + ], + ) + """ + + def testSapiV1FuturesHistDataLinkGet200Response(self): + """Test SapiV1FuturesHistDataLinkGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_futures_hist_data_link_get200_response_data_inner.py b/target/python/binance_openapi/test/test_sapi_v1_futures_hist_data_link_get200_response_data_inner.py new file mode 100644 index 0000000..0af0324 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_futures_hist_data_link_get200_response_data_inner.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_futures_hist_data_link_get200_response_data_inner import SapiV1FuturesHistDataLinkGet200ResponseDataInner + +class TestSapiV1FuturesHistDataLinkGet200ResponseDataInner(unittest.TestCase): + """SapiV1FuturesHistDataLinkGet200ResponseDataInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1FuturesHistDataLinkGet200ResponseDataInner: + """Test SapiV1FuturesHistDataLinkGet200ResponseDataInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1FuturesHistDataLinkGet200ResponseDataInner` + """ + model = SapiV1FuturesHistDataLinkGet200ResponseDataInner() + if include_optional: + return SapiV1FuturesHistDataLinkGet200ResponseDataInner( + day = '2023-06-30', + url = 'https://bin-prod-user-rebate-bucket.s3.ap-northeast-1.amazonaws.com/xxx' + ) + else: + return SapiV1FuturesHistDataLinkGet200ResponseDataInner( + day = '2023-06-30', + url = 'https://bin-prod-user-rebate-bucket.s3.ap-northeast-1.amazonaws.com/xxx', + ) + """ + + def testSapiV1FuturesHistDataLinkGet200ResponseDataInner(self): + """Test SapiV1FuturesHistDataLinkGet200ResponseDataInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_futures_transfer_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_futures_transfer_get200_response.py new file mode 100644 index 0000000..decf844 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_futures_transfer_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_futures_transfer_get200_response import SapiV1FuturesTransferGet200Response + +class TestSapiV1FuturesTransferGet200Response(unittest.TestCase): + """SapiV1FuturesTransferGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1FuturesTransferGet200Response: + """Test SapiV1FuturesTransferGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1FuturesTransferGet200Response` + """ + model = SapiV1FuturesTransferGet200Response() + if include_optional: + return SapiV1FuturesTransferGet200Response( + rows = [ + openapi_client.models._sapi_v1_futures_transfer_get_200_response_rows_inner._sapi_v1_futures_transfer_get_200_response_rows_inner( + asset = 'USDT', + tran_id = 100000001, + amount = '40.84624400', + type = '1', + timestamp = 1555056425000, + status = 'CONFIRMED', ) + ], + total = 1 + ) + else: + return SapiV1FuturesTransferGet200Response( + rows = [ + openapi_client.models._sapi_v1_futures_transfer_get_200_response_rows_inner._sapi_v1_futures_transfer_get_200_response_rows_inner( + asset = 'USDT', + tran_id = 100000001, + amount = '40.84624400', + type = '1', + timestamp = 1555056425000, + status = 'CONFIRMED', ) + ], + total = 1, + ) + """ + + def testSapiV1FuturesTransferGet200Response(self): + """Test SapiV1FuturesTransferGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_futures_transfer_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_futures_transfer_get200_response_rows_inner.py new file mode 100644 index 0000000..a67dc65 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_futures_transfer_get200_response_rows_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_futures_transfer_get200_response_rows_inner import SapiV1FuturesTransferGet200ResponseRowsInner + +class TestSapiV1FuturesTransferGet200ResponseRowsInner(unittest.TestCase): + """SapiV1FuturesTransferGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1FuturesTransferGet200ResponseRowsInner: + """Test SapiV1FuturesTransferGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1FuturesTransferGet200ResponseRowsInner` + """ + model = SapiV1FuturesTransferGet200ResponseRowsInner() + if include_optional: + return SapiV1FuturesTransferGet200ResponseRowsInner( + asset = 'USDT', + tran_id = 100000001, + amount = '40.84624400', + type = '1', + timestamp = 1555056425000, + status = 'CONFIRMED' + ) + else: + return SapiV1FuturesTransferGet200ResponseRowsInner( + asset = 'USDT', + tran_id = 100000001, + amount = '40.84624400', + type = '1', + timestamp = 1555056425000, + status = 'CONFIRMED', + ) + """ + + def testSapiV1FuturesTransferGet200ResponseRowsInner(self): + """Test SapiV1FuturesTransferGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_giftcard_buy_code_token_limit_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_giftcard_buy_code_token_limit_get200_response.py new file mode 100644 index 0000000..271c687 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_giftcard_buy_code_token_limit_get200_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_giftcard_buy_code_token_limit_get200_response import SapiV1GiftcardBuyCodeTokenLimitGet200Response + +class TestSapiV1GiftcardBuyCodeTokenLimitGet200Response(unittest.TestCase): + """SapiV1GiftcardBuyCodeTokenLimitGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1GiftcardBuyCodeTokenLimitGet200Response: + """Test SapiV1GiftcardBuyCodeTokenLimitGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1GiftcardBuyCodeTokenLimitGet200Response` + """ + model = SapiV1GiftcardBuyCodeTokenLimitGet200Response() + if include_optional: + return SapiV1GiftcardBuyCodeTokenLimitGet200Response( + code = '000000', + message = 'success', + data = openapi_client.models._sapi_v1_giftcard_buy_code_token_limit_get_200_response_data._sapi_v1_giftcard_buyCode_token_limit_get_200_response_data( + coin = 'BNB', + from_min = '0.01', + from_max = '1', ), + success = True + ) + else: + return SapiV1GiftcardBuyCodeTokenLimitGet200Response( + code = '000000', + message = 'success', + data = openapi_client.models._sapi_v1_giftcard_buy_code_token_limit_get_200_response_data._sapi_v1_giftcard_buyCode_token_limit_get_200_response_data( + coin = 'BNB', + from_min = '0.01', + from_max = '1', ), + success = True, + ) + """ + + def testSapiV1GiftcardBuyCodeTokenLimitGet200Response(self): + """Test SapiV1GiftcardBuyCodeTokenLimitGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_giftcard_buy_code_token_limit_get200_response_data.py b/target/python/binance_openapi/test/test_sapi_v1_giftcard_buy_code_token_limit_get200_response_data.py new file mode 100644 index 0000000..38d0eb1 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_giftcard_buy_code_token_limit_get200_response_data.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_giftcard_buy_code_token_limit_get200_response_data import SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData + +class TestSapiV1GiftcardBuyCodeTokenLimitGet200ResponseData(unittest.TestCase): + """SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData: + """Test SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData` + """ + model = SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData() + if include_optional: + return SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData( + coin = 'BNB', + from_min = '0.01', + from_max = '1' + ) + else: + return SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData( + ) + """ + + def testSapiV1GiftcardBuyCodeTokenLimitGet200ResponseData(self): + """Test SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_giftcard_create_code_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_giftcard_create_code_post200_response.py new file mode 100644 index 0000000..b4bbac3 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_giftcard_create_code_post200_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_giftcard_create_code_post200_response import SapiV1GiftcardCreateCodePost200Response + +class TestSapiV1GiftcardCreateCodePost200Response(unittest.TestCase): + """SapiV1GiftcardCreateCodePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1GiftcardCreateCodePost200Response: + """Test SapiV1GiftcardCreateCodePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1GiftcardCreateCodePost200Response` + """ + model = SapiV1GiftcardCreateCodePost200Response() + if include_optional: + return SapiV1GiftcardCreateCodePost200Response( + code = '000000', + message = 'success', + data = openapi_client.models._sapi_v1_giftcard_create_code_post_200_response_data._sapi_v1_giftcard_createCode_post_200_response_data( + reference_no = '0033002327977405', + code = 'AOGANK3NB4GIT3C6', + expired_time = 1727417154000, ), + success = True + ) + else: + return SapiV1GiftcardCreateCodePost200Response( + code = '000000', + message = 'success', + data = openapi_client.models._sapi_v1_giftcard_create_code_post_200_response_data._sapi_v1_giftcard_createCode_post_200_response_data( + reference_no = '0033002327977405', + code = 'AOGANK3NB4GIT3C6', + expired_time = 1727417154000, ), + success = True, + ) + """ + + def testSapiV1GiftcardCreateCodePost200Response(self): + """Test SapiV1GiftcardCreateCodePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_giftcard_create_code_post200_response_data.py b/target/python/binance_openapi/test/test_sapi_v1_giftcard_create_code_post200_response_data.py new file mode 100644 index 0000000..da6dca4 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_giftcard_create_code_post200_response_data.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_giftcard_create_code_post200_response_data import SapiV1GiftcardCreateCodePost200ResponseData + +class TestSapiV1GiftcardCreateCodePost200ResponseData(unittest.TestCase): + """SapiV1GiftcardCreateCodePost200ResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1GiftcardCreateCodePost200ResponseData: + """Test SapiV1GiftcardCreateCodePost200ResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1GiftcardCreateCodePost200ResponseData` + """ + model = SapiV1GiftcardCreateCodePost200ResponseData() + if include_optional: + return SapiV1GiftcardCreateCodePost200ResponseData( + reference_no = '0033002327977405', + code = 'AOGANK3NB4GIT3C6', + expired_time = 1727417154000 + ) + else: + return SapiV1GiftcardCreateCodePost200ResponseData( + reference_no = '0033002327977405', + code = 'AOGANK3NB4GIT3C6', + expired_time = 1727417154000, + ) + """ + + def testSapiV1GiftcardCreateCodePost200ResponseData(self): + """Test SapiV1GiftcardCreateCodePost200ResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_giftcard_cryptography_rsa_public_key_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_giftcard_cryptography_rsa_public_key_get200_response.py new file mode 100644 index 0000000..44e74e6 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_giftcard_cryptography_rsa_public_key_get200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_giftcard_cryptography_rsa_public_key_get200_response import SapiV1GiftcardCryptographyRsaPublicKeyGet200Response + +class TestSapiV1GiftcardCryptographyRsaPublicKeyGet200Response(unittest.TestCase): + """SapiV1GiftcardCryptographyRsaPublicKeyGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1GiftcardCryptographyRsaPublicKeyGet200Response: + """Test SapiV1GiftcardCryptographyRsaPublicKeyGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1GiftcardCryptographyRsaPublicKeyGet200Response` + """ + model = SapiV1GiftcardCryptographyRsaPublicKeyGet200Response() + if include_optional: + return SapiV1GiftcardCryptographyRsaPublicKeyGet200Response( + code = '000000', + message = 'success', + data = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCXBBVKLAc1GQ5FsIFFqOHrPTox5noBONIKr+IAedTR9FkVxq6e65updEbfdhRNkMOeYIO2i0UylrjGC0X8YSoIszmrVHeV0l06Zh1oJuZos1+7N+WLuz9JvlPaawof3GUakTxYWWCa9+8KIbLKsoKMdfS96VT+8iOXO3quMGKUmQIDAQAB', + success = True + ) + else: + return SapiV1GiftcardCryptographyRsaPublicKeyGet200Response( + code = '000000', + message = 'success', + data = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCXBBVKLAc1GQ5FsIFFqOHrPTox5noBONIKr+IAedTR9FkVxq6e65updEbfdhRNkMOeYIO2i0UylrjGC0X8YSoIszmrVHeV0l06Zh1oJuZos1+7N+WLuz9JvlPaawof3GUakTxYWWCa9+8KIbLKsoKMdfS96VT+8iOXO3quMGKUmQIDAQAB', + success = True, + ) + """ + + def testSapiV1GiftcardCryptographyRsaPublicKeyGet200Response(self): + """Test SapiV1GiftcardCryptographyRsaPublicKeyGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_giftcard_redeem_code_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_giftcard_redeem_code_post200_response.py new file mode 100644 index 0000000..756c6b4 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_giftcard_redeem_code_post200_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_giftcard_redeem_code_post200_response import SapiV1GiftcardRedeemCodePost200Response + +class TestSapiV1GiftcardRedeemCodePost200Response(unittest.TestCase): + """SapiV1GiftcardRedeemCodePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1GiftcardRedeemCodePost200Response: + """Test SapiV1GiftcardRedeemCodePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1GiftcardRedeemCodePost200Response` + """ + model = SapiV1GiftcardRedeemCodePost200Response() + if include_optional: + return SapiV1GiftcardRedeemCodePost200Response( + code = '000000', + message = 'success', + data = openapi_client.models._sapi_v1_giftcard_redeem_code_post_200_response_data._sapi_v1_giftcard_redeemCode_post_200_response_data( + token = 'BNB', + amount = '10', + reference_no = '0033002327977405', + identity_no = '10316281761814589440', ), + success = True + ) + else: + return SapiV1GiftcardRedeemCodePost200Response( + code = '000000', + message = 'success', + data = openapi_client.models._sapi_v1_giftcard_redeem_code_post_200_response_data._sapi_v1_giftcard_redeemCode_post_200_response_data( + token = 'BNB', + amount = '10', + reference_no = '0033002327977405', + identity_no = '10316281761814589440', ), + success = True, + ) + """ + + def testSapiV1GiftcardRedeemCodePost200Response(self): + """Test SapiV1GiftcardRedeemCodePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_giftcard_redeem_code_post200_response_data.py b/target/python/binance_openapi/test/test_sapi_v1_giftcard_redeem_code_post200_response_data.py new file mode 100644 index 0000000..e463661 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_giftcard_redeem_code_post200_response_data.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_giftcard_redeem_code_post200_response_data import SapiV1GiftcardRedeemCodePost200ResponseData + +class TestSapiV1GiftcardRedeemCodePost200ResponseData(unittest.TestCase): + """SapiV1GiftcardRedeemCodePost200ResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1GiftcardRedeemCodePost200ResponseData: + """Test SapiV1GiftcardRedeemCodePost200ResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1GiftcardRedeemCodePost200ResponseData` + """ + model = SapiV1GiftcardRedeemCodePost200ResponseData() + if include_optional: + return SapiV1GiftcardRedeemCodePost200ResponseData( + token = 'BNB', + amount = '10', + reference_no = '0033002327977405', + identity_no = '10316281761814589440' + ) + else: + return SapiV1GiftcardRedeemCodePost200ResponseData( + token = 'BNB', + amount = '10', + reference_no = '0033002327977405', + identity_no = '10316281761814589440', + ) + """ + + def testSapiV1GiftcardRedeemCodePost200ResponseData(self): + """Test SapiV1GiftcardRedeemCodePost200ResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_giftcard_verify_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_giftcard_verify_get200_response.py new file mode 100644 index 0000000..560e946 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_giftcard_verify_get200_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_giftcard_verify_get200_response import SapiV1GiftcardVerifyGet200Response + +class TestSapiV1GiftcardVerifyGet200Response(unittest.TestCase): + """SapiV1GiftcardVerifyGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1GiftcardVerifyGet200Response: + """Test SapiV1GiftcardVerifyGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1GiftcardVerifyGet200Response` + """ + model = SapiV1GiftcardVerifyGet200Response() + if include_optional: + return SapiV1GiftcardVerifyGet200Response( + code = '000000', + message = 'success', + data = openapi_client.models._sapi_v1_giftcard_verify_get_200_response_data._sapi_v1_giftcard_verify_get_200_response_data( + valid = True, + token = 'BNB', + amount = '0.00000001', ), + success = True + ) + else: + return SapiV1GiftcardVerifyGet200Response( + code = '000000', + message = 'success', + data = openapi_client.models._sapi_v1_giftcard_verify_get_200_response_data._sapi_v1_giftcard_verify_get_200_response_data( + valid = True, + token = 'BNB', + amount = '0.00000001', ), + success = True, + ) + """ + + def testSapiV1GiftcardVerifyGet200Response(self): + """Test SapiV1GiftcardVerifyGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_giftcard_verify_get200_response_data.py b/target/python/binance_openapi/test/test_sapi_v1_giftcard_verify_get200_response_data.py new file mode 100644 index 0000000..c3aacfc --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_giftcard_verify_get200_response_data.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_giftcard_verify_get200_response_data import SapiV1GiftcardVerifyGet200ResponseData + +class TestSapiV1GiftcardVerifyGet200ResponseData(unittest.TestCase): + """SapiV1GiftcardVerifyGet200ResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1GiftcardVerifyGet200ResponseData: + """Test SapiV1GiftcardVerifyGet200ResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1GiftcardVerifyGet200ResponseData` + """ + model = SapiV1GiftcardVerifyGet200ResponseData() + if include_optional: + return SapiV1GiftcardVerifyGet200ResponseData( + valid = True, + token = 'BNB', + amount = '0.00000001' + ) + else: + return SapiV1GiftcardVerifyGet200ResponseData( + valid = True, + token = 'BNB', + amount = '0.00000001', + ) + """ + + def testSapiV1GiftcardVerifyGet200ResponseData(self): + """Test SapiV1GiftcardVerifyGet200ResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_all_asset_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_all_asset_get200_response.py new file mode 100644 index 0000000..23f63bd --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_all_asset_get200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_all_asset_get200_response import SapiV1LendingAutoInvestAllAssetGet200Response + +class TestSapiV1LendingAutoInvestAllAssetGet200Response(unittest.TestCase): + """SapiV1LendingAutoInvestAllAssetGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestAllAssetGet200Response: + """Test SapiV1LendingAutoInvestAllAssetGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestAllAssetGet200Response` + """ + model = SapiV1LendingAutoInvestAllAssetGet200Response() + if include_optional: + return SapiV1LendingAutoInvestAllAssetGet200Response( + target_assets = [ + '["BTC","BNB"]' + ], + source_assets = [ + '["BTC","BNB"]' + ] + ) + else: + return SapiV1LendingAutoInvestAllAssetGet200Response( + target_assets = [ + '["BTC","BNB"]' + ], + source_assets = [ + '["BTC","BNB"]' + ], + ) + """ + + def testSapiV1LendingAutoInvestAllAssetGet200Response(self): + """Test SapiV1LendingAutoInvestAllAssetGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_history_list_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_history_list_get200_response_inner.py new file mode 100644 index 0000000..ca04967 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_history_list_get200_response_inner.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_history_list_get200_response_inner import SapiV1LendingAutoInvestHistoryListGet200ResponseInner + +class TestSapiV1LendingAutoInvestHistoryListGet200ResponseInner(unittest.TestCase): + """SapiV1LendingAutoInvestHistoryListGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestHistoryListGet200ResponseInner: + """Test SapiV1LendingAutoInvestHistoryListGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestHistoryListGet200ResponseInner` + """ + model = SapiV1LendingAutoInvestHistoryListGet200ResponseInner() + if include_optional: + return SapiV1LendingAutoInvestHistoryListGet200ResponseInner( + id = 12345, + target_asset = 'BTC', + plan_type = 'SINGLE', + plan_name = 'BTC', + plan_id = 1234, + transaction_date_time = 1648378800000, + transaction_status = 'SUCCESS', + failed_type = 'INSUFFICIENT_BALANCE', + source_asset = 'BUSD', + source_asset_amount = '297.12345', + target_asset_amount = '297.12345', + source_wallet = 'SPOT_WALLET', + flexible_used = 'false', + transaction_fee = '0.002', + transaction_fee_unit = 'BUSD', + execution_price = '2342', + execution_type = 'RECURRING', + subscription_cycle = 'WEEKLY' + ) + else: + return SapiV1LendingAutoInvestHistoryListGet200ResponseInner( + id = 12345, + target_asset = 'BTC', + plan_type = 'SINGLE', + plan_name = 'BTC', + plan_id = 1234, + transaction_date_time = 1648378800000, + transaction_status = 'SUCCESS', + failed_type = 'INSUFFICIENT_BALANCE', + source_asset = 'BUSD', + source_asset_amount = '297.12345', + target_asset_amount = '297.12345', + source_wallet = 'SPOT_WALLET', + flexible_used = 'false', + transaction_fee = '0.002', + transaction_fee_unit = 'BUSD', + execution_price = '2342', + execution_type = 'RECURRING', + subscription_cycle = 'WEEKLY', + ) + """ + + def testSapiV1LendingAutoInvestHistoryListGet200ResponseInner(self): + """Test SapiV1LendingAutoInvestHistoryListGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_info_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_info_get200_response.py new file mode 100644 index 0000000..fb6f775 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_info_get200_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_index_info_get200_response import SapiV1LendingAutoInvestIndexInfoGet200Response + +class TestSapiV1LendingAutoInvestIndexInfoGet200Response(unittest.TestCase): + """SapiV1LendingAutoInvestIndexInfoGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestIndexInfoGet200Response: + """Test SapiV1LendingAutoInvestIndexInfoGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestIndexInfoGet200Response` + """ + model = SapiV1LendingAutoInvestIndexInfoGet200Response() + if include_optional: + return SapiV1LendingAutoInvestIndexInfoGet200Response( + index_id = 1, + index_name = 'BINANCE TOP 10 EW', + status = 'RUNNING', + asset_allocation = [ + openapi_client.models._sapi_v1_lending_auto_invest_index_info_get_200_response_asset_allocation_inner._sapi_v1_lending_auto_invest_index_info_get_200_response_assetAllocation_inner( + target_asset = 'ADA', + allocation = '10', ) + ] + ) + else: + return SapiV1LendingAutoInvestIndexInfoGet200Response( + index_id = 1, + index_name = 'BINANCE TOP 10 EW', + status = 'RUNNING', + asset_allocation = [ + openapi_client.models._sapi_v1_lending_auto_invest_index_info_get_200_response_asset_allocation_inner._sapi_v1_lending_auto_invest_index_info_get_200_response_assetAllocation_inner( + target_asset = 'ADA', + allocation = '10', ) + ], + ) + """ + + def testSapiV1LendingAutoInvestIndexInfoGet200Response(self): + """Test SapiV1LendingAutoInvestIndexInfoGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner.py new file mode 100644 index 0000000..d9fe2ba --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_index_info_get200_response_asset_allocation_inner import SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner + +class TestSapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner(unittest.TestCase): + """SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner: + """Test SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner` + """ + model = SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner() + if include_optional: + return SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner( + target_asset = 'ADA', + allocation = '10' + ) + else: + return SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner( + target_asset = 'ADA', + allocation = '10', + ) + """ + + def testSapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner(self): + """Test SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_user_summary_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_user_summary_get200_response.py new file mode 100644 index 0000000..244d495 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_user_summary_get200_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response import SapiV1LendingAutoInvestIndexUserSummaryGet200Response + +class TestSapiV1LendingAutoInvestIndexUserSummaryGet200Response(unittest.TestCase): + """SapiV1LendingAutoInvestIndexUserSummaryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestIndexUserSummaryGet200Response: + """Test SapiV1LendingAutoInvestIndexUserSummaryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestIndexUserSummaryGet200Response` + """ + model = SapiV1LendingAutoInvestIndexUserSummaryGet200Response() + if include_optional: + return SapiV1LendingAutoInvestIndexUserSummaryGet200Response( + index_id = 1, + total_invested_in_usd = '114.555', + current_invested_in_usd = '101.2', + pnl_in_usd = '101.2', + roi = '1.023', + asset_allocation = [ + openapi_client.models._sapi_v1_lending_auto_invest_index_user_summary_get_200_response_asset_allocation_inner._sapi_v1_lending_auto_invest_index_user_summary_get_200_response_assetAllocation_inner( + target_asset = 'ADA', + allocation = '10', ) + ], + details = [ + openapi_client.models._sapi_v1_lending_auto_invest_index_user_summary_get_200_response_details_inner._sapi_v1_lending_auto_invest_index_user_summary_get_200_response_details_inner( + target_asset = 'ADA', + average_price_in_usd = '3.4', + total_invested_in_usd = '222.21', + current_invested_in_usd = '101.2', + purchased_amount = '122.2', + pnl_in_usd = '109.2', + roi = '0.2', + percentage = '10', + available_amount = '122.12345678', + redeemed_amount = '122', + asset_value_in_usd = '101', ) + ] + ) + else: + return SapiV1LendingAutoInvestIndexUserSummaryGet200Response( + index_id = 1, + total_invested_in_usd = '114.555', + current_invested_in_usd = '101.2', + pnl_in_usd = '101.2', + roi = '1.023', + asset_allocation = [ + openapi_client.models._sapi_v1_lending_auto_invest_index_user_summary_get_200_response_asset_allocation_inner._sapi_v1_lending_auto_invest_index_user_summary_get_200_response_assetAllocation_inner( + target_asset = 'ADA', + allocation = '10', ) + ], + details = [ + openapi_client.models._sapi_v1_lending_auto_invest_index_user_summary_get_200_response_details_inner._sapi_v1_lending_auto_invest_index_user_summary_get_200_response_details_inner( + target_asset = 'ADA', + average_price_in_usd = '3.4', + total_invested_in_usd = '222.21', + current_invested_in_usd = '101.2', + purchased_amount = '122.2', + pnl_in_usd = '109.2', + roi = '0.2', + percentage = '10', + available_amount = '122.12345678', + redeemed_amount = '122', + asset_value_in_usd = '101', ) + ], + ) + """ + + def testSapiV1LendingAutoInvestIndexUserSummaryGet200Response(self): + """Test SapiV1LendingAutoInvestIndexUserSummaryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner.py new file mode 100644 index 0000000..395b996 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response_asset_allocation_inner import SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner + +class TestSapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner(unittest.TestCase): + """SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner: + """Test SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner` + """ + model = SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner() + if include_optional: + return SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner( + target_asset = 'ADA', + allocation = '10' + ) + else: + return SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner( + target_asset = 'ADA', + allocation = '10', + ) + """ + + def testSapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner(self): + """Test SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner.py new file mode 100644 index 0000000..e8aadc3 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_index_user_summary_get200_response_details_inner import SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner + +class TestSapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner(unittest.TestCase): + """SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner: + """Test SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner` + """ + model = SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner() + if include_optional: + return SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner( + target_asset = 'ADA', + average_price_in_usd = '3.4', + total_invested_in_usd = '222.21', + current_invested_in_usd = '101.2', + purchased_amount = '122.2', + pnl_in_usd = '109.2', + roi = '0.2', + percentage = '10', + available_amount = '122.12345678', + redeemed_amount = '122', + asset_value_in_usd = '101' + ) + else: + return SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner( + target_asset = 'ADA', + average_price_in_usd = '3.4', + total_invested_in_usd = '222.21', + current_invested_in_usd = '101.2', + purchased_amount = '122.2', + pnl_in_usd = '109.2', + roi = '0.2', + percentage = '10', + available_amount = '122.12345678', + redeemed_amount = '122', + asset_value_in_usd = '101', + ) + """ + + def testSapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner(self): + """Test SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_one_off_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_one_off_post200_response.py new file mode 100644 index 0000000..b303044 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_one_off_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_post200_response import SapiV1LendingAutoInvestOneOffPost200Response + +class TestSapiV1LendingAutoInvestOneOffPost200Response(unittest.TestCase): + """SapiV1LendingAutoInvestOneOffPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestOneOffPost200Response: + """Test SapiV1LendingAutoInvestOneOffPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestOneOffPost200Response` + """ + model = SapiV1LendingAutoInvestOneOffPost200Response() + if include_optional: + return SapiV1LendingAutoInvestOneOffPost200Response( + transaction_id = 12345, + wait_second = 5 + ) + else: + return SapiV1LendingAutoInvestOneOffPost200Response( + transaction_id = 12345, + wait_second = 5, + ) + """ + + def testSapiV1LendingAutoInvestOneOffPost200Response(self): + """Test SapiV1LendingAutoInvestOneOffPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner.py new file mode 100644 index 0000000..a45bb7c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner import SapiV1LendingAutoInvestOneOffPostDetailsParameterInner + +class TestSapiV1LendingAutoInvestOneOffPostDetailsParameterInner(unittest.TestCase): + """SapiV1LendingAutoInvestOneOffPostDetailsParameterInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestOneOffPostDetailsParameterInner: + """Test SapiV1LendingAutoInvestOneOffPostDetailsParameterInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestOneOffPostDetailsParameterInner` + """ + model = SapiV1LendingAutoInvestOneOffPostDetailsParameterInner() + if include_optional: + return SapiV1LendingAutoInvestOneOffPostDetailsParameterInner( + target_asset = 'BTC', + percentage = 40 + ) + else: + return SapiV1LendingAutoInvestOneOffPostDetailsParameterInner( + ) + """ + + def testSapiV1LendingAutoInvestOneOffPostDetailsParameterInner(self): + """Test SapiV1LendingAutoInvestOneOffPostDetailsParameterInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_one_off_status_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_one_off_status_get200_response.py new file mode 100644 index 0000000..7bae4b1 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_one_off_status_get200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_one_off_status_get200_response import SapiV1LendingAutoInvestOneOffStatusGet200Response + +class TestSapiV1LendingAutoInvestOneOffStatusGet200Response(unittest.TestCase): + """SapiV1LendingAutoInvestOneOffStatusGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestOneOffStatusGet200Response: + """Test SapiV1LendingAutoInvestOneOffStatusGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestOneOffStatusGet200Response` + """ + model = SapiV1LendingAutoInvestOneOffStatusGet200Response() + if include_optional: + return SapiV1LendingAutoInvestOneOffStatusGet200Response( + transaction_id = 12345, + status = 'SUCCESS' + ) + else: + return SapiV1LendingAutoInvestOneOffStatusGet200Response( + transaction_id = 12345, + status = 'SUCCESS', + ) + """ + + def testSapiV1LendingAutoInvestOneOffStatusGet200Response(self): + """Test SapiV1LendingAutoInvestOneOffStatusGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_add_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_add_post200_response.py new file mode 100644 index 0000000..71e48f7 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_add_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_plan_add_post200_response import SapiV1LendingAutoInvestPlanAddPost200Response + +class TestSapiV1LendingAutoInvestPlanAddPost200Response(unittest.TestCase): + """SapiV1LendingAutoInvestPlanAddPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestPlanAddPost200Response: + """Test SapiV1LendingAutoInvestPlanAddPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestPlanAddPost200Response` + """ + model = SapiV1LendingAutoInvestPlanAddPost200Response() + if include_optional: + return SapiV1LendingAutoInvestPlanAddPost200Response( + plan_id = 12345, + next_execution_date_time = 1648378800000 + ) + else: + return SapiV1LendingAutoInvestPlanAddPost200Response( + plan_id = 12345, + next_execution_date_time = 1648378800000, + ) + """ + + def testSapiV1LendingAutoInvestPlanAddPost200Response(self): + """Test SapiV1LendingAutoInvestPlanAddPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner.py new file mode 100644 index 0000000..36dcbcd --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner import SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner + +class TestSapiV1LendingAutoInvestPlanAddPostDetailsParameterInner(unittest.TestCase): + """SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner: + """Test SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner` + """ + model = SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner() + if include_optional: + return SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner( + target_asset = 'BTC', + percentage = 56 + ) + else: + return SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner( + ) + """ + + def testSapiV1LendingAutoInvestPlanAddPostDetailsParameterInner(self): + """Test SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_edit_status_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_edit_status_post200_response.py new file mode 100644 index 0000000..12f18be --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_edit_status_post200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_plan_edit_status_post200_response import SapiV1LendingAutoInvestPlanEditStatusPost200Response + +class TestSapiV1LendingAutoInvestPlanEditStatusPost200Response(unittest.TestCase): + """SapiV1LendingAutoInvestPlanEditStatusPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestPlanEditStatusPost200Response: + """Test SapiV1LendingAutoInvestPlanEditStatusPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestPlanEditStatusPost200Response` + """ + model = SapiV1LendingAutoInvestPlanEditStatusPost200Response() + if include_optional: + return SapiV1LendingAutoInvestPlanEditStatusPost200Response( + plan_id = 12345, + next_execution_date_time = 1648378800000, + status = 'ONGOING' + ) + else: + return SapiV1LendingAutoInvestPlanEditStatusPost200Response( + plan_id = 12345, + next_execution_date_time = 1648378800000, + status = 'ONGOING', + ) + """ + + def testSapiV1LendingAutoInvestPlanEditStatusPost200Response(self): + """Test SapiV1LendingAutoInvestPlanEditStatusPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_id_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_id_get200_response.py new file mode 100644 index 0000000..26bb918 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_id_get200_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response import SapiV1LendingAutoInvestPlanIdGet200Response + +class TestSapiV1LendingAutoInvestPlanIdGet200Response(unittest.TestCase): + """SapiV1LendingAutoInvestPlanIdGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestPlanIdGet200Response: + """Test SapiV1LendingAutoInvestPlanIdGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestPlanIdGet200Response` + """ + model = SapiV1LendingAutoInvestPlanIdGet200Response() + if include_optional: + return SapiV1LendingAutoInvestPlanIdGet200Response( + plan_value_in_usd = '123', + plan_value_in_btc = '0.1', + pnl_in_usd = '120', + roi = '2.3', + plan = [ + openapi_client.models._sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner._sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner( + plan_id = 12345, + plan_type = 'SINGLE', + edit_allowed = 'true', + flexible_allowed_to_use = 'false', + creation_date_time = 1648378800000, + first_execution_date_time = 1648378800000, + next_execution_date_time = 1648378800000, + status = 'ONGOING', + target_asset = 'BTC', + source_asset = 'BUSD', + total_invested_in_usd = '4.555', + plan_value_in_usd = '101.2', + pnl_in_usd = '101.2', + roi = '1.02', + details = [ + openapi_client.models._sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner_details_inner._sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner_details_inner( + target_asset = 'ADA', + average_price_in_usd = '3.4', + total_invested_in_usd = '222.21', + purchased_amount = '122.12345678', + purchased_amount_unit = 'ADA', + pnl_in_usd = '109.2', + roi = '0.1', + percentage = '50', + asset_status = 'ACTIVE', + available_amount = '122.12345678', + available_amount_unit = 'ADA', + redeemed_amout = '122.12345678', + redeemed_amout_unit = 'ADA', + asset_value_in_usd = '101.2', ) + ], ) + ] + ) + else: + return SapiV1LendingAutoInvestPlanIdGet200Response( + ) + """ + + def testSapiV1LendingAutoInvestPlanIdGet200Response(self): + """Test SapiV1LendingAutoInvestPlanIdGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner.py new file mode 100644 index 0000000..b072cb0 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner import SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner + +class TestSapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner(unittest.TestCase): + """SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner: + """Test SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner` + """ + model = SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner() + if include_optional: + return SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner( + plan_id = 12345, + plan_type = 'SINGLE', + edit_allowed = 'true', + flexible_allowed_to_use = 'false', + creation_date_time = 1648378800000, + first_execution_date_time = 1648378800000, + next_execution_date_time = 1648378800000, + status = 'ONGOING', + target_asset = 'BTC', + source_asset = 'BUSD', + total_invested_in_usd = '4.555', + plan_value_in_usd = '101.2', + pnl_in_usd = '101.2', + roi = '1.02', + details = [ + openapi_client.models._sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner_details_inner._sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner_details_inner( + target_asset = 'ADA', + average_price_in_usd = '3.4', + total_invested_in_usd = '222.21', + purchased_amount = '122.12345678', + purchased_amount_unit = 'ADA', + pnl_in_usd = '109.2', + roi = '0.1', + percentage = '50', + asset_status = 'ACTIVE', + available_amount = '122.12345678', + available_amount_unit = 'ADA', + redeemed_amout = '122.12345678', + redeemed_amout_unit = 'ADA', + asset_value_in_usd = '101.2', ) + ] + ) + else: + return SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner( + plan_id = 12345, + plan_type = 'SINGLE', + edit_allowed = 'true', + flexible_allowed_to_use = 'false', + creation_date_time = 1648378800000, + first_execution_date_time = 1648378800000, + next_execution_date_time = 1648378800000, + status = 'ONGOING', + target_asset = 'BTC', + source_asset = 'BUSD', + total_invested_in_usd = '4.555', + plan_value_in_usd = '101.2', + pnl_in_usd = '101.2', + roi = '1.02', + details = [ + openapi_client.models._sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner_details_inner._sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner_details_inner( + target_asset = 'ADA', + average_price_in_usd = '3.4', + total_invested_in_usd = '222.21', + purchased_amount = '122.12345678', + purchased_amount_unit = 'ADA', + pnl_in_usd = '109.2', + roi = '0.1', + percentage = '50', + asset_status = 'ACTIVE', + available_amount = '122.12345678', + available_amount_unit = 'ADA', + redeemed_amout = '122.12345678', + redeemed_amout_unit = 'ADA', + asset_value_in_usd = '101.2', ) + ], + ) + """ + + def testSapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner(self): + """Test SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner.py new file mode 100644 index 0000000..f83dd2b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_plan_id_get200_response_plan_inner_details_inner import SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner + +class TestSapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner(unittest.TestCase): + """SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner: + """Test SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner` + """ + model = SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner() + if include_optional: + return SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner( + target_asset = 'ADA', + average_price_in_usd = '3.4', + total_invested_in_usd = '222.21', + purchased_amount = '122.12345678', + purchased_amount_unit = 'ADA', + pnl_in_usd = '109.2', + roi = '0.1', + percentage = '50', + asset_status = 'ACTIVE', + available_amount = '122.12345678', + available_amount_unit = 'ADA', + redeemed_amout = '122.12345678', + redeemed_amout_unit = 'ADA', + asset_value_in_usd = '101.2' + ) + else: + return SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner( + target_asset = 'ADA', + average_price_in_usd = '3.4', + total_invested_in_usd = '222.21', + purchased_amount = '122.12345678', + purchased_amount_unit = 'ADA', + pnl_in_usd = '109.2', + roi = '0.1', + percentage = '50', + asset_status = 'ACTIVE', + available_amount = '122.12345678', + available_amount_unit = 'ADA', + redeemed_amout = '122.12345678', + redeemed_amout_unit = 'ADA', + asset_value_in_usd = '101.2', + ) + """ + + def testSapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner(self): + """Test SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_list_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_list_get200_response.py new file mode 100644 index 0000000..f71b2bc --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_list_get200_response.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_plan_list_get200_response import SapiV1LendingAutoInvestPlanListGet200Response + +class TestSapiV1LendingAutoInvestPlanListGet200Response(unittest.TestCase): + """SapiV1LendingAutoInvestPlanListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestPlanListGet200Response: + """Test SapiV1LendingAutoInvestPlanListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestPlanListGet200Response` + """ + model = SapiV1LendingAutoInvestPlanListGet200Response() + if include_optional: + return SapiV1LendingAutoInvestPlanListGet200Response( + plan_value_in_usd = '123', + plan_value_in_btc = '0.1', + pnl_in_usd = '120', + roi = '2.3', + plan = [ + openapi_client.models._sapi_v1_lending_auto_invest_plan_list_get_200_response_plan_inner._sapi_v1_lending_auto_invest_plan_list_get_200_response_plan_inner( + plan_id = 12345, + plan_type = 'SINGLE', + edit_allowed = 'true', + creation_date_time = 1648378800000, + first_execution_date_time = 1648378800000, + next_execution_date_time = 1648378800000, + status = 'ONGOING', + last_updated_date_time = 1648378800000, + target_asset = 'BTC', + total_target_amount = '0.111', + source_asset = 'BUSD', + total_invested_in_usd = '4.555', + subscription_amount = '0.1', + subscription_cycle = 'WEEKLY', + subscription_start_day = '1', + subscription_start_weekday = 'MON', + subscription_start_time = '1', + source_wallet = 'SPOT_WALLET', + flexible_allowed_to_use = 'false', + plan_value_in_usd = '101.2', + pnl_in_usd = '101.2', + roi = '1.02', ) + ] + ) + else: + return SapiV1LendingAutoInvestPlanListGet200Response( + plan_value_in_usd = '123', + plan_value_in_btc = '0.1', + pnl_in_usd = '120', + roi = '2.3', + plan = [ + openapi_client.models._sapi_v1_lending_auto_invest_plan_list_get_200_response_plan_inner._sapi_v1_lending_auto_invest_plan_list_get_200_response_plan_inner( + plan_id = 12345, + plan_type = 'SINGLE', + edit_allowed = 'true', + creation_date_time = 1648378800000, + first_execution_date_time = 1648378800000, + next_execution_date_time = 1648378800000, + status = 'ONGOING', + last_updated_date_time = 1648378800000, + target_asset = 'BTC', + total_target_amount = '0.111', + source_asset = 'BUSD', + total_invested_in_usd = '4.555', + subscription_amount = '0.1', + subscription_cycle = 'WEEKLY', + subscription_start_day = '1', + subscription_start_weekday = 'MON', + subscription_start_time = '1', + source_wallet = 'SPOT_WALLET', + flexible_allowed_to_use = 'false', + plan_value_in_usd = '101.2', + pnl_in_usd = '101.2', + roi = '1.02', ) + ], + ) + """ + + def testSapiV1LendingAutoInvestPlanListGet200Response(self): + """Test SapiV1LendingAutoInvestPlanListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner.py new file mode 100644 index 0000000..0af6d78 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_plan_list_get200_response_plan_inner import SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner + +class TestSapiV1LendingAutoInvestPlanListGet200ResponsePlanInner(unittest.TestCase): + """SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner: + """Test SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner` + """ + model = SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner() + if include_optional: + return SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner( + plan_id = 12345, + plan_type = 'SINGLE', + edit_allowed = 'true', + creation_date_time = 1648378800000, + first_execution_date_time = 1648378800000, + next_execution_date_time = 1648378800000, + status = 'ONGOING', + last_updated_date_time = 1648378800000, + target_asset = 'BTC', + total_target_amount = '0.111', + source_asset = 'BUSD', + total_invested_in_usd = '4.555', + subscription_amount = '0.1', + subscription_cycle = 'WEEKLY', + subscription_start_day = '1', + subscription_start_weekday = 'MON', + subscription_start_time = '1', + source_wallet = 'SPOT_WALLET', + flexible_allowed_to_use = 'false', + plan_value_in_usd = '101.2', + pnl_in_usd = '101.2', + roi = '1.02' + ) + else: + return SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner( + plan_id = 12345, + plan_type = 'SINGLE', + edit_allowed = 'true', + creation_date_time = 1648378800000, + first_execution_date_time = 1648378800000, + next_execution_date_time = 1648378800000, + status = 'ONGOING', + last_updated_date_time = 1648378800000, + target_asset = 'BTC', + total_target_amount = '0.111', + source_asset = 'BUSD', + total_invested_in_usd = '4.555', + subscription_amount = '0.1', + subscription_cycle = 'WEEKLY', + subscription_start_day = '1', + subscription_start_weekday = 'MON', + subscription_start_time = '1', + source_wallet = 'SPOT_WALLET', + flexible_allowed_to_use = 'false', + plan_value_in_usd = '101.2', + pnl_in_usd = '101.2', + roi = '1.02', + ) + """ + + def testSapiV1LendingAutoInvestPlanListGet200ResponsePlanInner(self): + """Test SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner.py new file mode 100644 index 0000000..626b811 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner import SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner + +class TestSapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner(unittest.TestCase): + """SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner: + """Test SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner` + """ + model = SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner() + if include_optional: + return SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner( + index_id = 1, + index_name = 'BINANCE TOP 10 EW', + rebalance_id = 11, + status = 'SUCCESS', + rebalance_fee = '10', + rebalance_fee_unit = 'USDT', + transaction_details = [ + openapi_client.models._sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner_transaction_details_inner._sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner_transactionDetails_inner( + asset = 'BTC', + transaction_date_time = 1648378800000, + rebalance_direction = 'BUY', + rebalance_amount = '0.005', ) + ] + ) + else: + return SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner( + index_id = 1, + index_name = 'BINANCE TOP 10 EW', + rebalance_id = 11, + status = 'SUCCESS', + rebalance_fee = '10', + rebalance_fee_unit = 'USDT', + transaction_details = [ + openapi_client.models._sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner_transaction_details_inner._sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner_transactionDetails_inner( + asset = 'BTC', + transaction_date_time = 1648378800000, + rebalance_direction = 'BUY', + rebalance_amount = '0.005', ) + ], + ) + """ + + def testSapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner(self): + """Test SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner.py new file mode 100644 index 0000000..7e4aeb6 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_rebalance_history_get200_response_inner_transaction_details_inner import SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner + +class TestSapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner(unittest.TestCase): + """SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner: + """Test SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner` + """ + model = SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner() + if include_optional: + return SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner( + asset = 'BTC', + transaction_date_time = 1648378800000, + rebalance_direction = 'BUY', + rebalance_amount = '0.005' + ) + else: + return SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner( + asset = 'BTC', + transaction_date_time = 1648378800000, + rebalance_direction = 'BUY', + rebalance_amount = '0.005', + ) + """ + + def testSapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner(self): + """Test SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_redeem_history_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_redeem_history_get200_response_inner.py new file mode 100644 index 0000000..122f063 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_redeem_history_get200_response_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_redeem_history_get200_response_inner import SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner + +class TestSapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner(unittest.TestCase): + """SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner: + """Test SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner` + """ + model = SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner() + if include_optional: + return SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner( + index_id = 1, + index_name = 'BINANCE TOP 10 EW', + redemption_id = 11, + status = 'SUCCESS', + asset = 'BTC', + amount = '0.005', + redemption_date_time = 1648378800000, + transaction_fee = '0', + transaction_fee_unit = 'USDT' + ) + else: + return SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner( + index_id = 1, + index_name = 'BINANCE TOP 10 EW', + redemption_id = 11, + status = 'SUCCESS', + asset = 'BTC', + amount = '0.005', + redemption_date_time = 1648378800000, + transaction_fee = '0', + transaction_fee_unit = 'USDT', + ) + """ + + def testSapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner(self): + """Test SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_redeem_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_redeem_post200_response.py new file mode 100644 index 0000000..890d1c6 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_redeem_post200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_redeem_post200_response import SapiV1LendingAutoInvestRedeemPost200Response + +class TestSapiV1LendingAutoInvestRedeemPost200Response(unittest.TestCase): + """SapiV1LendingAutoInvestRedeemPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestRedeemPost200Response: + """Test SapiV1LendingAutoInvestRedeemPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestRedeemPost200Response` + """ + model = SapiV1LendingAutoInvestRedeemPost200Response() + if include_optional: + return SapiV1LendingAutoInvestRedeemPost200Response( + redemption_id = 12345 + ) + else: + return SapiV1LendingAutoInvestRedeemPost200Response( + redemption_id = 12345, + ) + """ + + def testSapiV1LendingAutoInvestRedeemPost200Response(self): + """Test SapiV1LendingAutoInvestRedeemPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_source_asset_list_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_source_asset_list_get200_response.py new file mode 100644 index 0000000..7f8f92f --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_source_asset_list_get200_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_source_asset_list_get200_response import SapiV1LendingAutoInvestSourceAssetListGet200Response + +class TestSapiV1LendingAutoInvestSourceAssetListGet200Response(unittest.TestCase): + """SapiV1LendingAutoInvestSourceAssetListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestSourceAssetListGet200Response: + """Test SapiV1LendingAutoInvestSourceAssetListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestSourceAssetListGet200Response` + """ + model = SapiV1LendingAutoInvestSourceAssetListGet200Response() + if include_optional: + return SapiV1LendingAutoInvestSourceAssetListGet200Response( + fee_rate = '0.002', + source_assets = [ + openapi_client.models._sapi_v1_lending_auto_invest_source_asset_list_get_200_response_source_assets_inner._sapi_v1_lending_auto_invest_source_asset_list_get_200_response_sourceAssets_inner( + source_asset = 'USDT', + asset_min_amount = '0.1', + asset_max_amount = '1000000', + scale = '2', + flexible_amount = '1111', ) + ] + ) + else: + return SapiV1LendingAutoInvestSourceAssetListGet200Response( + fee_rate = '0.002', + source_assets = [ + openapi_client.models._sapi_v1_lending_auto_invest_source_asset_list_get_200_response_source_assets_inner._sapi_v1_lending_auto_invest_source_asset_list_get_200_response_sourceAssets_inner( + source_asset = 'USDT', + asset_min_amount = '0.1', + asset_max_amount = '1000000', + scale = '2', + flexible_amount = '1111', ) + ], + ) + """ + + def testSapiV1LendingAutoInvestSourceAssetListGet200Response(self): + """Test SapiV1LendingAutoInvestSourceAssetListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner.py new file mode 100644 index 0000000..4baefe9 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_source_asset_list_get200_response_source_assets_inner import SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner + +class TestSapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner(unittest.TestCase): + """SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner: + """Test SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner` + """ + model = SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner() + if include_optional: + return SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner( + source_asset = 'USDT', + asset_min_amount = '0.1', + asset_max_amount = '1000000', + scale = '2', + flexible_amount = '1111' + ) + else: + return SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner( + source_asset = 'USDT', + asset_min_amount = '0.1', + asset_max_amount = '1000000', + scale = '2', + flexible_amount = '1111', + ) + """ + + def testSapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner(self): + """Test SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_list_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_list_get200_response.py new file mode 100644 index 0000000..b2463e8 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_list_get200_response.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response import SapiV1LendingAutoInvestTargetAssetListGet200Response + +class TestSapiV1LendingAutoInvestTargetAssetListGet200Response(unittest.TestCase): + """SapiV1LendingAutoInvestTargetAssetListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestTargetAssetListGet200Response: + """Test SapiV1LendingAutoInvestTargetAssetListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestTargetAssetListGet200Response` + """ + model = SapiV1LendingAutoInvestTargetAssetListGet200Response() + if include_optional: + return SapiV1LendingAutoInvestTargetAssetListGet200Response( + target_assets = 'BTC', + auto_invest_asset_list = [ + openapi_client.models._sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner._sapi_v1_lending_auto_invest_target_asset_list_get_200_response_autoInvestAssetList_inner( + target_asset = 'BTC', + roi_and_dimension_type_list = [ + openapi_client.models._sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner._sapi_v1_lending_auto_invest_target_asset_list_get_200_response_autoInvestAssetList_inner_roiAndDimensionTypeList_inner( + simulate_roi = '5.004', + dimension_value = '3', + dimension_unit = 'year', ) + ], ) + ] + ) + else: + return SapiV1LendingAutoInvestTargetAssetListGet200Response( + ) + """ + + def testSapiV1LendingAutoInvestTargetAssetListGet200Response(self): + """Test SapiV1LendingAutoInvestTargetAssetListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner.py new file mode 100644 index 0000000..69b3546 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner import SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner + +class TestSapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner(unittest.TestCase): + """SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner: + """Test SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner` + """ + model = SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner() + if include_optional: + return SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner( + target_asset = 'BTC', + roi_and_dimension_type_list = [ + openapi_client.models._sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner._sapi_v1_lending_auto_invest_target_asset_list_get_200_response_autoInvestAssetList_inner_roiAndDimensionTypeList_inner( + simulate_roi = '5.004', + dimension_value = '3', + dimension_unit = 'year', ) + ] + ) + else: + return SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner( + target_asset = 'BTC', + roi_and_dimension_type_list = [ + openapi_client.models._sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner._sapi_v1_lending_auto_invest_target_asset_list_get_200_response_autoInvestAssetList_inner_roiAndDimensionTypeList_inner( + simulate_roi = '5.004', + dimension_value = '3', + dimension_unit = 'year', ) + ], + ) + """ + + def testSapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner(self): + """Test SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner.py new file mode 100644 index 0000000..626baa1 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_list_get200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner import SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner + +class TestSapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner(unittest.TestCase): + """SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner: + """Test SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner` + """ + model = SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner() + if include_optional: + return SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner( + simulate_roi = '5.004', + dimension_value = '3', + dimension_unit = 'year' + ) + else: + return SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner( + simulate_roi = '5.004', + dimension_value = '3', + dimension_unit = 'year', + ) + """ + + def testSapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner(self): + """Test SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner.py new file mode 100644 index 0000000..013713c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_auto_invest_target_asset_roi_list_get200_response_inner import SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner + +class TestSapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner(unittest.TestCase): + """SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner: + """Test SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner` + """ + model = SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner() + if include_optional: + return SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner( + var_date = '1648378800000', + simulate_roi = '1.75' + ) + else: + return SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner( + var_date = '1648378800000', + simulate_roi = '1.75', + ) + """ + + def testSapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner(self): + """Test SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_customized_fixed_purchase_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_lending_customized_fixed_purchase_post200_response.py new file mode 100644 index 0000000..06bb924 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_customized_fixed_purchase_post200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_customized_fixed_purchase_post200_response import SapiV1LendingCustomizedFixedPurchasePost200Response + +class TestSapiV1LendingCustomizedFixedPurchasePost200Response(unittest.TestCase): + """SapiV1LendingCustomizedFixedPurchasePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingCustomizedFixedPurchasePost200Response: + """Test SapiV1LendingCustomizedFixedPurchasePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingCustomizedFixedPurchasePost200Response` + """ + model = SapiV1LendingCustomizedFixedPurchasePost200Response() + if include_optional: + return SapiV1LendingCustomizedFixedPurchasePost200Response( + purchase_id = '18356' + ) + else: + return SapiV1LendingCustomizedFixedPurchasePost200Response( + purchase_id = '18356', + ) + """ + + def testSapiV1LendingCustomizedFixedPurchasePost200Response(self): + """Test SapiV1LendingCustomizedFixedPurchasePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_position_changed_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_lending_position_changed_post200_response.py new file mode 100644 index 0000000..aaadae2 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_position_changed_post200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_position_changed_post200_response import SapiV1LendingPositionChangedPost200Response + +class TestSapiV1LendingPositionChangedPost200Response(unittest.TestCase): + """SapiV1LendingPositionChangedPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingPositionChangedPost200Response: + """Test SapiV1LendingPositionChangedPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingPositionChangedPost200Response` + """ + model = SapiV1LendingPositionChangedPost200Response() + if include_optional: + return SapiV1LendingPositionChangedPost200Response( + daily_purchase_id = 862290, + success = True, + time = 1577233578000 + ) + else: + return SapiV1LendingPositionChangedPost200Response( + daily_purchase_id = 862290, + success = True, + time = 1577233578000, + ) + """ + + def testSapiV1LendingPositionChangedPost200Response(self): + """Test SapiV1LendingPositionChangedPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_project_list_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_project_list_get200_response_inner.py new file mode 100644 index 0000000..f162c07 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_project_list_get200_response_inner.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_project_list_get200_response_inner import SapiV1LendingProjectListGet200ResponseInner + +class TestSapiV1LendingProjectListGet200ResponseInner(unittest.TestCase): + """SapiV1LendingProjectListGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingProjectListGet200ResponseInner: + """Test SapiV1LendingProjectListGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingProjectListGet200ResponseInner` + """ + model = SapiV1LendingProjectListGet200ResponseInner() + if include_optional: + return SapiV1LendingProjectListGet200ResponseInner( + asset = 'USDT', + display_priority = 1, + duration = 90, + interest_per_lot = '1.35810000', + interest_rate = '0.05510000', + lot_size = '100.00000000', + lots_low_limit = 1, + lots_purchased = 74155, + lots_up_limit = 80000, + max_lots_per_user = 2000, + need_kyc = True, + project_id = 'CUSDT90DAYSS001', + project_name = 'USDT', + status = 'PURCHASING', + type = 'CUSTOMIZED_FIXED', + with_area_limitation = True + ) + else: + return SapiV1LendingProjectListGet200ResponseInner( + asset = 'USDT', + display_priority = 1, + duration = 90, + interest_per_lot = '1.35810000', + interest_rate = '0.05510000', + lot_size = '100.00000000', + lots_low_limit = 1, + lots_purchased = 74155, + lots_up_limit = 80000, + max_lots_per_user = 2000, + need_kyc = True, + project_id = 'CUSDT90DAYSS001', + project_name = 'USDT', + status = 'PURCHASING', + type = 'CUSTOMIZED_FIXED', + with_area_limitation = True, + ) + """ + + def testSapiV1LendingProjectListGet200ResponseInner(self): + """Test SapiV1LendingProjectListGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_lending_project_position_list_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_lending_project_position_list_get200_response_inner.py new file mode 100644 index 0000000..814a852 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_lending_project_position_list_get200_response_inner.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_lending_project_position_list_get200_response_inner import SapiV1LendingProjectPositionListGet200ResponseInner + +class TestSapiV1LendingProjectPositionListGet200ResponseInner(unittest.TestCase): + """SapiV1LendingProjectPositionListGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LendingProjectPositionListGet200ResponseInner: + """Test SapiV1LendingProjectPositionListGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LendingProjectPositionListGet200ResponseInner` + """ + model = SapiV1LendingProjectPositionListGet200ResponseInner() + if include_optional: + return SapiV1LendingProjectPositionListGet200ResponseInner( + asset = 'USDT', + can_transfer = True, + create_timestamp = 1587010770000, + duration = 14, + end_time = 1588291200000, + interest = '0.19950000', + interest_rate = '0.05201250', + lot = 1, + position_id = 51724, + principal = '100.00000000', + project_id = 'CUSDT14DAYSS001', + project_name = 'USDT', + purchase_time = 1587010771000, + redeem_date = 'Fri May 01 08:00:00 WITA 2020', + start_time = 1587081600000, + status = 'HOLDING', + type = 'CUSTOMIZED_FIXED' + ) + else: + return SapiV1LendingProjectPositionListGet200ResponseInner( + asset = 'USDT', + can_transfer = True, + create_timestamp = 1587010770000, + duration = 14, + end_time = 1588291200000, + interest = '0.19950000', + interest_rate = '0.05201250', + lot = 1, + position_id = 51724, + principal = '100.00000000', + project_id = 'CUSDT14DAYSS001', + project_name = 'USDT', + purchase_time = 1587010771000, + redeem_date = 'Fri May 01 08:00:00 WITA 2020', + start_time = 1587081600000, + status = 'HOLDING', + type = 'CUSTOMIZED_FIXED', + ) + """ + + def testSapiV1LendingProjectPositionListGet200ResponseInner(self): + """Test SapiV1LendingProjectPositionListGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_adjust_ltv_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_adjust_ltv_post200_response.py new file mode 100644 index 0000000..0f33c69 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_adjust_ltv_post200_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_adjust_ltv_post200_response import SapiV1LoanAdjustLtvPost200Response + +class TestSapiV1LoanAdjustLtvPost200Response(unittest.TestCase): + """SapiV1LoanAdjustLtvPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanAdjustLtvPost200Response: + """Test SapiV1LoanAdjustLtvPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanAdjustLtvPost200Response` + """ + model = SapiV1LoanAdjustLtvPost200Response() + if include_optional: + return SapiV1LoanAdjustLtvPost200Response( + loan_coin = 'BUSD', + collateral_coin = 'BNB', + direction = 'ADDITIONAL', + amount = '5.235', + current_ltv = '0.52' + ) + else: + return SapiV1LoanAdjustLtvPost200Response( + loan_coin = 'BUSD', + collateral_coin = 'BNB', + direction = 'ADDITIONAL', + amount = '5.235', + current_ltv = '0.52', + ) + """ + + def testSapiV1LoanAdjustLtvPost200Response(self): + """Test SapiV1LoanAdjustLtvPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_borrow_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_borrow_history_get200_response.py new file mode 100644 index 0000000..5f35a22 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_borrow_history_get200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_borrow_history_get200_response import SapiV1LoanBorrowHistoryGet200Response + +class TestSapiV1LoanBorrowHistoryGet200Response(unittest.TestCase): + """SapiV1LoanBorrowHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanBorrowHistoryGet200Response: + """Test SapiV1LoanBorrowHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanBorrowHistoryGet200Response` + """ + model = SapiV1LoanBorrowHistoryGet200Response() + if include_optional: + return SapiV1LoanBorrowHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_borrow_history_get_200_response_rows_inner._sapi_v1_loan_borrow_history_get_200_response_rows_inner( + order_id = 100000001, + loan_coin = 'BUSD', + initial_loan_amount = '10000', + hourly_interest_rate = '0.000057', + loan_term = '7', + collateral_coin = 'BNB', + initial_collateral_amount = '49.27565492', + borrow_time = 1575018510000, + status = 'Accruing_Interest, Overdue, Liquidating, Repaying, Repaid, Liquidated, Pending, Failed', ) + ], + total = 1 + ) + else: + return SapiV1LoanBorrowHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_borrow_history_get_200_response_rows_inner._sapi_v1_loan_borrow_history_get_200_response_rows_inner( + order_id = 100000001, + loan_coin = 'BUSD', + initial_loan_amount = '10000', + hourly_interest_rate = '0.000057', + loan_term = '7', + collateral_coin = 'BNB', + initial_collateral_amount = '49.27565492', + borrow_time = 1575018510000, + status = 'Accruing_Interest, Overdue, Liquidating, Repaying, Repaid, Liquidated, Pending, Failed', ) + ], + total = 1, + ) + """ + + def testSapiV1LoanBorrowHistoryGet200Response(self): + """Test SapiV1LoanBorrowHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_borrow_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_borrow_history_get200_response_rows_inner.py new file mode 100644 index 0000000..5791f83 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_borrow_history_get200_response_rows_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_borrow_history_get200_response_rows_inner import SapiV1LoanBorrowHistoryGet200ResponseRowsInner + +class TestSapiV1LoanBorrowHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1LoanBorrowHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanBorrowHistoryGet200ResponseRowsInner: + """Test SapiV1LoanBorrowHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanBorrowHistoryGet200ResponseRowsInner` + """ + model = SapiV1LoanBorrowHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1LoanBorrowHistoryGet200ResponseRowsInner( + order_id = 100000001, + loan_coin = 'BUSD', + initial_loan_amount = '10000', + hourly_interest_rate = '0.000057', + loan_term = '7', + collateral_coin = 'BNB', + initial_collateral_amount = '49.27565492', + borrow_time = 1575018510000, + status = 'Accruing_Interest, Overdue, Liquidating, Repaying, Repaid, Liquidated, Pending, Failed' + ) + else: + return SapiV1LoanBorrowHistoryGet200ResponseRowsInner( + order_id = 100000001, + loan_coin = 'BUSD', + initial_loan_amount = '10000', + hourly_interest_rate = '0.000057', + loan_term = '7', + collateral_coin = 'BNB', + initial_collateral_amount = '49.27565492', + borrow_time = 1575018510000, + status = 'Accruing_Interest, Overdue, Liquidating, Repaying, Repaid, Liquidated, Pending, Failed', + ) + """ + + def testSapiV1LoanBorrowHistoryGet200ResponseRowsInner(self): + """Test SapiV1LoanBorrowHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_borrow_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_borrow_post200_response.py new file mode 100644 index 0000000..979e02d --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_borrow_post200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_borrow_post200_response import SapiV1LoanBorrowPost200Response + +class TestSapiV1LoanBorrowPost200Response(unittest.TestCase): + """SapiV1LoanBorrowPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanBorrowPost200Response: + """Test SapiV1LoanBorrowPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanBorrowPost200Response` + """ + model = SapiV1LoanBorrowPost200Response() + if include_optional: + return SapiV1LoanBorrowPost200Response( + loan_coin = 'BUSD', + loan_amount = '100.5', + collateral_coin = 'BNB', + collateral_amount = '50.5', + hourly_interest_rate = '0.001234', + order_id = '100000001' + ) + else: + return SapiV1LoanBorrowPost200Response( + loan_coin = 'BUSD', + loan_amount = '100.5', + collateral_coin = 'BNB', + collateral_amount = '50.5', + hourly_interest_rate = '0.001234', + order_id = '100000001', + ) + """ + + def testSapiV1LoanBorrowPost200Response(self): + """Test SapiV1LoanBorrowPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_collateral_data_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_collateral_data_get200_response.py new file mode 100644 index 0000000..7e7b313 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_collateral_data_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_collateral_data_get200_response import SapiV1LoanCollateralDataGet200Response + +class TestSapiV1LoanCollateralDataGet200Response(unittest.TestCase): + """SapiV1LoanCollateralDataGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanCollateralDataGet200Response: + """Test SapiV1LoanCollateralDataGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanCollateralDataGet200Response` + """ + model = SapiV1LoanCollateralDataGet200Response() + if include_optional: + return SapiV1LoanCollateralDataGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_collateral_data_get_200_response_rows_inner._sapi_v1_loan_collateral_data_get_200_response_rows_inner( + collateral_coin = 'BNB', + initial_ltv = '0.65', + margin_call_ltv = '0.75', + liquidation_ltv = '0.83', + max_limit = '1000000', + vip_level = 1, ) + ], + total = 1 + ) + else: + return SapiV1LoanCollateralDataGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_collateral_data_get_200_response_rows_inner._sapi_v1_loan_collateral_data_get_200_response_rows_inner( + collateral_coin = 'BNB', + initial_ltv = '0.65', + margin_call_ltv = '0.75', + liquidation_ltv = '0.83', + max_limit = '1000000', + vip_level = 1, ) + ], + total = 1, + ) + """ + + def testSapiV1LoanCollateralDataGet200Response(self): + """Test SapiV1LoanCollateralDataGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_collateral_data_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_collateral_data_get200_response_rows_inner.py new file mode 100644 index 0000000..08ae1ef --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_collateral_data_get200_response_rows_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_collateral_data_get200_response_rows_inner import SapiV1LoanCollateralDataGet200ResponseRowsInner + +class TestSapiV1LoanCollateralDataGet200ResponseRowsInner(unittest.TestCase): + """SapiV1LoanCollateralDataGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanCollateralDataGet200ResponseRowsInner: + """Test SapiV1LoanCollateralDataGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanCollateralDataGet200ResponseRowsInner` + """ + model = SapiV1LoanCollateralDataGet200ResponseRowsInner() + if include_optional: + return SapiV1LoanCollateralDataGet200ResponseRowsInner( + collateral_coin = 'BNB', + initial_ltv = '0.65', + margin_call_ltv = '0.75', + liquidation_ltv = '0.83', + max_limit = '1000000', + vip_level = 1 + ) + else: + return SapiV1LoanCollateralDataGet200ResponseRowsInner( + collateral_coin = 'BNB', + initial_ltv = '0.65', + margin_call_ltv = '0.75', + liquidation_ltv = '0.83', + max_limit = '1000000', + vip_level = 1, + ) + """ + + def testSapiV1LoanCollateralDataGet200ResponseRowsInner(self): + """Test SapiV1LoanCollateralDataGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_customize_margin_call_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_customize_margin_call_post200_response.py new file mode 100644 index 0000000..d38f83e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_customize_margin_call_post200_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_customize_margin_call_post200_response import SapiV1LoanCustomizeMarginCallPost200Response + +class TestSapiV1LoanCustomizeMarginCallPost200Response(unittest.TestCase): + """SapiV1LoanCustomizeMarginCallPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanCustomizeMarginCallPost200Response: + """Test SapiV1LoanCustomizeMarginCallPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanCustomizeMarginCallPost200Response` + """ + model = SapiV1LoanCustomizeMarginCallPost200Response() + if include_optional: + return SapiV1LoanCustomizeMarginCallPost200Response( + rows = [ + openapi_client.models._sapi_v1_loan_customize_margin_call_post_200_response_rows_inner._sapi_v1_loan_customize_margin_call_post_200_response_rows_inner( + order_id = '100000001', + collateral_coin = 'BNB', + pre_margin_call = '0.8', + after_margin_call = '0.7', + customize_time = 1575018510000, ) + ], + total = 1 + ) + else: + return SapiV1LoanCustomizeMarginCallPost200Response( + rows = [ + openapi_client.models._sapi_v1_loan_customize_margin_call_post_200_response_rows_inner._sapi_v1_loan_customize_margin_call_post_200_response_rows_inner( + order_id = '100000001', + collateral_coin = 'BNB', + pre_margin_call = '0.8', + after_margin_call = '0.7', + customize_time = 1575018510000, ) + ], + total = 1, + ) + """ + + def testSapiV1LoanCustomizeMarginCallPost200Response(self): + """Test SapiV1LoanCustomizeMarginCallPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_customize_margin_call_post200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_customize_margin_call_post200_response_rows_inner.py new file mode 100644 index 0000000..ad1ed17 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_customize_margin_call_post200_response_rows_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_customize_margin_call_post200_response_rows_inner import SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner + +class TestSapiV1LoanCustomizeMarginCallPost200ResponseRowsInner(unittest.TestCase): + """SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner: + """Test SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner` + """ + model = SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner() + if include_optional: + return SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner( + order_id = '100000001', + collateral_coin = 'BNB', + pre_margin_call = '0.8', + after_margin_call = '0.7', + customize_time = 1575018510000 + ) + else: + return SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner( + order_id = '100000001', + collateral_coin = 'BNB', + pre_margin_call = '0.8', + after_margin_call = '0.7', + customize_time = 1575018510000, + ) + """ + + def testSapiV1LoanCustomizeMarginCallPost200ResponseRowsInner(self): + """Test SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_income_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_income_get200_response_inner.py new file mode 100644 index 0000000..7081d3b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_income_get200_response_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_income_get200_response_inner import SapiV1LoanIncomeGet200ResponseInner + +class TestSapiV1LoanIncomeGet200ResponseInner(unittest.TestCase): + """SapiV1LoanIncomeGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanIncomeGet200ResponseInner: + """Test SapiV1LoanIncomeGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanIncomeGet200ResponseInner` + """ + model = SapiV1LoanIncomeGet200ResponseInner() + if include_optional: + return SapiV1LoanIncomeGet200ResponseInner( + asset = 'BUSD', + type = 'borrowIn', + amount = '100', + timestamp = 1633771139847, + tran_id = '80423589583' + ) + else: + return SapiV1LoanIncomeGet200ResponseInner( + asset = 'BUSD', + type = 'borrowIn', + amount = '100', + timestamp = 1633771139847, + tran_id = '80423589583', + ) + """ + + def testSapiV1LoanIncomeGet200ResponseInner(self): + """Test SapiV1LoanIncomeGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_loanable_data_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_loanable_data_get200_response.py new file mode 100644 index 0000000..cbeab3c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_loanable_data_get200_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_loanable_data_get200_response import SapiV1LoanLoanableDataGet200Response + +class TestSapiV1LoanLoanableDataGet200Response(unittest.TestCase): + """SapiV1LoanLoanableDataGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanLoanableDataGet200Response: + """Test SapiV1LoanLoanableDataGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanLoanableDataGet200Response` + """ + model = SapiV1LoanLoanableDataGet200Response() + if include_optional: + return SapiV1LoanLoanableDataGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_loanable_data_get_200_response_rows_inner._sapi_v1_loan_loanable_data_get_200_response_rows_inner( + loan_coin = 'BUSD', + _7d_hourly_interest_rate = '0.00000491', + _7d_daily_interest_rate = '0.000118', + _14d_hourly_interest_rate = '0.00000491', + _14d_daily_interest_rate = '0.000118', + _30d_hourly_interest_rate = '0.00000567', + _30d_daily_interest_rate = '0.000136', + _90d_hourly_interest_rate = '0.00000596', + _90d_daily_interest_rate = '0.000143', + _180d_hourly_interest_rate = '0.00000631', + _180d_daily_interest_rate = '0.000151', + min_limit = '100', + max_limit = '1000000', + vip_level = 1, ) + ], + total = 1 + ) + else: + return SapiV1LoanLoanableDataGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_loanable_data_get_200_response_rows_inner._sapi_v1_loan_loanable_data_get_200_response_rows_inner( + loan_coin = 'BUSD', + _7d_hourly_interest_rate = '0.00000491', + _7d_daily_interest_rate = '0.000118', + _14d_hourly_interest_rate = '0.00000491', + _14d_daily_interest_rate = '0.000118', + _30d_hourly_interest_rate = '0.00000567', + _30d_daily_interest_rate = '0.000136', + _90d_hourly_interest_rate = '0.00000596', + _90d_daily_interest_rate = '0.000143', + _180d_hourly_interest_rate = '0.00000631', + _180d_daily_interest_rate = '0.000151', + min_limit = '100', + max_limit = '1000000', + vip_level = 1, ) + ], + total = 1, + ) + """ + + def testSapiV1LoanLoanableDataGet200Response(self): + """Test SapiV1LoanLoanableDataGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_loanable_data_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_loanable_data_get200_response_rows_inner.py new file mode 100644 index 0000000..a5f0b1b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_loanable_data_get200_response_rows_inner.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_loanable_data_get200_response_rows_inner import SapiV1LoanLoanableDataGet200ResponseRowsInner + +class TestSapiV1LoanLoanableDataGet200ResponseRowsInner(unittest.TestCase): + """SapiV1LoanLoanableDataGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanLoanableDataGet200ResponseRowsInner: + """Test SapiV1LoanLoanableDataGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanLoanableDataGet200ResponseRowsInner` + """ + model = SapiV1LoanLoanableDataGet200ResponseRowsInner() + if include_optional: + return SapiV1LoanLoanableDataGet200ResponseRowsInner( + loan_coin = 'BUSD', + var_7d_hourly_interest_rate = '0.00000491', + var_7d_daily_interest_rate = '0.000118', + var_14d_hourly_interest_rate = '0.00000491', + var_14d_daily_interest_rate = '0.000118', + var_30d_hourly_interest_rate = '0.00000567', + var_30d_daily_interest_rate = '0.000136', + var_90d_hourly_interest_rate = '0.00000596', + var_90d_daily_interest_rate = '0.000143', + var_180d_hourly_interest_rate = '0.00000631', + var_180d_daily_interest_rate = '0.000151', + min_limit = '100', + max_limit = '1000000', + vip_level = 1 + ) + else: + return SapiV1LoanLoanableDataGet200ResponseRowsInner( + loan_coin = 'BUSD', + var_7d_hourly_interest_rate = '0.00000491', + var_7d_daily_interest_rate = '0.000118', + var_14d_hourly_interest_rate = '0.00000491', + var_14d_daily_interest_rate = '0.000118', + var_30d_hourly_interest_rate = '0.00000567', + var_30d_daily_interest_rate = '0.000136', + var_90d_hourly_interest_rate = '0.00000596', + var_90d_daily_interest_rate = '0.000143', + var_180d_hourly_interest_rate = '0.00000631', + var_180d_daily_interest_rate = '0.000151', + min_limit = '100', + max_limit = '1000000', + vip_level = 1, + ) + """ + + def testSapiV1LoanLoanableDataGet200ResponseRowsInner(self): + """Test SapiV1LoanLoanableDataGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_ltv_adjustment_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_ltv_adjustment_history_get200_response.py new file mode 100644 index 0000000..45d3e47 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_ltv_adjustment_history_get200_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_ltv_adjustment_history_get200_response import SapiV1LoanLtvAdjustmentHistoryGet200Response + +class TestSapiV1LoanLtvAdjustmentHistoryGet200Response(unittest.TestCase): + """SapiV1LoanLtvAdjustmentHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanLtvAdjustmentHistoryGet200Response: + """Test SapiV1LoanLtvAdjustmentHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanLtvAdjustmentHistoryGet200Response` + """ + model = SapiV1LoanLtvAdjustmentHistoryGet200Response() + if include_optional: + return SapiV1LoanLtvAdjustmentHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_ltv_adjustment_history_get_200_response_rows_inner._sapi_v1_loan_ltv_adjustment_history_get_200_response_rows_inner( + loan_coin = 'BUSD', + collateral_coin = 'BNB', + direction = 'ADDITIONAL', + amount = '5.235', + pre_ltv = '0.78', + after_ltv = '0.56', + adjust_time = 1575018510000, + order_id = 756783308056935434, ) + ], + total = 1 + ) + else: + return SapiV1LoanLtvAdjustmentHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_ltv_adjustment_history_get_200_response_rows_inner._sapi_v1_loan_ltv_adjustment_history_get_200_response_rows_inner( + loan_coin = 'BUSD', + collateral_coin = 'BNB', + direction = 'ADDITIONAL', + amount = '5.235', + pre_ltv = '0.78', + after_ltv = '0.56', + adjust_time = 1575018510000, + order_id = 756783308056935434, ) + ], + total = 1, + ) + """ + + def testSapiV1LoanLtvAdjustmentHistoryGet200Response(self): + """Test SapiV1LoanLtvAdjustmentHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner.py new file mode 100644 index 0000000..a687810 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_ltv_adjustment_history_get200_response_rows_inner import SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner + +class TestSapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner: + """Test SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner` + """ + model = SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner( + loan_coin = 'BUSD', + collateral_coin = 'BNB', + direction = 'ADDITIONAL', + amount = '5.235', + pre_ltv = '0.78', + after_ltv = '0.56', + adjust_time = 1575018510000, + order_id = 756783308056935434 + ) + else: + return SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner( + loan_coin = 'BUSD', + collateral_coin = 'BNB', + direction = 'ADDITIONAL', + amount = '5.235', + pre_ltv = '0.78', + after_ltv = '0.56', + adjust_time = 1575018510000, + order_id = 756783308056935434, + ) + """ + + def testSapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner(self): + """Test SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_ongoing_orders_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_ongoing_orders_get200_response.py new file mode 100644 index 0000000..55fad08 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_ongoing_orders_get200_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_ongoing_orders_get200_response import SapiV1LoanOngoingOrdersGet200Response + +class TestSapiV1LoanOngoingOrdersGet200Response(unittest.TestCase): + """SapiV1LoanOngoingOrdersGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanOngoingOrdersGet200Response: + """Test SapiV1LoanOngoingOrdersGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanOngoingOrdersGet200Response` + """ + model = SapiV1LoanOngoingOrdersGet200Response() + if include_optional: + return SapiV1LoanOngoingOrdersGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_ongoing_orders_get_200_response_rows_inner._sapi_v1_loan_ongoing_orders_get_200_response_rows_inner( + order_id = 100000001, + loan_coin = 'BUSD', + total_debt = '10000', + residual_interest = '10.27687923', + collateral_coin = 'BNB', + collateral_amount = '49.27565492', + current_ltv = '0.57', + expiration_time = 1575018510000, ) + ], + total = 1 + ) + else: + return SapiV1LoanOngoingOrdersGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_ongoing_orders_get_200_response_rows_inner._sapi_v1_loan_ongoing_orders_get_200_response_rows_inner( + order_id = 100000001, + loan_coin = 'BUSD', + total_debt = '10000', + residual_interest = '10.27687923', + collateral_coin = 'BNB', + collateral_amount = '49.27565492', + current_ltv = '0.57', + expiration_time = 1575018510000, ) + ], + total = 1, + ) + """ + + def testSapiV1LoanOngoingOrdersGet200Response(self): + """Test SapiV1LoanOngoingOrdersGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_ongoing_orders_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_ongoing_orders_get200_response_rows_inner.py new file mode 100644 index 0000000..3396fcd --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_ongoing_orders_get200_response_rows_inner.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_ongoing_orders_get200_response_rows_inner import SapiV1LoanOngoingOrdersGet200ResponseRowsInner + +class TestSapiV1LoanOngoingOrdersGet200ResponseRowsInner(unittest.TestCase): + """SapiV1LoanOngoingOrdersGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanOngoingOrdersGet200ResponseRowsInner: + """Test SapiV1LoanOngoingOrdersGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanOngoingOrdersGet200ResponseRowsInner` + """ + model = SapiV1LoanOngoingOrdersGet200ResponseRowsInner() + if include_optional: + return SapiV1LoanOngoingOrdersGet200ResponseRowsInner( + order_id = 100000001, + loan_coin = 'BUSD', + total_debt = '10000', + residual_interest = '10.27687923', + collateral_coin = 'BNB', + collateral_amount = '49.27565492', + current_ltv = '0.57', + expiration_time = 1575018510000 + ) + else: + return SapiV1LoanOngoingOrdersGet200ResponseRowsInner( + order_id = 100000001, + loan_coin = 'BUSD', + total_debt = '10000', + residual_interest = '10.27687923', + collateral_coin = 'BNB', + collateral_amount = '49.27565492', + current_ltv = '0.57', + expiration_time = 1575018510000, + ) + """ + + def testSapiV1LoanOngoingOrdersGet200ResponseRowsInner(self): + """Test SapiV1LoanOngoingOrdersGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_repay_collateral_rate_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_repay_collateral_rate_get200_response.py new file mode 100644 index 0000000..6750495 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_repay_collateral_rate_get200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_repay_collateral_rate_get200_response import SapiV1LoanRepayCollateralRateGet200Response + +class TestSapiV1LoanRepayCollateralRateGet200Response(unittest.TestCase): + """SapiV1LoanRepayCollateralRateGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanRepayCollateralRateGet200Response: + """Test SapiV1LoanRepayCollateralRateGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanRepayCollateralRateGet200Response` + """ + model = SapiV1LoanRepayCollateralRateGet200Response() + if include_optional: + return SapiV1LoanRepayCollateralRateGet200Response( + loan_coin = 'BUSD', + collateral_coin = 'BUSD', + repay_amount = '1000', + rate = '300.36781234' + ) + else: + return SapiV1LoanRepayCollateralRateGet200Response( + loan_coin = 'BUSD', + collateral_coin = 'BUSD', + repay_amount = '1000', + rate = '300.36781234', + ) + """ + + def testSapiV1LoanRepayCollateralRateGet200Response(self): + """Test SapiV1LoanRepayCollateralRateGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_repay_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_repay_history_get200_response.py new file mode 100644 index 0000000..516b5b7 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_repay_history_get200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_repay_history_get200_response import SapiV1LoanRepayHistoryGet200Response + +class TestSapiV1LoanRepayHistoryGet200Response(unittest.TestCase): + """SapiV1LoanRepayHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanRepayHistoryGet200Response: + """Test SapiV1LoanRepayHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanRepayHistoryGet200Response` + """ + model = SapiV1LoanRepayHistoryGet200Response() + if include_optional: + return SapiV1LoanRepayHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_repay_history_get_200_response_rows_inner._sapi_v1_loan_repay_history_get_200_response_rows_inner( + loan_coin = 'BUSD', + repay_amount = '10000', + collateral_coin = 'BNB', + collateral_used = '0', + collateral_return = '49.27565492', + repay_type = '1', + repay_status = 'Repaid', + repay_time = 1575018510000, + order_id = 756783308056935434, ) + ], + total = 1 + ) + else: + return SapiV1LoanRepayHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_repay_history_get_200_response_rows_inner._sapi_v1_loan_repay_history_get_200_response_rows_inner( + loan_coin = 'BUSD', + repay_amount = '10000', + collateral_coin = 'BNB', + collateral_used = '0', + collateral_return = '49.27565492', + repay_type = '1', + repay_status = 'Repaid', + repay_time = 1575018510000, + order_id = 756783308056935434, ) + ], + total = 1, + ) + """ + + def testSapiV1LoanRepayHistoryGet200Response(self): + """Test SapiV1LoanRepayHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_repay_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_repay_history_get200_response_rows_inner.py new file mode 100644 index 0000000..5e35c0c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_repay_history_get200_response_rows_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_repay_history_get200_response_rows_inner import SapiV1LoanRepayHistoryGet200ResponseRowsInner + +class TestSapiV1LoanRepayHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1LoanRepayHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanRepayHistoryGet200ResponseRowsInner: + """Test SapiV1LoanRepayHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanRepayHistoryGet200ResponseRowsInner` + """ + model = SapiV1LoanRepayHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1LoanRepayHistoryGet200ResponseRowsInner( + loan_coin = 'BUSD', + repay_amount = '10000', + collateral_coin = 'BNB', + collateral_used = '0', + collateral_return = '49.27565492', + repay_type = '1', + repay_status = 'Repaid', + repay_time = 1575018510000, + order_id = 756783308056935434 + ) + else: + return SapiV1LoanRepayHistoryGet200ResponseRowsInner( + loan_coin = 'BUSD', + repay_amount = '10000', + collateral_coin = 'BNB', + collateral_used = '0', + collateral_return = '49.27565492', + repay_type = '1', + repay_status = 'Repaid', + repay_time = 1575018510000, + order_id = 756783308056935434, + ) + """ + + def testSapiV1LoanRepayHistoryGet200ResponseRowsInner(self): + """Test SapiV1LoanRepayHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_repay_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_repay_post200_response.py new file mode 100644 index 0000000..cd7cbdc --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_repay_post200_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_repay_post200_response import SapiV1LoanRepayPost200Response + +class TestSapiV1LoanRepayPost200Response(unittest.TestCase): + """SapiV1LoanRepayPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanRepayPost200Response: + """Test SapiV1LoanRepayPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanRepayPost200Response` + """ + model = SapiV1LoanRepayPost200Response() + if include_optional: + return SapiV1LoanRepayPost200Response( + loan_coin = 'BUSD', + remaining_principal = '100.5', + remaining_interest = '0', + collateral_coin = 'BNB', + remaining_collateral = '5.253', + current_ltv = '0.25', + repay_status = 'Repaying' + ) + else: + return SapiV1LoanRepayPost200Response( + loan_coin = 'BUSD', + remaining_principal = '100.5', + remaining_interest = '0', + collateral_coin = 'BNB', + remaining_collateral = '5.253', + current_ltv = '0.25', + repay_status = 'Repaying', + ) + """ + + def testSapiV1LoanRepayPost200Response(self): + """Test SapiV1LoanRepayPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_borrow_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_borrow_post200_response.py new file mode 100644 index 0000000..e6070ef --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_borrow_post200_response.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_borrow_post200_response import SapiV1LoanVipBorrowPost200Response + +class TestSapiV1LoanVipBorrowPost200Response(unittest.TestCase): + """SapiV1LoanVipBorrowPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipBorrowPost200Response: + """Test SapiV1LoanVipBorrowPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipBorrowPost200Response` + """ + model = SapiV1LoanVipBorrowPost200Response() + if include_optional: + return SapiV1LoanVipBorrowPost200Response( + loan_account_id = '12345678', + request_id = '12345678', + loan_coin = 'BTC', + is_flexible_rate = 'No', + loan_amount = '100.55', + collateral_account_id = '12345678,12345678,12345678', + collateral_coin = 'BUSD,USDT,ETH', + loan_term = '30' + ) + else: + return SapiV1LoanVipBorrowPost200Response( + loan_account_id = '12345678', + request_id = '12345678', + loan_coin = 'BTC', + is_flexible_rate = 'No', + loan_amount = '100.55', + collateral_account_id = '12345678,12345678,12345678', + collateral_coin = 'BUSD,USDT,ETH', + ) + """ + + def testSapiV1LoanVipBorrowPost200Response(self): + """Test SapiV1LoanVipBorrowPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_account_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_account_get200_response.py new file mode 100644 index 0000000..bd32ec9 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_account_get200_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_collateral_account_get200_response import SapiV1LoanVipCollateralAccountGet200Response + +class TestSapiV1LoanVipCollateralAccountGet200Response(unittest.TestCase): + """SapiV1LoanVipCollateralAccountGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipCollateralAccountGet200Response: + """Test SapiV1LoanVipCollateralAccountGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipCollateralAccountGet200Response` + """ + model = SapiV1LoanVipCollateralAccountGet200Response() + if include_optional: + return SapiV1LoanVipCollateralAccountGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_vip_collateral_account_get_200_response_rows_inner._sapi_v1_loan_vip_collateral_account_get_200_response_rows_inner( + collateral_account_id = '12345678', + collateral_coin = 'BNB,BTC,ETH', + collateral_value = '500.27565492', ) + ], + total = 1 + ) + else: + return SapiV1LoanVipCollateralAccountGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_vip_collateral_account_get_200_response_rows_inner._sapi_v1_loan_vip_collateral_account_get_200_response_rows_inner( + collateral_account_id = '12345678', + collateral_coin = 'BNB,BTC,ETH', + collateral_value = '500.27565492', ) + ], + total = 1, + ) + """ + + def testSapiV1LoanVipCollateralAccountGet200Response(self): + """Test SapiV1LoanVipCollateralAccountGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_account_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_account_get200_response_rows_inner.py new file mode 100644 index 0000000..7b04231 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_account_get200_response_rows_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_collateral_account_get200_response_rows_inner import SapiV1LoanVipCollateralAccountGet200ResponseRowsInner + +class TestSapiV1LoanVipCollateralAccountGet200ResponseRowsInner(unittest.TestCase): + """SapiV1LoanVipCollateralAccountGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipCollateralAccountGet200ResponseRowsInner: + """Test SapiV1LoanVipCollateralAccountGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipCollateralAccountGet200ResponseRowsInner` + """ + model = SapiV1LoanVipCollateralAccountGet200ResponseRowsInner() + if include_optional: + return SapiV1LoanVipCollateralAccountGet200ResponseRowsInner( + collateral_account_id = '12345678', + collateral_coin = 'BNB,BTC,ETH', + collateral_value = '500.27565492' + ) + else: + return SapiV1LoanVipCollateralAccountGet200ResponseRowsInner( + collateral_account_id = '12345678', + collateral_coin = 'BNB,BTC,ETH', + collateral_value = '500.27565492', + ) + """ + + def testSapiV1LoanVipCollateralAccountGet200ResponseRowsInner(self): + """Test SapiV1LoanVipCollateralAccountGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_data_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_data_get200_response.py new file mode 100644 index 0000000..7b0c26e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_data_get200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_collateral_data_get200_response import SapiV1LoanVipCollateralDataGet200Response + +class TestSapiV1LoanVipCollateralDataGet200Response(unittest.TestCase): + """SapiV1LoanVipCollateralDataGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipCollateralDataGet200Response: + """Test SapiV1LoanVipCollateralDataGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipCollateralDataGet200Response` + """ + model = SapiV1LoanVipCollateralDataGet200Response() + if include_optional: + return SapiV1LoanVipCollateralDataGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_vip_collateral_data_get_200_response_rows_inner._sapi_v1_loan_vip_collateral_data_get_200_response_rows_inner( + collateral_coin = 'BUSD', + _1st_collateral_ratio = '100%', + _1st_collateral_range = '1-10000000', + _2nd_collateral_ratio = '80%', + _2nd_collateral_range = '10000000-100000000', + _3rd_collateral_ratio = '60%', + _3rd_collateral_range = '100000000-1000000000', + _4th_collateral_ratio = '0%', + _4th_collateral_range = '>10000000000', ) + ], + total = 1 + ) + else: + return SapiV1LoanVipCollateralDataGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_vip_collateral_data_get_200_response_rows_inner._sapi_v1_loan_vip_collateral_data_get_200_response_rows_inner( + collateral_coin = 'BUSD', + _1st_collateral_ratio = '100%', + _1st_collateral_range = '1-10000000', + _2nd_collateral_ratio = '80%', + _2nd_collateral_range = '10000000-100000000', + _3rd_collateral_ratio = '60%', + _3rd_collateral_range = '100000000-1000000000', + _4th_collateral_ratio = '0%', + _4th_collateral_range = '>10000000000', ) + ], + total = 1, + ) + """ + + def testSapiV1LoanVipCollateralDataGet200Response(self): + """Test SapiV1LoanVipCollateralDataGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_data_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_data_get200_response_rows_inner.py new file mode 100644 index 0000000..7c7ceb1 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_collateral_data_get200_response_rows_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_collateral_data_get200_response_rows_inner import SapiV1LoanVipCollateralDataGet200ResponseRowsInner + +class TestSapiV1LoanVipCollateralDataGet200ResponseRowsInner(unittest.TestCase): + """SapiV1LoanVipCollateralDataGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipCollateralDataGet200ResponseRowsInner: + """Test SapiV1LoanVipCollateralDataGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipCollateralDataGet200ResponseRowsInner` + """ + model = SapiV1LoanVipCollateralDataGet200ResponseRowsInner() + if include_optional: + return SapiV1LoanVipCollateralDataGet200ResponseRowsInner( + collateral_coin = 'BUSD', + var_1st_collateral_ratio = '100%', + var_1st_collateral_range = '1-10000000', + var_2nd_collateral_ratio = '80%', + var_2nd_collateral_range = '10000000-100000000', + var_3rd_collateral_ratio = '60%', + var_3rd_collateral_range = '100000000-1000000000', + var_4th_collateral_ratio = '0%', + var_4th_collateral_range = '>10000000000' + ) + else: + return SapiV1LoanVipCollateralDataGet200ResponseRowsInner( + collateral_coin = 'BUSD', + var_1st_collateral_ratio = '100%', + var_1st_collateral_range = '1-10000000', + var_2nd_collateral_ratio = '80%', + var_2nd_collateral_range = '10000000-100000000', + var_3rd_collateral_ratio = '60%', + var_3rd_collateral_range = '100000000-1000000000', + var_4th_collateral_ratio = '0%', + var_4th_collateral_range = '>10000000000', + ) + """ + + def testSapiV1LoanVipCollateralDataGet200ResponseRowsInner(self): + """Test SapiV1LoanVipCollateralDataGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_loanable_data_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_loanable_data_get200_response.py new file mode 100644 index 0000000..a366b58 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_loanable_data_get200_response.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_loanable_data_get200_response import SapiV1LoanVipLoanableDataGet200Response + +class TestSapiV1LoanVipLoanableDataGet200Response(unittest.TestCase): + """SapiV1LoanVipLoanableDataGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipLoanableDataGet200Response: + """Test SapiV1LoanVipLoanableDataGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipLoanableDataGet200Response` + """ + model = SapiV1LoanVipLoanableDataGet200Response() + if include_optional: + return SapiV1LoanVipLoanableDataGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v1_loan_vip_loanable_data_get_200_response_rows_inner._sapi_v1_loan_vip_loanable_data_get_200_response_rows_inner( + loan_coin = 'BUSD', + _flexible_daily_interest_rate = '0.001503', + _flexible_yearly_interest_rate = '0.548595', + _30d_daily_interest_rate = '0.000136', + _30d_yearly_interest_rate = '0.03450', + _60d_daily_interest_rate = '0.000145', + _60d_yearly_interest_rate = '0.04103', + min_limit = '100', + max_limit = '1000000', + vip_level = 1, ) + ] + ) + else: + return SapiV1LoanVipLoanableDataGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v1_loan_vip_loanable_data_get_200_response_rows_inner._sapi_v1_loan_vip_loanable_data_get_200_response_rows_inner( + loan_coin = 'BUSD', + _flexible_daily_interest_rate = '0.001503', + _flexible_yearly_interest_rate = '0.548595', + _30d_daily_interest_rate = '0.000136', + _30d_yearly_interest_rate = '0.03450', + _60d_daily_interest_rate = '0.000145', + _60d_yearly_interest_rate = '0.04103', + min_limit = '100', + max_limit = '1000000', + vip_level = 1, ) + ], + ) + """ + + def testSapiV1LoanVipLoanableDataGet200Response(self): + """Test SapiV1LoanVipLoanableDataGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_loanable_data_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_loanable_data_get200_response_rows_inner.py new file mode 100644 index 0000000..c2afe01 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_loanable_data_get200_response_rows_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_loanable_data_get200_response_rows_inner import SapiV1LoanVipLoanableDataGet200ResponseRowsInner + +class TestSapiV1LoanVipLoanableDataGet200ResponseRowsInner(unittest.TestCase): + """SapiV1LoanVipLoanableDataGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipLoanableDataGet200ResponseRowsInner: + """Test SapiV1LoanVipLoanableDataGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipLoanableDataGet200ResponseRowsInner` + """ + model = SapiV1LoanVipLoanableDataGet200ResponseRowsInner() + if include_optional: + return SapiV1LoanVipLoanableDataGet200ResponseRowsInner( + loan_coin = 'BUSD', + flexible_daily_interest_rate = '0.001503', + flexible_yearly_interest_rate = '0.548595', + var_30d_daily_interest_rate = '0.000136', + var_30d_yearly_interest_rate = '0.03450', + var_60d_daily_interest_rate = '0.000145', + var_60d_yearly_interest_rate = '0.04103', + min_limit = '100', + max_limit = '1000000', + vip_level = 1 + ) + else: + return SapiV1LoanVipLoanableDataGet200ResponseRowsInner( + loan_coin = 'BUSD', + flexible_daily_interest_rate = '0.001503', + flexible_yearly_interest_rate = '0.548595', + var_30d_daily_interest_rate = '0.000136', + var_30d_yearly_interest_rate = '0.03450', + var_60d_daily_interest_rate = '0.000145', + var_60d_yearly_interest_rate = '0.04103', + min_limit = '100', + max_limit = '1000000', + vip_level = 1, + ) + """ + + def testSapiV1LoanVipLoanableDataGet200ResponseRowsInner(self): + """Test SapiV1LoanVipLoanableDataGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_ongoing_orders_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_ongoing_orders_get200_response.py new file mode 100644 index 0000000..43bba86 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_ongoing_orders_get200_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_ongoing_orders_get200_response import SapiV1LoanVipOngoingOrdersGet200Response + +class TestSapiV1LoanVipOngoingOrdersGet200Response(unittest.TestCase): + """SapiV1LoanVipOngoingOrdersGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipOngoingOrdersGet200Response: + """Test SapiV1LoanVipOngoingOrdersGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipOngoingOrdersGet200Response` + """ + model = SapiV1LoanVipOngoingOrdersGet200Response() + if include_optional: + return SapiV1LoanVipOngoingOrdersGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_vip_ongoing_orders_get_200_response_rows_inner._sapi_v1_loan_vip_ongoing_orders_get_200_response_rows_inner( + order_id = 100000001, + loan_coin = 'BUSD', + total_debt = '10000', + residual_interest = '10.27687923', + collateral_account_id = '12345678, 23456789', + collateral_coin = 'BNB,BTC,ETH', + collateral_value = '25000.27565492', + total_collateral_value_after_haircut = '25000.27565492', + locked_collateral_value = '25000.27565492', + current_ltv = '0.57', + expiration_time = 1575018510000, + loan_date = '1676851200000', + loan_rate = '0.0123', + loan_term = '30days', ) + ], + total = 1 + ) + else: + return SapiV1LoanVipOngoingOrdersGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_vip_ongoing_orders_get_200_response_rows_inner._sapi_v1_loan_vip_ongoing_orders_get_200_response_rows_inner( + order_id = 100000001, + loan_coin = 'BUSD', + total_debt = '10000', + residual_interest = '10.27687923', + collateral_account_id = '12345678, 23456789', + collateral_coin = 'BNB,BTC,ETH', + collateral_value = '25000.27565492', + total_collateral_value_after_haircut = '25000.27565492', + locked_collateral_value = '25000.27565492', + current_ltv = '0.57', + expiration_time = 1575018510000, + loan_date = '1676851200000', + loan_rate = '0.0123', + loan_term = '30days', ) + ], + total = 1, + ) + """ + + def testSapiV1LoanVipOngoingOrdersGet200Response(self): + """Test SapiV1LoanVipOngoingOrdersGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner.py new file mode 100644 index 0000000..ed44fae --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_ongoing_orders_get200_response_rows_inner import SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner + +class TestSapiV1LoanVipOngoingOrdersGet200ResponseRowsInner(unittest.TestCase): + """SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner: + """Test SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner` + """ + model = SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner() + if include_optional: + return SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner( + order_id = 100000001, + loan_coin = 'BUSD', + total_debt = '10000', + residual_interest = '10.27687923', + collateral_account_id = '12345678, 23456789', + collateral_coin = 'BNB,BTC,ETH', + collateral_value = '25000.27565492', + total_collateral_value_after_haircut = '25000.27565492', + locked_collateral_value = '25000.27565492', + current_ltv = '0.57', + expiration_time = 1575018510000, + loan_date = '1676851200000', + loan_rate = '0.0123', + loan_term = '30days' + ) + else: + return SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner( + order_id = 100000001, + loan_coin = 'BUSD', + total_debt = '10000', + residual_interest = '10.27687923', + collateral_account_id = '12345678, 23456789', + collateral_coin = 'BNB,BTC,ETH', + collateral_value = '25000.27565492', + current_ltv = '0.57', + expiration_time = 1575018510000, + loan_date = '1676851200000', + loan_rate = '0.0123', + loan_term = '30days', + ) + """ + + def testSapiV1LoanVipOngoingOrdersGet200ResponseRowsInner(self): + """Test SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_renew_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_renew_post200_response.py new file mode 100644 index 0000000..a6ba758 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_renew_post200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_renew_post200_response import SapiV1LoanVipRenewPost200Response + +class TestSapiV1LoanVipRenewPost200Response(unittest.TestCase): + """SapiV1LoanVipRenewPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipRenewPost200Response: + """Test SapiV1LoanVipRenewPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipRenewPost200Response` + """ + model = SapiV1LoanVipRenewPost200Response() + if include_optional: + return SapiV1LoanVipRenewPost200Response( + loan_account_id = '12345678', + loan_coin = 'BTC', + loan_amount = '100.55', + collateral_account_id = '12345677,12345678,12345679', + collateral_coin = 'BUSD,USDT,ETH', + loan_term = '30' + ) + else: + return SapiV1LoanVipRenewPost200Response( + loan_account_id = '12345678', + loan_coin = 'BTC', + loan_amount = '100.55', + collateral_account_id = '12345677,12345678,12345679', + collateral_coin = 'BUSD,USDT,ETH', + loan_term = '30', + ) + """ + + def testSapiV1LoanVipRenewPost200Response(self): + """Test SapiV1LoanVipRenewPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_repay_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_repay_history_get200_response.py new file mode 100644 index 0000000..b756c6c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_repay_history_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_repay_history_get200_response import SapiV1LoanVipRepayHistoryGet200Response + +class TestSapiV1LoanVipRepayHistoryGet200Response(unittest.TestCase): + """SapiV1LoanVipRepayHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipRepayHistoryGet200Response: + """Test SapiV1LoanVipRepayHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipRepayHistoryGet200Response` + """ + model = SapiV1LoanVipRepayHistoryGet200Response() + if include_optional: + return SapiV1LoanVipRepayHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_vip_repay_history_get_200_response_rows_inner._sapi_v1_loan_vip_repay_history_get_200_response_rows_inner( + loan_coin = 'BUSD', + repay_amount = '10000', + collateral_coin = 'BNB,BTC,ETH', + repay_status = 'Repaid', + repay_time = '1575018510000', + order_id = '756783308056935434', ) + ], + total = 1 + ) + else: + return SapiV1LoanVipRepayHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_loan_vip_repay_history_get_200_response_rows_inner._sapi_v1_loan_vip_repay_history_get_200_response_rows_inner( + loan_coin = 'BUSD', + repay_amount = '10000', + collateral_coin = 'BNB,BTC,ETH', + repay_status = 'Repaid', + repay_time = '1575018510000', + order_id = '756783308056935434', ) + ], + total = 1, + ) + """ + + def testSapiV1LoanVipRepayHistoryGet200Response(self): + """Test SapiV1LoanVipRepayHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_repay_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_repay_history_get200_response_rows_inner.py new file mode 100644 index 0000000..f718471 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_repay_history_get200_response_rows_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_repay_history_get200_response_rows_inner import SapiV1LoanVipRepayHistoryGet200ResponseRowsInner + +class TestSapiV1LoanVipRepayHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1LoanVipRepayHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipRepayHistoryGet200ResponseRowsInner: + """Test SapiV1LoanVipRepayHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipRepayHistoryGet200ResponseRowsInner` + """ + model = SapiV1LoanVipRepayHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1LoanVipRepayHistoryGet200ResponseRowsInner( + loan_coin = 'BUSD', + repay_amount = '10000', + collateral_coin = 'BNB,BTC,ETH', + repay_status = 'Repaid', + repay_time = '1575018510000', + order_id = '756783308056935434' + ) + else: + return SapiV1LoanVipRepayHistoryGet200ResponseRowsInner( + loan_coin = 'BUSD', + repay_amount = '10000', + collateral_coin = 'BNB,BTC,ETH', + repay_status = 'Repaid', + repay_time = '1575018510000', + order_id = '756783308056935434', + ) + """ + + def testSapiV1LoanVipRepayHistoryGet200ResponseRowsInner(self): + """Test SapiV1LoanVipRepayHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_repay_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_repay_post200_response.py new file mode 100644 index 0000000..e2c0b94 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_repay_post200_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_repay_post200_response import SapiV1LoanVipRepayPost200Response + +class TestSapiV1LoanVipRepayPost200Response(unittest.TestCase): + """SapiV1LoanVipRepayPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipRepayPost200Response: + """Test SapiV1LoanVipRepayPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipRepayPost200Response` + """ + model = SapiV1LoanVipRepayPost200Response() + if include_optional: + return SapiV1LoanVipRepayPost200Response( + loan_coin = 'BUSD', + repay_amount = '200.5', + remaining_principal = '100.5', + remaining_interest = '0', + collateral_coin = 'BNB,BTC,ETH', + current_ltv = '0.25', + repay_status = 'Repaid' + ) + else: + return SapiV1LoanVipRepayPost200Response( + loan_coin = 'BUSD', + repay_amount = '200.5', + remaining_principal = '100.5', + remaining_interest = '0', + collateral_coin = 'BNB,BTC,ETH', + current_ltv = '0.25', + repay_status = 'Repaid', + ) + """ + + def testSapiV1LoanVipRepayPost200Response(self): + """Test SapiV1LoanVipRepayPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_request_data_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_request_data_get200_response.py new file mode 100644 index 0000000..c9031f2 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_request_data_get200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_request_data_get200_response import SapiV1LoanVipRequestDataGet200Response + +class TestSapiV1LoanVipRequestDataGet200Response(unittest.TestCase): + """SapiV1LoanVipRequestDataGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipRequestDataGet200Response: + """Test SapiV1LoanVipRequestDataGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipRequestDataGet200Response` + """ + model = SapiV1LoanVipRequestDataGet200Response() + if include_optional: + return SapiV1LoanVipRequestDataGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v1_loan_vip_request_data_get_200_response_rows_inner._sapi_v1_loan_vip_request_data_get_200_response_rows_inner( + loan_account_id = '12345678', + order_id = '12345678', + request_id = '12345678', + loan_coin = 'BTC', + loan_amount = '100.5', + collateral_account_id = '12345678,12345678,12345678', + collateral_coin = 'BUSD,USDT,ETH', + loan_term = 30, + status = 56, ) + ] + ) + else: + return SapiV1LoanVipRequestDataGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v1_loan_vip_request_data_get_200_response_rows_inner._sapi_v1_loan_vip_request_data_get_200_response_rows_inner( + loan_account_id = '12345678', + order_id = '12345678', + request_id = '12345678', + loan_coin = 'BTC', + loan_amount = '100.5', + collateral_account_id = '12345678,12345678,12345678', + collateral_coin = 'BUSD,USDT,ETH', + loan_term = 30, + status = 56, ) + ], + ) + """ + + def testSapiV1LoanVipRequestDataGet200Response(self): + """Test SapiV1LoanVipRequestDataGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_request_data_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_request_data_get200_response_rows_inner.py new file mode 100644 index 0000000..ef37094 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_request_data_get200_response_rows_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_request_data_get200_response_rows_inner import SapiV1LoanVipRequestDataGet200ResponseRowsInner + +class TestSapiV1LoanVipRequestDataGet200ResponseRowsInner(unittest.TestCase): + """SapiV1LoanVipRequestDataGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipRequestDataGet200ResponseRowsInner: + """Test SapiV1LoanVipRequestDataGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipRequestDataGet200ResponseRowsInner` + """ + model = SapiV1LoanVipRequestDataGet200ResponseRowsInner() + if include_optional: + return SapiV1LoanVipRequestDataGet200ResponseRowsInner( + loan_account_id = '12345678', + order_id = '12345678', + request_id = '12345678', + loan_coin = 'BTC', + loan_amount = '100.5', + collateral_account_id = '12345678,12345678,12345678', + collateral_coin = 'BUSD,USDT,ETH', + loan_term = 30, + status = 56 + ) + else: + return SapiV1LoanVipRequestDataGet200ResponseRowsInner( + loan_account_id = '12345678', + order_id = '12345678', + request_id = '12345678', + loan_coin = 'BTC', + loan_amount = '100.5', + collateral_account_id = '12345678,12345678,12345678', + collateral_coin = 'BUSD,USDT,ETH', + loan_term = 30, + status = 56, + ) + """ + + def testSapiV1LoanVipRequestDataGet200ResponseRowsInner(self): + """Test SapiV1LoanVipRequestDataGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_loan_vip_request_interest_rate_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_request_interest_rate_get200_response_inner.py new file mode 100644 index 0000000..57f1718 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_loan_vip_request_interest_rate_get200_response_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_loan_vip_request_interest_rate_get200_response_inner import SapiV1LoanVipRequestInterestRateGet200ResponseInner + +class TestSapiV1LoanVipRequestInterestRateGet200ResponseInner(unittest.TestCase): + """SapiV1LoanVipRequestInterestRateGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1LoanVipRequestInterestRateGet200ResponseInner: + """Test SapiV1LoanVipRequestInterestRateGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1LoanVipRequestInterestRateGet200ResponseInner` + """ + model = SapiV1LoanVipRequestInterestRateGet200ResponseInner() + if include_optional: + return SapiV1LoanVipRequestInterestRateGet200ResponseInner( + asset = 'BUSD', + flexible_daily_interest_rate = '0.001503', + flexible_yearly_interest_rate = '0.548595', + time = 1577233578000 + ) + else: + return SapiV1LoanVipRequestInterestRateGet200ResponseInner( + asset = 'BUSD', + flexible_daily_interest_rate = '0.001503', + flexible_yearly_interest_rate = '0.548595', + time = 1577233578000, + ) + """ + + def testSapiV1LoanVipRequestInterestRateGet200ResponseInner(self): + """Test SapiV1LoanVipRequestInterestRateGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response.py new file mode 100644 index 0000000..3cd9d04 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response import SapiV1ManagedSubaccountAccountSnapshotGet200Response + +class TestSapiV1ManagedSubaccountAccountSnapshotGet200Response(unittest.TestCase): + """SapiV1ManagedSubaccountAccountSnapshotGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountAccountSnapshotGet200Response: + """Test SapiV1ManagedSubaccountAccountSnapshotGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountAccountSnapshotGet200Response` + """ + model = SapiV1ManagedSubaccountAccountSnapshotGet200Response() + if include_optional: + return SapiV1ManagedSubaccountAccountSnapshotGet200Response( + code = 200, + msg = '', + snapshot_vos = [ + openapi_client.models._sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner._sapi_v1_managed_subaccount_accountSnapshot_get_200_response_snapshotVos_inner( + data = openapi_client.models._sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data._sapi_v1_managed_subaccount_accountSnapshot_get_200_response_snapshotVos_inner_data( + balances = [ + openapi_client.models._sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data_balances_inner._sapi_v1_managed_subaccount_accountSnapshot_get_200_response_snapshotVos_inner_data_balances_inner( + asset = 'BTC', + free = '0.09905021', + locked = '0.00000000', ) + ], + total_asset_of_btc = '0.09942700', ), + type = 'spot', + update_time = 1576281599000, ) + ] + ) + else: + return SapiV1ManagedSubaccountAccountSnapshotGet200Response( + code = 200, + msg = '', + snapshot_vos = [ + openapi_client.models._sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner._sapi_v1_managed_subaccount_accountSnapshot_get_200_response_snapshotVos_inner( + data = openapi_client.models._sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data._sapi_v1_managed_subaccount_accountSnapshot_get_200_response_snapshotVos_inner_data( + balances = [ + openapi_client.models._sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data_balances_inner._sapi_v1_managed_subaccount_accountSnapshot_get_200_response_snapshotVos_inner_data_balances_inner( + asset = 'BTC', + free = '0.09905021', + locked = '0.00000000', ) + ], + total_asset_of_btc = '0.09942700', ), + type = 'spot', + update_time = 1576281599000, ) + ], + ) + """ + + def testSapiV1ManagedSubaccountAccountSnapshotGet200Response(self): + """Test SapiV1ManagedSubaccountAccountSnapshotGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner.py new file mode 100644 index 0000000..9dce4a7 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner + +class TestSapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner(unittest.TestCase): + """SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner: + """Test SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner` + """ + model = SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner() + if include_optional: + return SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner( + data = openapi_client.models._sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data._sapi_v1_managed_subaccount_accountSnapshot_get_200_response_snapshotVos_inner_data( + balances = [ + openapi_client.models._sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data_balances_inner._sapi_v1_managed_subaccount_accountSnapshot_get_200_response_snapshotVos_inner_data_balances_inner( + asset = 'BTC', + free = '0.09905021', + locked = '0.00000000', ) + ], + total_asset_of_btc = '0.09942700', ), + type = 'spot', + update_time = 1576281599000 + ) + else: + return SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner( + data = openapi_client.models._sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data._sapi_v1_managed_subaccount_accountSnapshot_get_200_response_snapshotVos_inner_data( + balances = [ + openapi_client.models._sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data_balances_inner._sapi_v1_managed_subaccount_accountSnapshot_get_200_response_snapshotVos_inner_data_balances_inner( + asset = 'BTC', + free = '0.09905021', + locked = '0.00000000', ) + ], + total_asset_of_btc = '0.09942700', ), + type = 'spot', + update_time = 1576281599000, + ) + """ + + def testSapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner(self): + """Test SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data.py new file mode 100644 index 0000000..6d45d6f --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData + +class TestSapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData(unittest.TestCase): + """SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData: + """Test SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData` + """ + model = SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData() + if include_optional: + return SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData( + balances = [ + openapi_client.models._sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data_balances_inner._sapi_v1_managed_subaccount_accountSnapshot_get_200_response_snapshotVos_inner_data_balances_inner( + asset = 'BTC', + free = '0.09905021', + locked = '0.00000000', ) + ], + total_asset_of_btc = '0.09942700' + ) + else: + return SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData( + balances = [ + openapi_client.models._sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data_balances_inner._sapi_v1_managed_subaccount_accountSnapshot_get_200_response_snapshotVos_inner_data_balances_inner( + asset = 'BTC', + free = '0.09905021', + locked = '0.00000000', ) + ], + total_asset_of_btc = '0.09942700', + ) + """ + + def testSapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData(self): + """Test SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner.py new file mode 100644 index 0000000..3b6677b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_account_snapshot_get200_response_snapshot_vos_inner_data_balances_inner import SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner + +class TestSapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner(unittest.TestCase): + """SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner: + """Test SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner` + """ + model = SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner() + if include_optional: + return SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner( + asset = 'BTC', + free = '0.09905021', + locked = '0.00000000' + ) + else: + return SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner( + asset = 'BTC', + free = '0.09905021', + locked = '0.00000000', + ) + """ + + def testSapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner(self): + """Test SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_asset_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_asset_get200_response_inner.py new file mode 100644 index 0000000..032ae3b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_asset_get200_response_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_asset_get200_response_inner import SapiV1ManagedSubaccountAssetGet200ResponseInner + +class TestSapiV1ManagedSubaccountAssetGet200ResponseInner(unittest.TestCase): + """SapiV1ManagedSubaccountAssetGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountAssetGet200ResponseInner: + """Test SapiV1ManagedSubaccountAssetGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountAssetGet200ResponseInner` + """ + model = SapiV1ManagedSubaccountAssetGet200ResponseInner() + if include_optional: + return SapiV1ManagedSubaccountAssetGet200ResponseInner( + coin = 'INJ', + name = 'Injective Protocol', + total_balance = '0', + available_balance = '0', + in_order = '0', + btc_value = '0' + ) + else: + return SapiV1ManagedSubaccountAssetGet200ResponseInner( + coin = 'INJ', + name = 'Injective Protocol', + total_balance = '0', + available_balance = '0', + in_order = '0', + btc_value = '0', + ) + """ + + def testSapiV1ManagedSubaccountAssetGet200ResponseInner(self): + """Test SapiV1ManagedSubaccountAssetGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_deposit_address_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_deposit_address_get200_response.py new file mode 100644 index 0000000..4f75a53 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_deposit_address_get200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_deposit_address_get200_response import SapiV1ManagedSubaccountDepositAddressGet200Response + +class TestSapiV1ManagedSubaccountDepositAddressGet200Response(unittest.TestCase): + """SapiV1ManagedSubaccountDepositAddressGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountDepositAddressGet200Response: + """Test SapiV1ManagedSubaccountDepositAddressGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountDepositAddressGet200Response` + """ + model = SapiV1ManagedSubaccountDepositAddressGet200Response() + if include_optional: + return SapiV1ManagedSubaccountDepositAddressGet200Response( + coin = 'USDT', + address = '0x206c22d833bb0bb2102da6b7c7d4c3eb14bcf73d', + tag = '', + url = 'https://etherscan.io/address/0x206c22d833bb0bb2102da6b7c7d4c3eb14bcf73d' + ) + else: + return SapiV1ManagedSubaccountDepositAddressGet200Response( + coin = 'USDT', + address = '0x206c22d833bb0bb2102da6b7c7d4c3eb14bcf73d', + tag = '', + url = 'https://etherscan.io/address/0x206c22d833bb0bb2102da6b7c7d4c3eb14bcf73d', + ) + """ + + def testSapiV1ManagedSubaccountDepositAddressGet200Response(self): + """Test SapiV1ManagedSubaccountDepositAddressGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_deposit_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_deposit_post200_response.py new file mode 100644 index 0000000..12d0105 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_deposit_post200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_deposit_post200_response import SapiV1ManagedSubaccountDepositPost200Response + +class TestSapiV1ManagedSubaccountDepositPost200Response(unittest.TestCase): + """SapiV1ManagedSubaccountDepositPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountDepositPost200Response: + """Test SapiV1ManagedSubaccountDepositPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountDepositPost200Response` + """ + model = SapiV1ManagedSubaccountDepositPost200Response() + if include_optional: + return SapiV1ManagedSubaccountDepositPost200Response( + tran_id = 66157362489 + ) + else: + return SapiV1ManagedSubaccountDepositPost200Response( + tran_id = 66157362489, + ) + """ + + def testSapiV1ManagedSubaccountDepositPost200Response(self): + """Test SapiV1ManagedSubaccountDepositPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response.py new file mode 100644 index 0000000..a16cec3 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response import SapiV1ManagedSubaccountFetchFutureAssetGet200Response + +class TestSapiV1ManagedSubaccountFetchFutureAssetGet200Response(unittest.TestCase): + """SapiV1ManagedSubaccountFetchFutureAssetGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountFetchFutureAssetGet200Response: + """Test SapiV1ManagedSubaccountFetchFutureAssetGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountFetchFutureAssetGet200Response` + """ + model = SapiV1ManagedSubaccountFetchFutureAssetGet200Response() + if include_optional: + return SapiV1ManagedSubaccountFetchFutureAssetGet200Response( + code = 200, + message = 'OK', + snapshot_vos = [ + openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner( + type = 'FUTURES', + update_time = 1626400907000, + data = openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data( + assets = [ + openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_assets_inner._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data_assets_inner( + asset = 'USDT', + margin_balance = 100, + wallet_balance = 100, ) + ], + position = [ + openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_position_inner._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data_position_inner( + symbol = 'BTCUSDT', + entry_price = 17000, + mark_price = 17000, + position_amt = 0.1, ) + ], ), ) + ] + ) + else: + return SapiV1ManagedSubaccountFetchFutureAssetGet200Response( + code = 200, + message = 'OK', + snapshot_vos = [ + openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner( + type = 'FUTURES', + update_time = 1626400907000, + data = openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data( + assets = [ + openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_assets_inner._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data_assets_inner( + asset = 'USDT', + margin_balance = 100, + wallet_balance = 100, ) + ], + position = [ + openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_position_inner._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data_position_inner( + symbol = 'BTCUSDT', + entry_price = 17000, + mark_price = 17000, + position_amt = 0.1, ) + ], ), ) + ], + ) + """ + + def testSapiV1ManagedSubaccountFetchFutureAssetGet200Response(self): + """Test SapiV1ManagedSubaccountFetchFutureAssetGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner.py new file mode 100644 index 0000000..6100cc0 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner + +class TestSapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner(unittest.TestCase): + """SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner: + """Test SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner` + """ + model = SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner() + if include_optional: + return SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner( + type = 'FUTURES', + update_time = 1626400907000, + data = openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data( + assets = [ + openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_assets_inner._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data_assets_inner( + asset = 'USDT', + margin_balance = 100, + wallet_balance = 100, ) + ], + position = [ + openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_position_inner._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data_position_inner( + symbol = 'BTCUSDT', + entry_price = 17000, + mark_price = 17000, + position_amt = 0.1, ) + ], ) + ) + else: + return SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner( + type = 'FUTURES', + update_time = 1626400907000, + data = openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data( + assets = [ + openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_assets_inner._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data_assets_inner( + asset = 'USDT', + margin_balance = 100, + wallet_balance = 100, ) + ], + position = [ + openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_position_inner._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data_position_inner( + symbol = 'BTCUSDT', + entry_price = 17000, + mark_price = 17000, + position_amt = 0.1, ) + ], ), + ) + """ + + def testSapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner(self): + """Test SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data.py new file mode 100644 index 0000000..429cef4 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData + +class TestSapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData(unittest.TestCase): + """SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData: + """Test SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData` + """ + model = SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData() + if include_optional: + return SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData( + assets = [ + openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_assets_inner._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data_assets_inner( + asset = 'USDT', + margin_balance = 100, + wallet_balance = 100, ) + ], + position = [ + openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_position_inner._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data_position_inner( + symbol = 'BTCUSDT', + entry_price = 17000, + mark_price = 17000, + position_amt = 0.1, ) + ] + ) + else: + return SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData( + assets = [ + openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_assets_inner._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data_assets_inner( + asset = 'USDT', + margin_balance = 100, + wallet_balance = 100, ) + ], + position = [ + openapi_client.models._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_position_inner._sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshotVos_inner_data_position_inner( + symbol = 'BTCUSDT', + entry_price = 17000, + mark_price = 17000, + position_amt = 0.1, ) + ], + ) + """ + + def testSapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData(self): + """Test SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner.py new file mode 100644 index 0000000..c857a7c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_assets_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner + +class TestSapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner(unittest.TestCase): + """SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner: + """Test SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner` + """ + model = SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner() + if include_optional: + return SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner( + asset = 'USDT', + margin_balance = 100, + wallet_balance = 100 + ) + else: + return SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner( + asset = 'USDT', + margin_balance = 100, + wallet_balance = 100, + ) + """ + + def testSapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner(self): + """Test SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner.py new file mode 100644 index 0000000..d812dce --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_fetch_future_asset_get200_response_snapshot_vos_inner_data_position_inner import SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner + +class TestSapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner(unittest.TestCase): + """SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner: + """Test SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner` + """ + model = SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner() + if include_optional: + return SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner( + symbol = 'BTCUSDT', + entry_price = 17000, + mark_price = 17000, + position_amt = 0.1 + ) + else: + return SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner( + symbol = 'BTCUSDT', + entry_price = 17000, + mark_price = 17000, + position_amt = 0.1, + ) + """ + + def testSapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner(self): + """Test SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_info_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_info_get200_response.py new file mode 100644 index 0000000..9178623 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_info_get200_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_info_get200_response import SapiV1ManagedSubaccountInfoGet200Response + +class TestSapiV1ManagedSubaccountInfoGet200Response(unittest.TestCase): + """SapiV1ManagedSubaccountInfoGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountInfoGet200Response: + """Test SapiV1ManagedSubaccountInfoGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountInfoGet200Response` + """ + model = SapiV1ManagedSubaccountInfoGet200Response() + if include_optional: + return SapiV1ManagedSubaccountInfoGet200Response( + total = 3, + manager_sub_user_info_vo_list = [ + openapi_client.models._sapi_v1_managed_subaccount_info_get_200_response_manager_sub_user_info_vo_list_inner._sapi_v1_managed_subaccount_info_get_200_response_managerSubUserInfoVoList_inner( + root_user_id = 1000138475670, + managersub_user_id = 1000137842513, + bind_parent_user_id = 1000138475669, + email = 'test_0_virtual@kq3kno9imanagedsub.com', + insert_time_stamp = 1678435149000, + bind_parent_email = 'wdyw8xsh8pey@test.com', + is_sub_user_enabled = True, + is_user_active = True, + is_margin_enabled = True, + is_future_enabled = True, + is_signed_lvt_risk_agreement = True, ) + ] + ) + else: + return SapiV1ManagedSubaccountInfoGet200Response( + total = 3, + manager_sub_user_info_vo_list = [ + openapi_client.models._sapi_v1_managed_subaccount_info_get_200_response_manager_sub_user_info_vo_list_inner._sapi_v1_managed_subaccount_info_get_200_response_managerSubUserInfoVoList_inner( + root_user_id = 1000138475670, + managersub_user_id = 1000137842513, + bind_parent_user_id = 1000138475669, + email = 'test_0_virtual@kq3kno9imanagedsub.com', + insert_time_stamp = 1678435149000, + bind_parent_email = 'wdyw8xsh8pey@test.com', + is_sub_user_enabled = True, + is_user_active = True, + is_margin_enabled = True, + is_future_enabled = True, + is_signed_lvt_risk_agreement = True, ) + ], + ) + """ + + def testSapiV1ManagedSubaccountInfoGet200Response(self): + """Test SapiV1ManagedSubaccountInfoGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner.py new file mode 100644 index 0000000..8fb3255 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_info_get200_response_manager_sub_user_info_vo_list_inner import SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner + +class TestSapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner(unittest.TestCase): + """SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner: + """Test SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner` + """ + model = SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner() + if include_optional: + return SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner( + root_user_id = 1000138475670, + managersub_user_id = 1000137842513, + bind_parent_user_id = 1000138475669, + email = 'test_0_virtual@kq3kno9imanagedsub.com', + insert_time_stamp = 1678435149000, + bind_parent_email = 'wdyw8xsh8pey@test.com', + is_sub_user_enabled = True, + is_user_active = True, + is_margin_enabled = True, + is_future_enabled = True, + is_signed_lvt_risk_agreement = True + ) + else: + return SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner( + root_user_id = 1000138475670, + managersub_user_id = 1000137842513, + bind_parent_user_id = 1000138475669, + insert_time_stamp = 1678435149000, + bind_parent_email = 'wdyw8xsh8pey@test.com', + is_sub_user_enabled = True, + is_user_active = True, + is_margin_enabled = True, + is_future_enabled = True, + is_signed_lvt_risk_agreement = True, + ) + """ + + def testSapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner(self): + """Test SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_margin_asset_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_margin_asset_get200_response.py new file mode 100644 index 0000000..c423806 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_margin_asset_get200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_margin_asset_get200_response import SapiV1ManagedSubaccountMarginAssetGet200Response + +class TestSapiV1ManagedSubaccountMarginAssetGet200Response(unittest.TestCase): + """SapiV1ManagedSubaccountMarginAssetGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountMarginAssetGet200Response: + """Test SapiV1ManagedSubaccountMarginAssetGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountMarginAssetGet200Response` + """ + model = SapiV1ManagedSubaccountMarginAssetGet200Response() + if include_optional: + return SapiV1ManagedSubaccountMarginAssetGet200Response( + margin_level = '999', + total_asset_of_btc = '0', + total_liability_of_btc = '0', + total_net_asset_of_btc = '0', + user_assets = [ + openapi_client.models._sapi_v1_managed_subaccount_margin_asset_get_200_response_user_assets_inner._sapi_v1_managed_subaccount_marginAsset_get_200_response_userAssets_inner( + asset = 'BTC', + borrowed = '0', + free = '0', + interest = '0', + locked = '0', + net_asset = '0', ) + ] + ) + else: + return SapiV1ManagedSubaccountMarginAssetGet200Response( + margin_level = '999', + total_asset_of_btc = '0', + total_liability_of_btc = '0', + total_net_asset_of_btc = '0', + user_assets = [ + openapi_client.models._sapi_v1_managed_subaccount_margin_asset_get_200_response_user_assets_inner._sapi_v1_managed_subaccount_marginAsset_get_200_response_userAssets_inner( + asset = 'BTC', + borrowed = '0', + free = '0', + interest = '0', + locked = '0', + net_asset = '0', ) + ], + ) + """ + + def testSapiV1ManagedSubaccountMarginAssetGet200Response(self): + """Test SapiV1ManagedSubaccountMarginAssetGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner.py new file mode 100644 index 0000000..2d703ce --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_margin_asset_get200_response_user_assets_inner import SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner + +class TestSapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner(unittest.TestCase): + """SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner: + """Test SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner` + """ + model = SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner() + if include_optional: + return SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner( + asset = 'BTC', + borrowed = '0', + free = '0', + interest = '0', + locked = '0', + net_asset = '0' + ) + else: + return SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner( + asset = 'BTC', + borrowed = '0', + free = '0', + interest = '0', + locked = '0', + net_asset = '0', + ) + """ + + def testSapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner(self): + """Test SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response.py new file mode 100644 index 0000000..d6473f4 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response import SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response + +class TestSapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response(unittest.TestCase): + """SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response: + """Test SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response` + """ + model = SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response() + if include_optional: + return SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response( + count = 2, + manager_sub_transfer_history_vos = [ + openapi_client.models._sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response_manager_sub_transfer_history_vos_inner._sapi_v1_managed_subaccount_queryTransLogForInvestor_get_200_response_managerSubTransferHistoryVos_inner( + from_email = 'test_0_virtual@kq3kno9imanagedsub.com', + from_account_type = 'SPOT', + to_email = 'wdywl0lddakh@test.com', + to_account_type = 'SPOT', + asset = 'BNB', + amount = '0.01', + scheduled_data = 1626144956000, + create_time = 1626144956000, + status = 'SUCCESS', + tran_id = 91077779, ) + ] + ) + else: + return SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response( + count = 2, + manager_sub_transfer_history_vos = [ + openapi_client.models._sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response_manager_sub_transfer_history_vos_inner._sapi_v1_managed_subaccount_queryTransLogForInvestor_get_200_response_managerSubTransferHistoryVos_inner( + from_email = 'test_0_virtual@kq3kno9imanagedsub.com', + from_account_type = 'SPOT', + to_email = 'wdywl0lddakh@test.com', + to_account_type = 'SPOT', + asset = 'BNB', + amount = '0.01', + scheduled_data = 1626144956000, + create_time = 1626144956000, + status = 'SUCCESS', + tran_id = 91077779, ) + ], + ) + """ + + def testSapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response(self): + """Test SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner.py new file mode 100644 index 0000000..d6e8c54 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_for_investor_get200_response_manager_sub_transfer_history_vos_inner import SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner + +class TestSapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner(unittest.TestCase): + """SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner: + """Test SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner` + """ + model = SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner() + if include_optional: + return SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner( + from_email = 'test_0_virtual@kq3kno9imanagedsub.com', + from_account_type = 'SPOT', + to_email = 'wdywl0lddakh@test.com', + to_account_type = 'SPOT', + asset = 'BNB', + amount = '0.01', + scheduled_data = 1626144956000, + create_time = 1626144956000, + status = 'SUCCESS', + tran_id = 91077779 + ) + else: + return SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner( + from_email = 'test_0_virtual@kq3kno9imanagedsub.com', + from_account_type = 'SPOT', + to_email = 'wdywl0lddakh@test.com', + to_account_type = 'SPOT', + asset = 'BNB', + amount = '0.01', + scheduled_data = 1626144956000, + create_time = 1626144956000, + status = 'SUCCESS', + tran_id = 91077779, + ) + """ + + def testSapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner(self): + """Test SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_get200_response.py new file mode 100644 index 0000000..502042f --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_get200_response.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_get200_response import SapiV1ManagedSubaccountQueryTransLogGet200Response + +class TestSapiV1ManagedSubaccountQueryTransLogGet200Response(unittest.TestCase): + """SapiV1ManagedSubaccountQueryTransLogGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountQueryTransLogGet200Response: + """Test SapiV1ManagedSubaccountQueryTransLogGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountQueryTransLogGet200Response` + """ + model = SapiV1ManagedSubaccountQueryTransLogGet200Response() + if include_optional: + return SapiV1ManagedSubaccountQueryTransLogGet200Response( + count = 2, + manager_sub_transfer_history_vos = [ + openapi_client.models._sapi_v1_managed_subaccount_query_trans_log_get_200_response_manager_sub_transfer_history_vos_inner._sapi_v1_managed_subaccount_query_trans_log_get_200_response_managerSubTransferHistoryVos_inner( + from_email = 'test_0_virtual@kq3kno9imanagedsub.com', + from_account_type = 'SPOT', + to_email = 'wdywl0lddakh@test.com', + to_account_type = 'SPOT', + asset = 'BNB', + amount = '0.01', + scheduled_data = 1679416673000, + create_time = 1679416673000, + status = 'SUCCESS', + tran_id = 91077779, ) + ] + ) + else: + return SapiV1ManagedSubaccountQueryTransLogGet200Response( + count = 2, + manager_sub_transfer_history_vos = [ + openapi_client.models._sapi_v1_managed_subaccount_query_trans_log_get_200_response_manager_sub_transfer_history_vos_inner._sapi_v1_managed_subaccount_query_trans_log_get_200_response_managerSubTransferHistoryVos_inner( + from_email = 'test_0_virtual@kq3kno9imanagedsub.com', + from_account_type = 'SPOT', + to_email = 'wdywl0lddakh@test.com', + to_account_type = 'SPOT', + asset = 'BNB', + amount = '0.01', + scheduled_data = 1679416673000, + create_time = 1679416673000, + status = 'SUCCESS', + tran_id = 91077779, ) + ], + ) + """ + + def testSapiV1ManagedSubaccountQueryTransLogGet200Response(self): + """Test SapiV1ManagedSubaccountQueryTransLogGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner.py b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner.py new file mode 100644 index 0000000..adb11f5 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_managed_subaccount_query_trans_log_get200_response_manager_sub_transfer_history_vos_inner import SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner + +class TestSapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner(unittest.TestCase): + """SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner: + """Test SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner` + """ + model = SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner() + if include_optional: + return SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner( + from_email = 'test_0_virtual@kq3kno9imanagedsub.com', + from_account_type = 'SPOT', + to_email = 'wdywl0lddakh@test.com', + to_account_type = 'SPOT', + asset = 'BNB', + amount = '0.01', + scheduled_data = 1679416673000, + create_time = 1679416673000, + status = 'SUCCESS', + tran_id = 91077779 + ) + else: + return SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner( + from_email = 'test_0_virtual@kq3kno9imanagedsub.com', + from_account_type = 'SPOT', + to_email = 'wdywl0lddakh@test.com', + to_account_type = 'SPOT', + asset = 'BNB', + amount = '0.01', + scheduled_data = 1679416673000, + create_time = 1679416673000, + status = 'SUCCESS', + tran_id = 91077779, + ) + """ + + def testSapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner(self): + """Test SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_account_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_account_get200_response.py new file mode 100644 index 0000000..40292fe --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_account_get200_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_account_get200_response import SapiV1MarginAccountGet200Response + +class TestSapiV1MarginAccountGet200Response(unittest.TestCase): + """SapiV1MarginAccountGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginAccountGet200Response: + """Test SapiV1MarginAccountGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginAccountGet200Response` + """ + model = SapiV1MarginAccountGet200Response() + if include_optional: + return SapiV1MarginAccountGet200Response( + borrow_enabled = True, + margin_level = '11.64405625', + total_asset_of_btc = '6.82728457', + total_liability_of_btc = '0.58633215', + total_net_asset_of_btc = '6.24095242', + trade_enabled = True, + transfer_enabled = True, + user_assets = [ + openapi_client.models._sapi_v1_margin_account_get_200_response_user_assets_inner._sapi_v1_margin_account_get_200_response_userAssets_inner( + asset = 'BTC', + borrowed = '0.00000000', + free = '0.00499500', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00499500', ) + ] + ) + else: + return SapiV1MarginAccountGet200Response( + borrow_enabled = True, + margin_level = '11.64405625', + total_asset_of_btc = '6.82728457', + total_liability_of_btc = '0.58633215', + total_net_asset_of_btc = '6.24095242', + trade_enabled = True, + transfer_enabled = True, + user_assets = [ + openapi_client.models._sapi_v1_margin_account_get_200_response_user_assets_inner._sapi_v1_margin_account_get_200_response_userAssets_inner( + asset = 'BTC', + borrowed = '0.00000000', + free = '0.00499500', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00499500', ) + ], + ) + """ + + def testSapiV1MarginAccountGet200Response(self): + """Test SapiV1MarginAccountGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_account_get200_response_user_assets_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_account_get200_response_user_assets_inner.py new file mode 100644 index 0000000..3e4eb9b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_account_get200_response_user_assets_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_account_get200_response_user_assets_inner import SapiV1MarginAccountGet200ResponseUserAssetsInner + +class TestSapiV1MarginAccountGet200ResponseUserAssetsInner(unittest.TestCase): + """SapiV1MarginAccountGet200ResponseUserAssetsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginAccountGet200ResponseUserAssetsInner: + """Test SapiV1MarginAccountGet200ResponseUserAssetsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginAccountGet200ResponseUserAssetsInner` + """ + model = SapiV1MarginAccountGet200ResponseUserAssetsInner() + if include_optional: + return SapiV1MarginAccountGet200ResponseUserAssetsInner( + asset = 'BTC', + borrowed = '0.00000000', + free = '0.00499500', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00499500' + ) + else: + return SapiV1MarginAccountGet200ResponseUserAssetsInner( + asset = 'BTC', + borrowed = '0.00000000', + free = '0.00499500', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00499500', + ) + """ + + def testSapiV1MarginAccountGet200ResponseUserAssetsInner(self): + """Test SapiV1MarginAccountGet200ResponseUserAssetsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_all_assets_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_all_assets_get200_response_inner.py new file mode 100644 index 0000000..faf34cb --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_all_assets_get200_response_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_all_assets_get200_response_inner import SapiV1MarginAllAssetsGet200ResponseInner + +class TestSapiV1MarginAllAssetsGet200ResponseInner(unittest.TestCase): + """SapiV1MarginAllAssetsGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginAllAssetsGet200ResponseInner: + """Test SapiV1MarginAllAssetsGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginAllAssetsGet200ResponseInner` + """ + model = SapiV1MarginAllAssetsGet200ResponseInner() + if include_optional: + return SapiV1MarginAllAssetsGet200ResponseInner( + asset_full_name = 'Binance coin', + asset_name = 'BNB', + is_borrowable = True, + is_mortgageable = True, + user_min_borrow = '0.00000000', + user_min_repay = '0.00000000' + ) + else: + return SapiV1MarginAllAssetsGet200ResponseInner( + asset_full_name = 'Binance coin', + asset_name = 'BNB', + is_borrowable = True, + is_mortgageable = True, + user_min_borrow = '0.00000000', + user_min_repay = '0.00000000', + ) + """ + + def testSapiV1MarginAllAssetsGet200ResponseInner(self): + """Test SapiV1MarginAllAssetsGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_all_pairs_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_all_pairs_get200_response_inner.py new file mode 100644 index 0000000..57b3689 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_all_pairs_get200_response_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_all_pairs_get200_response_inner import SapiV1MarginAllPairsGet200ResponseInner + +class TestSapiV1MarginAllPairsGet200ResponseInner(unittest.TestCase): + """SapiV1MarginAllPairsGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginAllPairsGet200ResponseInner: + """Test SapiV1MarginAllPairsGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginAllPairsGet200ResponseInner` + """ + model = SapiV1MarginAllPairsGet200ResponseInner() + if include_optional: + return SapiV1MarginAllPairsGet200ResponseInner( + base = 'BNB', + id = 351637150141315861, + is_buy_allowed = True, + is_margin_trade = True, + is_sell_allowed = True, + quote = 'BTC', + symbol = 'BNBBTC' + ) + else: + return SapiV1MarginAllPairsGet200ResponseInner( + base = 'BNB', + id = 351637150141315861, + is_buy_allowed = True, + is_margin_trade = True, + is_sell_allowed = True, + quote = 'BTC', + symbol = 'BNBBTC', + ) + """ + + def testSapiV1MarginAllPairsGet200ResponseInner(self): + """Test SapiV1MarginAllPairsGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_available_inventory_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_available_inventory_get200_response.py new file mode 100644 index 0000000..58d1d2e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_available_inventory_get200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_available_inventory_get200_response import SapiV1MarginAvailableInventoryGet200Response + +class TestSapiV1MarginAvailableInventoryGet200Response(unittest.TestCase): + """SapiV1MarginAvailableInventoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginAvailableInventoryGet200Response: + """Test SapiV1MarginAvailableInventoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginAvailableInventoryGet200Response` + """ + model = SapiV1MarginAvailableInventoryGet200Response() + if include_optional: + return SapiV1MarginAvailableInventoryGet200Response( + assets = openapi_client.models._sapi_v1_margin_available_inventory_get_200_response_assets._sapi_v1_margin_available_inventory_get_200_response_assets( + matic = '100000000', + stpt = '100000000', + tvk = '100000000', + shib = '97409653', ), + update_time = 1699272487 + ) + else: + return SapiV1MarginAvailableInventoryGet200Response( + assets = openapi_client.models._sapi_v1_margin_available_inventory_get_200_response_assets._sapi_v1_margin_available_inventory_get_200_response_assets( + matic = '100000000', + stpt = '100000000', + tvk = '100000000', + shib = '97409653', ), + update_time = 1699272487, + ) + """ + + def testSapiV1MarginAvailableInventoryGet200Response(self): + """Test SapiV1MarginAvailableInventoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_available_inventory_get200_response_assets.py b/target/python/binance_openapi/test/test_sapi_v1_margin_available_inventory_get200_response_assets.py new file mode 100644 index 0000000..25b6d38 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_available_inventory_get200_response_assets.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_available_inventory_get200_response_assets import SapiV1MarginAvailableInventoryGet200ResponseAssets + +class TestSapiV1MarginAvailableInventoryGet200ResponseAssets(unittest.TestCase): + """SapiV1MarginAvailableInventoryGet200ResponseAssets unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginAvailableInventoryGet200ResponseAssets: + """Test SapiV1MarginAvailableInventoryGet200ResponseAssets + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginAvailableInventoryGet200ResponseAssets` + """ + model = SapiV1MarginAvailableInventoryGet200ResponseAssets() + if include_optional: + return SapiV1MarginAvailableInventoryGet200ResponseAssets( + matic = '100000000', + stpt = '100000000', + tvk = '100000000', + shib = '97409653' + ) + else: + return SapiV1MarginAvailableInventoryGet200ResponseAssets( + matic = '100000000', + stpt = '100000000', + tvk = '100000000', + shib = '97409653', + ) + """ + + def testSapiV1MarginAvailableInventoryGet200ResponseAssets(self): + """Test SapiV1MarginAvailableInventoryGet200ResponseAssets""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_borrow_repay_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_borrow_repay_get200_response.py new file mode 100644 index 0000000..33bad46 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_borrow_repay_get200_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_borrow_repay_get200_response import SapiV1MarginBorrowRepayGet200Response + +class TestSapiV1MarginBorrowRepayGet200Response(unittest.TestCase): + """SapiV1MarginBorrowRepayGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginBorrowRepayGet200Response: + """Test SapiV1MarginBorrowRepayGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginBorrowRepayGet200Response` + """ + model = SapiV1MarginBorrowRepayGet200Response() + if include_optional: + return SapiV1MarginBorrowRepayGet200Response( + rows = [ + openapi_client.models._sapi_v1_margin_borrow_repay_get_200_response_rows_inner._sapi_v1_margin_borrow_repay_get_200_response_rows_inner( + isolated_symbol = '', + amount = '', + asset = '', + interest = '', + principal = '', + status = '', + timestamp = 56, + tx_id = 56, ) + ], + total = 56 + ) + else: + return SapiV1MarginBorrowRepayGet200Response( + rows = [ + openapi_client.models._sapi_v1_margin_borrow_repay_get_200_response_rows_inner._sapi_v1_margin_borrow_repay_get_200_response_rows_inner( + isolated_symbol = '', + amount = '', + asset = '', + interest = '', + principal = '', + status = '', + timestamp = 56, + tx_id = 56, ) + ], + total = 56, + ) + """ + + def testSapiV1MarginBorrowRepayGet200Response(self): + """Test SapiV1MarginBorrowRepayGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_borrow_repay_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_borrow_repay_get200_response_rows_inner.py new file mode 100644 index 0000000..b224c01 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_borrow_repay_get200_response_rows_inner.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_borrow_repay_get200_response_rows_inner import SapiV1MarginBorrowRepayGet200ResponseRowsInner + +class TestSapiV1MarginBorrowRepayGet200ResponseRowsInner(unittest.TestCase): + """SapiV1MarginBorrowRepayGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginBorrowRepayGet200ResponseRowsInner: + """Test SapiV1MarginBorrowRepayGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginBorrowRepayGet200ResponseRowsInner` + """ + model = SapiV1MarginBorrowRepayGet200ResponseRowsInner() + if include_optional: + return SapiV1MarginBorrowRepayGet200ResponseRowsInner( + isolated_symbol = '', + amount = '', + asset = '', + interest = '', + principal = '', + status = '', + timestamp = 56, + tx_id = 56 + ) + else: + return SapiV1MarginBorrowRepayGet200ResponseRowsInner( + asset = '', + principal = '', + status = '', + timestamp = 56, + tx_id = 56, + ) + """ + + def testSapiV1MarginBorrowRepayGet200ResponseRowsInner(self): + """Test SapiV1MarginBorrowRepayGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_borrow_repay_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_borrow_repay_post200_response.py new file mode 100644 index 0000000..730c596 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_borrow_repay_post200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_borrow_repay_post200_response import SapiV1MarginBorrowRepayPost200Response + +class TestSapiV1MarginBorrowRepayPost200Response(unittest.TestCase): + """SapiV1MarginBorrowRepayPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginBorrowRepayPost200Response: + """Test SapiV1MarginBorrowRepayPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginBorrowRepayPost200Response` + """ + model = SapiV1MarginBorrowRepayPost200Response() + if include_optional: + return SapiV1MarginBorrowRepayPost200Response( + tran_id = 100000001 + ) + else: + return SapiV1MarginBorrowRepayPost200Response( + tran_id = 100000001, + ) + """ + + def testSapiV1MarginBorrowRepayPost200Response(self): + """Test SapiV1MarginBorrowRepayPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_capital_flow_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_capital_flow_get200_response_inner.py new file mode 100644 index 0000000..ca5ef3e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_capital_flow_get200_response_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_capital_flow_get200_response_inner import SapiV1MarginCapitalFlowGet200ResponseInner + +class TestSapiV1MarginCapitalFlowGet200ResponseInner(unittest.TestCase): + """SapiV1MarginCapitalFlowGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginCapitalFlowGet200ResponseInner: + """Test SapiV1MarginCapitalFlowGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginCapitalFlowGet200ResponseInner` + """ + model = SapiV1MarginCapitalFlowGet200ResponseInner() + if include_optional: + return SapiV1MarginCapitalFlowGet200ResponseInner( + id = 123456, + tran_id = 123123, + timestamp = 1691116657000, + asset = 'USDT', + symbol = 'BTCUSDT', + type = 'BORROW', + amount = '101' + ) + else: + return SapiV1MarginCapitalFlowGet200ResponseInner( + id = 123456, + tran_id = 123123, + timestamp = 1691116657000, + asset = 'USDT', + symbol = 'BTCUSDT', + type = 'BORROW', + amount = '101', + ) + """ + + def testSapiV1MarginCapitalFlowGet200ResponseInner(self): + """Test SapiV1MarginCapitalFlowGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner.py new file mode 100644 index 0000000..a42878b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner import SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner + +class TestSapiV1MarginCrossMarginCollateralRatioGet200ResponseInner(unittest.TestCase): + """SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner: + """Test SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner` + """ + model = SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner() + if include_optional: + return SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner( + collaterals = [ + openapi_client.models._sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner_collaterals_inner._sapi_v1_margin_crossMarginCollateralRatio_get_200_response_inner_collaterals_inner( + min_usd_value = '0', + max_usd_value = '13000000', + discount_rate = '1', ) + ], + asset_names = [ + 'BNX' + ] + ) + else: + return SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner( + collaterals = [ + openapi_client.models._sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner_collaterals_inner._sapi_v1_margin_crossMarginCollateralRatio_get_200_response_inner_collaterals_inner( + min_usd_value = '0', + max_usd_value = '13000000', + discount_rate = '1', ) + ], + asset_names = [ + 'BNX' + ], + ) + """ + + def testSapiV1MarginCrossMarginCollateralRatioGet200ResponseInner(self): + """Test SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner.py new file mode 100644 index 0000000..dbb0b6e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_cross_margin_collateral_ratio_get200_response_inner_collaterals_inner import SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner + +class TestSapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner(unittest.TestCase): + """SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner: + """Test SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner` + """ + model = SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner() + if include_optional: + return SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner( + min_usd_value = '0', + max_usd_value = '13000000', + discount_rate = '1' + ) + else: + return SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner( + min_usd_value = '0', + max_usd_value = '13000000', + discount_rate = '1', + ) + """ + + def testSapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner(self): + """Test SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_cross_margin_data_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_cross_margin_data_get200_response_inner.py new file mode 100644 index 0000000..7459f6e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_cross_margin_data_get200_response_inner.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_cross_margin_data_get200_response_inner import SapiV1MarginCrossMarginDataGet200ResponseInner + +class TestSapiV1MarginCrossMarginDataGet200ResponseInner(unittest.TestCase): + """SapiV1MarginCrossMarginDataGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginCrossMarginDataGet200ResponseInner: + """Test SapiV1MarginCrossMarginDataGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginCrossMarginDataGet200ResponseInner` + """ + model = SapiV1MarginCrossMarginDataGet200ResponseInner() + if include_optional: + return SapiV1MarginCrossMarginDataGet200ResponseInner( + vip_level = 0, + coin = 'BTC', + transfer_in = True, + borrowable = True, + daily_interest = '0.00026125', + yearly_interest = '0.0953', + borrow_limit = '180', + marginable_pairs = ["BNBBTC","TRXBTC","ETHBTC","BTCUSDT"] + ) + else: + return SapiV1MarginCrossMarginDataGet200ResponseInner( + vip_level = 0, + coin = 'BTC', + transfer_in = True, + borrowable = True, + daily_interest = '0.00026125', + yearly_interest = '0.0953', + borrow_limit = '180', + marginable_pairs = ["BNBBTC","TRXBTC","ETHBTC","BTCUSDT"], + ) + """ + + def testSapiV1MarginCrossMarginDataGet200ResponseInner(self): + """Test SapiV1MarginCrossMarginDataGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_delist_schedule_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_delist_schedule_get200_response_inner.py new file mode 100644 index 0000000..bde014b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_delist_schedule_get200_response_inner.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_delist_schedule_get200_response_inner import SapiV1MarginDelistScheduleGet200ResponseInner + +class TestSapiV1MarginDelistScheduleGet200ResponseInner(unittest.TestCase): + """SapiV1MarginDelistScheduleGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginDelistScheduleGet200ResponseInner: + """Test SapiV1MarginDelistScheduleGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginDelistScheduleGet200ResponseInner` + """ + model = SapiV1MarginDelistScheduleGet200ResponseInner() + if include_optional: + return SapiV1MarginDelistScheduleGet200ResponseInner( + delist_time = 1686161202000, + cross_margin_assets = [ + 'BTC' + ], + isolated_margin_symbols = [ + 'BNBUSDT' + ] + ) + else: + return SapiV1MarginDelistScheduleGet200ResponseInner( + ) + """ + + def testSapiV1MarginDelistScheduleGet200ResponseInner(self): + """Test SapiV1MarginDelistScheduleGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_exchange_small_liability_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_exchange_small_liability_get200_response_inner.py new file mode 100644 index 0000000..054501d --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_exchange_small_liability_get200_response_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_exchange_small_liability_get200_response_inner import SapiV1MarginExchangeSmallLiabilityGet200ResponseInner + +class TestSapiV1MarginExchangeSmallLiabilityGet200ResponseInner(unittest.TestCase): + """SapiV1MarginExchangeSmallLiabilityGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginExchangeSmallLiabilityGet200ResponseInner: + """Test SapiV1MarginExchangeSmallLiabilityGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginExchangeSmallLiabilityGet200ResponseInner` + """ + model = SapiV1MarginExchangeSmallLiabilityGet200ResponseInner() + if include_optional: + return SapiV1MarginExchangeSmallLiabilityGet200ResponseInner( + asset = 'ETH', + interest = '0.00083334', + principal = '0.001', + liability_asset = 'USDT', + liability_qty = 0.3552 + ) + else: + return SapiV1MarginExchangeSmallLiabilityGet200ResponseInner( + asset = 'ETH', + interest = '0.00083334', + principal = '0.001', + liability_asset = 'USDT', + liability_qty = 0.3552, + ) + """ + + def testSapiV1MarginExchangeSmallLiabilityGet200ResponseInner(self): + """Test SapiV1MarginExchangeSmallLiabilityGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_exchange_small_liability_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_exchange_small_liability_history_get200_response.py new file mode 100644 index 0000000..51b72ee --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_exchange_small_liability_history_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_exchange_small_liability_history_get200_response import SapiV1MarginExchangeSmallLiabilityHistoryGet200Response + +class TestSapiV1MarginExchangeSmallLiabilityHistoryGet200Response(unittest.TestCase): + """SapiV1MarginExchangeSmallLiabilityHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginExchangeSmallLiabilityHistoryGet200Response: + """Test SapiV1MarginExchangeSmallLiabilityHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginExchangeSmallLiabilityHistoryGet200Response` + """ + model = SapiV1MarginExchangeSmallLiabilityHistoryGet200Response() + if include_optional: + return SapiV1MarginExchangeSmallLiabilityHistoryGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v1_margin_exchange_small_liability_history_get_200_response_rows_inner._sapi_v1_margin_exchange_small_liability_history_get_200_response_rows_inner( + asset = 'ETH', + amount = '0.00083434', + target_asset = 'BUSD', + target_amount = '1.37576819', + biz_type = 'EXCHANGE_SMALL_LIABILITY', + timestamp = 1672801339253, ) + ] + ) + else: + return SapiV1MarginExchangeSmallLiabilityHistoryGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v1_margin_exchange_small_liability_history_get_200_response_rows_inner._sapi_v1_margin_exchange_small_liability_history_get_200_response_rows_inner( + asset = 'ETH', + amount = '0.00083434', + target_asset = 'BUSD', + target_amount = '1.37576819', + biz_type = 'EXCHANGE_SMALL_LIABILITY', + timestamp = 1672801339253, ) + ], + ) + """ + + def testSapiV1MarginExchangeSmallLiabilityHistoryGet200Response(self): + """Test SapiV1MarginExchangeSmallLiabilityHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner.py new file mode 100644 index 0000000..2aa4345 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_exchange_small_liability_history_get200_response_rows_inner import SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner + +class TestSapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner: + """Test SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner` + """ + model = SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner( + asset = 'ETH', + amount = '0.00083434', + target_asset = 'BUSD', + target_amount = '1.37576819', + biz_type = 'EXCHANGE_SMALL_LIABILITY', + timestamp = 1672801339253 + ) + else: + return SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner( + asset = 'ETH', + amount = '0.00083434', + target_asset = 'BUSD', + target_amount = '1.37576819', + biz_type = 'EXCHANGE_SMALL_LIABILITY', + timestamp = 1672801339253, + ) + """ + + def testSapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner(self): + """Test SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_force_liquidation_rec_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_force_liquidation_rec_get200_response.py new file mode 100644 index 0000000..f07d371 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_force_liquidation_rec_get200_response.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_force_liquidation_rec_get200_response import SapiV1MarginForceLiquidationRecGet200Response + +class TestSapiV1MarginForceLiquidationRecGet200Response(unittest.TestCase): + """SapiV1MarginForceLiquidationRecGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginForceLiquidationRecGet200Response: + """Test SapiV1MarginForceLiquidationRecGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginForceLiquidationRecGet200Response` + """ + model = SapiV1MarginForceLiquidationRecGet200Response() + if include_optional: + return SapiV1MarginForceLiquidationRecGet200Response( + rows = [ + openapi_client.models._sapi_v1_margin_force_liquidation_rec_get_200_response_rows_inner._sapi_v1_margin_forceLiquidationRec_get_200_response_rows_inner( + avg_price = '', + executed_qty = '', + order_id = 56, + price = '', + qty = '', + side = '', + symbol = '', + time_in_force = '', + is_isolated = True, + updated_time = 56, ) + ], + total = 1 + ) + else: + return SapiV1MarginForceLiquidationRecGet200Response( + rows = [ + openapi_client.models._sapi_v1_margin_force_liquidation_rec_get_200_response_rows_inner._sapi_v1_margin_forceLiquidationRec_get_200_response_rows_inner( + avg_price = '', + executed_qty = '', + order_id = 56, + price = '', + qty = '', + side = '', + symbol = '', + time_in_force = '', + is_isolated = True, + updated_time = 56, ) + ], + total = 1, + ) + """ + + def testSapiV1MarginForceLiquidationRecGet200Response(self): + """Test SapiV1MarginForceLiquidationRecGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner.py new file mode 100644 index 0000000..bf6dac3 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_force_liquidation_rec_get200_response_rows_inner import SapiV1MarginForceLiquidationRecGet200ResponseRowsInner + +class TestSapiV1MarginForceLiquidationRecGet200ResponseRowsInner(unittest.TestCase): + """SapiV1MarginForceLiquidationRecGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginForceLiquidationRecGet200ResponseRowsInner: + """Test SapiV1MarginForceLiquidationRecGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginForceLiquidationRecGet200ResponseRowsInner` + """ + model = SapiV1MarginForceLiquidationRecGet200ResponseRowsInner() + if include_optional: + return SapiV1MarginForceLiquidationRecGet200ResponseRowsInner( + avg_price = '', + executed_qty = '', + order_id = 56, + price = '', + qty = '', + side = '', + symbol = '', + time_in_force = '', + is_isolated = True, + updated_time = 56 + ) + else: + return SapiV1MarginForceLiquidationRecGet200ResponseRowsInner( + avg_price = '', + executed_qty = '', + order_id = 56, + price = '', + qty = '', + side = '', + symbol = '', + time_in_force = '', + is_isolated = True, + updated_time = 56, + ) + """ + + def testSapiV1MarginForceLiquidationRecGet200ResponseRowsInner(self): + """Test SapiV1MarginForceLiquidationRecGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_interest_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_interest_history_get200_response.py new file mode 100644 index 0000000..354e29d --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_interest_history_get200_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_interest_history_get200_response import SapiV1MarginInterestHistoryGet200Response + +class TestSapiV1MarginInterestHistoryGet200Response(unittest.TestCase): + """SapiV1MarginInterestHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginInterestHistoryGet200Response: + """Test SapiV1MarginInterestHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginInterestHistoryGet200Response` + """ + model = SapiV1MarginInterestHistoryGet200Response() + if include_optional: + return SapiV1MarginInterestHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_margin_interest_history_get_200_response_rows_inner._sapi_v1_margin_interestHistory_get_200_response_rows_inner( + isolated_symbol = 'BNBUSDT', + asset = 'BNB', + interest = '0.01866667', + interest_accured_time = 1566813600, + interest_rate = '0.01600000', + principal = '36.22000000', + type = 'ON_BORROW', ) + ], + total = 1 + ) + else: + return SapiV1MarginInterestHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_margin_interest_history_get_200_response_rows_inner._sapi_v1_margin_interestHistory_get_200_response_rows_inner( + isolated_symbol = 'BNBUSDT', + asset = 'BNB', + interest = '0.01866667', + interest_accured_time = 1566813600, + interest_rate = '0.01600000', + principal = '36.22000000', + type = 'ON_BORROW', ) + ], + total = 1, + ) + """ + + def testSapiV1MarginInterestHistoryGet200Response(self): + """Test SapiV1MarginInterestHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_interest_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_interest_history_get200_response_rows_inner.py new file mode 100644 index 0000000..149f3f9 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_interest_history_get200_response_rows_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_interest_history_get200_response_rows_inner import SapiV1MarginInterestHistoryGet200ResponseRowsInner + +class TestSapiV1MarginInterestHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1MarginInterestHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginInterestHistoryGet200ResponseRowsInner: + """Test SapiV1MarginInterestHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginInterestHistoryGet200ResponseRowsInner` + """ + model = SapiV1MarginInterestHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1MarginInterestHistoryGet200ResponseRowsInner( + isolated_symbol = 'BNBUSDT', + asset = 'BNB', + interest = '0.01866667', + interest_accured_time = 1566813600, + interest_rate = '0.01600000', + principal = '36.22000000', + type = 'ON_BORROW' + ) + else: + return SapiV1MarginInterestHistoryGet200ResponseRowsInner( + isolated_symbol = 'BNBUSDT', + asset = 'BNB', + interest = '0.01866667', + interest_accured_time = 1566813600, + interest_rate = '0.01600000', + principal = '36.22000000', + type = 'ON_BORROW', + ) + """ + + def testSapiV1MarginInterestHistoryGet200ResponseRowsInner(self): + """Test SapiV1MarginInterestHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_interest_rate_history_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_interest_rate_history_get200_response_inner.py new file mode 100644 index 0000000..e98a39e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_interest_rate_history_get200_response_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_interest_rate_history_get200_response_inner import SapiV1MarginInterestRateHistoryGet200ResponseInner + +class TestSapiV1MarginInterestRateHistoryGet200ResponseInner(unittest.TestCase): + """SapiV1MarginInterestRateHistoryGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginInterestRateHistoryGet200ResponseInner: + """Test SapiV1MarginInterestRateHistoryGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginInterestRateHistoryGet200ResponseInner` + """ + model = SapiV1MarginInterestRateHistoryGet200ResponseInner() + if include_optional: + return SapiV1MarginInterestRateHistoryGet200ResponseInner( + asset = 'BTC', + daily_interest_rate = '0.00025000', + timestamp = 1611544731000, + vip_level = 1 + ) + else: + return SapiV1MarginInterestRateHistoryGet200ResponseInner( + asset = 'BTC', + daily_interest_rate = '0.00025000', + timestamp = 1611544731000, + vip_level = 1, + ) + """ + + def testSapiV1MarginInterestRateHistoryGet200ResponseInner(self): + """Test SapiV1MarginInterestRateHistoryGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_account_limit_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_account_limit_get200_response.py new file mode 100644 index 0000000..962f8d4 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_account_limit_get200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_isolated_account_limit_get200_response import SapiV1MarginIsolatedAccountLimitGet200Response + +class TestSapiV1MarginIsolatedAccountLimitGet200Response(unittest.TestCase): + """SapiV1MarginIsolatedAccountLimitGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginIsolatedAccountLimitGet200Response: + """Test SapiV1MarginIsolatedAccountLimitGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginIsolatedAccountLimitGet200Response` + """ + model = SapiV1MarginIsolatedAccountLimitGet200Response() + if include_optional: + return SapiV1MarginIsolatedAccountLimitGet200Response( + enabled_account = 5, + max_account = 20 + ) + else: + return SapiV1MarginIsolatedAccountLimitGet200Response( + enabled_account = 5, + max_account = 20, + ) + """ + + def testSapiV1MarginIsolatedAccountLimitGet200Response(self): + """Test SapiV1MarginIsolatedAccountLimitGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_account_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_account_post200_response.py new file mode 100644 index 0000000..e980788 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_account_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_isolated_account_post200_response import SapiV1MarginIsolatedAccountPost200Response + +class TestSapiV1MarginIsolatedAccountPost200Response(unittest.TestCase): + """SapiV1MarginIsolatedAccountPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginIsolatedAccountPost200Response: + """Test SapiV1MarginIsolatedAccountPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginIsolatedAccountPost200Response` + """ + model = SapiV1MarginIsolatedAccountPost200Response() + if include_optional: + return SapiV1MarginIsolatedAccountPost200Response( + success = True, + symbol = 'BTCUSDT' + ) + else: + return SapiV1MarginIsolatedAccountPost200Response( + success = True, + symbol = 'BTCUSDT', + ) + """ + + def testSapiV1MarginIsolatedAccountPost200Response(self): + """Test SapiV1MarginIsolatedAccountPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_all_pairs_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_all_pairs_get200_response_inner.py new file mode 100644 index 0000000..fb4c1e0 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_all_pairs_get200_response_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_isolated_all_pairs_get200_response_inner import SapiV1MarginIsolatedAllPairsGet200ResponseInner + +class TestSapiV1MarginIsolatedAllPairsGet200ResponseInner(unittest.TestCase): + """SapiV1MarginIsolatedAllPairsGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginIsolatedAllPairsGet200ResponseInner: + """Test SapiV1MarginIsolatedAllPairsGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginIsolatedAllPairsGet200ResponseInner` + """ + model = SapiV1MarginIsolatedAllPairsGet200ResponseInner() + if include_optional: + return SapiV1MarginIsolatedAllPairsGet200ResponseInner( + symbol = 'BTCUSDT', + base = 'BTC', + quote = 'USDT', + is_margin_trade = True, + is_buy_allowed = True, + is_sell_allowed = True + ) + else: + return SapiV1MarginIsolatedAllPairsGet200ResponseInner( + symbol = 'BTCUSDT', + base = 'BTC', + quote = 'USDT', + is_margin_trade = True, + is_buy_allowed = True, + is_sell_allowed = True, + ) + """ + + def testSapiV1MarginIsolatedAllPairsGet200ResponseInner(self): + """Test SapiV1MarginIsolatedAllPairsGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_margin_data_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_margin_data_get200_response_inner.py new file mode 100644 index 0000000..e4bfd91 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_margin_data_get200_response_inner.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_isolated_margin_data_get200_response_inner import SapiV1MarginIsolatedMarginDataGet200ResponseInner + +class TestSapiV1MarginIsolatedMarginDataGet200ResponseInner(unittest.TestCase): + """SapiV1MarginIsolatedMarginDataGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginIsolatedMarginDataGet200ResponseInner: + """Test SapiV1MarginIsolatedMarginDataGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginIsolatedMarginDataGet200ResponseInner` + """ + model = SapiV1MarginIsolatedMarginDataGet200ResponseInner() + if include_optional: + return SapiV1MarginIsolatedMarginDataGet200ResponseInner( + vip_level = 0, + symbol = 'BTCUSDT', + leverage = '10', + data = [{"coin":"BTC","dailyInterest":"0.00026125","borrowLimit":"270"},{"coin":"USDT","dailyInterest":"0.000475","borrowLimit":"2100000"}] + ) + else: + return SapiV1MarginIsolatedMarginDataGet200ResponseInner( + ) + """ + + def testSapiV1MarginIsolatedMarginDataGet200ResponseInner(self): + """Test SapiV1MarginIsolatedMarginDataGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner.py new file mode 100644 index 0000000..5078597 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_isolated_margin_data_get200_response_inner_data_inner import SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner + +class TestSapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner(unittest.TestCase): + """SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner: + """Test SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner` + """ + model = SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner() + if include_optional: + return SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner( + coin = '', + daily_interest = '', + borrow_limit = '' + ) + else: + return SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner( + ) + """ + + def testSapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner(self): + """Test SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_margin_tier_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_margin_tier_get200_response_inner.py new file mode 100644 index 0000000..3ebb4f2 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_isolated_margin_tier_get200_response_inner.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_isolated_margin_tier_get200_response_inner import SapiV1MarginIsolatedMarginTierGet200ResponseInner + +class TestSapiV1MarginIsolatedMarginTierGet200ResponseInner(unittest.TestCase): + """SapiV1MarginIsolatedMarginTierGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginIsolatedMarginTierGet200ResponseInner: + """Test SapiV1MarginIsolatedMarginTierGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginIsolatedMarginTierGet200ResponseInner` + """ + model = SapiV1MarginIsolatedMarginTierGet200ResponseInner() + if include_optional: + return SapiV1MarginIsolatedMarginTierGet200ResponseInner( + symbol = 'BTCUSDT', + tier = 1, + effective_multiple = '10', + initial_risk_ratio = '1.111', + liquidation_risk_ratio = '1.05', + base_asset_max_borrowable = '9', + quote_asset_max_borrowable = '70000' + ) + else: + return SapiV1MarginIsolatedMarginTierGet200ResponseInner( + ) + """ + + def testSapiV1MarginIsolatedMarginTierGet200ResponseInner(self): + """Test SapiV1MarginIsolatedMarginTierGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_leverage_bracket_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_leverage_bracket_get200_response_inner.py new file mode 100644 index 0000000..4c8c6ab --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_leverage_bracket_get200_response_inner.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_leverage_bracket_get200_response_inner import SapiV1MarginLeverageBracketGet200ResponseInner + +class TestSapiV1MarginLeverageBracketGet200ResponseInner(unittest.TestCase): + """SapiV1MarginLeverageBracketGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginLeverageBracketGet200ResponseInner: + """Test SapiV1MarginLeverageBracketGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginLeverageBracketGet200ResponseInner` + """ + model = SapiV1MarginLeverageBracketGet200ResponseInner() + if include_optional: + return SapiV1MarginLeverageBracketGet200ResponseInner( + asset_names = [ + 'BTC' + ], + rank = 1, + brackets = [ + openapi_client.models._sapi_v1_margin_leverage_bracket_get_200_response_inner_brackets_inner._sapi_v1_margin_leverageBracket_get_200_response_inner_brackets_inner( + leverage = 10, + max_debt = 1000000.0, + maintenance_margin_rate = 0.02, + initial_margin_rate = 0.1112, + fast_num = 60000.0, ) + ] + ) + else: + return SapiV1MarginLeverageBracketGet200ResponseInner( + asset_names = [ + 'BTC' + ], + rank = 1, + brackets = [ + openapi_client.models._sapi_v1_margin_leverage_bracket_get_200_response_inner_brackets_inner._sapi_v1_margin_leverageBracket_get_200_response_inner_brackets_inner( + leverage = 10, + max_debt = 1000000.0, + maintenance_margin_rate = 0.02, + initial_margin_rate = 0.1112, + fast_num = 60000.0, ) + ], + ) + """ + + def testSapiV1MarginLeverageBracketGet200ResponseInner(self): + """Test SapiV1MarginLeverageBracketGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner.py new file mode 100644 index 0000000..3df4c4b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_leverage_bracket_get200_response_inner_brackets_inner import SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner + +class TestSapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner(unittest.TestCase): + """SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner: + """Test SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner` + """ + model = SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner() + if include_optional: + return SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner( + leverage = 10, + max_debt = 1000000.0, + maintenance_margin_rate = 0.02, + initial_margin_rate = 0.1112, + fast_num = 60000.0 + ) + else: + return SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner( + ) + """ + + def testSapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner(self): + """Test SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_max_borrowable_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_max_borrowable_get200_response.py new file mode 100644 index 0000000..f86a142 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_max_borrowable_get200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_max_borrowable_get200_response import SapiV1MarginMaxBorrowableGet200Response + +class TestSapiV1MarginMaxBorrowableGet200Response(unittest.TestCase): + """SapiV1MarginMaxBorrowableGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginMaxBorrowableGet200Response: + """Test SapiV1MarginMaxBorrowableGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginMaxBorrowableGet200Response` + """ + model = SapiV1MarginMaxBorrowableGet200Response() + if include_optional: + return SapiV1MarginMaxBorrowableGet200Response( + amount = '1.69248805', + borrow_limit = '60' + ) + else: + return SapiV1MarginMaxBorrowableGet200Response( + amount = '1.69248805', + borrow_limit = '60', + ) + """ + + def testSapiV1MarginMaxBorrowableGet200Response(self): + """Test SapiV1MarginMaxBorrowableGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_max_leverage_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_max_leverage_post200_response.py new file mode 100644 index 0000000..20b1955 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_max_leverage_post200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_max_leverage_post200_response import SapiV1MarginMaxLeveragePost200Response + +class TestSapiV1MarginMaxLeveragePost200Response(unittest.TestCase): + """SapiV1MarginMaxLeveragePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginMaxLeveragePost200Response: + """Test SapiV1MarginMaxLeveragePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginMaxLeveragePost200Response` + """ + model = SapiV1MarginMaxLeveragePost200Response() + if include_optional: + return SapiV1MarginMaxLeveragePost200Response( + success = True + ) + else: + return SapiV1MarginMaxLeveragePost200Response( + success = True, + ) + """ + + def testSapiV1MarginMaxLeveragePost200Response(self): + """Test SapiV1MarginMaxLeveragePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_max_transferable_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_max_transferable_get200_response.py new file mode 100644 index 0000000..ca0fab9 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_max_transferable_get200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_max_transferable_get200_response import SapiV1MarginMaxTransferableGet200Response + +class TestSapiV1MarginMaxTransferableGet200Response(unittest.TestCase): + """SapiV1MarginMaxTransferableGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginMaxTransferableGet200Response: + """Test SapiV1MarginMaxTransferableGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginMaxTransferableGet200Response` + """ + model = SapiV1MarginMaxTransferableGet200Response() + if include_optional: + return SapiV1MarginMaxTransferableGet200Response( + amount = '', + borrow_limit = '' + ) + else: + return SapiV1MarginMaxTransferableGet200Response( + amount = '', + borrow_limit = '', + ) + """ + + def testSapiV1MarginMaxTransferableGet200Response(self): + """Test SapiV1MarginMaxTransferableGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_next_hourly_interest_rate_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_next_hourly_interest_rate_get200_response_inner.py new file mode 100644 index 0000000..210816b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_next_hourly_interest_rate_get200_response_inner.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_next_hourly_interest_rate_get200_response_inner import SapiV1MarginNextHourlyInterestRateGet200ResponseInner + +class TestSapiV1MarginNextHourlyInterestRateGet200ResponseInner(unittest.TestCase): + """SapiV1MarginNextHourlyInterestRateGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginNextHourlyInterestRateGet200ResponseInner: + """Test SapiV1MarginNextHourlyInterestRateGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginNextHourlyInterestRateGet200ResponseInner` + """ + model = SapiV1MarginNextHourlyInterestRateGet200ResponseInner() + if include_optional: + return SapiV1MarginNextHourlyInterestRateGet200ResponseInner( + asset = 'BTC', + next_hourly_interest_rate = '0.00000571' + ) + else: + return SapiV1MarginNextHourlyInterestRateGet200ResponseInner( + asset = 'BTC', + next_hourly_interest_rate = '0.00000571', + ) + """ + + def testSapiV1MarginNextHourlyInterestRateGet200ResponseInner(self): + """Test SapiV1MarginNextHourlyInterestRateGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_open_order_list_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_open_order_list_get200_response_inner.py new file mode 100644 index 0000000..bf24250 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_open_order_list_get200_response_inner.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_open_order_list_get200_response_inner import SapiV1MarginOpenOrderListGet200ResponseInner + +class TestSapiV1MarginOpenOrderListGet200ResponseInner(unittest.TestCase): + """SapiV1MarginOpenOrderListGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginOpenOrderListGet200ResponseInner: + """Test SapiV1MarginOpenOrderListGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginOpenOrderListGet200ResponseInner` + """ + model = SapiV1MarginOpenOrderListGet200ResponseInner() + if include_optional: + return SapiV1MarginOpenOrderListGet200ResponseInner( + order_list_id = 31, + contingency_type = 'OCO', + list_status_type = 'EXEC_STARTED', + list_order_status = 'EXECUTING', + list_client_order_id = 'wuB13fmulKj3YjdqWEcsnp', + transaction_time = 1565246080644, + symbol = 'LTCBTC', + is_isolated = False, + orders = [ + [{"symbol":"LTCBTC","orderId":4,"clientOrderId":"r3EH2N76dHfLoSZWIUw1bT"},{"symbol":"LTCBTC","orderId":5,"clientOrderId":"Cv1SnyPD3qhqpbjpYEHbd2"}] + ] + ) + else: + return SapiV1MarginOpenOrderListGet200ResponseInner( + order_list_id = 31, + contingency_type = 'OCO', + list_status_type = 'EXEC_STARTED', + list_order_status = 'EXECUTING', + list_client_order_id = 'wuB13fmulKj3YjdqWEcsnp', + transaction_time = 1565246080644, + symbol = 'LTCBTC', + is_isolated = False, + orders = [ + [{"symbol":"LTCBTC","orderId":4,"clientOrderId":"r3EH2N76dHfLoSZWIUw1bT"},{"symbol":"LTCBTC","orderId":5,"clientOrderId":"Cv1SnyPD3qhqpbjpYEHbd2"}] + ], + ) + """ + + def testSapiV1MarginOpenOrderListGet200ResponseInner(self): + """Test SapiV1MarginOpenOrderListGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_open_orders_delete200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_open_orders_delete200_response_inner.py new file mode 100644 index 0000000..5d83feb --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_open_orders_delete200_response_inner.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_open_orders_delete200_response_inner import SapiV1MarginOpenOrdersDelete200ResponseInner + +class TestSapiV1MarginOpenOrdersDelete200ResponseInner(unittest.TestCase): + """SapiV1MarginOpenOrdersDelete200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginOpenOrdersDelete200ResponseInner: + """Test SapiV1MarginOpenOrdersDelete200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginOpenOrdersDelete200ResponseInner` + """ + model = SapiV1MarginOpenOrdersDelete200ResponseInner() + if include_optional: + return SapiV1MarginOpenOrdersDelete200ResponseInner( + symbol = 'BNBUSDT', + is_isolated = False, + orig_client_order_id = 'E6APeyTJvkMvLMYMqu1KQ4', + order_id = 11, + order_list_id = 0, + client_order_id = 'pXLV6Hz6mprAcVYpVMTGgx', + price = '0.089853', + orig_qty = '0.178622', + executed_qty = '0.000000', + cummulative_quote_qty = '0.000000', + status = 'CANCELED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'BUY', + contingency_type = 'OCO', + list_status_type = 'ALL_DONE', + list_order_status = 'ALL_DONE', + list_client_order_id = 'C3wyj4WVEktd7u9aVBRXcN', + transaction_time = 1574040868128, + orders = [ + [{"symbol":"BNBUSDT","orderId":2,"clientOrderId":"pO9ufTiFGg3nw2fOdgeOXa"},{"symbol":"BNBUSDT","orderId":3,"clientOrderId":"TXOvglzXuaubXAaENpaRCB"}] + ], + order_reports = [ + [{"symbol":"BNBUSDT","origClientOrderId":"pO9ufTiFGg3nw2fOdgeOXa","orderId":2,"orderListId":0,"clientOrderId":"unfWT8ig8i0uj6lPuYLez6","price":"1.00000000","origQty":"10.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"CANCELED","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"1.00000000"},{"symbol":"BNBUSDT","origClientOrderId":"TXOvglzXuaubXAaENpaRCB","orderId":3,"orderListId":0,"clientOrderId":"unfWT8ig8i0uj6lPuYLez6","price":"3.00000000","origQty":"10.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"CANCELED","timeInForce":"GTC","type":"LIMIT_MAKER","side":"SELL"}] + ] + ) + else: + return SapiV1MarginOpenOrdersDelete200ResponseInner( + symbol = 'BNBUSDT', + is_isolated = False, + orig_client_order_id = 'E6APeyTJvkMvLMYMqu1KQ4', + order_id = 11, + order_list_id = 0, + client_order_id = 'pXLV6Hz6mprAcVYpVMTGgx', + price = '0.089853', + orig_qty = '0.178622', + executed_qty = '0.000000', + cummulative_quote_qty = '0.000000', + status = 'CANCELED', + time_in_force = 'GTC', + type = 'LIMIT', + side = 'BUY', + contingency_type = 'OCO', + list_status_type = 'ALL_DONE', + list_order_status = 'ALL_DONE', + list_client_order_id = 'C3wyj4WVEktd7u9aVBRXcN', + transaction_time = 1574040868128, + orders = [ + [{"symbol":"BNBUSDT","orderId":2,"clientOrderId":"pO9ufTiFGg3nw2fOdgeOXa"},{"symbol":"BNBUSDT","orderId":3,"clientOrderId":"TXOvglzXuaubXAaENpaRCB"}] + ], + order_reports = [ + [{"symbol":"BNBUSDT","origClientOrderId":"pO9ufTiFGg3nw2fOdgeOXa","orderId":2,"orderListId":0,"clientOrderId":"unfWT8ig8i0uj6lPuYLez6","price":"1.00000000","origQty":"10.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"CANCELED","timeInForce":"GTC","type":"STOP_LOSS_LIMIT","side":"SELL","stopPrice":"1.00000000"},{"symbol":"BNBUSDT","origClientOrderId":"TXOvglzXuaubXAaENpaRCB","orderId":3,"orderListId":0,"clientOrderId":"unfWT8ig8i0uj6lPuYLez6","price":"3.00000000","origQty":"10.00000000","executedQty":"0.00000000","cummulativeQuoteQty":"0.00000000","status":"CANCELED","timeInForce":"GTC","type":"LIMIT_MAKER","side":"SELL"}] + ], + ) + """ + + def testSapiV1MarginOpenOrdersDelete200ResponseInner(self): + """Test SapiV1MarginOpenOrdersDelete200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_order_list_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_order_list_get200_response.py new file mode 100644 index 0000000..e2a5369 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_order_list_get200_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_order_list_get200_response import SapiV1MarginOrderListGet200Response + +class TestSapiV1MarginOrderListGet200Response(unittest.TestCase): + """SapiV1MarginOrderListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginOrderListGet200Response: + """Test SapiV1MarginOrderListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginOrderListGet200Response` + """ + model = SapiV1MarginOrderListGet200Response() + if include_optional: + return SapiV1MarginOrderListGet200Response( + order_list_id = 27, + contingency_type = 'OCO', + list_status_type = 'EXEC_STARTED', + list_order_status = 'EXECUTING', + list_client_order_id = 'h2USkA5YQpaXHPIrkd96xE', + transaction_time = 1565245656253, + symbol = 'LTCBTC', + is_isolated = False, + orders = [ + [{"symbol":"LTCBTC","orderId":4,"clientOrderId":"qD1gy3kc3Gx0rihm9Y3xwS"},{"symbol":"LTCBTC","orderId":5,"clientOrderId":"ARzZ9I00CPM8i3NhmU9Ega"}] + ] + ) + else: + return SapiV1MarginOrderListGet200Response( + order_list_id = 27, + contingency_type = 'OCO', + list_status_type = 'EXEC_STARTED', + list_order_status = 'EXECUTING', + list_client_order_id = 'h2USkA5YQpaXHPIrkd96xE', + transaction_time = 1565245656253, + symbol = 'LTCBTC', + is_isolated = False, + orders = [ + [{"symbol":"LTCBTC","orderId":4,"clientOrderId":"qD1gy3kc3Gx0rihm9Y3xwS"},{"symbol":"LTCBTC","orderId":5,"clientOrderId":"ARzZ9I00CPM8i3NhmU9Ega"}] + ], + ) + """ + + def testSapiV1MarginOrderListGet200Response(self): + """Test SapiV1MarginOrderListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_order_oco_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_order_oco_post200_response.py new file mode 100644 index 0000000..857504e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_order_oco_post200_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_order_oco_post200_response import SapiV1MarginOrderOcoPost200Response + +class TestSapiV1MarginOrderOcoPost200Response(unittest.TestCase): + """SapiV1MarginOrderOcoPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginOrderOcoPost200Response: + """Test SapiV1MarginOrderOcoPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginOrderOcoPost200Response` + """ + model = SapiV1MarginOrderOcoPost200Response() + if include_optional: + return SapiV1MarginOrderOcoPost200Response( + order_list_id = 0, + contingency_type = 'OCO', + list_status_type = 'EXEC_STARTED', + list_order_status = 'EXECUTING', + list_client_order_id = 'JYVpp3F0f5CAG15DhtrqLp', + transaction_time = 1563417480525, + symbol = 'LTCBTC', + margin_buy_borrow_amount = '5', + margin_buy_borrow_asset = 'BTC', + is_isolated = False, + orders = [{"symbol":"LTCBTC","orderId":2,"clientOrderId":"Kk7sqHb9J6mJWTMDVW7Vos"},{"symbol":"LTCBTC","orderId":3,"clientOrderId":"xTXKaGYd4bluPVp78IVRvl"}], + order_reports = [{"symbol":"LTCBTC","orderId":2,"orderListId":0,"clientOrderId":"Kk7sqHb9J6mJWTMDVW7Vos","transactTime":1563417480525,"price":"0.000000","origQty":"0.624363","executedQty":"0.000000","cummulativeQuoteQty":"0.000000","status":"NEW","timeInForce":"GTC","type":"STOP_LOSS","side":"BUY","stopPrice":"0.960664"},{"symbol":"LTCBTC","orderId":3,"orderListId":0,"clientOrderId":"xTXKaGYd4bluPVp78IVRvl","transactTime":1563417480525,"price":"0.036435","origQty":"0.624363","executedQty":"0.000000","cummulativeQuoteQty":"0.000000","status":"NEW","timeInForce":"GTC","type":"LIMIT_MAKER","side":"BUY"}] + ) + else: + return SapiV1MarginOrderOcoPost200Response( + order_list_id = 0, + contingency_type = 'OCO', + list_status_type = 'EXEC_STARTED', + list_order_status = 'EXECUTING', + list_client_order_id = 'JYVpp3F0f5CAG15DhtrqLp', + transaction_time = 1563417480525, + symbol = 'LTCBTC', + margin_buy_borrow_amount = '5', + margin_buy_borrow_asset = 'BTC', + is_isolated = False, + orders = [{"symbol":"LTCBTC","orderId":2,"clientOrderId":"Kk7sqHb9J6mJWTMDVW7Vos"},{"symbol":"LTCBTC","orderId":3,"clientOrderId":"xTXKaGYd4bluPVp78IVRvl"}], + order_reports = [{"symbol":"LTCBTC","orderId":2,"orderListId":0,"clientOrderId":"Kk7sqHb9J6mJWTMDVW7Vos","transactTime":1563417480525,"price":"0.000000","origQty":"0.624363","executedQty":"0.000000","cummulativeQuoteQty":"0.000000","status":"NEW","timeInForce":"GTC","type":"STOP_LOSS","side":"BUY","stopPrice":"0.960664"},{"symbol":"LTCBTC","orderId":3,"orderListId":0,"clientOrderId":"xTXKaGYd4bluPVp78IVRvl","transactTime":1563417480525,"price":"0.036435","origQty":"0.624363","executedQty":"0.000000","cummulativeQuoteQty":"0.000000","status":"NEW","timeInForce":"GTC","type":"LIMIT_MAKER","side":"BUY"}], + ) + """ + + def testSapiV1MarginOrderOcoPost200Response(self): + """Test SapiV1MarginOrderOcoPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_order_oco_post200_response_order_reports_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_order_oco_post200_response_order_reports_inner.py new file mode 100644 index 0000000..3d20276 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_order_oco_post200_response_order_reports_inner.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_order_oco_post200_response_order_reports_inner import SapiV1MarginOrderOcoPost200ResponseOrderReportsInner + +class TestSapiV1MarginOrderOcoPost200ResponseOrderReportsInner(unittest.TestCase): + """SapiV1MarginOrderOcoPost200ResponseOrderReportsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginOrderOcoPost200ResponseOrderReportsInner: + """Test SapiV1MarginOrderOcoPost200ResponseOrderReportsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginOrderOcoPost200ResponseOrderReportsInner` + """ + model = SapiV1MarginOrderOcoPost200ResponseOrderReportsInner() + if include_optional: + return SapiV1MarginOrderOcoPost200ResponseOrderReportsInner( + symbol = '', + order_id = 56, + order_list_id = 56, + client_order_id = '', + transact_time = 56, + price = '', + orig_qty = '', + executed_qty = '', + cummulative_quote_qty = '', + status = '', + time_in_force = '', + type = '', + side = '', + stop_price = '' + ) + else: + return SapiV1MarginOrderOcoPost200ResponseOrderReportsInner( + symbol = '', + order_id = 56, + order_list_id = 56, + client_order_id = '', + transact_time = 56, + price = '', + orig_qty = '', + executed_qty = '', + cummulative_quote_qty = '', + status = '', + time_in_force = '', + type = '', + side = '', + stop_price = '', + ) + """ + + def testSapiV1MarginOrderOcoPost200ResponseOrderReportsInner(self): + """Test SapiV1MarginOrderOcoPost200ResponseOrderReportsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_order_oco_post200_response_orders_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_order_oco_post200_response_orders_inner.py new file mode 100644 index 0000000..e820c69 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_order_oco_post200_response_orders_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_order_oco_post200_response_orders_inner import SapiV1MarginOrderOcoPost200ResponseOrdersInner + +class TestSapiV1MarginOrderOcoPost200ResponseOrdersInner(unittest.TestCase): + """SapiV1MarginOrderOcoPost200ResponseOrdersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginOrderOcoPost200ResponseOrdersInner: + """Test SapiV1MarginOrderOcoPost200ResponseOrdersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginOrderOcoPost200ResponseOrdersInner` + """ + model = SapiV1MarginOrderOcoPost200ResponseOrdersInner() + if include_optional: + return SapiV1MarginOrderOcoPost200ResponseOrdersInner( + symbol = '', + order_id = 56, + client_order_id = '' + ) + else: + return SapiV1MarginOrderOcoPost200ResponseOrdersInner( + symbol = '', + order_id = 56, + client_order_id = '', + ) + """ + + def testSapiV1MarginOrderOcoPost200ResponseOrdersInner(self): + """Test SapiV1MarginOrderOcoPost200ResponseOrdersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_order_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_order_post200_response.py new file mode 100644 index 0000000..7d7f6b9 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_order_post200_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_order_post200_response import SapiV1MarginOrderPost200Response + +class TestSapiV1MarginOrderPost200Response(unittest.TestCase): + """SapiV1MarginOrderPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginOrderPost200Response: + """Test SapiV1MarginOrderPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginOrderPost200Response` + """ + model = SapiV1MarginOrderPost200Response() + if include_optional: + return SapiV1MarginOrderPost200Response( + symbol = 'BTCUSDT', + order_id = 28, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + is_isolated = True, + transact_time = 1507725176595, + price = '1.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'MARKET', + side = 'SELL', + margin_buy_borrow_amount = 5, + margin_buy_borrow_asset = 'BTC', + fills = [ + openapi_client.models.order_response_full_fills_inner.orderResponseFull_fills_inner( + price = '4000.00000000', + qty = '1.00000000', + commission = '4.00000000', + commission_asset = 'USDT', ) + ] + ) + else: + return SapiV1MarginOrderPost200Response( + symbol = 'BTCUSDT', + order_id = 28, + client_order_id = '6gCrw2kRUAF9CvJDGP16IP', + is_isolated = True, + transact_time = 1507725176595, + price = '1.00000000', + orig_qty = '10.00000000', + executed_qty = '10.00000000', + cummulative_quote_qty = '10.00000000', + status = 'FILLED', + time_in_force = 'GTC', + type = 'MARKET', + side = 'SELL', + margin_buy_borrow_amount = 5, + margin_buy_borrow_asset = 'BTC', + fills = [ + openapi_client.models.order_response_full_fills_inner.orderResponseFull_fills_inner( + price = '4000.00000000', + qty = '1.00000000', + commission = '4.00000000', + commission_asset = 'USDT', ) + ], + ) + """ + + def testSapiV1MarginOrderPost200Response(self): + """Test SapiV1MarginOrderPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_price_index_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_price_index_get200_response.py new file mode 100644 index 0000000..a3be632 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_price_index_get200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_price_index_get200_response import SapiV1MarginPriceIndexGet200Response + +class TestSapiV1MarginPriceIndexGet200Response(unittest.TestCase): + """SapiV1MarginPriceIndexGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginPriceIndexGet200Response: + """Test SapiV1MarginPriceIndexGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginPriceIndexGet200Response` + """ + model = SapiV1MarginPriceIndexGet200Response() + if include_optional: + return SapiV1MarginPriceIndexGet200Response( + calc_time = 1562046418000, + price = '0.00333930', + symbol = 'BNBBTC' + ) + else: + return SapiV1MarginPriceIndexGet200Response( + calc_time = 1562046418000, + price = '0.00333930', + symbol = 'BNBBTC', + ) + """ + + def testSapiV1MarginPriceIndexGet200Response(self): + """Test SapiV1MarginPriceIndexGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_rate_limit_order_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_rate_limit_order_get200_response_inner.py new file mode 100644 index 0000000..ce6f4d1 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_rate_limit_order_get200_response_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_rate_limit_order_get200_response_inner import SapiV1MarginRateLimitOrderGet200ResponseInner + +class TestSapiV1MarginRateLimitOrderGet200ResponseInner(unittest.TestCase): + """SapiV1MarginRateLimitOrderGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginRateLimitOrderGet200ResponseInner: + """Test SapiV1MarginRateLimitOrderGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginRateLimitOrderGet200ResponseInner` + """ + model = SapiV1MarginRateLimitOrderGet200ResponseInner() + if include_optional: + return SapiV1MarginRateLimitOrderGet200ResponseInner( + rate_limit_type = 'ORDERS', + interval = 'SECOND', + interval_num = 10, + limit = 10000, + count = 0 + ) + else: + return SapiV1MarginRateLimitOrderGet200ResponseInner( + rate_limit_type = 'ORDERS', + interval = 'SECOND', + interval_num = 10, + limit = 10000, + count = 0, + ) + """ + + def testSapiV1MarginRateLimitOrderGet200ResponseInner(self): + """Test SapiV1MarginRateLimitOrderGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_trade_coeff_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_trade_coeff_get200_response.py new file mode 100644 index 0000000..a37082f --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_trade_coeff_get200_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_trade_coeff_get200_response import SapiV1MarginTradeCoeffGet200Response + +class TestSapiV1MarginTradeCoeffGet200Response(unittest.TestCase): + """SapiV1MarginTradeCoeffGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginTradeCoeffGet200Response: + """Test SapiV1MarginTradeCoeffGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginTradeCoeffGet200Response` + """ + model = SapiV1MarginTradeCoeffGet200Response() + if include_optional: + return SapiV1MarginTradeCoeffGet200Response( + normal_bar = '1.5', + margin_call_bar = '1.3', + force_liquidation_bar = '1.1' + ) + else: + return SapiV1MarginTradeCoeffGet200Response( + ) + """ + + def testSapiV1MarginTradeCoeffGet200Response(self): + """Test SapiV1MarginTradeCoeffGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_transfer_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_margin_transfer_get200_response.py new file mode 100644 index 0000000..b9b452e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_transfer_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_transfer_get200_response import SapiV1MarginTransferGet200Response + +class TestSapiV1MarginTransferGet200Response(unittest.TestCase): + """SapiV1MarginTransferGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginTransferGet200Response: + """Test SapiV1MarginTransferGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginTransferGet200Response` + """ + model = SapiV1MarginTransferGet200Response() + if include_optional: + return SapiV1MarginTransferGet200Response( + rows = [ + openapi_client.models._sapi_v1_margin_transfer_get_200_response_rows_inner._sapi_v1_margin_transfer_get_200_response_rows_inner( + amount = '', + asset = '', + status = '', + timestamp = 56, + tx_id = 56, + type = '', ) + ], + total = 3 + ) + else: + return SapiV1MarginTransferGet200Response( + rows = [ + openapi_client.models._sapi_v1_margin_transfer_get_200_response_rows_inner._sapi_v1_margin_transfer_get_200_response_rows_inner( + amount = '', + asset = '', + status = '', + timestamp = 56, + tx_id = 56, + type = '', ) + ], + total = 3, + ) + """ + + def testSapiV1MarginTransferGet200Response(self): + """Test SapiV1MarginTransferGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_margin_transfer_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_margin_transfer_get200_response_rows_inner.py new file mode 100644 index 0000000..75f6b98 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_margin_transfer_get200_response_rows_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_margin_transfer_get200_response_rows_inner import SapiV1MarginTransferGet200ResponseRowsInner + +class TestSapiV1MarginTransferGet200ResponseRowsInner(unittest.TestCase): + """SapiV1MarginTransferGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MarginTransferGet200ResponseRowsInner: + """Test SapiV1MarginTransferGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MarginTransferGet200ResponseRowsInner` + """ + model = SapiV1MarginTransferGet200ResponseRowsInner() + if include_optional: + return SapiV1MarginTransferGet200ResponseRowsInner( + amount = '', + asset = '', + status = '', + timestamp = 56, + tx_id = 56, + type = '' + ) + else: + return SapiV1MarginTransferGet200ResponseRowsInner( + amount = '', + asset = '', + status = '', + timestamp = 56, + tx_id = 56, + type = '', + ) + """ + + def testSapiV1MarginTransferGet200ResponseRowsInner(self): + """Test SapiV1MarginTransferGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_cancel_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_cancel_post200_response.py new file mode 100644 index 0000000..9ccfa8e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_cancel_post200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_hash_transfer_config_cancel_post200_response import SapiV1MiningHashTransferConfigCancelPost200Response + +class TestSapiV1MiningHashTransferConfigCancelPost200Response(unittest.TestCase): + """SapiV1MiningHashTransferConfigCancelPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningHashTransferConfigCancelPost200Response: + """Test SapiV1MiningHashTransferConfigCancelPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningHashTransferConfigCancelPost200Response` + """ + model = SapiV1MiningHashTransferConfigCancelPost200Response() + if include_optional: + return SapiV1MiningHashTransferConfigCancelPost200Response( + code = 0, + msg = '', + data = True + ) + else: + return SapiV1MiningHashTransferConfigCancelPost200Response( + code = 0, + msg = '', + data = True, + ) + """ + + def testSapiV1MiningHashTransferConfigCancelPost200Response(self): + """Test SapiV1MiningHashTransferConfigCancelPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_details_list_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_details_list_get200_response.py new file mode 100644 index 0000000..c94d354 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_details_list_get200_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response import SapiV1MiningHashTransferConfigDetailsListGet200Response + +class TestSapiV1MiningHashTransferConfigDetailsListGet200Response(unittest.TestCase): + """SapiV1MiningHashTransferConfigDetailsListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningHashTransferConfigDetailsListGet200Response: + """Test SapiV1MiningHashTransferConfigDetailsListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningHashTransferConfigDetailsListGet200Response` + """ + model = SapiV1MiningHashTransferConfigDetailsListGet200Response() + if include_optional: + return SapiV1MiningHashTransferConfigDetailsListGet200Response( + code = 0, + msg = '', + data = openapi_client.models._sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data._sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data( + config_details = [ + openapi_client.models._sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_config_details_inner._sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_configDetails_inner( + config_id = 168, + pool_username = '123', + to_pool_username = 'user1', + algo_name = 'Ethash', + hash_rate = 5000000, + start_day = 20201210, + end_day = 20210405, + status = 1, ) + ], + total_num = 21, + page_size = 200, ) + ) + else: + return SapiV1MiningHashTransferConfigDetailsListGet200Response( + code = 0, + msg = '', + data = openapi_client.models._sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data._sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data( + config_details = [ + openapi_client.models._sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_config_details_inner._sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_configDetails_inner( + config_id = 168, + pool_username = '123', + to_pool_username = 'user1', + algo_name = 'Ethash', + hash_rate = 5000000, + start_day = 20201210, + end_day = 20210405, + status = 1, ) + ], + total_num = 21, + page_size = 200, ), + ) + """ + + def testSapiV1MiningHashTransferConfigDetailsListGet200Response(self): + """Test SapiV1MiningHashTransferConfigDetailsListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_details_list_get200_response_data.py b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_details_list_get200_response_data.py new file mode 100644 index 0000000..1ab6d69 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_details_list_get200_response_data.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response_data import SapiV1MiningHashTransferConfigDetailsListGet200ResponseData + +class TestSapiV1MiningHashTransferConfigDetailsListGet200ResponseData(unittest.TestCase): + """SapiV1MiningHashTransferConfigDetailsListGet200ResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningHashTransferConfigDetailsListGet200ResponseData: + """Test SapiV1MiningHashTransferConfigDetailsListGet200ResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningHashTransferConfigDetailsListGet200ResponseData` + """ + model = SapiV1MiningHashTransferConfigDetailsListGet200ResponseData() + if include_optional: + return SapiV1MiningHashTransferConfigDetailsListGet200ResponseData( + config_details = [ + openapi_client.models._sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_config_details_inner._sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_configDetails_inner( + config_id = 168, + pool_username = '123', + to_pool_username = 'user1', + algo_name = 'Ethash', + hash_rate = 5000000, + start_day = 20201210, + end_day = 20210405, + status = 1, ) + ], + total_num = 21, + page_size = 200 + ) + else: + return SapiV1MiningHashTransferConfigDetailsListGet200ResponseData( + config_details = [ + openapi_client.models._sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_config_details_inner._sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_configDetails_inner( + config_id = 168, + pool_username = '123', + to_pool_username = 'user1', + algo_name = 'Ethash', + hash_rate = 5000000, + start_day = 20201210, + end_day = 20210405, + status = 1, ) + ], + total_num = 21, + page_size = 200, + ) + """ + + def testSapiV1MiningHashTransferConfigDetailsListGet200ResponseData(self): + """Test SapiV1MiningHashTransferConfigDetailsListGet200ResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner.py b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner.py new file mode 100644 index 0000000..31f8dc9 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_hash_transfer_config_details_list_get200_response_data_config_details_inner import SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner + +class TestSapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner(unittest.TestCase): + """SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner: + """Test SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner` + """ + model = SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner() + if include_optional: + return SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner( + config_id = 168, + pool_username = '123', + to_pool_username = 'user1', + algo_name = 'Ethash', + hash_rate = 5000000, + start_day = 20201210, + end_day = 20210405, + status = 1 + ) + else: + return SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner( + config_id = 168, + pool_username = '123', + to_pool_username = 'user1', + algo_name = 'Ethash', + hash_rate = 5000000, + start_day = 20201210, + end_day = 20210405, + status = 1, + ) + """ + + def testSapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner(self): + """Test SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_post200_response.py new file mode 100644 index 0000000..ca20eb0 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_config_post200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_hash_transfer_config_post200_response import SapiV1MiningHashTransferConfigPost200Response + +class TestSapiV1MiningHashTransferConfigPost200Response(unittest.TestCase): + """SapiV1MiningHashTransferConfigPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningHashTransferConfigPost200Response: + """Test SapiV1MiningHashTransferConfigPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningHashTransferConfigPost200Response` + """ + model = SapiV1MiningHashTransferConfigPost200Response() + if include_optional: + return SapiV1MiningHashTransferConfigPost200Response( + code = 0, + msg = '', + data = 171 + ) + else: + return SapiV1MiningHashTransferConfigPost200Response( + code = 0, + msg = '', + data = 171, + ) + """ + + def testSapiV1MiningHashTransferConfigPost200Response(self): + """Test SapiV1MiningHashTransferConfigPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_profit_details_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_profit_details_get200_response.py new file mode 100644 index 0000000..d6c68ab --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_profit_details_get200_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response import SapiV1MiningHashTransferProfitDetailsGet200Response + +class TestSapiV1MiningHashTransferProfitDetailsGet200Response(unittest.TestCase): + """SapiV1MiningHashTransferProfitDetailsGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningHashTransferProfitDetailsGet200Response: + """Test SapiV1MiningHashTransferProfitDetailsGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningHashTransferProfitDetailsGet200Response` + """ + model = SapiV1MiningHashTransferProfitDetailsGet200Response() + if include_optional: + return SapiV1MiningHashTransferProfitDetailsGet200Response( + code = 0, + msg = '', + data = openapi_client.models._sapi_v1_mining_hash_transfer_profit_details_get_200_response_data._sapi_v1_mining_hash_transfer_profit_details_get_200_response_data( + profit_transfer_details = [ + openapi_client.models._sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profit_transfer_details_inner._sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profitTransferDetails_inner( + pool_username = 'test4001', + to_pool_username = 'pop', + algo_name = 'sha256', + hash_rate = 200000000000, + day = 20201213, + amount = 0.2256872, + coin_name = 'BTC', ) + ], + total_num = 8, + page_size = 200, ) + ) + else: + return SapiV1MiningHashTransferProfitDetailsGet200Response( + code = 0, + msg = '', + data = openapi_client.models._sapi_v1_mining_hash_transfer_profit_details_get_200_response_data._sapi_v1_mining_hash_transfer_profit_details_get_200_response_data( + profit_transfer_details = [ + openapi_client.models._sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profit_transfer_details_inner._sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profitTransferDetails_inner( + pool_username = 'test4001', + to_pool_username = 'pop', + algo_name = 'sha256', + hash_rate = 200000000000, + day = 20201213, + amount = 0.2256872, + coin_name = 'BTC', ) + ], + total_num = 8, + page_size = 200, ), + ) + """ + + def testSapiV1MiningHashTransferProfitDetailsGet200Response(self): + """Test SapiV1MiningHashTransferProfitDetailsGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_profit_details_get200_response_data.py b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_profit_details_get200_response_data.py new file mode 100644 index 0000000..e1ee1a9 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_profit_details_get200_response_data.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response_data import SapiV1MiningHashTransferProfitDetailsGet200ResponseData + +class TestSapiV1MiningHashTransferProfitDetailsGet200ResponseData(unittest.TestCase): + """SapiV1MiningHashTransferProfitDetailsGet200ResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningHashTransferProfitDetailsGet200ResponseData: + """Test SapiV1MiningHashTransferProfitDetailsGet200ResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningHashTransferProfitDetailsGet200ResponseData` + """ + model = SapiV1MiningHashTransferProfitDetailsGet200ResponseData() + if include_optional: + return SapiV1MiningHashTransferProfitDetailsGet200ResponseData( + profit_transfer_details = [ + openapi_client.models._sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profit_transfer_details_inner._sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profitTransferDetails_inner( + pool_username = 'test4001', + to_pool_username = 'pop', + algo_name = 'sha256', + hash_rate = 200000000000, + day = 20201213, + amount = 0.2256872, + coin_name = 'BTC', ) + ], + total_num = 8, + page_size = 200 + ) + else: + return SapiV1MiningHashTransferProfitDetailsGet200ResponseData( + profit_transfer_details = [ + openapi_client.models._sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profit_transfer_details_inner._sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profitTransferDetails_inner( + pool_username = 'test4001', + to_pool_username = 'pop', + algo_name = 'sha256', + hash_rate = 200000000000, + day = 20201213, + amount = 0.2256872, + coin_name = 'BTC', ) + ], + total_num = 8, + page_size = 200, + ) + """ + + def testSapiV1MiningHashTransferProfitDetailsGet200ResponseData(self): + """Test SapiV1MiningHashTransferProfitDetailsGet200ResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner.py b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner.py new file mode 100644 index 0000000..eb962c3 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_hash_transfer_profit_details_get200_response_data_profit_transfer_details_inner import SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner + +class TestSapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner(unittest.TestCase): + """SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner: + """Test SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner` + """ + model = SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner() + if include_optional: + return SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner( + pool_username = 'test4001', + to_pool_username = 'pop', + algo_name = 'sha256', + hash_rate = 200000000000, + day = 20201213, + amount = 0.2256872, + coin_name = 'BTC' + ) + else: + return SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner( + pool_username = 'test4001', + to_pool_username = 'pop', + algo_name = 'sha256', + hash_rate = 200000000000, + day = 20201213, + amount = 0.2256872, + coin_name = 'BTC', + ) + """ + + def testSapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner(self): + """Test SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_payment_list_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_list_get200_response.py new file mode 100644 index 0000000..6771a87 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_list_get200_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_payment_list_get200_response import SapiV1MiningPaymentListGet200Response + +class TestSapiV1MiningPaymentListGet200Response(unittest.TestCase): + """SapiV1MiningPaymentListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningPaymentListGet200Response: + """Test SapiV1MiningPaymentListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningPaymentListGet200Response` + """ + model = SapiV1MiningPaymentListGet200Response() + if include_optional: + return SapiV1MiningPaymentListGet200Response( + code = 0, + msg = '', + data = openapi_client.models._sapi_v1_mining_payment_list_get_200_response_data._sapi_v1_mining_payment_list_get_200_response_data( + account_profits = [ + openapi_client.models._sapi_v1_mining_payment_list_get_200_response_data_account_profits_inner._sapi_v1_mining_payment_list_get_200_response_data_accountProfits_inner( + time = 1586188800000, + type = 31, + hash_transfer = 56, + transfer_amount = 1.337, + day_hash_rate = 129129903378244, + profit_amount = 8.6083060304, + coin_name = 'BTC', + status = 2, ) + ], + total_num = 3, + page_size = 20, ) + ) + else: + return SapiV1MiningPaymentListGet200Response( + code = 0, + msg = '', + data = openapi_client.models._sapi_v1_mining_payment_list_get_200_response_data._sapi_v1_mining_payment_list_get_200_response_data( + account_profits = [ + openapi_client.models._sapi_v1_mining_payment_list_get_200_response_data_account_profits_inner._sapi_v1_mining_payment_list_get_200_response_data_accountProfits_inner( + time = 1586188800000, + type = 31, + hash_transfer = 56, + transfer_amount = 1.337, + day_hash_rate = 129129903378244, + profit_amount = 8.6083060304, + coin_name = 'BTC', + status = 2, ) + ], + total_num = 3, + page_size = 20, ), + ) + """ + + def testSapiV1MiningPaymentListGet200Response(self): + """Test SapiV1MiningPaymentListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_payment_list_get200_response_data.py b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_list_get200_response_data.py new file mode 100644 index 0000000..6e49c78 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_list_get200_response_data.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_payment_list_get200_response_data import SapiV1MiningPaymentListGet200ResponseData + +class TestSapiV1MiningPaymentListGet200ResponseData(unittest.TestCase): + """SapiV1MiningPaymentListGet200ResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningPaymentListGet200ResponseData: + """Test SapiV1MiningPaymentListGet200ResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningPaymentListGet200ResponseData` + """ + model = SapiV1MiningPaymentListGet200ResponseData() + if include_optional: + return SapiV1MiningPaymentListGet200ResponseData( + account_profits = [ + openapi_client.models._sapi_v1_mining_payment_list_get_200_response_data_account_profits_inner._sapi_v1_mining_payment_list_get_200_response_data_accountProfits_inner( + time = 1586188800000, + type = 31, + hash_transfer = 56, + transfer_amount = 1.337, + day_hash_rate = 129129903378244, + profit_amount = 8.6083060304, + coin_name = 'BTC', + status = 2, ) + ], + total_num = 3, + page_size = 20 + ) + else: + return SapiV1MiningPaymentListGet200ResponseData( + account_profits = [ + openapi_client.models._sapi_v1_mining_payment_list_get_200_response_data_account_profits_inner._sapi_v1_mining_payment_list_get_200_response_data_accountProfits_inner( + time = 1586188800000, + type = 31, + hash_transfer = 56, + transfer_amount = 1.337, + day_hash_rate = 129129903378244, + profit_amount = 8.6083060304, + coin_name = 'BTC', + status = 2, ) + ], + total_num = 3, + page_size = 20, + ) + """ + + def testSapiV1MiningPaymentListGet200ResponseData(self): + """Test SapiV1MiningPaymentListGet200ResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_payment_list_get200_response_data_account_profits_inner.py b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_list_get200_response_data_account_profits_inner.py new file mode 100644 index 0000000..db41031 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_list_get200_response_data_account_profits_inner.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_payment_list_get200_response_data_account_profits_inner import SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner + +class TestSapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner(unittest.TestCase): + """SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner: + """Test SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner` + """ + model = SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner() + if include_optional: + return SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner( + time = 1586188800000, + type = 31, + hash_transfer = 56, + transfer_amount = 1.337, + day_hash_rate = 129129903378244, + profit_amount = 8.6083060304, + coin_name = 'BTC', + status = 2 + ) + else: + return SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner( + time = 1586188800000, + type = 31, + hash_transfer = 56, + transfer_amount = 1.337, + day_hash_rate = 129129903378244, + profit_amount = 8.6083060304, + coin_name = 'BTC', + status = 2, + ) + """ + + def testSapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner(self): + """Test SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_payment_other_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_other_get200_response.py new file mode 100644 index 0000000..910f679 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_other_get200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_payment_other_get200_response import SapiV1MiningPaymentOtherGet200Response + +class TestSapiV1MiningPaymentOtherGet200Response(unittest.TestCase): + """SapiV1MiningPaymentOtherGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningPaymentOtherGet200Response: + """Test SapiV1MiningPaymentOtherGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningPaymentOtherGet200Response` + """ + model = SapiV1MiningPaymentOtherGet200Response() + if include_optional: + return SapiV1MiningPaymentOtherGet200Response( + code = 0, + msg = '', + data = openapi_client.models._sapi_v1_mining_payment_other_get_200_response_data._sapi_v1_mining_payment_other_get_200_response_data( + other_profits = [ + openapi_client.models._sapi_v1_mining_payment_other_get_200_response_data_other_profits_inner._sapi_v1_mining_payment_other_get_200_response_data_otherProfits_inner( + time = 1607443200000, + coin_name = 'BTC', + type = 4, + profit_amount = 0.0011859, + status = 2, ) + ], + total_num = 3, + page_size = 20, ) + ) + else: + return SapiV1MiningPaymentOtherGet200Response( + code = 0, + msg = '', + data = openapi_client.models._sapi_v1_mining_payment_other_get_200_response_data._sapi_v1_mining_payment_other_get_200_response_data( + other_profits = [ + openapi_client.models._sapi_v1_mining_payment_other_get_200_response_data_other_profits_inner._sapi_v1_mining_payment_other_get_200_response_data_otherProfits_inner( + time = 1607443200000, + coin_name = 'BTC', + type = 4, + profit_amount = 0.0011859, + status = 2, ) + ], + total_num = 3, + page_size = 20, ), + ) + """ + + def testSapiV1MiningPaymentOtherGet200Response(self): + """Test SapiV1MiningPaymentOtherGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_payment_other_get200_response_data.py b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_other_get200_response_data.py new file mode 100644 index 0000000..6e623cb --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_other_get200_response_data.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_payment_other_get200_response_data import SapiV1MiningPaymentOtherGet200ResponseData + +class TestSapiV1MiningPaymentOtherGet200ResponseData(unittest.TestCase): + """SapiV1MiningPaymentOtherGet200ResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningPaymentOtherGet200ResponseData: + """Test SapiV1MiningPaymentOtherGet200ResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningPaymentOtherGet200ResponseData` + """ + model = SapiV1MiningPaymentOtherGet200ResponseData() + if include_optional: + return SapiV1MiningPaymentOtherGet200ResponseData( + other_profits = [ + openapi_client.models._sapi_v1_mining_payment_other_get_200_response_data_other_profits_inner._sapi_v1_mining_payment_other_get_200_response_data_otherProfits_inner( + time = 1607443200000, + coin_name = 'BTC', + type = 4, + profit_amount = 0.0011859, + status = 2, ) + ], + total_num = 3, + page_size = 20 + ) + else: + return SapiV1MiningPaymentOtherGet200ResponseData( + other_profits = [ + openapi_client.models._sapi_v1_mining_payment_other_get_200_response_data_other_profits_inner._sapi_v1_mining_payment_other_get_200_response_data_otherProfits_inner( + time = 1607443200000, + coin_name = 'BTC', + type = 4, + profit_amount = 0.0011859, + status = 2, ) + ], + total_num = 3, + page_size = 20, + ) + """ + + def testSapiV1MiningPaymentOtherGet200ResponseData(self): + """Test SapiV1MiningPaymentOtherGet200ResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_payment_other_get200_response_data_other_profits_inner.py b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_other_get200_response_data_other_profits_inner.py new file mode 100644 index 0000000..07c44bf --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_other_get200_response_data_other_profits_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_payment_other_get200_response_data_other_profits_inner import SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner + +class TestSapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner(unittest.TestCase): + """SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner: + """Test SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner` + """ + model = SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner() + if include_optional: + return SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner( + time = 1607443200000, + coin_name = 'BTC', + type = 4, + profit_amount = 0.0011859, + status = 2 + ) + else: + return SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner( + time = 1607443200000, + coin_name = 'BTC', + type = 4, + profit_amount = 0.0011859, + status = 2, + ) + """ + + def testSapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner(self): + """Test SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_payment_uid_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_uid_get200_response.py new file mode 100644 index 0000000..028e523 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_uid_get200_response.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response import SapiV1MiningPaymentUidGet200Response + +class TestSapiV1MiningPaymentUidGet200Response(unittest.TestCase): + """SapiV1MiningPaymentUidGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningPaymentUidGet200Response: + """Test SapiV1MiningPaymentUidGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningPaymentUidGet200Response` + """ + model = SapiV1MiningPaymentUidGet200Response() + if include_optional: + return SapiV1MiningPaymentUidGet200Response( + code = 0, + msg = '', + data = openapi_client.models._sapi_v1_mining_payment_uid_get_200_response_data._sapi_v1_mining_payment_uid_get_200_response_data( + account_profits = [ + openapi_client.models._sapi_v1_mining_payment_uid_get_200_response_data_account_profits_inner._sapi_v1_mining_payment_uid_get_200_response_data_accountProfits_inner( + time = 1607443200000, + coin_name = 'BTC', + type = 2, + puid = 59985472, + sub_name = 'vdvaghani', + amount = 0.09186957, ) + ], + total_num = 3, + page_size = 20, ) + ) + else: + return SapiV1MiningPaymentUidGet200Response( + code = 0, + msg = '', + data = openapi_client.models._sapi_v1_mining_payment_uid_get_200_response_data._sapi_v1_mining_payment_uid_get_200_response_data( + account_profits = [ + openapi_client.models._sapi_v1_mining_payment_uid_get_200_response_data_account_profits_inner._sapi_v1_mining_payment_uid_get_200_response_data_accountProfits_inner( + time = 1607443200000, + coin_name = 'BTC', + type = 2, + puid = 59985472, + sub_name = 'vdvaghani', + amount = 0.09186957, ) + ], + total_num = 3, + page_size = 20, ), + ) + """ + + def testSapiV1MiningPaymentUidGet200Response(self): + """Test SapiV1MiningPaymentUidGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_payment_uid_get200_response_data.py b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_uid_get200_response_data.py new file mode 100644 index 0000000..706ad6c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_uid_get200_response_data.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response_data import SapiV1MiningPaymentUidGet200ResponseData + +class TestSapiV1MiningPaymentUidGet200ResponseData(unittest.TestCase): + """SapiV1MiningPaymentUidGet200ResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningPaymentUidGet200ResponseData: + """Test SapiV1MiningPaymentUidGet200ResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningPaymentUidGet200ResponseData` + """ + model = SapiV1MiningPaymentUidGet200ResponseData() + if include_optional: + return SapiV1MiningPaymentUidGet200ResponseData( + account_profits = [ + openapi_client.models._sapi_v1_mining_payment_uid_get_200_response_data_account_profits_inner._sapi_v1_mining_payment_uid_get_200_response_data_accountProfits_inner( + time = 1607443200000, + coin_name = 'BTC', + type = 2, + puid = 59985472, + sub_name = 'vdvaghani', + amount = 0.09186957, ) + ], + total_num = 3, + page_size = 20 + ) + else: + return SapiV1MiningPaymentUidGet200ResponseData( + account_profits = [ + openapi_client.models._sapi_v1_mining_payment_uid_get_200_response_data_account_profits_inner._sapi_v1_mining_payment_uid_get_200_response_data_accountProfits_inner( + time = 1607443200000, + coin_name = 'BTC', + type = 2, + puid = 59985472, + sub_name = 'vdvaghani', + amount = 0.09186957, ) + ], + total_num = 3, + page_size = 20, + ) + """ + + def testSapiV1MiningPaymentUidGet200ResponseData(self): + """Test SapiV1MiningPaymentUidGet200ResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner.py b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner.py new file mode 100644 index 0000000..14df8d9 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_payment_uid_get200_response_data_account_profits_inner import SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner + +class TestSapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner(unittest.TestCase): + """SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner: + """Test SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner` + """ + model = SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner() + if include_optional: + return SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner( + time = 1607443200000, + coin_name = 'BTC', + type = 2, + puid = 59985472, + sub_name = 'vdvaghani', + amount = 0.09186957 + ) + else: + return SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner( + time = 1607443200000, + coin_name = 'BTC', + type = 2, + puid = 59985472, + sub_name = 'vdvaghani', + amount = 0.09186957, + ) + """ + + def testSapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner(self): + """Test SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_pub_algo_list_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_mining_pub_algo_list_get200_response.py new file mode 100644 index 0000000..56d1dbc --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_pub_algo_list_get200_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_pub_algo_list_get200_response import SapiV1MiningPubAlgoListGet200Response + +class TestSapiV1MiningPubAlgoListGet200Response(unittest.TestCase): + """SapiV1MiningPubAlgoListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningPubAlgoListGet200Response: + """Test SapiV1MiningPubAlgoListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningPubAlgoListGet200Response` + """ + model = SapiV1MiningPubAlgoListGet200Response() + if include_optional: + return SapiV1MiningPubAlgoListGet200Response( + code = 0, + msg = '', + data = [ + openapi_client.models._sapi_v1_mining_pub_algo_list_get_200_response_data_inner._sapi_v1_mining_pub_algoList_get_200_response_data_inner( + algo_name = 'sha256', + algo_id = 1, + pool_index = 0, + unit = 'h/s', ) + ] + ) + else: + return SapiV1MiningPubAlgoListGet200Response( + code = 0, + msg = '', + data = [ + openapi_client.models._sapi_v1_mining_pub_algo_list_get_200_response_data_inner._sapi_v1_mining_pub_algoList_get_200_response_data_inner( + algo_name = 'sha256', + algo_id = 1, + pool_index = 0, + unit = 'h/s', ) + ], + ) + """ + + def testSapiV1MiningPubAlgoListGet200Response(self): + """Test SapiV1MiningPubAlgoListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_pub_algo_list_get200_response_data_inner.py b/target/python/binance_openapi/test/test_sapi_v1_mining_pub_algo_list_get200_response_data_inner.py new file mode 100644 index 0000000..b9883cf --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_pub_algo_list_get200_response_data_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_pub_algo_list_get200_response_data_inner import SapiV1MiningPubAlgoListGet200ResponseDataInner + +class TestSapiV1MiningPubAlgoListGet200ResponseDataInner(unittest.TestCase): + """SapiV1MiningPubAlgoListGet200ResponseDataInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningPubAlgoListGet200ResponseDataInner: + """Test SapiV1MiningPubAlgoListGet200ResponseDataInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningPubAlgoListGet200ResponseDataInner` + """ + model = SapiV1MiningPubAlgoListGet200ResponseDataInner() + if include_optional: + return SapiV1MiningPubAlgoListGet200ResponseDataInner( + algo_name = 'sha256', + algo_id = 1, + pool_index = 0, + unit = 'h/s' + ) + else: + return SapiV1MiningPubAlgoListGet200ResponseDataInner( + algo_name = 'sha256', + algo_id = 1, + pool_index = 0, + unit = 'h/s', + ) + """ + + def testSapiV1MiningPubAlgoListGet200ResponseDataInner(self): + """Test SapiV1MiningPubAlgoListGet200ResponseDataInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_pub_coin_list_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_mining_pub_coin_list_get200_response.py new file mode 100644 index 0000000..55a6a06 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_pub_coin_list_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_pub_coin_list_get200_response import SapiV1MiningPubCoinListGet200Response + +class TestSapiV1MiningPubCoinListGet200Response(unittest.TestCase): + """SapiV1MiningPubCoinListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningPubCoinListGet200Response: + """Test SapiV1MiningPubCoinListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningPubCoinListGet200Response` + """ + model = SapiV1MiningPubCoinListGet200Response() + if include_optional: + return SapiV1MiningPubCoinListGet200Response( + code = 0, + msg = '', + data = [ + openapi_client.models._sapi_v1_mining_pub_coin_list_get_200_response_data_inner._sapi_v1_mining_pub_coinList_get_200_response_data_inner( + coin_name = 'BTC', + coin_id = 1, + pool_index = 0, + algo_id = 1, + algo_name = 'sha256', ) + ] + ) + else: + return SapiV1MiningPubCoinListGet200Response( + code = 0, + msg = '', + data = [ + openapi_client.models._sapi_v1_mining_pub_coin_list_get_200_response_data_inner._sapi_v1_mining_pub_coinList_get_200_response_data_inner( + coin_name = 'BTC', + coin_id = 1, + pool_index = 0, + algo_id = 1, + algo_name = 'sha256', ) + ], + ) + """ + + def testSapiV1MiningPubCoinListGet200Response(self): + """Test SapiV1MiningPubCoinListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_pub_coin_list_get200_response_data_inner.py b/target/python/binance_openapi/test/test_sapi_v1_mining_pub_coin_list_get200_response_data_inner.py new file mode 100644 index 0000000..43bbefa --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_pub_coin_list_get200_response_data_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_pub_coin_list_get200_response_data_inner import SapiV1MiningPubCoinListGet200ResponseDataInner + +class TestSapiV1MiningPubCoinListGet200ResponseDataInner(unittest.TestCase): + """SapiV1MiningPubCoinListGet200ResponseDataInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningPubCoinListGet200ResponseDataInner: + """Test SapiV1MiningPubCoinListGet200ResponseDataInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningPubCoinListGet200ResponseDataInner` + """ + model = SapiV1MiningPubCoinListGet200ResponseDataInner() + if include_optional: + return SapiV1MiningPubCoinListGet200ResponseDataInner( + coin_name = 'BTC', + coin_id = 1, + pool_index = 0, + algo_id = 1, + algo_name = 'sha256' + ) + else: + return SapiV1MiningPubCoinListGet200ResponseDataInner( + coin_name = 'BTC', + coin_id = 1, + pool_index = 0, + algo_id = 1, + algo_name = 'sha256', + ) + """ + + def testSapiV1MiningPubCoinListGet200ResponseDataInner(self): + """Test SapiV1MiningPubCoinListGet200ResponseDataInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_list_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_list_get200_response.py new file mode 100644 index 0000000..95b1f3e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_list_get200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response import SapiV1MiningStatisticsUserListGet200Response + +class TestSapiV1MiningStatisticsUserListGet200Response(unittest.TestCase): + """SapiV1MiningStatisticsUserListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningStatisticsUserListGet200Response: + """Test SapiV1MiningStatisticsUserListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningStatisticsUserListGet200Response` + """ + model = SapiV1MiningStatisticsUserListGet200Response() + if include_optional: + return SapiV1MiningStatisticsUserListGet200Response( + code = 0, + msg = '', + data = [ + openapi_client.models._sapi_v1_mining_statistics_user_list_get_200_response_data_inner._sapi_v1_mining_statistics_user_list_get_200_response_data_inner( + type = 'H_hashrate', + user_name = 'test', + list = [ + openapi_client.models._sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner._sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner( + time = 1585267200000, + hashrate = '0.00000000', + reject = '0.00000000', ) + ], ) + ] + ) + else: + return SapiV1MiningStatisticsUserListGet200Response( + code = 0, + msg = '', + data = [ + openapi_client.models._sapi_v1_mining_statistics_user_list_get_200_response_data_inner._sapi_v1_mining_statistics_user_list_get_200_response_data_inner( + type = 'H_hashrate', + user_name = 'test', + list = [ + openapi_client.models._sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner._sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner( + time = 1585267200000, + hashrate = '0.00000000', + reject = '0.00000000', ) + ], ) + ], + ) + """ + + def testSapiV1MiningStatisticsUserListGet200Response(self): + """Test SapiV1MiningStatisticsUserListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_list_get200_response_data_inner.py b/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_list_get200_response_data_inner.py new file mode 100644 index 0000000..4c1babe --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_list_get200_response_data_inner.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response_data_inner import SapiV1MiningStatisticsUserListGet200ResponseDataInner + +class TestSapiV1MiningStatisticsUserListGet200ResponseDataInner(unittest.TestCase): + """SapiV1MiningStatisticsUserListGet200ResponseDataInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningStatisticsUserListGet200ResponseDataInner: + """Test SapiV1MiningStatisticsUserListGet200ResponseDataInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningStatisticsUserListGet200ResponseDataInner` + """ + model = SapiV1MiningStatisticsUserListGet200ResponseDataInner() + if include_optional: + return SapiV1MiningStatisticsUserListGet200ResponseDataInner( + type = 'H_hashrate', + user_name = 'test', + list = [ + openapi_client.models._sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner._sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner( + time = 1585267200000, + hashrate = '0.00000000', + reject = '0.00000000', ) + ] + ) + else: + return SapiV1MiningStatisticsUserListGet200ResponseDataInner( + type = 'H_hashrate', + user_name = 'test', + list = [ + openapi_client.models._sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner._sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner( + time = 1585267200000, + hashrate = '0.00000000', + reject = '0.00000000', ) + ], + ) + """ + + def testSapiV1MiningStatisticsUserListGet200ResponseDataInner(self): + """Test SapiV1MiningStatisticsUserListGet200ResponseDataInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner.py new file mode 100644 index 0000000..913429f --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_statistics_user_list_get200_response_data_inner_list_inner import SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner + +class TestSapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner(unittest.TestCase): + """SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner: + """Test SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner` + """ + model = SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner() + if include_optional: + return SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner( + time = 1585267200000, + hashrate = '0.00000000', + reject = '0.00000000' + ) + else: + return SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner( + time = 1585267200000, + hashrate = '0.00000000', + reject = '0.00000000', + ) + """ + + def testSapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner(self): + """Test SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_status_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_status_get200_response.py new file mode 100644 index 0000000..11d19d3 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_status_get200_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response import SapiV1MiningStatisticsUserStatusGet200Response + +class TestSapiV1MiningStatisticsUserStatusGet200Response(unittest.TestCase): + """SapiV1MiningStatisticsUserStatusGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningStatisticsUserStatusGet200Response: + """Test SapiV1MiningStatisticsUserStatusGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningStatisticsUserStatusGet200Response` + """ + model = SapiV1MiningStatisticsUserStatusGet200Response() + if include_optional: + return SapiV1MiningStatisticsUserStatusGet200Response( + code = 0, + msg = '', + data = openapi_client.models._sapi_v1_mining_statistics_user_status_get_200_response_data._sapi_v1_mining_statistics_user_status_get_200_response_data( + fifteen_min_hash_rate = '457835490067496409.00000000', + day_hash_rate = '214289268068874127.65000000', + valid_num = 0, + invalid_num = 17562, + profit_today = openapi_client.models._sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today._sapi_v1_mining_statistics_user_status_get_200_response_data_profitToday( + btc = '0.00314332', + bsv = '56.17055953', + bch = '106.61586001', ), + profit_yesterday = openapi_client.models._sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today._sapi_v1_mining_statistics_user_status_get_200_response_data_profitToday( + btc = '0.00314332', + bsv = '56.17055953', + bch = '106.61586001', ), + user_name = 'test', + unit = 'h/s', + algo = 'sha256', ) + ) + else: + return SapiV1MiningStatisticsUserStatusGet200Response( + code = 0, + msg = '', + data = openapi_client.models._sapi_v1_mining_statistics_user_status_get_200_response_data._sapi_v1_mining_statistics_user_status_get_200_response_data( + fifteen_min_hash_rate = '457835490067496409.00000000', + day_hash_rate = '214289268068874127.65000000', + valid_num = 0, + invalid_num = 17562, + profit_today = openapi_client.models._sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today._sapi_v1_mining_statistics_user_status_get_200_response_data_profitToday( + btc = '0.00314332', + bsv = '56.17055953', + bch = '106.61586001', ), + profit_yesterday = openapi_client.models._sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today._sapi_v1_mining_statistics_user_status_get_200_response_data_profitToday( + btc = '0.00314332', + bsv = '56.17055953', + bch = '106.61586001', ), + user_name = 'test', + unit = 'h/s', + algo = 'sha256', ), + ) + """ + + def testSapiV1MiningStatisticsUserStatusGet200Response(self): + """Test SapiV1MiningStatisticsUserStatusGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_status_get200_response_data.py b/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_status_get200_response_data.py new file mode 100644 index 0000000..dc0573e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_status_get200_response_data.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response_data import SapiV1MiningStatisticsUserStatusGet200ResponseData + +class TestSapiV1MiningStatisticsUserStatusGet200ResponseData(unittest.TestCase): + """SapiV1MiningStatisticsUserStatusGet200ResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningStatisticsUserStatusGet200ResponseData: + """Test SapiV1MiningStatisticsUserStatusGet200ResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningStatisticsUserStatusGet200ResponseData` + """ + model = SapiV1MiningStatisticsUserStatusGet200ResponseData() + if include_optional: + return SapiV1MiningStatisticsUserStatusGet200ResponseData( + fifteen_min_hash_rate = '457835490067496409.00000000', + day_hash_rate = '214289268068874127.65000000', + valid_num = 0, + invalid_num = 17562, + profit_today = openapi_client.models._sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today._sapi_v1_mining_statistics_user_status_get_200_response_data_profitToday( + btc = '0.00314332', + bsv = '56.17055953', + bch = '106.61586001', ), + profit_yesterday = openapi_client.models._sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today._sapi_v1_mining_statistics_user_status_get_200_response_data_profitToday( + btc = '0.00314332', + bsv = '56.17055953', + bch = '106.61586001', ), + user_name = 'test', + unit = 'h/s', + algo = 'sha256' + ) + else: + return SapiV1MiningStatisticsUserStatusGet200ResponseData( + fifteen_min_hash_rate = '457835490067496409.00000000', + day_hash_rate = '214289268068874127.65000000', + valid_num = 0, + invalid_num = 17562, + profit_today = openapi_client.models._sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today._sapi_v1_mining_statistics_user_status_get_200_response_data_profitToday( + btc = '0.00314332', + bsv = '56.17055953', + bch = '106.61586001', ), + profit_yesterday = openapi_client.models._sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today._sapi_v1_mining_statistics_user_status_get_200_response_data_profitToday( + btc = '0.00314332', + bsv = '56.17055953', + bch = '106.61586001', ), + user_name = 'test', + unit = 'h/s', + algo = 'sha256', + ) + """ + + def testSapiV1MiningStatisticsUserStatusGet200ResponseData(self): + """Test SapiV1MiningStatisticsUserStatusGet200ResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_status_get200_response_data_profit_today.py b/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_status_get200_response_data_profit_today.py new file mode 100644 index 0000000..f4cc124 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_statistics_user_status_get200_response_data_profit_today.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_statistics_user_status_get200_response_data_profit_today import SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday + +class TestSapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday(unittest.TestCase): + """SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday: + """Test SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday` + """ + model = SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday() + if include_optional: + return SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday( + btc = '0.00314332', + bsv = '56.17055953', + bch = '106.61586001' + ) + else: + return SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday( + btc = '0.00314332', + bsv = '56.17055953', + bch = '106.61586001', + ) + """ + + def testSapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday(self): + """Test SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_worker_detail_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_mining_worker_detail_get200_response.py new file mode 100644 index 0000000..89b3702 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_worker_detail_get200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response import SapiV1MiningWorkerDetailGet200Response + +class TestSapiV1MiningWorkerDetailGet200Response(unittest.TestCase): + """SapiV1MiningWorkerDetailGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningWorkerDetailGet200Response: + """Test SapiV1MiningWorkerDetailGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningWorkerDetailGet200Response` + """ + model = SapiV1MiningWorkerDetailGet200Response() + if include_optional: + return SapiV1MiningWorkerDetailGet200Response( + code = 0, + msg = '', + data = [ + openapi_client.models._sapi_v1_mining_worker_detail_get_200_response_data_inner._sapi_v1_mining_worker_detail_get_200_response_data_inner( + worker_name = 'bhdc1.16A10404B', + type = 'H_hashrate', + hashrate_datas = [ + openapi_client.models._sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrate_datas_inner._sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrateDatas_inner( + time = 1587902400000, + hashrate = '0', + reject = 0, ) + ], ) + ] + ) + else: + return SapiV1MiningWorkerDetailGet200Response( + code = 0, + msg = '', + data = [ + openapi_client.models._sapi_v1_mining_worker_detail_get_200_response_data_inner._sapi_v1_mining_worker_detail_get_200_response_data_inner( + worker_name = 'bhdc1.16A10404B', + type = 'H_hashrate', + hashrate_datas = [ + openapi_client.models._sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrate_datas_inner._sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrateDatas_inner( + time = 1587902400000, + hashrate = '0', + reject = 0, ) + ], ) + ], + ) + """ + + def testSapiV1MiningWorkerDetailGet200Response(self): + """Test SapiV1MiningWorkerDetailGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_worker_detail_get200_response_data_inner.py b/target/python/binance_openapi/test/test_sapi_v1_mining_worker_detail_get200_response_data_inner.py new file mode 100644 index 0000000..dbc1f43 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_worker_detail_get200_response_data_inner.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response_data_inner import SapiV1MiningWorkerDetailGet200ResponseDataInner + +class TestSapiV1MiningWorkerDetailGet200ResponseDataInner(unittest.TestCase): + """SapiV1MiningWorkerDetailGet200ResponseDataInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningWorkerDetailGet200ResponseDataInner: + """Test SapiV1MiningWorkerDetailGet200ResponseDataInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningWorkerDetailGet200ResponseDataInner` + """ + model = SapiV1MiningWorkerDetailGet200ResponseDataInner() + if include_optional: + return SapiV1MiningWorkerDetailGet200ResponseDataInner( + worker_name = 'bhdc1.16A10404B', + type = 'H_hashrate', + hashrate_datas = [ + openapi_client.models._sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrate_datas_inner._sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrateDatas_inner( + time = 1587902400000, + hashrate = '0', + reject = 0, ) + ] + ) + else: + return SapiV1MiningWorkerDetailGet200ResponseDataInner( + worker_name = 'bhdc1.16A10404B', + type = 'H_hashrate', + hashrate_datas = [ + openapi_client.models._sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrate_datas_inner._sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrateDatas_inner( + time = 1587902400000, + hashrate = '0', + reject = 0, ) + ], + ) + """ + + def testSapiV1MiningWorkerDetailGet200ResponseDataInner(self): + """Test SapiV1MiningWorkerDetailGet200ResponseDataInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner.py b/target/python/binance_openapi/test/test_sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner.py new file mode 100644 index 0000000..2e79506 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_worker_detail_get200_response_data_inner_hashrate_datas_inner import SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner + +class TestSapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner(unittest.TestCase): + """SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner: + """Test SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner` + """ + model = SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner() + if include_optional: + return SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner( + time = 1587902400000, + hashrate = '0', + reject = 0 + ) + else: + return SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner( + time = 1587902400000, + hashrate = '0', + reject = 0, + ) + """ + + def testSapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner(self): + """Test SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_worker_list_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_mining_worker_list_get200_response.py new file mode 100644 index 0000000..66fe334 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_worker_list_get200_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_worker_list_get200_response import SapiV1MiningWorkerListGet200Response + +class TestSapiV1MiningWorkerListGet200Response(unittest.TestCase): + """SapiV1MiningWorkerListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningWorkerListGet200Response: + """Test SapiV1MiningWorkerListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningWorkerListGet200Response` + """ + model = SapiV1MiningWorkerListGet200Response() + if include_optional: + return SapiV1MiningWorkerListGet200Response( + code = 0, + msg = '', + data = openapi_client.models._sapi_v1_mining_worker_list_get_200_response_data._sapi_v1_mining_worker_list_get_200_response_data( + worker_datas = [ + openapi_client.models._sapi_v1_mining_worker_list_get_200_response_data_worker_datas_inner._sapi_v1_mining_worker_list_get_200_response_data_workerDatas_inner( + worker_id = '1420554439452400131', + worker_name = '2X73', + status = 3, + hash_rate = 0, + day_hash_rate = 0, + reject_rate = 0, + last_share_time = 1587712919000, ) + ], + total_num = 18530, + page_size = 20, ) + ) + else: + return SapiV1MiningWorkerListGet200Response( + code = 0, + msg = '', + data = openapi_client.models._sapi_v1_mining_worker_list_get_200_response_data._sapi_v1_mining_worker_list_get_200_response_data( + worker_datas = [ + openapi_client.models._sapi_v1_mining_worker_list_get_200_response_data_worker_datas_inner._sapi_v1_mining_worker_list_get_200_response_data_workerDatas_inner( + worker_id = '1420554439452400131', + worker_name = '2X73', + status = 3, + hash_rate = 0, + day_hash_rate = 0, + reject_rate = 0, + last_share_time = 1587712919000, ) + ], + total_num = 18530, + page_size = 20, ), + ) + """ + + def testSapiV1MiningWorkerListGet200Response(self): + """Test SapiV1MiningWorkerListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_worker_list_get200_response_data.py b/target/python/binance_openapi/test/test_sapi_v1_mining_worker_list_get200_response_data.py new file mode 100644 index 0000000..9bafe10 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_worker_list_get200_response_data.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_worker_list_get200_response_data import SapiV1MiningWorkerListGet200ResponseData + +class TestSapiV1MiningWorkerListGet200ResponseData(unittest.TestCase): + """SapiV1MiningWorkerListGet200ResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningWorkerListGet200ResponseData: + """Test SapiV1MiningWorkerListGet200ResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningWorkerListGet200ResponseData` + """ + model = SapiV1MiningWorkerListGet200ResponseData() + if include_optional: + return SapiV1MiningWorkerListGet200ResponseData( + worker_datas = [ + openapi_client.models._sapi_v1_mining_worker_list_get_200_response_data_worker_datas_inner._sapi_v1_mining_worker_list_get_200_response_data_workerDatas_inner( + worker_id = '1420554439452400131', + worker_name = '2X73', + status = 3, + hash_rate = 0, + day_hash_rate = 0, + reject_rate = 0, + last_share_time = 1587712919000, ) + ], + total_num = 18530, + page_size = 20 + ) + else: + return SapiV1MiningWorkerListGet200ResponseData( + worker_datas = [ + openapi_client.models._sapi_v1_mining_worker_list_get_200_response_data_worker_datas_inner._sapi_v1_mining_worker_list_get_200_response_data_workerDatas_inner( + worker_id = '1420554439452400131', + worker_name = '2X73', + status = 3, + hash_rate = 0, + day_hash_rate = 0, + reject_rate = 0, + last_share_time = 1587712919000, ) + ], + total_num = 18530, + page_size = 20, + ) + """ + + def testSapiV1MiningWorkerListGet200ResponseData(self): + """Test SapiV1MiningWorkerListGet200ResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner.py b/target/python/binance_openapi/test/test_sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner.py new file mode 100644 index 0000000..03877b7 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_mining_worker_list_get200_response_data_worker_datas_inner import SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner + +class TestSapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner(unittest.TestCase): + """SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner: + """Test SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner` + """ + model = SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner() + if include_optional: + return SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner( + worker_id = '1420554439452400131', + worker_name = '2X73', + status = 3, + hash_rate = 0, + day_hash_rate = 0, + reject_rate = 0, + last_share_time = 1587712919000 + ) + else: + return SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner( + worker_id = '1420554439452400131', + worker_name = '2X73', + status = 3, + hash_rate = 0, + day_hash_rate = 0, + reject_rate = 0, + last_share_time = 1587712919000, + ) + """ + + def testSapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner(self): + """Test SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_nft_history_deposit_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_nft_history_deposit_get200_response.py new file mode 100644 index 0000000..4253053 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_nft_history_deposit_get200_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_nft_history_deposit_get200_response import SapiV1NftHistoryDepositGet200Response + +class TestSapiV1NftHistoryDepositGet200Response(unittest.TestCase): + """SapiV1NftHistoryDepositGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1NftHistoryDepositGet200Response: + """Test SapiV1NftHistoryDepositGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1NftHistoryDepositGet200Response` + """ + model = SapiV1NftHistoryDepositGet200Response() + if include_optional: + return SapiV1NftHistoryDepositGet200Response( + total = 1, + list = [ + openapi_client.models._sapi_v1_nft_history_deposit_get_200_response_list_inner._sapi_v1_nft_history_deposit_get_200_response_list_inner( + network = 'ETH', + tx_id = 56, + contract_adrress = '0xe507c961ee127d4439977a61af39c34eafee0dc6', + token_id = '10014', + timestamp = 1629986047000, ) + ] + ) + else: + return SapiV1NftHistoryDepositGet200Response( + total = 1, + list = [ + openapi_client.models._sapi_v1_nft_history_deposit_get_200_response_list_inner._sapi_v1_nft_history_deposit_get_200_response_list_inner( + network = 'ETH', + tx_id = 56, + contract_adrress = '0xe507c961ee127d4439977a61af39c34eafee0dc6', + token_id = '10014', + timestamp = 1629986047000, ) + ], + ) + """ + + def testSapiV1NftHistoryDepositGet200Response(self): + """Test SapiV1NftHistoryDepositGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_nft_history_deposit_get200_response_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_nft_history_deposit_get200_response_list_inner.py new file mode 100644 index 0000000..0fb14a1 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_nft_history_deposit_get200_response_list_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_nft_history_deposit_get200_response_list_inner import SapiV1NftHistoryDepositGet200ResponseListInner + +class TestSapiV1NftHistoryDepositGet200ResponseListInner(unittest.TestCase): + """SapiV1NftHistoryDepositGet200ResponseListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1NftHistoryDepositGet200ResponseListInner: + """Test SapiV1NftHistoryDepositGet200ResponseListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1NftHistoryDepositGet200ResponseListInner` + """ + model = SapiV1NftHistoryDepositGet200ResponseListInner() + if include_optional: + return SapiV1NftHistoryDepositGet200ResponseListInner( + network = 'ETH', + tx_id = 56, + contract_adrress = '0xe507c961ee127d4439977a61af39c34eafee0dc6', + token_id = '10014', + timestamp = 1629986047000 + ) + else: + return SapiV1NftHistoryDepositGet200ResponseListInner( + network = 'ETH', + tx_id = 56, + contract_adrress = '0xe507c961ee127d4439977a61af39c34eafee0dc6', + token_id = '10014', + timestamp = 1629986047000, + ) + """ + + def testSapiV1NftHistoryDepositGet200ResponseListInner(self): + """Test SapiV1NftHistoryDepositGet200ResponseListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_nft_history_transactions_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_nft_history_transactions_get200_response.py new file mode 100644 index 0000000..eb1103d --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_nft_history_transactions_get200_response.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response import SapiV1NftHistoryTransactionsGet200Response + +class TestSapiV1NftHistoryTransactionsGet200Response(unittest.TestCase): + """SapiV1NftHistoryTransactionsGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1NftHistoryTransactionsGet200Response: + """Test SapiV1NftHistoryTransactionsGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1NftHistoryTransactionsGet200Response` + """ + model = SapiV1NftHistoryTransactionsGet200Response() + if include_optional: + return SapiV1NftHistoryTransactionsGet200Response( + total = 1, + list = [ + openapi_client.models._sapi_v1_nft_history_transactions_get_200_response_list_inner._sapi_v1_nft_history_transactions_get_200_response_list_inner( + order_no = '1_470502070600699904', + tokens = [ + openapi_client.models._sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner._sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner( + network = 'BSC', + token_id = '216000000496', + contract_address = 'MYSTERY_BOX0000087', ) + ], + trade_time = 1626941236000, + trade_amount = '19.60000000', + trade_currency = 'BNB', ) + ] + ) + else: + return SapiV1NftHistoryTransactionsGet200Response( + total = 1, + list = [ + openapi_client.models._sapi_v1_nft_history_transactions_get_200_response_list_inner._sapi_v1_nft_history_transactions_get_200_response_list_inner( + order_no = '1_470502070600699904', + tokens = [ + openapi_client.models._sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner._sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner( + network = 'BSC', + token_id = '216000000496', + contract_address = 'MYSTERY_BOX0000087', ) + ], + trade_time = 1626941236000, + trade_amount = '19.60000000', + trade_currency = 'BNB', ) + ], + ) + """ + + def testSapiV1NftHistoryTransactionsGet200Response(self): + """Test SapiV1NftHistoryTransactionsGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_nft_history_transactions_get200_response_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_nft_history_transactions_get200_response_list_inner.py new file mode 100644 index 0000000..448de35 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_nft_history_transactions_get200_response_list_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response_list_inner import SapiV1NftHistoryTransactionsGet200ResponseListInner + +class TestSapiV1NftHistoryTransactionsGet200ResponseListInner(unittest.TestCase): + """SapiV1NftHistoryTransactionsGet200ResponseListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1NftHistoryTransactionsGet200ResponseListInner: + """Test SapiV1NftHistoryTransactionsGet200ResponseListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1NftHistoryTransactionsGet200ResponseListInner` + """ + model = SapiV1NftHistoryTransactionsGet200ResponseListInner() + if include_optional: + return SapiV1NftHistoryTransactionsGet200ResponseListInner( + order_no = '1_470502070600699904', + tokens = [ + openapi_client.models._sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner._sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner( + network = 'BSC', + token_id = '216000000496', + contract_address = 'MYSTERY_BOX0000087', ) + ], + trade_time = 1626941236000, + trade_amount = '19.60000000', + trade_currency = 'BNB' + ) + else: + return SapiV1NftHistoryTransactionsGet200ResponseListInner( + order_no = '1_470502070600699904', + tokens = [ + openapi_client.models._sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner._sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner( + network = 'BSC', + token_id = '216000000496', + contract_address = 'MYSTERY_BOX0000087', ) + ], + trade_time = 1626941236000, + trade_amount = '19.60000000', + trade_currency = 'BNB', + ) + """ + + def testSapiV1NftHistoryTransactionsGet200ResponseListInner(self): + """Test SapiV1NftHistoryTransactionsGet200ResponseListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner.py b/target/python/binance_openapi/test/test_sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner.py new file mode 100644 index 0000000..30eb501 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_nft_history_transactions_get200_response_list_inner_tokens_inner import SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner + +class TestSapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner(unittest.TestCase): + """SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner: + """Test SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner` + """ + model = SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner() + if include_optional: + return SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner( + network = 'BSC', + token_id = '216000000496', + contract_address = 'MYSTERY_BOX0000087' + ) + else: + return SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner( + network = 'BSC', + token_id = '216000000496', + contract_address = 'MYSTERY_BOX0000087', + ) + """ + + def testSapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner(self): + """Test SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_nft_history_withdraw_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_nft_history_withdraw_get200_response.py new file mode 100644 index 0000000..b5769d8 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_nft_history_withdraw_get200_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_nft_history_withdraw_get200_response import SapiV1NftHistoryWithdrawGet200Response + +class TestSapiV1NftHistoryWithdrawGet200Response(unittest.TestCase): + """SapiV1NftHistoryWithdrawGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1NftHistoryWithdrawGet200Response: + """Test SapiV1NftHistoryWithdrawGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1NftHistoryWithdrawGet200Response` + """ + model = SapiV1NftHistoryWithdrawGet200Response() + if include_optional: + return SapiV1NftHistoryWithdrawGet200Response( + total = 178, + list = [ + openapi_client.models._sapi_v1_nft_history_withdraw_get_200_response_list_inner._sapi_v1_nft_history_withdraw_get_200_response_list_inner( + network = 'ETH', + tx_id = '0x2be5eed31d787fdb4880bc631c8e76bdfb6150e137f5cf1732e0416ea206f57f', + contract_adrress = '0xe507c961ee127d4439977a61af39c34eafee0dc6', + token_id = '1000001247', + timestamp = 1633674433000, + fee = 0.1, + fee_asset = 'ETH', ) + ] + ) + else: + return SapiV1NftHistoryWithdrawGet200Response( + total = 178, + list = [ + openapi_client.models._sapi_v1_nft_history_withdraw_get_200_response_list_inner._sapi_v1_nft_history_withdraw_get_200_response_list_inner( + network = 'ETH', + tx_id = '0x2be5eed31d787fdb4880bc631c8e76bdfb6150e137f5cf1732e0416ea206f57f', + contract_adrress = '0xe507c961ee127d4439977a61af39c34eafee0dc6', + token_id = '1000001247', + timestamp = 1633674433000, + fee = 0.1, + fee_asset = 'ETH', ) + ], + ) + """ + + def testSapiV1NftHistoryWithdrawGet200Response(self): + """Test SapiV1NftHistoryWithdrawGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_nft_history_withdraw_get200_response_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_nft_history_withdraw_get200_response_list_inner.py new file mode 100644 index 0000000..83e48f8 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_nft_history_withdraw_get200_response_list_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_nft_history_withdraw_get200_response_list_inner import SapiV1NftHistoryWithdrawGet200ResponseListInner + +class TestSapiV1NftHistoryWithdrawGet200ResponseListInner(unittest.TestCase): + """SapiV1NftHistoryWithdrawGet200ResponseListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1NftHistoryWithdrawGet200ResponseListInner: + """Test SapiV1NftHistoryWithdrawGet200ResponseListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1NftHistoryWithdrawGet200ResponseListInner` + """ + model = SapiV1NftHistoryWithdrawGet200ResponseListInner() + if include_optional: + return SapiV1NftHistoryWithdrawGet200ResponseListInner( + network = 'ETH', + tx_id = '0x2be5eed31d787fdb4880bc631c8e76bdfb6150e137f5cf1732e0416ea206f57f', + contract_adrress = '0xe507c961ee127d4439977a61af39c34eafee0dc6', + token_id = '1000001247', + timestamp = 1633674433000, + fee = 0.1, + fee_asset = 'ETH' + ) + else: + return SapiV1NftHistoryWithdrawGet200ResponseListInner( + network = 'ETH', + tx_id = '0x2be5eed31d787fdb4880bc631c8e76bdfb6150e137f5cf1732e0416ea206f57f', + contract_adrress = '0xe507c961ee127d4439977a61af39c34eafee0dc6', + token_id = '1000001247', + timestamp = 1633674433000, + fee = 0.1, + fee_asset = 'ETH', + ) + """ + + def testSapiV1NftHistoryWithdrawGet200ResponseListInner(self): + """Test SapiV1NftHistoryWithdrawGet200ResponseListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_nft_user_get_asset_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_nft_user_get_asset_get200_response.py new file mode 100644 index 0000000..6820ce3 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_nft_user_get_asset_get200_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_nft_user_get_asset_get200_response import SapiV1NftUserGetAssetGet200Response + +class TestSapiV1NftUserGetAssetGet200Response(unittest.TestCase): + """SapiV1NftUserGetAssetGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1NftUserGetAssetGet200Response: + """Test SapiV1NftUserGetAssetGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1NftUserGetAssetGet200Response` + """ + model = SapiV1NftUserGetAssetGet200Response() + if include_optional: + return SapiV1NftUserGetAssetGet200Response( + total = 347, + list = [ + openapi_client.models._sapi_v1_nft_user_get_asset_get_200_response_list_inner._sapi_v1_nft_user_getAsset_get_200_response_list_inner( + network = 'BSC', + contract_address = 'REGULAR11234567891779', + token_id = '100900000017', ) + ] + ) + else: + return SapiV1NftUserGetAssetGet200Response( + total = 347, + list = [ + openapi_client.models._sapi_v1_nft_user_get_asset_get_200_response_list_inner._sapi_v1_nft_user_getAsset_get_200_response_list_inner( + network = 'BSC', + contract_address = 'REGULAR11234567891779', + token_id = '100900000017', ) + ], + ) + """ + + def testSapiV1NftUserGetAssetGet200Response(self): + """Test SapiV1NftUserGetAssetGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_nft_user_get_asset_get200_response_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_nft_user_get_asset_get200_response_list_inner.py new file mode 100644 index 0000000..b66112e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_nft_user_get_asset_get200_response_list_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_nft_user_get_asset_get200_response_list_inner import SapiV1NftUserGetAssetGet200ResponseListInner + +class TestSapiV1NftUserGetAssetGet200ResponseListInner(unittest.TestCase): + """SapiV1NftUserGetAssetGet200ResponseListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1NftUserGetAssetGet200ResponseListInner: + """Test SapiV1NftUserGetAssetGet200ResponseListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1NftUserGetAssetGet200ResponseListInner` + """ + model = SapiV1NftUserGetAssetGet200ResponseListInner() + if include_optional: + return SapiV1NftUserGetAssetGet200ResponseListInner( + network = 'BSC', + contract_address = 'REGULAR11234567891779', + token_id = '100900000017' + ) + else: + return SapiV1NftUserGetAssetGet200ResponseListInner( + network = 'BSC', + contract_address = 'REGULAR11234567891779', + token_id = '100900000017', + ) + """ + + def testSapiV1NftUserGetAssetGet200ResponseListInner(self): + """Test SapiV1NftUserGetAssetGet200ResponseListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response.py new file mode 100644 index 0000000..f42ed05 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_pay_transactions_get200_response import SapiV1PayTransactionsGet200Response + +class TestSapiV1PayTransactionsGet200Response(unittest.TestCase): + """SapiV1PayTransactionsGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PayTransactionsGet200Response: + """Test SapiV1PayTransactionsGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PayTransactionsGet200Response` + """ + model = SapiV1PayTransactionsGet200Response() + if include_optional: + return SapiV1PayTransactionsGet200Response( + code = '000000', + message = 'success', + data = [ + openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner._sapi_v1_pay_transactions_get_200_response_data_inner( + order_type = 'C2C', + transaction_id = 'M_P_71505104267788288', + transaction_time = 1610090460133, + amount = '23.72469206', + currency = 'BNB', + wallet_type = 1, + wallet_types = [ + 56 + ], + funds_detail = [ + [{"currency":"USDT","amount":"1.2"},{"currency":"ETH","amount":"0.0001"}] + ], + payer_info = openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner_payer_info._sapi_v1_pay_transactions_get_200_response_data_inner_payerInfo( + name = 'Jack', + type = 'USER', + binance_id = '12345678', + account_id = '67736251', ), + receiver_info = openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info._sapi_v1_pay_transactions_get_200_response_data_inner_receiverInfo( + name = 'Alan', + type = 'MERCHANT', + email = 'alan@test.com', + binance_id = '34355667', + account_id = '21326891', + country_code = '1', + phone_number = '8057651210', + mobile_code = 'US', + extend = [ + openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info_extend_inner._sapi_v1_pay_transactions_get_200_response_data_inner_receiverInfo_extend_inner( + institution_name = '', + card_number = '', + digital_wallet_id = '', ) + ], ), ) + ], + success = True + ) + else: + return SapiV1PayTransactionsGet200Response( + code = '000000', + message = 'success', + data = [ + openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner._sapi_v1_pay_transactions_get_200_response_data_inner( + order_type = 'C2C', + transaction_id = 'M_P_71505104267788288', + transaction_time = 1610090460133, + amount = '23.72469206', + currency = 'BNB', + wallet_type = 1, + wallet_types = [ + 56 + ], + funds_detail = [ + [{"currency":"USDT","amount":"1.2"},{"currency":"ETH","amount":"0.0001"}] + ], + payer_info = openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner_payer_info._sapi_v1_pay_transactions_get_200_response_data_inner_payerInfo( + name = 'Jack', + type = 'USER', + binance_id = '12345678', + account_id = '67736251', ), + receiver_info = openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info._sapi_v1_pay_transactions_get_200_response_data_inner_receiverInfo( + name = 'Alan', + type = 'MERCHANT', + email = 'alan@test.com', + binance_id = '34355667', + account_id = '21326891', + country_code = '1', + phone_number = '8057651210', + mobile_code = 'US', + extend = [ + openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info_extend_inner._sapi_v1_pay_transactions_get_200_response_data_inner_receiverInfo_extend_inner( + institution_name = '', + card_number = '', + digital_wallet_id = '', ) + ], ), ) + ], + success = True, + ) + """ + + def testSapiV1PayTransactionsGet200Response(self): + """Test SapiV1PayTransactionsGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner.py b/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner.py new file mode 100644 index 0000000..6f49af7 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner import SapiV1PayTransactionsGet200ResponseDataInner + +class TestSapiV1PayTransactionsGet200ResponseDataInner(unittest.TestCase): + """SapiV1PayTransactionsGet200ResponseDataInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PayTransactionsGet200ResponseDataInner: + """Test SapiV1PayTransactionsGet200ResponseDataInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PayTransactionsGet200ResponseDataInner` + """ + model = SapiV1PayTransactionsGet200ResponseDataInner() + if include_optional: + return SapiV1PayTransactionsGet200ResponseDataInner( + order_type = 'C2C', + transaction_id = 'M_P_71505104267788288', + transaction_time = 1610090460133, + amount = '23.72469206', + currency = 'BNB', + wallet_type = 1, + wallet_types = [ + 56 + ], + funds_detail = [ + [{"currency":"USDT","amount":"1.2"},{"currency":"ETH","amount":"0.0001"}] + ], + payer_info = openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner_payer_info._sapi_v1_pay_transactions_get_200_response_data_inner_payerInfo( + name = 'Jack', + type = 'USER', + binance_id = '12345678', + account_id = '67736251', ), + receiver_info = openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info._sapi_v1_pay_transactions_get_200_response_data_inner_receiverInfo( + name = 'Alan', + type = 'MERCHANT', + email = 'alan@test.com', + binance_id = '34355667', + account_id = '21326891', + country_code = '1', + phone_number = '8057651210', + mobile_code = 'US', + extend = [ + openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info_extend_inner._sapi_v1_pay_transactions_get_200_response_data_inner_receiverInfo_extend_inner( + institution_name = '', + card_number = '', + digital_wallet_id = '', ) + ], ) + ) + else: + return SapiV1PayTransactionsGet200ResponseDataInner( + order_type = 'C2C', + transaction_id = 'M_P_71505104267788288', + transaction_time = 1610090460133, + amount = '23.72469206', + currency = 'BNB', + wallet_type = 1, + wallet_types = [ + 56 + ], + funds_detail = [ + [{"currency":"USDT","amount":"1.2"},{"currency":"ETH","amount":"0.0001"}] + ], + payer_info = openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner_payer_info._sapi_v1_pay_transactions_get_200_response_data_inner_payerInfo( + name = 'Jack', + type = 'USER', + binance_id = '12345678', + account_id = '67736251', ), + receiver_info = openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info._sapi_v1_pay_transactions_get_200_response_data_inner_receiverInfo( + name = 'Alan', + type = 'MERCHANT', + email = 'alan@test.com', + binance_id = '34355667', + account_id = '21326891', + country_code = '1', + phone_number = '8057651210', + mobile_code = 'US', + extend = [ + openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info_extend_inner._sapi_v1_pay_transactions_get_200_response_data_inner_receiverInfo_extend_inner( + institution_name = '', + card_number = '', + digital_wallet_id = '', ) + ], ), + ) + """ + + def testSapiV1PayTransactionsGet200ResponseDataInner(self): + """Test SapiV1PayTransactionsGet200ResponseDataInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner.py b/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner.py new file mode 100644 index 0000000..c4ad79f --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_funds_detail_inner import SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner + +class TestSapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner(unittest.TestCase): + """SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner: + """Test SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner` + """ + model = SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner() + if include_optional: + return SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner( + currency = '', + amount = '' + ) + else: + return SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner( + currency = '', + amount = '', + ) + """ + + def testSapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner(self): + """Test SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_payer_info.py b/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_payer_info.py new file mode 100644 index 0000000..c0f72e9 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_payer_info.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_payer_info import SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo + +class TestSapiV1PayTransactionsGet200ResponseDataInnerPayerInfo(unittest.TestCase): + """SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo: + """Test SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo` + """ + model = SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo() + if include_optional: + return SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo( + name = 'Jack', + type = 'USER', + binance_id = '12345678', + account_id = '67736251' + ) + else: + return SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo( + name = 'Jack', + type = 'USER', + binance_id = '12345678', + account_id = '67736251', + ) + """ + + def testSapiV1PayTransactionsGet200ResponseDataInnerPayerInfo(self): + """Test SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_receiver_info.py b/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_receiver_info.py new file mode 100644 index 0000000..dbec705 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_receiver_info.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_receiver_info import SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo + +class TestSapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo(unittest.TestCase): + """SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo: + """Test SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo` + """ + model = SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo() + if include_optional: + return SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo( + name = 'Alan', + type = 'MERCHANT', + email = 'alan@test.com', + binance_id = '34355667', + account_id = '21326891', + country_code = '1', + phone_number = '8057651210', + mobile_code = 'US', + extend = [ + openapi_client.models._sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info_extend_inner._sapi_v1_pay_transactions_get_200_response_data_inner_receiverInfo_extend_inner( + institution_name = '', + card_number = '', + digital_wallet_id = '', ) + ] + ) + else: + return SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo( + name = 'Alan', + type = 'MERCHANT', + email = 'alan@test.com', + binance_id = '34355667', + account_id = '21326891', + country_code = '1', + phone_number = '8057651210', + mobile_code = 'US', + ) + """ + + def testSapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo(self): + """Test SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner.py b/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner.py new file mode 100644 index 0000000..bffe113 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_pay_transactions_get200_response_data_inner_receiver_info_extend_inner import SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner + +class TestSapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner(unittest.TestCase): + """SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner: + """Test SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner` + """ + model = SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner() + if include_optional: + return SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner( + institution_name = '', + card_number = '', + digital_wallet_id = '' + ) + else: + return SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner( + institution_name = '', + card_number = '', + digital_wallet_id = '', + ) + """ + + def testSapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner(self): + """Test SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_portfolio_account_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_portfolio_account_get200_response.py new file mode 100644 index 0000000..540b88f --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_portfolio_account_get200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_portfolio_account_get200_response import SapiV1PortfolioAccountGet200Response + +class TestSapiV1PortfolioAccountGet200Response(unittest.TestCase): + """SapiV1PortfolioAccountGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PortfolioAccountGet200Response: + """Test SapiV1PortfolioAccountGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PortfolioAccountGet200Response` + """ + model = SapiV1PortfolioAccountGet200Response() + if include_optional: + return SapiV1PortfolioAccountGet200Response( + uni_mmr = '1.87987800', + account_equity = '122607.35137903', + actual_equity = '142607.35137903', + account_maint_margin = '23.72469206', + account_status = 'NORMAL', + account_type = 'PM_1' + ) + else: + return SapiV1PortfolioAccountGet200Response( + uni_mmr = '1.87987800', + account_equity = '122607.35137903', + actual_equity = '142607.35137903', + account_maint_margin = '23.72469206', + account_status = 'NORMAL', + account_type = 'PM_1', + ) + """ + + def testSapiV1PortfolioAccountGet200Response(self): + """Test SapiV1PortfolioAccountGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_portfolio_asset_index_price_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_portfolio_asset_index_price_get200_response_inner.py new file mode 100644 index 0000000..e30b160 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_portfolio_asset_index_price_get200_response_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_portfolio_asset_index_price_get200_response_inner import SapiV1PortfolioAssetIndexPriceGet200ResponseInner + +class TestSapiV1PortfolioAssetIndexPriceGet200ResponseInner(unittest.TestCase): + """SapiV1PortfolioAssetIndexPriceGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PortfolioAssetIndexPriceGet200ResponseInner: + """Test SapiV1PortfolioAssetIndexPriceGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PortfolioAssetIndexPriceGet200ResponseInner` + """ + model = SapiV1PortfolioAssetIndexPriceGet200ResponseInner() + if include_optional: + return SapiV1PortfolioAssetIndexPriceGet200ResponseInner( + asset = 'USDT', + asset_index_price = '28251.9136906', + time = 1683518338121 + ) + else: + return SapiV1PortfolioAssetIndexPriceGet200ResponseInner( + asset = 'USDT', + asset_index_price = '28251.9136906', + time = 1683518338121, + ) + """ + + def testSapiV1PortfolioAssetIndexPriceGet200ResponseInner(self): + """Test SapiV1PortfolioAssetIndexPriceGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_portfolio_auto_collection_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_portfolio_auto_collection_post200_response.py new file mode 100644 index 0000000..c22c64e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_portfolio_auto_collection_post200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_portfolio_auto_collection_post200_response import SapiV1PortfolioAutoCollectionPost200Response + +class TestSapiV1PortfolioAutoCollectionPost200Response(unittest.TestCase): + """SapiV1PortfolioAutoCollectionPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PortfolioAutoCollectionPost200Response: + """Test SapiV1PortfolioAutoCollectionPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PortfolioAutoCollectionPost200Response` + """ + model = SapiV1PortfolioAutoCollectionPost200Response() + if include_optional: + return SapiV1PortfolioAutoCollectionPost200Response( + msg = 'success' + ) + else: + return SapiV1PortfolioAutoCollectionPost200Response( + msg = 'success', + ) + """ + + def testSapiV1PortfolioAutoCollectionPost200Response(self): + """Test SapiV1PortfolioAutoCollectionPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_portfolio_collateral_rate_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_portfolio_collateral_rate_get200_response_inner.py new file mode 100644 index 0000000..bb8045a --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_portfolio_collateral_rate_get200_response_inner.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_portfolio_collateral_rate_get200_response_inner import SapiV1PortfolioCollateralRateGet200ResponseInner + +class TestSapiV1PortfolioCollateralRateGet200ResponseInner(unittest.TestCase): + """SapiV1PortfolioCollateralRateGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PortfolioCollateralRateGet200ResponseInner: + """Test SapiV1PortfolioCollateralRateGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PortfolioCollateralRateGet200ResponseInner` + """ + model = SapiV1PortfolioCollateralRateGet200ResponseInner() + if include_optional: + return SapiV1PortfolioCollateralRateGet200ResponseInner( + asset = 'USDC', + collateral_rate = '1.0000' + ) + else: + return SapiV1PortfolioCollateralRateGet200ResponseInner( + asset = 'USDC', + collateral_rate = '1.0000', + ) + """ + + def testSapiV1PortfolioCollateralRateGet200ResponseInner(self): + """Test SapiV1PortfolioCollateralRateGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_portfolio_interest_history_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_portfolio_interest_history_get200_response_inner.py new file mode 100644 index 0000000..2516113 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_portfolio_interest_history_get200_response_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_portfolio_interest_history_get200_response_inner import SapiV1PortfolioInterestHistoryGet200ResponseInner + +class TestSapiV1PortfolioInterestHistoryGet200ResponseInner(unittest.TestCase): + """SapiV1PortfolioInterestHistoryGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PortfolioInterestHistoryGet200ResponseInner: + """Test SapiV1PortfolioInterestHistoryGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PortfolioInterestHistoryGet200ResponseInner` + """ + model = SapiV1PortfolioInterestHistoryGet200ResponseInner() + if include_optional: + return SapiV1PortfolioInterestHistoryGet200ResponseInner( + asset = 'USDT', + interest = '24.4440', + interest_accrued_time = 1672801339253, + interest_rate = '0.0001164', + principal = '210000' + ) + else: + return SapiV1PortfolioInterestHistoryGet200ResponseInner( + asset = 'USDT', + interest = '24.4440', + interest_accrued_time = 1672801339253, + interest_rate = '0.0001164', + principal = '210000', + ) + """ + + def testSapiV1PortfolioInterestHistoryGet200ResponseInner(self): + """Test SapiV1PortfolioInterestHistoryGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_portfolio_margin_asset_leverage_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_portfolio_margin_asset_leverage_get200_response_inner.py new file mode 100644 index 0000000..298c994 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_portfolio_margin_asset_leverage_get200_response_inner.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_portfolio_margin_asset_leverage_get200_response_inner import SapiV1PortfolioMarginAssetLeverageGet200ResponseInner + +class TestSapiV1PortfolioMarginAssetLeverageGet200ResponseInner(unittest.TestCase): + """SapiV1PortfolioMarginAssetLeverageGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PortfolioMarginAssetLeverageGet200ResponseInner: + """Test SapiV1PortfolioMarginAssetLeverageGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PortfolioMarginAssetLeverageGet200ResponseInner` + """ + model = SapiV1PortfolioMarginAssetLeverageGet200ResponseInner() + if include_optional: + return SapiV1PortfolioMarginAssetLeverageGet200ResponseInner( + asset = 'USDC', + collateral_rate = '1.0000' + ) + else: + return SapiV1PortfolioMarginAssetLeverageGet200ResponseInner( + ) + """ + + def testSapiV1PortfolioMarginAssetLeverageGet200ResponseInner(self): + """Test SapiV1PortfolioMarginAssetLeverageGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_portfolio_pm_loan_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_portfolio_pm_loan_get200_response.py new file mode 100644 index 0000000..db8999e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_portfolio_pm_loan_get200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_portfolio_pm_loan_get200_response import SapiV1PortfolioPmLoanGet200Response + +class TestSapiV1PortfolioPmLoanGet200Response(unittest.TestCase): + """SapiV1PortfolioPmLoanGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PortfolioPmLoanGet200Response: + """Test SapiV1PortfolioPmLoanGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PortfolioPmLoanGet200Response` + """ + model = SapiV1PortfolioPmLoanGet200Response() + if include_optional: + return SapiV1PortfolioPmLoanGet200Response( + asset = 'BUSD', + amount = '579.45' + ) + else: + return SapiV1PortfolioPmLoanGet200Response( + asset = 'BUSD', + amount = '579.45', + ) + """ + + def testSapiV1PortfolioPmLoanGet200Response(self): + """Test SapiV1PortfolioPmLoanGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_portfolio_repay_futures_switch_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_portfolio_repay_futures_switch_get200_response.py new file mode 100644 index 0000000..b2cf95f --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_portfolio_repay_futures_switch_get200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_portfolio_repay_futures_switch_get200_response import SapiV1PortfolioRepayFuturesSwitchGet200Response + +class TestSapiV1PortfolioRepayFuturesSwitchGet200Response(unittest.TestCase): + """SapiV1PortfolioRepayFuturesSwitchGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PortfolioRepayFuturesSwitchGet200Response: + """Test SapiV1PortfolioRepayFuturesSwitchGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PortfolioRepayFuturesSwitchGet200Response` + """ + model = SapiV1PortfolioRepayFuturesSwitchGet200Response() + if include_optional: + return SapiV1PortfolioRepayFuturesSwitchGet200Response( + auto_repay = True + ) + else: + return SapiV1PortfolioRepayFuturesSwitchGet200Response( + auto_repay = True, + ) + """ + + def testSapiV1PortfolioRepayFuturesSwitchGet200Response(self): + """Test SapiV1PortfolioRepayFuturesSwitchGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_portfolio_repay_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_portfolio_repay_post200_response.py new file mode 100644 index 0000000..d5c2938 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_portfolio_repay_post200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_portfolio_repay_post200_response import SapiV1PortfolioRepayPost200Response + +class TestSapiV1PortfolioRepayPost200Response(unittest.TestCase): + """SapiV1PortfolioRepayPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1PortfolioRepayPost200Response: + """Test SapiV1PortfolioRepayPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1PortfolioRepayPost200Response` + """ + model = SapiV1PortfolioRepayPost200Response() + if include_optional: + return SapiV1PortfolioRepayPost200Response( + tran_id = 58203331886213500 + ) + else: + return SapiV1PortfolioRepayPost200Response( + tran_id = 58203331886213500, + ) + """ + + def testSapiV1PortfolioRepayPost200Response(self): + """Test SapiV1PortfolioRepayPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_rebate_tax_query_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_rebate_tax_query_get200_response.py new file mode 100644 index 0000000..5f3dc76 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_rebate_tax_query_get200_response.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response import SapiV1RebateTaxQueryGet200Response + +class TestSapiV1RebateTaxQueryGet200Response(unittest.TestCase): + """SapiV1RebateTaxQueryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1RebateTaxQueryGet200Response: + """Test SapiV1RebateTaxQueryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1RebateTaxQueryGet200Response` + """ + model = SapiV1RebateTaxQueryGet200Response() + if include_optional: + return SapiV1RebateTaxQueryGet200Response( + status = 'OK', + type = 'GENERAL', + code = '000000000', + data = openapi_client.models._sapi_v1_rebate_tax_query_get_200_response_data._sapi_v1_rebate_taxQuery_get_200_response_data( + page = 1, + total_records = 2, + total_page_num = 1, + data = [ + openapi_client.models._sapi_v1_rebate_tax_query_get_200_response_data_data_inner._sapi_v1_rebate_taxQuery_get_200_response_data_data_inner( + asset = 'USDT', + type = 1, + amount = '0.0001126', + update_time = 1637651320000, ) + ], ) + ) + else: + return SapiV1RebateTaxQueryGet200Response( + status = 'OK', + type = 'GENERAL', + code = '000000000', + data = openapi_client.models._sapi_v1_rebate_tax_query_get_200_response_data._sapi_v1_rebate_taxQuery_get_200_response_data( + page = 1, + total_records = 2, + total_page_num = 1, + data = [ + openapi_client.models._sapi_v1_rebate_tax_query_get_200_response_data_data_inner._sapi_v1_rebate_taxQuery_get_200_response_data_data_inner( + asset = 'USDT', + type = 1, + amount = '0.0001126', + update_time = 1637651320000, ) + ], ), + ) + """ + + def testSapiV1RebateTaxQueryGet200Response(self): + """Test SapiV1RebateTaxQueryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_rebate_tax_query_get200_response_data.py b/target/python/binance_openapi/test/test_sapi_v1_rebate_tax_query_get200_response_data.py new file mode 100644 index 0000000..6b44bd6 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_rebate_tax_query_get200_response_data.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response_data import SapiV1RebateTaxQueryGet200ResponseData + +class TestSapiV1RebateTaxQueryGet200ResponseData(unittest.TestCase): + """SapiV1RebateTaxQueryGet200ResponseData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1RebateTaxQueryGet200ResponseData: + """Test SapiV1RebateTaxQueryGet200ResponseData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1RebateTaxQueryGet200ResponseData` + """ + model = SapiV1RebateTaxQueryGet200ResponseData() + if include_optional: + return SapiV1RebateTaxQueryGet200ResponseData( + page = 1, + total_records = 2, + total_page_num = 1, + data = [ + openapi_client.models._sapi_v1_rebate_tax_query_get_200_response_data_data_inner._sapi_v1_rebate_taxQuery_get_200_response_data_data_inner( + asset = 'USDT', + type = 1, + amount = '0.0001126', + update_time = 1637651320000, ) + ] + ) + else: + return SapiV1RebateTaxQueryGet200ResponseData( + page = 1, + total_records = 2, + total_page_num = 1, + data = [ + openapi_client.models._sapi_v1_rebate_tax_query_get_200_response_data_data_inner._sapi_v1_rebate_taxQuery_get_200_response_data_data_inner( + asset = 'USDT', + type = 1, + amount = '0.0001126', + update_time = 1637651320000, ) + ], + ) + """ + + def testSapiV1RebateTaxQueryGet200ResponseData(self): + """Test SapiV1RebateTaxQueryGet200ResponseData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_rebate_tax_query_get200_response_data_data_inner.py b/target/python/binance_openapi/test/test_sapi_v1_rebate_tax_query_get200_response_data_data_inner.py new file mode 100644 index 0000000..9bc3b92 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_rebate_tax_query_get200_response_data_data_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_rebate_tax_query_get200_response_data_data_inner import SapiV1RebateTaxQueryGet200ResponseDataDataInner + +class TestSapiV1RebateTaxQueryGet200ResponseDataDataInner(unittest.TestCase): + """SapiV1RebateTaxQueryGet200ResponseDataDataInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1RebateTaxQueryGet200ResponseDataDataInner: + """Test SapiV1RebateTaxQueryGet200ResponseDataDataInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1RebateTaxQueryGet200ResponseDataDataInner` + """ + model = SapiV1RebateTaxQueryGet200ResponseDataDataInner() + if include_optional: + return SapiV1RebateTaxQueryGet200ResponseDataDataInner( + asset = 'USDT', + type = 1, + amount = '0.0001126', + update_time = 1637651320000 + ) + else: + return SapiV1RebateTaxQueryGet200ResponseDataDataInner( + asset = 'USDT', + type = 1, + amount = '0.0001126', + update_time = 1637651320000, + ) + """ + + def testSapiV1RebateTaxQueryGet200ResponseDataDataInner(self): + """Test SapiV1RebateTaxQueryGet200ResponseDataDataInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_account_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_account_get200_response.py new file mode 100644 index 0000000..b157e6a --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_account_get200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_account_get200_response import SapiV1SimpleEarnAccountGet200Response + +class TestSapiV1SimpleEarnAccountGet200Response(unittest.TestCase): + """SapiV1SimpleEarnAccountGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnAccountGet200Response: + """Test SapiV1SimpleEarnAccountGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnAccountGet200Response` + """ + model = SapiV1SimpleEarnAccountGet200Response() + if include_optional: + return SapiV1SimpleEarnAccountGet200Response( + total_amount_in_btc = '0.01067982', + total_amount_in_usdt = '77.13289230', + total_flexible_amount_in_btc = '0.00000000', + total_flexible_amount_in_usdt = '0.00000000', + total_locked_in_btc = '0.01067982', + total_locked_in_usdt = '77.13289230' + ) + else: + return SapiV1SimpleEarnAccountGet200Response( + total_amount_in_btc = '0.01067982', + total_amount_in_usdt = '77.13289230', + total_flexible_amount_in_btc = '0.00000000', + total_flexible_amount_in_usdt = '0.00000000', + total_locked_in_btc = '0.01067982', + total_locked_in_usdt = '77.13289230', + ) + """ + + def testSapiV1SimpleEarnAccountGet200Response(self): + """Test SapiV1SimpleEarnAccountGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_collateral_record_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_collateral_record_get200_response.py new file mode 100644 index 0000000..d0640fd --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_collateral_record_get200_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_history_collateral_record_get200_response import SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response + +class TestSapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response(unittest.TestCase): + """SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response: + """Test SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response` + """ + model = SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response() + if include_optional: + return SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response_rows_inner._sapi_v1_simple_earn_flexible_history_collateralRecord_get_200_response_rows_inner( + amount = '100.00000000', + product_id = 'BUSD001', + asset = 'USDT', + create_time = 1575018510000, + type = 'REPAY', + product_name = 'USDT', + order_id = 26055, ) + ], + total = 1 + ) + else: + return SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response_rows_inner._sapi_v1_simple_earn_flexible_history_collateralRecord_get_200_response_rows_inner( + amount = '100.00000000', + product_id = 'BUSD001', + asset = 'USDT', + create_time = 1575018510000, + type = 'REPAY', + product_name = 'USDT', + order_id = 26055, ) + ], + total = 1, + ) + """ + + def testSapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response(self): + """Test SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner.py new file mode 100644 index 0000000..05cf054 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_history_collateral_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner + +class TestSapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner(unittest.TestCase): + """SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner: + """Test SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner` + """ + model = SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner() + if include_optional: + return SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner( + amount = '100.00000000', + product_id = 'BUSD001', + asset = 'USDT', + create_time = 1575018510000, + type = 'REPAY', + product_name = 'USDT', + order_id = 26055 + ) + else: + return SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner( + amount = '100.00000000', + product_id = 'BUSD001', + asset = 'USDT', + create_time = 1575018510000, + type = 'REPAY', + product_name = 'USDT', + order_id = 26055, + ) + """ + + def testSapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner(self): + """Test SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rate_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rate_history_get200_response.py new file mode 100644 index 0000000..56bf567 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rate_history_get200_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rate_history_get200_response import SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response + +class TestSapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response(unittest.TestCase): + """SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response: + """Test SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response` + """ + model = SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response() + if include_optional: + return SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_flexible_history_rate_history_get_200_response_rows_inner._sapi_v1_simple_earn_flexible_history_rateHistory_get_200_response_rows_inner( + product_id = 'BUSD001', + asset = 'BUSD', + annual_percentage_rate = '0.00006408', + time = 1577233578000, ) + ], + total = 1 + ) + else: + return SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_flexible_history_rate_history_get_200_response_rows_inner._sapi_v1_simple_earn_flexible_history_rateHistory_get_200_response_rows_inner( + product_id = 'BUSD001', + asset = 'BUSD', + annual_percentage_rate = '0.00006408', + time = 1577233578000, ) + ], + total = 1, + ) + """ + + def testSapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response(self): + """Test SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner.py new file mode 100644 index 0000000..9a712f4 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rate_history_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner + +class TestSapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner: + """Test SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner` + """ + model = SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner( + product_id = 'BUSD001', + asset = 'BUSD', + annual_percentage_rate = '0.00006408', + time = 1577233578000 + ) + else: + return SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner( + product_id = 'BUSD001', + asset = 'BUSD', + annual_percentage_rate = '0.00006408', + time = 1577233578000, + ) + """ + + def testSapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner(self): + """Test SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_redemption_record_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_redemption_record_get200_response.py new file mode 100644 index 0000000..6fac25a --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_redemption_record_get200_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_history_redemption_record_get200_response import SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response + +class TestSapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response(unittest.TestCase): + """SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response: + """Test SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response` + """ + model = SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response() + if include_optional: + return SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response_rows_inner._sapi_v1_simple_earn_flexible_history_redemptionRecord_get_200_response_rows_inner( + amount = '10.54000000', + asset = 'USDT', + time = 1577257222000, + project_id = 'USDT001', + redeem_id = 40607, + dest_account = 'SPOT', + status = 'PAID', ) + ], + total = 1 + ) + else: + return SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response_rows_inner._sapi_v1_simple_earn_flexible_history_redemptionRecord_get_200_response_rows_inner( + amount = '10.54000000', + asset = 'USDT', + time = 1577257222000, + project_id = 'USDT001', + redeem_id = 40607, + dest_account = 'SPOT', + status = 'PAID', ) + ], + total = 1, + ) + """ + + def testSapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response(self): + """Test SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner.py new file mode 100644 index 0000000..bf1e7b4 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_history_redemption_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner + +class TestSapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner(unittest.TestCase): + """SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner: + """Test SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner` + """ + model = SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner() + if include_optional: + return SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner( + amount = '10.54000000', + asset = 'USDT', + time = 1577257222000, + project_id = 'USDT001', + redeem_id = 40607, + dest_account = 'SPOT', + status = 'PAID' + ) + else: + return SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner( + amount = '10.54000000', + asset = 'USDT', + time = 1577257222000, + project_id = 'USDT001', + redeem_id = 40607, + dest_account = 'SPOT', + status = 'PAID', + ) + """ + + def testSapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner(self): + """Test SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rewards_record_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rewards_record_get200_response.py new file mode 100644 index 0000000..2c336be --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rewards_record_get200_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rewards_record_get200_response import SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response + +class TestSapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response(unittest.TestCase): + """SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response: + """Test SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response` + """ + model = SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response() + if include_optional: + return SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response_rows_inner._sapi_v1_simple_earn_flexible_history_rewardsRecord_get_200_response_rows_inner( + asset = 'BUSD', + rewards = '0.00006408', + project_id = 'USDT001', + type = 'BONUS', + time = 1577257222000, ) + ], + total = 2 + ) + else: + return SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response_rows_inner._sapi_v1_simple_earn_flexible_history_rewardsRecord_get_200_response_rows_inner( + asset = 'BUSD', + rewards = '0.00006408', + project_id = 'USDT001', + type = 'BONUS', + time = 1577257222000, ) + ], + total = 2, + ) + """ + + def testSapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response(self): + """Test SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner.py new file mode 100644 index 0000000..60a6c23 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_history_rewards_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner + +class TestSapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner(unittest.TestCase): + """SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner: + """Test SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner` + """ + model = SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner() + if include_optional: + return SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner( + asset = 'BUSD', + rewards = '0.00006408', + project_id = 'USDT001', + type = 'BONUS', + time = 1577257222000 + ) + else: + return SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner( + asset = 'BUSD', + rewards = '0.00006408', + project_id = 'USDT001', + type = 'BONUS', + time = 1577257222000, + ) + """ + + def testSapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner(self): + """Test SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_subscription_record_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_subscription_record_get200_response.py new file mode 100644 index 0000000..7d52323 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_subscription_record_get200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_history_subscription_record_get200_response import SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response + +class TestSapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response(unittest.TestCase): + """SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response: + """Test SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response` + """ + model = SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response() + if include_optional: + return SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response_rows_inner._sapi_v1_simple_earn_flexible_history_subscriptionRecord_get_200_response_rows_inner( + amount = '100.00000000', + asset = 'USDT', + time = 1575018510000, + purchase_id = 26055, + type = 'AUTO', + source_account = 'SPOT', + amt_from_spot = '30', + amt_from_funding = '70', + status = 'SUCCESS', ) + ], + total = 1 + ) + else: + return SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response_rows_inner._sapi_v1_simple_earn_flexible_history_subscriptionRecord_get_200_response_rows_inner( + amount = '100.00000000', + asset = 'USDT', + time = 1575018510000, + purchase_id = 26055, + type = 'AUTO', + source_account = 'SPOT', + amt_from_spot = '30', + amt_from_funding = '70', + status = 'SUCCESS', ) + ], + total = 1, + ) + """ + + def testSapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response(self): + """Test SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner.py new file mode 100644 index 0000000..d8603cc --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_history_subscription_record_get200_response_rows_inner import SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner + +class TestSapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner(unittest.TestCase): + """SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner: + """Test SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner` + """ + model = SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner() + if include_optional: + return SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner( + amount = '100.00000000', + asset = 'USDT', + time = 1575018510000, + purchase_id = 26055, + type = 'AUTO', + source_account = 'SPOT', + amt_from_spot = '30', + amt_from_funding = '70', + status = 'SUCCESS' + ) + else: + return SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner( + amount = '100.00000000', + asset = 'USDT', + time = 1575018510000, + purchase_id = 26055, + type = 'AUTO', + source_account = 'SPOT', + amt_from_spot = '30', + amt_from_funding = '70', + status = 'SUCCESS', + ) + """ + + def testSapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner(self): + """Test SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_list_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_list_get200_response.py new file mode 100644 index 0000000..a9955f9 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_list_get200_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response import SapiV1SimpleEarnFlexibleListGet200Response + +class TestSapiV1SimpleEarnFlexibleListGet200Response(unittest.TestCase): + """SapiV1SimpleEarnFlexibleListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleListGet200Response: + """Test SapiV1SimpleEarnFlexibleListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleListGet200Response` + """ + model = SapiV1SimpleEarnFlexibleListGet200Response() + if include_optional: + return SapiV1SimpleEarnFlexibleListGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner( + asset = 'BTC', + latest_annual_percentage_rate = '0.05000000', + tier_annual_percentage_rate = openapi_client.models._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tierAnnualPercentageRate( + 0_5_btc = 0.05, + 5_10_btc = 0.03, ), + air_drop_percentage_rate = '0.05000000', + can_purchase = True, + can_redeem = True, + is_sold_out = True, + hot = True, + min_purchase_amount = '0.01000000', + product_id = 'BTC001', + subscription_start_time = '1646182276000', + status = 'PURCHASING', ) + ], + total = 1 + ) + else: + return SapiV1SimpleEarnFlexibleListGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner( + asset = 'BTC', + latest_annual_percentage_rate = '0.05000000', + tier_annual_percentage_rate = openapi_client.models._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tierAnnualPercentageRate( + 0_5_btc = 0.05, + 5_10_btc = 0.03, ), + air_drop_percentage_rate = '0.05000000', + can_purchase = True, + can_redeem = True, + is_sold_out = True, + hot = True, + min_purchase_amount = '0.01000000', + product_id = 'BTC001', + subscription_start_time = '1646182276000', + status = 'PURCHASING', ) + ], + total = 1, + ) + """ + + def testSapiV1SimpleEarnFlexibleListGet200Response(self): + """Test SapiV1SimpleEarnFlexibleListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_list_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_list_get200_response_rows_inner.py new file mode 100644 index 0000000..199be8a --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_list_get200_response_rows_inner.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response_rows_inner import SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner + +class TestSapiV1SimpleEarnFlexibleListGet200ResponseRowsInner(unittest.TestCase): + """SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner: + """Test SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner` + """ + model = SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner() + if include_optional: + return SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner( + asset = 'BTC', + latest_annual_percentage_rate = '0.05000000', + tier_annual_percentage_rate = openapi_client.models._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tierAnnualPercentageRate( + 0_5_btc = 0.05, + 5_10_btc = 0.03, ), + air_drop_percentage_rate = '0.05000000', + can_purchase = True, + can_redeem = True, + is_sold_out = True, + hot = True, + min_purchase_amount = '0.01000000', + product_id = 'BTC001', + subscription_start_time = '1646182276000', + status = 'PURCHASING' + ) + else: + return SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner( + asset = 'BTC', + latest_annual_percentage_rate = '0.05000000', + tier_annual_percentage_rate = openapi_client.models._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tierAnnualPercentageRate( + 0_5_btc = 0.05, + 5_10_btc = 0.03, ), + air_drop_percentage_rate = '0.05000000', + can_purchase = True, + can_redeem = True, + is_sold_out = True, + hot = True, + min_purchase_amount = '0.01000000', + product_id = 'BTC001', + subscription_start_time = '1646182276000', + status = 'PURCHASING', + ) + """ + + def testSapiV1SimpleEarnFlexibleListGet200ResponseRowsInner(self): + """Test SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate.py new file mode 100644 index 0000000..6ee1f0a --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_list_get200_response_rows_inner_tier_annual_percentage_rate import SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate + +class TestSapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate(unittest.TestCase): + """SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate: + """Test SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate` + """ + model = SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate() + if include_optional: + return SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate( + var_0_5_btc = 0.05, + var_5_10_btc = 0.03 + ) + else: + return SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate( + var_0_5_btc = 0.05, + var_5_10_btc = 0.03, + ) + """ + + def testSapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate(self): + """Test SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_personal_left_quota_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_personal_left_quota_get200_response.py new file mode 100644 index 0000000..b1e1dea --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_personal_left_quota_get200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_personal_left_quota_get200_response import SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response + +class TestSapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response(unittest.TestCase): + """SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response: + """Test SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response` + """ + model = SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response() + if include_optional: + return SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response( + left_personal_quota = '1000' + ) + else: + return SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response( + left_personal_quota = '1000', + ) + """ + + def testSapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response(self): + """Test SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_position_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_position_get200_response.py new file mode 100644 index 0000000..8982f3a --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_position_get200_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_position_get200_response import SapiV1SimpleEarnFlexiblePositionGet200Response + +class TestSapiV1SimpleEarnFlexiblePositionGet200Response(unittest.TestCase): + """SapiV1SimpleEarnFlexiblePositionGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexiblePositionGet200Response: + """Test SapiV1SimpleEarnFlexiblePositionGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexiblePositionGet200Response` + """ + model = SapiV1SimpleEarnFlexiblePositionGet200Response() + if include_optional: + return SapiV1SimpleEarnFlexiblePositionGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_flexible_position_get_200_response_rows_inner._sapi_v1_simple_earn_flexible_position_get_200_response_rows_inner( + total_amount = '75.46000000', + tier_annual_percentage_rate = openapi_client.models._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tierAnnualPercentageRate( + 0_5_btc = 0.05, + 5_10_btc = 0.03, ), + latest_annual_percentage_rate = '0.02599895', + yesterday_airdrop_percentage_rate = '0.02599895', + asset = 'USDT', + air_drop_asset = 'BETH', + can_redeem = True, + collateral_amount = '232.23123213', + product_id = 'USDT001', + yesterday_real_time_rewards = '0.10293829', + cumulative_bonus_rewards = '0.22759183', + cumulative_real_time_rewards = '0.22759183', + cumulative_total_rewards = '0.45459183', + auto_subscribe = True, ) + ], + total = 1 + ) + else: + return SapiV1SimpleEarnFlexiblePositionGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_flexible_position_get_200_response_rows_inner._sapi_v1_simple_earn_flexible_position_get_200_response_rows_inner( + total_amount = '75.46000000', + tier_annual_percentage_rate = openapi_client.models._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tierAnnualPercentageRate( + 0_5_btc = 0.05, + 5_10_btc = 0.03, ), + latest_annual_percentage_rate = '0.02599895', + yesterday_airdrop_percentage_rate = '0.02599895', + asset = 'USDT', + air_drop_asset = 'BETH', + can_redeem = True, + collateral_amount = '232.23123213', + product_id = 'USDT001', + yesterday_real_time_rewards = '0.10293829', + cumulative_bonus_rewards = '0.22759183', + cumulative_real_time_rewards = '0.22759183', + cumulative_total_rewards = '0.45459183', + auto_subscribe = True, ) + ], + total = 1, + ) + """ + + def testSapiV1SimpleEarnFlexiblePositionGet200Response(self): + """Test SapiV1SimpleEarnFlexiblePositionGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_position_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_position_get200_response_rows_inner.py new file mode 100644 index 0000000..c58ea75 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_position_get200_response_rows_inner.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_position_get200_response_rows_inner import SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner + +class TestSapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner(unittest.TestCase): + """SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner: + """Test SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner` + """ + model = SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner() + if include_optional: + return SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner( + total_amount = '75.46000000', + tier_annual_percentage_rate = openapi_client.models._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tierAnnualPercentageRate( + 0_5_btc = 0.05, + 5_10_btc = 0.03, ), + latest_annual_percentage_rate = '0.02599895', + yesterday_airdrop_percentage_rate = '0.02599895', + asset = 'USDT', + air_drop_asset = 'BETH', + can_redeem = True, + collateral_amount = '232.23123213', + product_id = 'USDT001', + yesterday_real_time_rewards = '0.10293829', + cumulative_bonus_rewards = '0.22759183', + cumulative_real_time_rewards = '0.22759183', + cumulative_total_rewards = '0.45459183', + auto_subscribe = True + ) + else: + return SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner( + total_amount = '75.46000000', + tier_annual_percentage_rate = openapi_client.models._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate._sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tierAnnualPercentageRate( + 0_5_btc = 0.05, + 5_10_btc = 0.03, ), + latest_annual_percentage_rate = '0.02599895', + yesterday_airdrop_percentage_rate = '0.02599895', + asset = 'USDT', + air_drop_asset = 'BETH', + can_redeem = True, + collateral_amount = '232.23123213', + product_id = 'USDT001', + yesterday_real_time_rewards = '0.10293829', + cumulative_bonus_rewards = '0.22759183', + cumulative_real_time_rewards = '0.22759183', + cumulative_total_rewards = '0.45459183', + auto_subscribe = True, + ) + """ + + def testSapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner(self): + """Test SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_redeem_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_redeem_post200_response.py new file mode 100644 index 0000000..6a9f9eb --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_redeem_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_redeem_post200_response import SapiV1SimpleEarnFlexibleRedeemPost200Response + +class TestSapiV1SimpleEarnFlexibleRedeemPost200Response(unittest.TestCase): + """SapiV1SimpleEarnFlexibleRedeemPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleRedeemPost200Response: + """Test SapiV1SimpleEarnFlexibleRedeemPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleRedeemPost200Response` + """ + model = SapiV1SimpleEarnFlexibleRedeemPost200Response() + if include_optional: + return SapiV1SimpleEarnFlexibleRedeemPost200Response( + redeem_id = 40607, + success = True + ) + else: + return SapiV1SimpleEarnFlexibleRedeemPost200Response( + redeem_id = 40607, + success = True, + ) + """ + + def testSapiV1SimpleEarnFlexibleRedeemPost200Response(self): + """Test SapiV1SimpleEarnFlexibleRedeemPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_subscribe_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_subscribe_post200_response.py new file mode 100644 index 0000000..dbf40de --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_subscribe_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_subscribe_post200_response import SapiV1SimpleEarnFlexibleSubscribePost200Response + +class TestSapiV1SimpleEarnFlexibleSubscribePost200Response(unittest.TestCase): + """SapiV1SimpleEarnFlexibleSubscribePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleSubscribePost200Response: + """Test SapiV1SimpleEarnFlexibleSubscribePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleSubscribePost200Response` + """ + model = SapiV1SimpleEarnFlexibleSubscribePost200Response() + if include_optional: + return SapiV1SimpleEarnFlexibleSubscribePost200Response( + purchase_id = 40607, + success = True + ) + else: + return SapiV1SimpleEarnFlexibleSubscribePost200Response( + purchase_id = 40607, + success = True, + ) + """ + + def testSapiV1SimpleEarnFlexibleSubscribePost200Response(self): + """Test SapiV1SimpleEarnFlexibleSubscribePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_subscription_preview_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_subscription_preview_get200_response.py new file mode 100644 index 0000000..56e56be --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_flexible_subscription_preview_get200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_flexible_subscription_preview_get200_response import SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response + +class TestSapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response(unittest.TestCase): + """SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response: + """Test SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response` + """ + model = SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response() + if include_optional: + return SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response( + total_amount = '1232.32230982', + reward_asset = 'BUSD', + air_drop_asset = 'BETH', + est_daily_bonus_rewards = '0.22759183', + est_daily_real_time_rewards = '0.22759183', + est_daily_airdrop_rewards = '0.22759183' + ) + else: + return SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response( + total_amount = '1232.32230982', + reward_asset = 'BUSD', + air_drop_asset = 'BETH', + est_daily_bonus_rewards = '0.22759183', + est_daily_real_time_rewards = '0.22759183', + est_daily_airdrop_rewards = '0.22759183', + ) + """ + + def testSapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response(self): + """Test SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_redemption_record_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_redemption_record_get200_response.py new file mode 100644 index 0000000..6712065 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_redemption_record_get200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_locked_history_redemption_record_get200_response import SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response + +class TestSapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response(unittest.TestCase): + """SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response: + """Test SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response` + """ + model = SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response() + if include_optional: + return SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_locked_history_redemption_record_get_200_response_rows_inner._sapi_v1_simple_earn_locked_history_redemptionRecord_get_200_response_rows_inner( + position_id = '123123', + redeem_id = 40607, + time = 1575018510000, + asset = 'BNB', + lock_period = '30', + amount = '21312.23223', + type = 'MATURE', + deliver_date = '1575018510000', + status = 'PAID', ) + ], + total = 1 + ) + else: + return SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_locked_history_redemption_record_get_200_response_rows_inner._sapi_v1_simple_earn_locked_history_redemptionRecord_get_200_response_rows_inner( + position_id = '123123', + redeem_id = 40607, + time = 1575018510000, + asset = 'BNB', + lock_period = '30', + amount = '21312.23223', + type = 'MATURE', + deliver_date = '1575018510000', + status = 'PAID', ) + ], + total = 1, + ) + """ + + def testSapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response(self): + """Test SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner.py new file mode 100644 index 0000000..84e3f74 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_locked_history_redemption_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner + +class TestSapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner(unittest.TestCase): + """SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner: + """Test SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner` + """ + model = SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner() + if include_optional: + return SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner( + position_id = '123123', + redeem_id = 40607, + time = 1575018510000, + asset = 'BNB', + lock_period = '30', + amount = '21312.23223', + type = 'MATURE', + deliver_date = '1575018510000', + status = 'PAID' + ) + else: + return SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner( + position_id = '123123', + redeem_id = 40607, + time = 1575018510000, + asset = 'BNB', + lock_period = '30', + amount = '21312.23223', + type = 'MATURE', + deliver_date = '1575018510000', + status = 'PAID', + ) + """ + + def testSapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner(self): + """Test SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_rewards_record_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_rewards_record_get200_response.py new file mode 100644 index 0000000..13695e7 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_rewards_record_get200_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_locked_history_rewards_record_get200_response import SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response + +class TestSapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response(unittest.TestCase): + """SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response: + """Test SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response` + """ + model = SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response() + if include_optional: + return SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_locked_history_rewards_record_get_200_response_rows_inner._sapi_v1_simple_earn_locked_history_rewardsRecord_get_200_response_rows_inner( + position_id = '123123', + time = 1577257222000, + asset = 'BNB', + lock_period = '30', + amount = '21312.23223', ) + ], + total = 1 + ) + else: + return SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_locked_history_rewards_record_get_200_response_rows_inner._sapi_v1_simple_earn_locked_history_rewardsRecord_get_200_response_rows_inner( + position_id = '123123', + time = 1577257222000, + asset = 'BNB', + lock_period = '30', + amount = '21312.23223', ) + ], + total = 1, + ) + """ + + def testSapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response(self): + """Test SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner.py new file mode 100644 index 0000000..d71fb22 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_locked_history_rewards_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner + +class TestSapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner(unittest.TestCase): + """SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner: + """Test SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner` + """ + model = SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner() + if include_optional: + return SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner( + position_id = '123123', + time = 1577257222000, + asset = 'BNB', + lock_period = '30', + amount = '21312.23223' + ) + else: + return SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner( + position_id = '123123', + time = 1577257222000, + asset = 'BNB', + lock_period = '30', + amount = '21312.23223', + ) + """ + + def testSapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner(self): + """Test SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_subscription_record_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_subscription_record_get200_response.py new file mode 100644 index 0000000..4512426 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_subscription_record_get200_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_locked_history_subscription_record_get200_response import SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response + +class TestSapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response(unittest.TestCase): + """SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response: + """Test SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response` + """ + model = SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response() + if include_optional: + return SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_locked_history_subscription_record_get_200_response_rows_inner._sapi_v1_simple_earn_locked_history_subscriptionRecord_get_200_response_rows_inner( + position_id = '123123', + purchase_id = 26055, + time = 1575018510000, + asset = 'BNB', + amount = '21312.23223', + lock_period = '30', + type = 'AUTO', + source_account = 'SPOT', + amt_from_spot = '30', + amt_from_funding = '70', + status = 'SUCCESS', ) + ], + total = 1 + ) + else: + return SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_locked_history_subscription_record_get_200_response_rows_inner._sapi_v1_simple_earn_locked_history_subscriptionRecord_get_200_response_rows_inner( + position_id = '123123', + purchase_id = 26055, + time = 1575018510000, + asset = 'BNB', + amount = '21312.23223', + lock_period = '30', + type = 'AUTO', + source_account = 'SPOT', + amt_from_spot = '30', + amt_from_funding = '70', + status = 'SUCCESS', ) + ], + total = 1, + ) + """ + + def testSapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response(self): + """Test SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner.py new file mode 100644 index 0000000..11c8cf8 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_locked_history_subscription_record_get200_response_rows_inner import SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner + +class TestSapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner(unittest.TestCase): + """SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner: + """Test SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner` + """ + model = SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner() + if include_optional: + return SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner( + position_id = '123123', + purchase_id = 26055, + time = 1575018510000, + asset = 'BNB', + amount = '21312.23223', + lock_period = '30', + type = 'AUTO', + source_account = 'SPOT', + amt_from_spot = '30', + amt_from_funding = '70', + status = 'SUCCESS' + ) + else: + return SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner( + position_id = '123123', + purchase_id = 26055, + time = 1575018510000, + asset = 'BNB', + amount = '21312.23223', + lock_period = '30', + type = 'AUTO', + source_account = 'SPOT', + amt_from_spot = '30', + amt_from_funding = '70', + status = 'SUCCESS', + ) + """ + + def testSapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner(self): + """Test SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response.py new file mode 100644 index 0000000..2de9493 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response import SapiV1SimpleEarnLockedListGet200Response + +class TestSapiV1SimpleEarnLockedListGet200Response(unittest.TestCase): + """SapiV1SimpleEarnLockedListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnLockedListGet200Response: + """Test SapiV1SimpleEarnLockedListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnLockedListGet200Response` + """ + model = SapiV1SimpleEarnLockedListGet200Response() + if include_optional: + return SapiV1SimpleEarnLockedListGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner( + project_id = 'BNB', + detail = openapi_client.models._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail( + asset = 'AXS', + reward_asset = 'AXS', + duration = 90, + renewable = True, + is_sold_out = True, + apr = '1.2069', + status = 'CREATED', + subscription_start_time = '1646182276000', + extra_reward_asset = 'BNB', + extra_reward_apr = '0.23', ), + quota = openapi_client.models._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota( + total_personal_quota = '2', + minimum = '0.001', ), ) + ], + total = 1 + ) + else: + return SapiV1SimpleEarnLockedListGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner( + project_id = 'BNB', + detail = openapi_client.models._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail( + asset = 'AXS', + reward_asset = 'AXS', + duration = 90, + renewable = True, + is_sold_out = True, + apr = '1.2069', + status = 'CREATED', + subscription_start_time = '1646182276000', + extra_reward_asset = 'BNB', + extra_reward_apr = '0.23', ), + quota = openapi_client.models._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota( + total_personal_quota = '2', + minimum = '0.001', ), ) + ], + total = 1, + ) + """ + + def testSapiV1SimpleEarnLockedListGet200Response(self): + """Test SapiV1SimpleEarnLockedListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response_rows_inner.py new file mode 100644 index 0000000..f584a6b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response_rows_inner.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner import SapiV1SimpleEarnLockedListGet200ResponseRowsInner + +class TestSapiV1SimpleEarnLockedListGet200ResponseRowsInner(unittest.TestCase): + """SapiV1SimpleEarnLockedListGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnLockedListGet200ResponseRowsInner: + """Test SapiV1SimpleEarnLockedListGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnLockedListGet200ResponseRowsInner` + """ + model = SapiV1SimpleEarnLockedListGet200ResponseRowsInner() + if include_optional: + return SapiV1SimpleEarnLockedListGet200ResponseRowsInner( + project_id = 'BNB', + detail = openapi_client.models._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail( + asset = 'AXS', + reward_asset = 'AXS', + duration = 90, + renewable = True, + is_sold_out = True, + apr = '1.2069', + status = 'CREATED', + subscription_start_time = '1646182276000', + extra_reward_asset = 'BNB', + extra_reward_apr = '0.23', ), + quota = openapi_client.models._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota( + total_personal_quota = '2', + minimum = '0.001', ) + ) + else: + return SapiV1SimpleEarnLockedListGet200ResponseRowsInner( + project_id = 'BNB', + detail = openapi_client.models._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail( + asset = 'AXS', + reward_asset = 'AXS', + duration = 90, + renewable = True, + is_sold_out = True, + apr = '1.2069', + status = 'CREATED', + subscription_start_time = '1646182276000', + extra_reward_asset = 'BNB', + extra_reward_apr = '0.23', ), + quota = openapi_client.models._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota._sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota( + total_personal_quota = '2', + minimum = '0.001', ), + ) + """ + + def testSapiV1SimpleEarnLockedListGet200ResponseRowsInner(self): + """Test SapiV1SimpleEarnLockedListGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail.py new file mode 100644 index 0000000..9fcd3bf --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner_detail import SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail + +class TestSapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail(unittest.TestCase): + """SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail: + """Test SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail` + """ + model = SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail() + if include_optional: + return SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail( + asset = 'AXS', + reward_asset = 'AXS', + duration = 90, + renewable = True, + is_sold_out = True, + apr = '1.2069', + status = 'CREATED', + subscription_start_time = '1646182276000', + extra_reward_asset = 'BNB', + extra_reward_apr = '0.23' + ) + else: + return SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail( + asset = 'AXS', + reward_asset = 'AXS', + duration = 90, + renewable = True, + is_sold_out = True, + apr = '1.2069', + status = 'CREATED', + subscription_start_time = '1646182276000', + extra_reward_asset = 'BNB', + extra_reward_apr = '0.23', + ) + """ + + def testSapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail(self): + """Test SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota.py new file mode 100644 index 0000000..2cf8cdd --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_locked_list_get200_response_rows_inner_quota import SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota + +class TestSapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota(unittest.TestCase): + """SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota: + """Test SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota` + """ + model = SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota() + if include_optional: + return SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota( + total_personal_quota = '2', + minimum = '0.001' + ) + else: + return SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota( + total_personal_quota = '2', + minimum = '0.001', + ) + """ + + def testSapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota(self): + """Test SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_position_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_position_get200_response.py new file mode 100644 index 0000000..020622a --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_position_get200_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_locked_position_get200_response import SapiV1SimpleEarnLockedPositionGet200Response + +class TestSapiV1SimpleEarnLockedPositionGet200Response(unittest.TestCase): + """SapiV1SimpleEarnLockedPositionGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnLockedPositionGet200Response: + """Test SapiV1SimpleEarnLockedPositionGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnLockedPositionGet200Response` + """ + model = SapiV1SimpleEarnLockedPositionGet200Response() + if include_optional: + return SapiV1SimpleEarnLockedPositionGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_locked_position_get_200_response_rows_inner._sapi_v1_simple_earn_locked_position_get_200_response_rows_inner( + position_id = '123123', + project_id = 'Axs*90', + asset = 'AXS', + amount = '122.09202928', + purchase_time = '1646182276000', + duration = '60', + accrual_days = '4', + reward_asset = 'AXS', + apy = '0.23', + is_renewable = True, + is_auto_renew = True, + redeem_date = '1732182276000', ) + ], + total = 1 + ) + else: + return SapiV1SimpleEarnLockedPositionGet200Response( + rows = [ + openapi_client.models._sapi_v1_simple_earn_locked_position_get_200_response_rows_inner._sapi_v1_simple_earn_locked_position_get_200_response_rows_inner( + position_id = '123123', + project_id = 'Axs*90', + asset = 'AXS', + amount = '122.09202928', + purchase_time = '1646182276000', + duration = '60', + accrual_days = '4', + reward_asset = 'AXS', + apy = '0.23', + is_renewable = True, + is_auto_renew = True, + redeem_date = '1732182276000', ) + ], + total = 1, + ) + """ + + def testSapiV1SimpleEarnLockedPositionGet200Response(self): + """Test SapiV1SimpleEarnLockedPositionGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_position_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_position_get200_response_rows_inner.py new file mode 100644 index 0000000..49a7494 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_position_get200_response_rows_inner.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_locked_position_get200_response_rows_inner import SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner + +class TestSapiV1SimpleEarnLockedPositionGet200ResponseRowsInner(unittest.TestCase): + """SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner: + """Test SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner` + """ + model = SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner() + if include_optional: + return SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner( + position_id = '123123', + project_id = 'Axs*90', + asset = 'AXS', + amount = '122.09202928', + purchase_time = '1646182276000', + duration = '60', + accrual_days = '4', + reward_asset = 'AXS', + apy = '0.23', + is_renewable = True, + is_auto_renew = True, + redeem_date = '1732182276000' + ) + else: + return SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner( + position_id = '123123', + project_id = 'Axs*90', + asset = 'AXS', + amount = '122.09202928', + purchase_time = '1646182276000', + duration = '60', + accrual_days = '4', + reward_asset = 'AXS', + apy = '0.23', + is_renewable = True, + is_auto_renew = True, + redeem_date = '1732182276000', + ) + """ + + def testSapiV1SimpleEarnLockedPositionGet200ResponseRowsInner(self): + """Test SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_subscribe_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_subscribe_post200_response.py new file mode 100644 index 0000000..af5d084 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_subscribe_post200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_locked_subscribe_post200_response import SapiV1SimpleEarnLockedSubscribePost200Response + +class TestSapiV1SimpleEarnLockedSubscribePost200Response(unittest.TestCase): + """SapiV1SimpleEarnLockedSubscribePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnLockedSubscribePost200Response: + """Test SapiV1SimpleEarnLockedSubscribePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnLockedSubscribePost200Response` + """ + model = SapiV1SimpleEarnLockedSubscribePost200Response() + if include_optional: + return SapiV1SimpleEarnLockedSubscribePost200Response( + purchase_id = 40607, + position_id = '12345', + success = True + ) + else: + return SapiV1SimpleEarnLockedSubscribePost200Response( + purchase_id = 40607, + position_id = '12345', + success = True, + ) + """ + + def testSapiV1SimpleEarnLockedSubscribePost200Response(self): + """Test SapiV1SimpleEarnLockedSubscribePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner.py new file mode 100644 index 0000000..f4ce2f3 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_simple_earn_locked_subscription_preview_get200_response_inner import SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner + +class TestSapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner(unittest.TestCase): + """SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner: + """Test SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner` + """ + model = SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner() + if include_optional: + return SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner( + reward_asset = 'AXS', + total_reward_amt = '5.17181528', + extra_reward_asset = 'BNB', + est_total_extra_reward_amt = '5.17181528', + next_pay = '1.29295383', + next_pay_date = '1646697600000', + value_date = '1646697600000', + rewards_end_date = '1651449600000', + deliver_date = '1651536000000', + next_subscription_date = '1651536000000' + ) + else: + return SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner( + reward_asset = 'AXS', + total_reward_amt = '5.17181528', + extra_reward_asset = 'BNB', + est_total_extra_reward_amt = '5.17181528', + next_pay = '1.29295383', + next_pay_date = '1646697600000', + value_date = '1646697600000', + rewards_end_date = '1651449600000', + deliver_date = '1651536000000', + next_subscription_date = '1651536000000', + ) + """ + + def testSapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner(self): + """Test SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_spot_delist_schedule_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_spot_delist_schedule_get200_response_inner.py new file mode 100644 index 0000000..b8b40b2 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_spot_delist_schedule_get200_response_inner.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_spot_delist_schedule_get200_response_inner import SapiV1SpotDelistScheduleGet200ResponseInner + +class TestSapiV1SpotDelistScheduleGet200ResponseInner(unittest.TestCase): + """SapiV1SpotDelistScheduleGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SpotDelistScheduleGet200ResponseInner: + """Test SapiV1SpotDelistScheduleGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SpotDelistScheduleGet200ResponseInner` + """ + model = SapiV1SpotDelistScheduleGet200ResponseInner() + if include_optional: + return SapiV1SpotDelistScheduleGet200ResponseInner( + delist_time = 1686161202000, + symbol = ["ADAUSDT","BNBUSDT"] + ) + else: + return SapiV1SpotDelistScheduleGet200ResponseInner( + delist_time = 1686161202000, + symbol = ["ADAUSDT","BNBUSDT"], + ) + """ + + def testSapiV1SpotDelistScheduleGet200ResponseInner(self): + """Test SapiV1SpotDelistScheduleGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_blvt_enable_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_blvt_enable_post200_response.py new file mode 100644 index 0000000..a9d9afe --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_blvt_enable_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_blvt_enable_post200_response import SapiV1SubAccountBlvtEnablePost200Response + +class TestSapiV1SubAccountBlvtEnablePost200Response(unittest.TestCase): + """SapiV1SubAccountBlvtEnablePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountBlvtEnablePost200Response: + """Test SapiV1SubAccountBlvtEnablePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountBlvtEnablePost200Response` + """ + model = SapiV1SubAccountBlvtEnablePost200Response() + if include_optional: + return SapiV1SubAccountBlvtEnablePost200Response( + email = '123@test.com', + enable_blvt = True + ) + else: + return SapiV1SubAccountBlvtEnablePost200Response( + email = '123@test.com', + enable_blvt = True, + ) + """ + + def testSapiV1SubAccountBlvtEnablePost200Response(self): + """Test SapiV1SubAccountBlvtEnablePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_eoptions_enable_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_eoptions_enable_post200_response.py new file mode 100644 index 0000000..7240452 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_eoptions_enable_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_eoptions_enable_post200_response import SapiV1SubAccountEoptionsEnablePost200Response + +class TestSapiV1SubAccountEoptionsEnablePost200Response(unittest.TestCase): + """SapiV1SubAccountEoptionsEnablePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountEoptionsEnablePost200Response: + """Test SapiV1SubAccountEoptionsEnablePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountEoptionsEnablePost200Response` + """ + model = SapiV1SubAccountEoptionsEnablePost200Response() + if include_optional: + return SapiV1SubAccountEoptionsEnablePost200Response( + email = 'alice@test.com', + is_e_options_enabled = True + ) + else: + return SapiV1SubAccountEoptionsEnablePost200Response( + email = 'alice@test.com', + is_e_options_enabled = True, + ) + """ + + def testSapiV1SubAccountEoptionsEnablePost200Response(self): + """Test SapiV1SubAccountEoptionsEnablePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_get200_response.py new file mode 100644 index 0000000..578aaf6 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_get200_response.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_futures_account_get200_response import SapiV1SubAccountFuturesAccountGet200Response + +class TestSapiV1SubAccountFuturesAccountGet200Response(unittest.TestCase): + """SapiV1SubAccountFuturesAccountGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountFuturesAccountGet200Response: + """Test SapiV1SubAccountFuturesAccountGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountFuturesAccountGet200Response` + """ + model = SapiV1SubAccountFuturesAccountGet200Response() + if include_optional: + return SapiV1SubAccountFuturesAccountGet200Response( + email = 'abc@test.com', + asset = 'USDT', + assets = [ + openapi_client.models._sapi_v1_sub_account_futures_account_get_200_response_assets_inner._sapi_v1_sub_account_futures_account_get_200_response_assets_inner( + asset = 'USDT', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000', ) + ], + can_deposit = True, + can_trade = True, + can_withdraw = True, + fee_tier = 2, + max_withdraw_amount = '0.88308000', + total_initial_margin = '0.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '0.88308000', + total_open_order_initial_margin = '0.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '0.88308000', + update_time = 1576756674610 + ) + else: + return SapiV1SubAccountFuturesAccountGet200Response( + email = 'abc@test.com', + asset = 'USDT', + assets = [ + openapi_client.models._sapi_v1_sub_account_futures_account_get_200_response_assets_inner._sapi_v1_sub_account_futures_account_get_200_response_assets_inner( + asset = 'USDT', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000', ) + ], + can_deposit = True, + can_trade = True, + can_withdraw = True, + fee_tier = 2, + max_withdraw_amount = '0.88308000', + total_initial_margin = '0.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '0.88308000', + total_open_order_initial_margin = '0.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '0.88308000', + update_time = 1576756674610, + ) + """ + + def testSapiV1SubAccountFuturesAccountGet200Response(self): + """Test SapiV1SubAccountFuturesAccountGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_get200_response_assets_inner.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_get200_response_assets_inner.py new file mode 100644 index 0000000..b9b2189 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_get200_response_assets_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_futures_account_get200_response_assets_inner import SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner + +class TestSapiV1SubAccountFuturesAccountGet200ResponseAssetsInner(unittest.TestCase): + """SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner: + """Test SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner` + """ + model = SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner() + if include_optional: + return SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner( + asset = 'USDT', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000' + ) + else: + return SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner( + asset = 'USDT', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000', + ) + """ + + def testSapiV1SubAccountFuturesAccountGet200ResponseAssetsInner(self): + """Test SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_summary_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_summary_get200_response.py new file mode 100644 index 0000000..bc0a480 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_summary_get200_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_futures_account_summary_get200_response import SapiV1SubAccountFuturesAccountSummaryGet200Response + +class TestSapiV1SubAccountFuturesAccountSummaryGet200Response(unittest.TestCase): + """SapiV1SubAccountFuturesAccountSummaryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountFuturesAccountSummaryGet200Response: + """Test SapiV1SubAccountFuturesAccountSummaryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountFuturesAccountSummaryGet200Response` + """ + model = SapiV1SubAccountFuturesAccountSummaryGet200Response() + if include_optional: + return SapiV1SubAccountFuturesAccountSummaryGet200Response( + total_initial_margin = '9.83137400', + total_maintenance_margin = '0.41568700', + total_margin_balance = '23.03235621', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.83137400', + total_unrealized_profit = '0.03219710', + total_wallet_balance = '22.15879444', + asset = 'USD', + sub_account_list = [ + openapi_client.models._sapi_v1_sub_account_futures_account_summary_get_200_response_sub_account_list_inner._sapi_v1_sub_account_futures_accountSummary_get_200_response_subAccountList_inner( + email = '123@test.com', + total_initial_margin = '9.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '22.12659734', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '22.12659734', + asset = 'USD', ) + ] + ) + else: + return SapiV1SubAccountFuturesAccountSummaryGet200Response( + total_initial_margin = '9.83137400', + total_maintenance_margin = '0.41568700', + total_margin_balance = '23.03235621', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.83137400', + total_unrealized_profit = '0.03219710', + total_wallet_balance = '22.15879444', + asset = 'USD', + sub_account_list = [ + openapi_client.models._sapi_v1_sub_account_futures_account_summary_get_200_response_sub_account_list_inner._sapi_v1_sub_account_futures_accountSummary_get_200_response_subAccountList_inner( + email = '123@test.com', + total_initial_margin = '9.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '22.12659734', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '22.12659734', + asset = 'USD', ) + ], + ) + """ + + def testSapiV1SubAccountFuturesAccountSummaryGet200Response(self): + """Test SapiV1SubAccountFuturesAccountSummaryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner.py new file mode 100644 index 0000000..01c5740 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_futures_account_summary_get200_response_sub_account_list_inner import SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner + +class TestSapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner(unittest.TestCase): + """SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner: + """Test SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner` + """ + model = SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner() + if include_optional: + return SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner( + email = '123@test.com', + total_initial_margin = '9.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '22.12659734', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '22.12659734', + asset = 'USD' + ) + else: + return SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner( + email = '123@test.com', + total_initial_margin = '9.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '22.12659734', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '22.12659734', + asset = 'USD', + ) + """ + + def testSapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner(self): + """Test SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_enable_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_enable_post200_response.py new file mode 100644 index 0000000..55e6618 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_enable_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_futures_enable_post200_response import SapiV1SubAccountFuturesEnablePost200Response + +class TestSapiV1SubAccountFuturesEnablePost200Response(unittest.TestCase): + """SapiV1SubAccountFuturesEnablePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountFuturesEnablePost200Response: + """Test SapiV1SubAccountFuturesEnablePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountFuturesEnablePost200Response` + """ + model = SapiV1SubAccountFuturesEnablePost200Response() + if include_optional: + return SapiV1SubAccountFuturesEnablePost200Response( + email = '123@test.com', + is_futures_enabled = True + ) + else: + return SapiV1SubAccountFuturesEnablePost200Response( + email = '123@test.com', + is_futures_enabled = True, + ) + """ + + def testSapiV1SubAccountFuturesEnablePost200Response(self): + """Test SapiV1SubAccountFuturesEnablePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_internal_transfer_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_internal_transfer_get200_response.py new file mode 100644 index 0000000..6ac8c75 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_internal_transfer_get200_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_get200_response import SapiV1SubAccountFuturesInternalTransferGet200Response + +class TestSapiV1SubAccountFuturesInternalTransferGet200Response(unittest.TestCase): + """SapiV1SubAccountFuturesInternalTransferGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountFuturesInternalTransferGet200Response: + """Test SapiV1SubAccountFuturesInternalTransferGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountFuturesInternalTransferGet200Response` + """ + model = SapiV1SubAccountFuturesInternalTransferGet200Response() + if include_optional: + return SapiV1SubAccountFuturesInternalTransferGet200Response( + success = True, + futures_type = 2, + transfers = [ + openapi_client.models._sapi_v1_sub_account_futures_internal_transfer_get_200_response_transfers_inner._sapi_v1_sub_account_futures_internalTransfer_get_200_response_transfers_inner( + from = 'aaa@test.com', + to = 'bbb@test.com', + asset = 'BTC', + qty = '1', + tran_id = 11897001102, + time = 1544433328000, ) + ] + ) + else: + return SapiV1SubAccountFuturesInternalTransferGet200Response( + success = True, + futures_type = 2, + transfers = [ + openapi_client.models._sapi_v1_sub_account_futures_internal_transfer_get_200_response_transfers_inner._sapi_v1_sub_account_futures_internalTransfer_get_200_response_transfers_inner( + from = 'aaa@test.com', + to = 'bbb@test.com', + asset = 'BTC', + qty = '1', + tran_id = 11897001102, + time = 1544433328000, ) + ], + ) + """ + + def testSapiV1SubAccountFuturesInternalTransferGet200Response(self): + """Test SapiV1SubAccountFuturesInternalTransferGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner.py new file mode 100644 index 0000000..bb640a8 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_get200_response_transfers_inner import SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner + +class TestSapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner(unittest.TestCase): + """SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner: + """Test SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner` + """ + model = SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner() + if include_optional: + return SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner( + var_from = 'aaa@test.com', + to = 'bbb@test.com', + asset = 'BTC', + qty = '1', + tran_id = 11897001102, + time = 1544433328000 + ) + else: + return SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner( + var_from = 'aaa@test.com', + to = 'bbb@test.com', + asset = 'BTC', + qty = '1', + tran_id = 11897001102, + time = 1544433328000, + ) + """ + + def testSapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner(self): + """Test SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_internal_transfer_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_internal_transfer_post200_response.py new file mode 100644 index 0000000..45e5831 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_internal_transfer_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_futures_internal_transfer_post200_response import SapiV1SubAccountFuturesInternalTransferPost200Response + +class TestSapiV1SubAccountFuturesInternalTransferPost200Response(unittest.TestCase): + """SapiV1SubAccountFuturesInternalTransferPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountFuturesInternalTransferPost200Response: + """Test SapiV1SubAccountFuturesInternalTransferPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountFuturesInternalTransferPost200Response` + """ + model = SapiV1SubAccountFuturesInternalTransferPost200Response() + if include_optional: + return SapiV1SubAccountFuturesInternalTransferPost200Response( + success = True, + txn_id = '2934662589' + ) + else: + return SapiV1SubAccountFuturesInternalTransferPost200Response( + success = True, + txn_id = '2934662589', + ) + """ + + def testSapiV1SubAccountFuturesInternalTransferPost200Response(self): + """Test SapiV1SubAccountFuturesInternalTransferPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_position_risk_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_position_risk_get200_response_inner.py new file mode 100644 index 0000000..4c52867 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_position_risk_get200_response_inner.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_futures_position_risk_get200_response_inner import SapiV1SubAccountFuturesPositionRiskGet200ResponseInner + +class TestSapiV1SubAccountFuturesPositionRiskGet200ResponseInner(unittest.TestCase): + """SapiV1SubAccountFuturesPositionRiskGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountFuturesPositionRiskGet200ResponseInner: + """Test SapiV1SubAccountFuturesPositionRiskGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountFuturesPositionRiskGet200ResponseInner` + """ + model = SapiV1SubAccountFuturesPositionRiskGet200ResponseInner() + if include_optional: + return SapiV1SubAccountFuturesPositionRiskGet200ResponseInner( + entry_price = '9975.12000', + leverage = '50', + max_notional = '1000000', + liquidation_price = '7963.54', + mark_price = '9973.50770517', + position_amount = '0.010', + symbol = 'BTCUSDT', + unrealized_profit = '-0.01612295' + ) + else: + return SapiV1SubAccountFuturesPositionRiskGet200ResponseInner( + entry_price = '9975.12000', + leverage = '50', + max_notional = '1000000', + liquidation_price = '7963.54', + mark_price = '9973.50770517', + position_amount = '0.010', + symbol = 'BTCUSDT', + unrealized_profit = '-0.01612295', + ) + """ + + def testSapiV1SubAccountFuturesPositionRiskGet200ResponseInner(self): + """Test SapiV1SubAccountFuturesPositionRiskGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_transfer_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_transfer_post200_response.py new file mode 100644 index 0000000..9583747 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_futures_transfer_post200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_futures_transfer_post200_response import SapiV1SubAccountFuturesTransferPost200Response + +class TestSapiV1SubAccountFuturesTransferPost200Response(unittest.TestCase): + """SapiV1SubAccountFuturesTransferPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountFuturesTransferPost200Response: + """Test SapiV1SubAccountFuturesTransferPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountFuturesTransferPost200Response` + """ + model = SapiV1SubAccountFuturesTransferPost200Response() + if include_optional: + return SapiV1SubAccountFuturesTransferPost200Response( + txn_id = '2966662589' + ) + else: + return SapiV1SubAccountFuturesTransferPost200Response( + txn_id = '2966662589', + ) + """ + + def testSapiV1SubAccountFuturesTransferPost200Response(self): + """Test SapiV1SubAccountFuturesTransferPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_list_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_list_get200_response.py new file mode 100644 index 0000000..43ca77a --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_list_get200_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_list_get200_response import SapiV1SubAccountListGet200Response + +class TestSapiV1SubAccountListGet200Response(unittest.TestCase): + """SapiV1SubAccountListGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountListGet200Response: + """Test SapiV1SubAccountListGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountListGet200Response` + """ + model = SapiV1SubAccountListGet200Response() + if include_optional: + return SapiV1SubAccountListGet200Response( + sub_accounts = [ + openapi_client.models._sapi_v1_sub_account_list_get_200_response_sub_accounts_inner._sapi_v1_sub_account_list_get_200_response_subAccounts_inner( + email = 'testsub@gmail.com', + is_freeze = False, + create_time = 1544433328000, + is_managed_sub_account = False, + is_asset_management_sub_account = False, ) + ] + ) + else: + return SapiV1SubAccountListGet200Response( + sub_accounts = [ + openapi_client.models._sapi_v1_sub_account_list_get_200_response_sub_accounts_inner._sapi_v1_sub_account_list_get_200_response_subAccounts_inner( + email = 'testsub@gmail.com', + is_freeze = False, + create_time = 1544433328000, + is_managed_sub_account = False, + is_asset_management_sub_account = False, ) + ], + ) + """ + + def testSapiV1SubAccountListGet200Response(self): + """Test SapiV1SubAccountListGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_list_get200_response_sub_accounts_inner.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_list_get200_response_sub_accounts_inner.py new file mode 100644 index 0000000..49fc129 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_list_get200_response_sub_accounts_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_list_get200_response_sub_accounts_inner import SapiV1SubAccountListGet200ResponseSubAccountsInner + +class TestSapiV1SubAccountListGet200ResponseSubAccountsInner(unittest.TestCase): + """SapiV1SubAccountListGet200ResponseSubAccountsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountListGet200ResponseSubAccountsInner: + """Test SapiV1SubAccountListGet200ResponseSubAccountsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountListGet200ResponseSubAccountsInner` + """ + model = SapiV1SubAccountListGet200ResponseSubAccountsInner() + if include_optional: + return SapiV1SubAccountListGet200ResponseSubAccountsInner( + email = 'testsub@gmail.com', + is_freeze = False, + create_time = 1544433328000, + is_managed_sub_account = False, + is_asset_management_sub_account = False + ) + else: + return SapiV1SubAccountListGet200ResponseSubAccountsInner( + email = 'testsub@gmail.com', + is_freeze = False, + create_time = 1544433328000, + is_managed_sub_account = False, + is_asset_management_sub_account = False, + ) + """ + + def testSapiV1SubAccountListGet200ResponseSubAccountsInner(self): + """Test SapiV1SubAccountListGet200ResponseSubAccountsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_get200_response.py new file mode 100644 index 0000000..735125b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_get200_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_margin_account_get200_response import SapiV1SubAccountMarginAccountGet200Response + +class TestSapiV1SubAccountMarginAccountGet200Response(unittest.TestCase): + """SapiV1SubAccountMarginAccountGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountMarginAccountGet200Response: + """Test SapiV1SubAccountMarginAccountGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountMarginAccountGet200Response` + """ + model = SapiV1SubAccountMarginAccountGet200Response() + if include_optional: + return SapiV1SubAccountMarginAccountGet200Response( + email = '123@test.com', + margin_level = '11.64405625', + total_asset_of_btc = '6.82728457', + total_liability_of_btc = '0.58633215', + total_net_asset_of_btc = '6.24095242', + margin_trade_coeff_vo = openapi_client.models._sapi_v1_sub_account_margin_account_get_200_response_margin_trade_coeff_vo._sapi_v1_sub_account_margin_account_get_200_response_marginTradeCoeffVo( + force_liquidation_bar = '1.10000000', + margin_call_bar = '1.50000000', + normal_bar = '2.00000000', ), + margin_user_asset_vo_list = [ + openapi_client.models._sapi_v1_margin_account_get_200_response_user_assets_inner._sapi_v1_margin_account_get_200_response_userAssets_inner( + asset = 'BTC', + borrowed = '0.00000000', + free = '0.00499500', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00499500', ) + ] + ) + else: + return SapiV1SubAccountMarginAccountGet200Response( + email = '123@test.com', + margin_level = '11.64405625', + total_asset_of_btc = '6.82728457', + total_liability_of_btc = '0.58633215', + total_net_asset_of_btc = '6.24095242', + margin_trade_coeff_vo = openapi_client.models._sapi_v1_sub_account_margin_account_get_200_response_margin_trade_coeff_vo._sapi_v1_sub_account_margin_account_get_200_response_marginTradeCoeffVo( + force_liquidation_bar = '1.10000000', + margin_call_bar = '1.50000000', + normal_bar = '2.00000000', ), + margin_user_asset_vo_list = [ + openapi_client.models._sapi_v1_margin_account_get_200_response_user_assets_inner._sapi_v1_margin_account_get_200_response_userAssets_inner( + asset = 'BTC', + borrowed = '0.00000000', + free = '0.00499500', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '0.00499500', ) + ], + ) + """ + + def testSapiV1SubAccountMarginAccountGet200Response(self): + """Test SapiV1SubAccountMarginAccountGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo.py new file mode 100644 index 0000000..a148633 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_margin_account_get200_response_margin_trade_coeff_vo import SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo + +class TestSapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo(unittest.TestCase): + """SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo: + """Test SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo` + """ + model = SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo() + if include_optional: + return SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo( + force_liquidation_bar = '1.10000000', + margin_call_bar = '1.50000000', + normal_bar = '2.00000000' + ) + else: + return SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo( + force_liquidation_bar = '1.10000000', + margin_call_bar = '1.50000000', + normal_bar = '2.00000000', + ) + """ + + def testSapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo(self): + """Test SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_summary_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_summary_get200_response.py new file mode 100644 index 0000000..2ec2eae --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_summary_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_margin_account_summary_get200_response import SapiV1SubAccountMarginAccountSummaryGet200Response + +class TestSapiV1SubAccountMarginAccountSummaryGet200Response(unittest.TestCase): + """SapiV1SubAccountMarginAccountSummaryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountMarginAccountSummaryGet200Response: + """Test SapiV1SubAccountMarginAccountSummaryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountMarginAccountSummaryGet200Response` + """ + model = SapiV1SubAccountMarginAccountSummaryGet200Response() + if include_optional: + return SapiV1SubAccountMarginAccountSummaryGet200Response( + total_asset_of_btc = '4.33333333', + total_liability_of_btc = '2.11111112', + total_net_asset_of_btc = '2.22222221', + sub_account_list = [ + openapi_client.models._sapi_v1_sub_account_margin_account_summary_get_200_response_sub_account_list_inner._sapi_v1_sub_account_margin_accountSummary_get_200_response_subAccountList_inner( + email = '123@test.com', + total_asset_of_btc = '2.11111111', + total_liability_of_btc = '1.11111111', + total_net_asset_of_btc = '1.00000000', ) + ] + ) + else: + return SapiV1SubAccountMarginAccountSummaryGet200Response( + total_asset_of_btc = '4.33333333', + total_liability_of_btc = '2.11111112', + total_net_asset_of_btc = '2.22222221', + sub_account_list = [ + openapi_client.models._sapi_v1_sub_account_margin_account_summary_get_200_response_sub_account_list_inner._sapi_v1_sub_account_margin_accountSummary_get_200_response_subAccountList_inner( + email = '123@test.com', + total_asset_of_btc = '2.11111111', + total_liability_of_btc = '1.11111111', + total_net_asset_of_btc = '1.00000000', ) + ], + ) + """ + + def testSapiV1SubAccountMarginAccountSummaryGet200Response(self): + """Test SapiV1SubAccountMarginAccountSummaryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner.py new file mode 100644 index 0000000..b4c5f91 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_margin_account_summary_get200_response_sub_account_list_inner import SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner + +class TestSapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner(unittest.TestCase): + """SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner: + """Test SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner` + """ + model = SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner() + if include_optional: + return SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner( + email = '123@test.com', + total_asset_of_btc = '2.11111111', + total_liability_of_btc = '1.11111111', + total_net_asset_of_btc = '1.00000000' + ) + else: + return SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner( + email = '123@test.com', + total_asset_of_btc = '2.11111111', + total_liability_of_btc = '1.11111111', + total_net_asset_of_btc = '1.00000000', + ) + """ + + def testSapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner(self): + """Test SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_enable_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_enable_post200_response.py new file mode 100644 index 0000000..3c26e31 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_margin_enable_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_margin_enable_post200_response import SapiV1SubAccountMarginEnablePost200Response + +class TestSapiV1SubAccountMarginEnablePost200Response(unittest.TestCase): + """SapiV1SubAccountMarginEnablePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountMarginEnablePost200Response: + """Test SapiV1SubAccountMarginEnablePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountMarginEnablePost200Response` + """ + model = SapiV1SubAccountMarginEnablePost200Response() + if include_optional: + return SapiV1SubAccountMarginEnablePost200Response( + email = '123@test.com', + is_margin_enabled = True + ) + else: + return SapiV1SubAccountMarginEnablePost200Response( + email = '123@test.com', + is_margin_enabled = True, + ) + """ + + def testSapiV1SubAccountMarginEnablePost200Response(self): + """Test SapiV1SubAccountMarginEnablePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_spot_summary_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_spot_summary_get200_response.py new file mode 100644 index 0000000..1e9e327 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_spot_summary_get200_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_spot_summary_get200_response import SapiV1SubAccountSpotSummaryGet200Response + +class TestSapiV1SubAccountSpotSummaryGet200Response(unittest.TestCase): + """SapiV1SubAccountSpotSummaryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountSpotSummaryGet200Response: + """Test SapiV1SubAccountSpotSummaryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountSpotSummaryGet200Response` + """ + model = SapiV1SubAccountSpotSummaryGet200Response() + if include_optional: + return SapiV1SubAccountSpotSummaryGet200Response( + total_count = 1, + master_account_total_asset = '0.23231201', + spot_sub_user_asset_btc_vo_list = [ + openapi_client.models._sapi_v1_sub_account_spot_summary_get_200_response_spot_sub_user_asset_btc_vo_list_inner._sapi_v1_sub_account_spotSummary_get_200_response_spotSubUserAssetBtcVoList_inner( + email = 'sub123@test.com', + total_asset = '9999.00000000', ) + ] + ) + else: + return SapiV1SubAccountSpotSummaryGet200Response( + total_count = 1, + master_account_total_asset = '0.23231201', + spot_sub_user_asset_btc_vo_list = [ + openapi_client.models._sapi_v1_sub_account_spot_summary_get_200_response_spot_sub_user_asset_btc_vo_list_inner._sapi_v1_sub_account_spotSummary_get_200_response_spotSubUserAssetBtcVoList_inner( + email = 'sub123@test.com', + total_asset = '9999.00000000', ) + ], + ) + """ + + def testSapiV1SubAccountSpotSummaryGet200Response(self): + """Test SapiV1SubAccountSpotSummaryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner.py new file mode 100644 index 0000000..4679f92 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_spot_summary_get200_response_spot_sub_user_asset_btc_vo_list_inner import SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner + +class TestSapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner(unittest.TestCase): + """SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner: + """Test SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner` + """ + model = SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner() + if include_optional: + return SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner( + email = 'sub123@test.com', + total_asset = '9999.00000000' + ) + else: + return SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner( + email = 'sub123@test.com', + total_asset = '9999.00000000', + ) + """ + + def testSapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner(self): + """Test SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_status_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_status_get200_response_inner.py new file mode 100644 index 0000000..86daeda --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_status_get200_response_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_status_get200_response_inner import SapiV1SubAccountStatusGet200ResponseInner + +class TestSapiV1SubAccountStatusGet200ResponseInner(unittest.TestCase): + """SapiV1SubAccountStatusGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountStatusGet200ResponseInner: + """Test SapiV1SubAccountStatusGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountStatusGet200ResponseInner` + """ + model = SapiV1SubAccountStatusGet200ResponseInner() + if include_optional: + return SapiV1SubAccountStatusGet200ResponseInner( + email = '123@test.com', + is_sub_user_enabled = True, + is_user_active = True, + insert_time = 1570791523523, + is_margin_enabled = True, + is_future_enabled = True, + mobile = 1570791523523 + ) + else: + return SapiV1SubAccountStatusGet200ResponseInner( + email = '123@test.com', + is_sub_user_enabled = True, + is_user_active = True, + insert_time = 1570791523523, + is_margin_enabled = True, + is_future_enabled = True, + mobile = 1570791523523, + ) + """ + + def testSapiV1SubAccountStatusGet200ResponseInner(self): + """Test SapiV1SubAccountStatusGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response.py new file mode 100644 index 0000000..a2b8d2c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_sub_account_api_ip_restriction_get200_response import SapiV1SubAccountSubAccountApiIpRestrictionGet200Response + +class TestSapiV1SubAccountSubAccountApiIpRestrictionGet200Response(unittest.TestCase): + """SapiV1SubAccountSubAccountApiIpRestrictionGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountSubAccountApiIpRestrictionGet200Response: + """Test SapiV1SubAccountSubAccountApiIpRestrictionGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountSubAccountApiIpRestrictionGet200Response` + """ + model = SapiV1SubAccountSubAccountApiIpRestrictionGet200Response() + if include_optional: + return SapiV1SubAccountSubAccountApiIpRestrictionGet200Response( + ip_restrict = 'true', + ip_list = ["69.210.67.14","8.34.21.10"], + update_time = 1636369557189, + api_key = 'k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf' + ) + else: + return SapiV1SubAccountSubAccountApiIpRestrictionGet200Response( + ip_restrict = 'true', + ip_list = ["69.210.67.14","8.34.21.10"], + update_time = 1636369557189, + api_key = 'k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf', + ) + """ + + def testSapiV1SubAccountSubAccountApiIpRestrictionGet200Response(self): + """Test SapiV1SubAccountSubAccountApiIpRestrictionGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response.py new file mode 100644 index 0000000..03ae535 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete200_response import SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response + +class TestSapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response(unittest.TestCase): + """SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response: + """Test SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response` + """ + model = SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response() + if include_optional: + return SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response( + ip_restrict = 'true', + ip_list = ["69.210.67.14","thirdPartyName"], + update_time = 1636369557189, + api_key = 'k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf' + ) + else: + return SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response( + ip_restrict = 'true', + ip_list = ["69.210.67.14","thirdPartyName"], + update_time = 1636369557189, + api_key = 'k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf', + ) + """ + + def testSapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response(self): + """Test SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_sub_transfer_history_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_sub_transfer_history_get200_response_inner.py new file mode 100644 index 0000000..a72a49c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_sub_transfer_history_get200_response_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_sub_transfer_history_get200_response_inner import SapiV1SubAccountSubTransferHistoryGet200ResponseInner + +class TestSapiV1SubAccountSubTransferHistoryGet200ResponseInner(unittest.TestCase): + """SapiV1SubAccountSubTransferHistoryGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountSubTransferHistoryGet200ResponseInner: + """Test SapiV1SubAccountSubTransferHistoryGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountSubTransferHistoryGet200ResponseInner` + """ + model = SapiV1SubAccountSubTransferHistoryGet200ResponseInner() + if include_optional: + return SapiV1SubAccountSubTransferHistoryGet200ResponseInner( + var_from = 'aaa@test.com', + to = 'bbb@test.com', + asset = 'BTC', + qty = '10', + status = 'SUCCESS', + tran_id = 6489943656, + time = 1544433328000 + ) + else: + return SapiV1SubAccountSubTransferHistoryGet200ResponseInner( + var_from = 'aaa@test.com', + to = 'bbb@test.com', + asset = 'BTC', + qty = '10', + status = 'SUCCESS', + tran_id = 6489943656, + time = 1544433328000, + ) + """ + + def testSapiV1SubAccountSubTransferHistoryGet200ResponseInner(self): + """Test SapiV1SubAccountSubTransferHistoryGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_transaction_statistics_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_transaction_statistics_get200_response.py new file mode 100644 index 0000000..ecf4d7c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_transaction_statistics_get200_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_transaction_statistics_get200_response import SapiV1SubAccountTransactionStatisticsGet200Response + +class TestSapiV1SubAccountTransactionStatisticsGet200Response(unittest.TestCase): + """SapiV1SubAccountTransactionStatisticsGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountTransactionStatisticsGet200Response: + """Test SapiV1SubAccountTransactionStatisticsGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountTransactionStatisticsGet200Response` + """ + model = SapiV1SubAccountTransactionStatisticsGet200Response() + if include_optional: + return SapiV1SubAccountTransactionStatisticsGet200Response( + recent30_btc_total = '0', + recent30_btc_futures_total = '0', + recent30_btc_margin_total = '0', + recent30_busd_total = '0', + recent30_busd_futures_total = '0', + recent30_busd_margin_total = '0', + trade_info_vos = [ + openapi_client.models._sapi_v1_sub_account_transaction_statistics_get_200_response_trade_info_vos_inner._sapi_v1_sub_account_transaction_statistics_get_200_response_tradeInfoVos_inner( + user_id = 1000138138384, + btc = 0, + btc_futures = 0, + btc_margin = 0, + busd = 0, + busd_futures = 0, + busd_margin = 0, + date = 1676851200000, ) + ] + ) + else: + return SapiV1SubAccountTransactionStatisticsGet200Response( + recent30_btc_total = '0', + recent30_btc_futures_total = '0', + recent30_btc_margin_total = '0', + recent30_busd_total = '0', + recent30_busd_futures_total = '0', + recent30_busd_margin_total = '0', + trade_info_vos = [ + openapi_client.models._sapi_v1_sub_account_transaction_statistics_get_200_response_trade_info_vos_inner._sapi_v1_sub_account_transaction_statistics_get_200_response_tradeInfoVos_inner( + user_id = 1000138138384, + btc = 0, + btc_futures = 0, + btc_margin = 0, + busd = 0, + busd_futures = 0, + busd_margin = 0, + date = 1676851200000, ) + ], + ) + """ + + def testSapiV1SubAccountTransactionStatisticsGet200Response(self): + """Test SapiV1SubAccountTransactionStatisticsGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner.py new file mode 100644 index 0000000..ecfb30a --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_transaction_statistics_get200_response_trade_info_vos_inner import SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner + +class TestSapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner(unittest.TestCase): + """SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner: + """Test SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner` + """ + model = SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner() + if include_optional: + return SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner( + user_id = 1000138138384, + btc = 0, + btc_futures = 0, + btc_margin = 0, + busd = 0, + busd_futures = 0, + busd_margin = 0, + var_date = 1676851200000 + ) + else: + return SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner( + ) + """ + + def testSapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner(self): + """Test SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner.py new file mode 100644 index 0000000..f57bacd --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_transfer_sub_user_history_get200_response_inner import SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner + +class TestSapiV1SubAccountTransferSubUserHistoryGet200ResponseInner(unittest.TestCase): + """SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner: + """Test SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner` + """ + model = SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner() + if include_optional: + return SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner( + counter_party = 'master', + email = 'master@test.com', + type = 1, + asset = 'BTC', + qty = '1', + from_account_type = 'SPOT', + to_account_type = 'SPOT', + status = 'SUCCESS', + tran_id = 11798835829, + time = 1544433325000 + ) + else: + return SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner( + counter_party = 'master', + email = 'master@test.com', + type = 1, + asset = 'BTC', + qty = '1', + from_account_type = 'SPOT', + to_account_type = 'SPOT', + status = 'SUCCESS', + tran_id = 11798835829, + time = 1544433325000, + ) + """ + + def testSapiV1SubAccountTransferSubUserHistoryGet200ResponseInner(self): + """Test SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_universal_transfer_get200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_universal_transfer_get200_response_inner.py new file mode 100644 index 0000000..b48dc05 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_universal_transfer_get200_response_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_universal_transfer_get200_response_inner import SapiV1SubAccountUniversalTransferGet200ResponseInner + +class TestSapiV1SubAccountUniversalTransferGet200ResponseInner(unittest.TestCase): + """SapiV1SubAccountUniversalTransferGet200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountUniversalTransferGet200ResponseInner: + """Test SapiV1SubAccountUniversalTransferGet200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountUniversalTransferGet200ResponseInner` + """ + model = SapiV1SubAccountUniversalTransferGet200ResponseInner() + if include_optional: + return SapiV1SubAccountUniversalTransferGet200ResponseInner( + tran_id = 11945860693, + from_email = 'master@test.com', + to_email = 'subaccount1@test.com', + asset = 'BTC', + amount = '0.1', + from_account_type = 'SPOT', + to_account_type = 'COIN_FUTURE', + status = 'SUCCESS', + create_time_stamp = 1544433325000, + client_tran_id = '11945860694' + ) + else: + return SapiV1SubAccountUniversalTransferGet200ResponseInner( + tran_id = 11945860693, + from_email = 'master@test.com', + to_email = 'subaccount1@test.com', + asset = 'BTC', + amount = '0.1', + from_account_type = 'SPOT', + to_account_type = 'COIN_FUTURE', + status = 'SUCCESS', + create_time_stamp = 1544433325000, + client_tran_id = '11945860694', + ) + """ + + def testSapiV1SubAccountUniversalTransferGet200ResponseInner(self): + """Test SapiV1SubAccountUniversalTransferGet200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_universal_transfer_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_universal_transfer_post200_response.py new file mode 100644 index 0000000..d157cc2 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_universal_transfer_post200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_universal_transfer_post200_response import SapiV1SubAccountUniversalTransferPost200Response + +class TestSapiV1SubAccountUniversalTransferPost200Response(unittest.TestCase): + """SapiV1SubAccountUniversalTransferPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountUniversalTransferPost200Response: + """Test SapiV1SubAccountUniversalTransferPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountUniversalTransferPost200Response` + """ + model = SapiV1SubAccountUniversalTransferPost200Response() + if include_optional: + return SapiV1SubAccountUniversalTransferPost200Response( + tran_id = 11945860693, + client_tran_id = '11945860694' + ) + else: + return SapiV1SubAccountUniversalTransferPost200Response( + tran_id = 11945860693, + client_tran_id = '11945860694', + ) + """ + + def testSapiV1SubAccountUniversalTransferPost200Response(self): + """Test SapiV1SubAccountUniversalTransferPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_sub_account_virtual_sub_account_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_sub_account_virtual_sub_account_post200_response.py new file mode 100644 index 0000000..df9dcea --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_sub_account_virtual_sub_account_post200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_sub_account_virtual_sub_account_post200_response import SapiV1SubAccountVirtualSubAccountPost200Response + +class TestSapiV1SubAccountVirtualSubAccountPost200Response(unittest.TestCase): + """SapiV1SubAccountVirtualSubAccountPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SubAccountVirtualSubAccountPost200Response: + """Test SapiV1SubAccountVirtualSubAccountPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SubAccountVirtualSubAccountPost200Response` + """ + model = SapiV1SubAccountVirtualSubAccountPost200Response() + if include_optional: + return SapiV1SubAccountVirtualSubAccountPost200Response( + email = 'addsdd_virtual@aasaixwqnoemail.com' + ) + else: + return SapiV1SubAccountVirtualSubAccountPost200Response( + email = 'addsdd_virtual@aasaixwqnoemail.com', + ) + """ + + def testSapiV1SubAccountVirtualSubAccountPost200Response(self): + """Test SapiV1SubAccountVirtualSubAccountPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_system_status_get200_response.py b/target/python/binance_openapi/test/test_sapi_v1_system_status_get200_response.py new file mode 100644 index 0000000..f099e2c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_system_status_get200_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_system_status_get200_response import SapiV1SystemStatusGet200Response + +class TestSapiV1SystemStatusGet200Response(unittest.TestCase): + """SapiV1SystemStatusGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1SystemStatusGet200Response: + """Test SapiV1SystemStatusGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1SystemStatusGet200Response` + """ + model = SapiV1SystemStatusGet200Response() + if include_optional: + return SapiV1SystemStatusGet200Response( + status = 0, + msg = 'normal' + ) + else: + return SapiV1SystemStatusGet200Response( + status = 0, + msg = 'normal', + ) + """ + + def testSapiV1SystemStatusGet200Response(self): + """Test SapiV1SystemStatusGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v1_user_data_stream_isolated_post200_response.py b/target/python/binance_openapi/test/test_sapi_v1_user_data_stream_isolated_post200_response.py new file mode 100644 index 0000000..f25d7ec --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v1_user_data_stream_isolated_post200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v1_user_data_stream_isolated_post200_response import SapiV1UserDataStreamIsolatedPost200Response + +class TestSapiV1UserDataStreamIsolatedPost200Response(unittest.TestCase): + """SapiV1UserDataStreamIsolatedPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV1UserDataStreamIsolatedPost200Response: + """Test SapiV1UserDataStreamIsolatedPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV1UserDataStreamIsolatedPost200Response` + """ + model = SapiV1UserDataStreamIsolatedPost200Response() + if include_optional: + return SapiV1UserDataStreamIsolatedPost200Response( + listen_key = 'T3ee22BIYuWqmvne0HNq2A2WsFlEtLhvWCtItw6ffhhdmjifQ2tRbuKkTHhr' + ) + else: + return SapiV1UserDataStreamIsolatedPost200Response( + listen_key = 'T3ee22BIYuWqmvne0HNq2A2WsFlEtLhvWCtItw6ffhhdmjifQ2tRbuKkTHhr', + ) + """ + + def testSapiV1UserDataStreamIsolatedPost200Response(self): + """Test SapiV1UserDataStreamIsolatedPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_eth_staking_account_get200_response.py b/target/python/binance_openapi/test/test_sapi_v2_eth_staking_account_get200_response.py new file mode 100644 index 0000000..75c364b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_eth_staking_account_get200_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_eth_staking_account_get200_response import SapiV2EthStakingAccountGet200Response + +class TestSapiV2EthStakingAccountGet200Response(unittest.TestCase): + """SapiV2EthStakingAccountGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2EthStakingAccountGet200Response: + """Test SapiV2EthStakingAccountGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2EthStakingAccountGet200Response` + """ + model = SapiV2EthStakingAccountGet200Response() + if include_optional: + return SapiV2EthStakingAccountGet200Response( + holding_in_eth = '1.22330928', + holdings = openapi_client.models._sapi_v2_eth_staking_account_get_200_response_holdings._sapi_v2_eth_staking_account_get_200_response_holdings( + wbeth_amount = '1.10928781', + beth_amount = '1.90002112', ), + thirty_days_profit_in_eth = '0.22330928', + profit = openapi_client.models._sapi_v2_eth_staking_account_get_200_response_profit._sapi_v2_eth_staking_account_get_200_response_profit( + amount_from_wbeth = '0.12330928', + amount_from_beth = '0.1', ) + ) + else: + return SapiV2EthStakingAccountGet200Response( + holding_in_eth = '1.22330928', + holdings = openapi_client.models._sapi_v2_eth_staking_account_get_200_response_holdings._sapi_v2_eth_staking_account_get_200_response_holdings( + wbeth_amount = '1.10928781', + beth_amount = '1.90002112', ), + thirty_days_profit_in_eth = '0.22330928', + profit = openapi_client.models._sapi_v2_eth_staking_account_get_200_response_profit._sapi_v2_eth_staking_account_get_200_response_profit( + amount_from_wbeth = '0.12330928', + amount_from_beth = '0.1', ), + ) + """ + + def testSapiV2EthStakingAccountGet200Response(self): + """Test SapiV2EthStakingAccountGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_eth_staking_account_get200_response_holdings.py b/target/python/binance_openapi/test/test_sapi_v2_eth_staking_account_get200_response_holdings.py new file mode 100644 index 0000000..0861dbd --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_eth_staking_account_get200_response_holdings.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_eth_staking_account_get200_response_holdings import SapiV2EthStakingAccountGet200ResponseHoldings + +class TestSapiV2EthStakingAccountGet200ResponseHoldings(unittest.TestCase): + """SapiV2EthStakingAccountGet200ResponseHoldings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2EthStakingAccountGet200ResponseHoldings: + """Test SapiV2EthStakingAccountGet200ResponseHoldings + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2EthStakingAccountGet200ResponseHoldings` + """ + model = SapiV2EthStakingAccountGet200ResponseHoldings() + if include_optional: + return SapiV2EthStakingAccountGet200ResponseHoldings( + wbeth_amount = '1.10928781', + beth_amount = '1.90002112' + ) + else: + return SapiV2EthStakingAccountGet200ResponseHoldings( + wbeth_amount = '1.10928781', + beth_amount = '1.90002112', + ) + """ + + def testSapiV2EthStakingAccountGet200ResponseHoldings(self): + """Test SapiV2EthStakingAccountGet200ResponseHoldings""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_eth_staking_account_get200_response_profit.py b/target/python/binance_openapi/test/test_sapi_v2_eth_staking_account_get200_response_profit.py new file mode 100644 index 0000000..1899063 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_eth_staking_account_get200_response_profit.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_eth_staking_account_get200_response_profit import SapiV2EthStakingAccountGet200ResponseProfit + +class TestSapiV2EthStakingAccountGet200ResponseProfit(unittest.TestCase): + """SapiV2EthStakingAccountGet200ResponseProfit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2EthStakingAccountGet200ResponseProfit: + """Test SapiV2EthStakingAccountGet200ResponseProfit + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2EthStakingAccountGet200ResponseProfit` + """ + model = SapiV2EthStakingAccountGet200ResponseProfit() + if include_optional: + return SapiV2EthStakingAccountGet200ResponseProfit( + amount_from_wbeth = '0.12330928', + amount_from_beth = '0.1' + ) + else: + return SapiV2EthStakingAccountGet200ResponseProfit( + amount_from_wbeth = '0.12330928', + amount_from_beth = '0.1', + ) + """ + + def testSapiV2EthStakingAccountGet200ResponseProfit(self): + """Test SapiV2EthStakingAccountGet200ResponseProfit""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_eth_staking_eth_stake_post200_response.py b/target/python/binance_openapi/test/test_sapi_v2_eth_staking_eth_stake_post200_response.py new file mode 100644 index 0000000..245028c --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_eth_staking_eth_stake_post200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_eth_staking_eth_stake_post200_response import SapiV2EthStakingEthStakePost200Response + +class TestSapiV2EthStakingEthStakePost200Response(unittest.TestCase): + """SapiV2EthStakingEthStakePost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2EthStakingEthStakePost200Response: + """Test SapiV2EthStakingEthStakePost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2EthStakingEthStakePost200Response` + """ + model = SapiV2EthStakingEthStakePost200Response() + if include_optional: + return SapiV2EthStakingEthStakePost200Response( + success = True, + wbeth_amount = '0.23092091', + conversion_ratio = '1.001212342342' + ) + else: + return SapiV2EthStakingEthStakePost200Response( + success = True, + wbeth_amount = '0.23092091', + conversion_ratio = '1.001212342342', + ) + """ + + def testSapiV2EthStakingEthStakePost200Response(self): + """Test SapiV2EthStakingEthStakePost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_adjust_ltv_post200_response.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_adjust_ltv_post200_response.py new file mode 100644 index 0000000..fe43d1d --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_adjust_ltv_post200_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_adjust_ltv_post200_response import SapiV2LoanFlexibleAdjustLtvPost200Response + +class TestSapiV2LoanFlexibleAdjustLtvPost200Response(unittest.TestCase): + """SapiV2LoanFlexibleAdjustLtvPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleAdjustLtvPost200Response: + """Test SapiV2LoanFlexibleAdjustLtvPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleAdjustLtvPost200Response` + """ + model = SapiV2LoanFlexibleAdjustLtvPost200Response() + if include_optional: + return SapiV2LoanFlexibleAdjustLtvPost200Response( + loan_coin = 'BUSD', + collateral_coin = 'BNB', + direction = 'ADDITIONAL', + adjustment_amount = '5.235', + current_ltv = '0.235' + ) + else: + return SapiV2LoanFlexibleAdjustLtvPost200Response( + loan_coin = 'BUSD', + collateral_coin = 'BNB', + direction = 'ADDITIONAL', + adjustment_amount = '5.235', + current_ltv = '0.235', + ) + """ + + def testSapiV2LoanFlexibleAdjustLtvPost200Response(self): + """Test SapiV2LoanFlexibleAdjustLtvPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_borrow_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_borrow_history_get200_response.py new file mode 100644 index 0000000..2062e53 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_borrow_history_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_borrow_history_get200_response import SapiV2LoanFlexibleBorrowHistoryGet200Response + +class TestSapiV2LoanFlexibleBorrowHistoryGet200Response(unittest.TestCase): + """SapiV2LoanFlexibleBorrowHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleBorrowHistoryGet200Response: + """Test SapiV2LoanFlexibleBorrowHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleBorrowHistoryGet200Response` + """ + model = SapiV2LoanFlexibleBorrowHistoryGet200Response() + if include_optional: + return SapiV2LoanFlexibleBorrowHistoryGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v2_loan_flexible_borrow_history_get_200_response_rows_inner._sapi_v2_loan_flexible_borrow_history_get_200_response_rows_inner( + loan_coin = 'BUSD', + initial_loan_amount = '10000', + collateral_coin = 'BNB', + initial_collateral_amount = '49.27565492', + borrow_time = 1575018510000, + status = 'Succeeds', ) + ] + ) + else: + return SapiV2LoanFlexibleBorrowHistoryGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v2_loan_flexible_borrow_history_get_200_response_rows_inner._sapi_v2_loan_flexible_borrow_history_get_200_response_rows_inner( + loan_coin = 'BUSD', + initial_loan_amount = '10000', + collateral_coin = 'BNB', + initial_collateral_amount = '49.27565492', + borrow_time = 1575018510000, + status = 'Succeeds', ) + ], + ) + """ + + def testSapiV2LoanFlexibleBorrowHistoryGet200Response(self): + """Test SapiV2LoanFlexibleBorrowHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner.py new file mode 100644 index 0000000..fa22080 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_borrow_history_get200_response_rows_inner import SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner + +class TestSapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner: + """Test SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner` + """ + model = SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner( + loan_coin = 'BUSD', + initial_loan_amount = '10000', + collateral_coin = 'BNB', + initial_collateral_amount = '49.27565492', + borrow_time = 1575018510000, + status = 'Succeeds' + ) + else: + return SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner( + loan_coin = 'BUSD', + initial_loan_amount = '10000', + collateral_coin = 'BNB', + initial_collateral_amount = '49.27565492', + borrow_time = 1575018510000, + status = 'Succeeds', + ) + """ + + def testSapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner(self): + """Test SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_borrow_post200_response.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_borrow_post200_response.py new file mode 100644 index 0000000..a11ec6e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_borrow_post200_response.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_borrow_post200_response import SapiV2LoanFlexibleBorrowPost200Response + +class TestSapiV2LoanFlexibleBorrowPost200Response(unittest.TestCase): + """SapiV2LoanFlexibleBorrowPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleBorrowPost200Response: + """Test SapiV2LoanFlexibleBorrowPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleBorrowPost200Response` + """ + model = SapiV2LoanFlexibleBorrowPost200Response() + if include_optional: + return SapiV2LoanFlexibleBorrowPost200Response( + loan_coin = 'BUSD', + loan_amount = '100.5', + collateral_coin = 'BNB', + collateral_amount = '50.5', + status = 'Succeeds' + ) + else: + return SapiV2LoanFlexibleBorrowPost200Response( + loan_coin = 'BUSD', + loan_amount = '100.5', + collateral_amount = '50.5', + status = 'Succeeds', + ) + """ + + def testSapiV2LoanFlexibleBorrowPost200Response(self): + """Test SapiV2LoanFlexibleBorrowPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_collateral_data_get200_response.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_collateral_data_get200_response.py new file mode 100644 index 0000000..83ea87a --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_collateral_data_get200_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_collateral_data_get200_response import SapiV2LoanFlexibleCollateralDataGet200Response + +class TestSapiV2LoanFlexibleCollateralDataGet200Response(unittest.TestCase): + """SapiV2LoanFlexibleCollateralDataGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleCollateralDataGet200Response: + """Test SapiV2LoanFlexibleCollateralDataGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleCollateralDataGet200Response` + """ + model = SapiV2LoanFlexibleCollateralDataGet200Response() + if include_optional: + return SapiV2LoanFlexibleCollateralDataGet200Response( + rows = [ + openapi_client.models._sapi_v2_loan_flexible_collateral_data_get_200_response_rows_inner._sapi_v2_loan_flexible_collateral_data_get_200_response_rows_inner( + collateral_coin = 'BNB', + initial_ltv = '0.01', + margin_call_ltv = '0.7', + liquidation_ltv = '0.8', + max_limit = '1000000', ) + ], + total = 1 + ) + else: + return SapiV2LoanFlexibleCollateralDataGet200Response( + rows = [ + openapi_client.models._sapi_v2_loan_flexible_collateral_data_get_200_response_rows_inner._sapi_v2_loan_flexible_collateral_data_get_200_response_rows_inner( + collateral_coin = 'BNB', + initial_ltv = '0.01', + margin_call_ltv = '0.7', + liquidation_ltv = '0.8', + max_limit = '1000000', ) + ], + total = 1, + ) + """ + + def testSapiV2LoanFlexibleCollateralDataGet200Response(self): + """Test SapiV2LoanFlexibleCollateralDataGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner.py new file mode 100644 index 0000000..d36dc2b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_collateral_data_get200_response_rows_inner import SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner + +class TestSapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner(unittest.TestCase): + """SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner: + """Test SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner` + """ + model = SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner() + if include_optional: + return SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner( + collateral_coin = 'BNB', + initial_ltv = '0.01', + margin_call_ltv = '0.7', + liquidation_ltv = '0.8', + max_limit = '1000000' + ) + else: + return SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner( + collateral_coin = 'BNB', + initial_ltv = '0.01', + margin_call_ltv = '0.7', + liquidation_ltv = '0.8', + max_limit = '1000000', + ) + """ + + def testSapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner(self): + """Test SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_loanable_data_get200_response.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_loanable_data_get200_response.py new file mode 100644 index 0000000..8bf5095 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_loanable_data_get200_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_loanable_data_get200_response import SapiV2LoanFlexibleLoanableDataGet200Response + +class TestSapiV2LoanFlexibleLoanableDataGet200Response(unittest.TestCase): + """SapiV2LoanFlexibleLoanableDataGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleLoanableDataGet200Response: + """Test SapiV2LoanFlexibleLoanableDataGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleLoanableDataGet200Response` + """ + model = SapiV2LoanFlexibleLoanableDataGet200Response() + if include_optional: + return SapiV2LoanFlexibleLoanableDataGet200Response( + rows = [ + openapi_client.models._sapi_v2_loan_flexible_loanable_data_get_200_response_rows_inner._sapi_v2_loan_flexible_loanable_data_get_200_response_rows_inner( + loan_coin = 'BNB', + flexible_interest_rate = '0.01', + flexible_min_limit = '100', + flexible_max_limit = '1000000', ) + ], + total = 1 + ) + else: + return SapiV2LoanFlexibleLoanableDataGet200Response( + rows = [ + openapi_client.models._sapi_v2_loan_flexible_loanable_data_get_200_response_rows_inner._sapi_v2_loan_flexible_loanable_data_get_200_response_rows_inner( + loan_coin = 'BNB', + flexible_interest_rate = '0.01', + flexible_min_limit = '100', + flexible_max_limit = '1000000', ) + ], + total = 1, + ) + """ + + def testSapiV2LoanFlexibleLoanableDataGet200Response(self): + """Test SapiV2LoanFlexibleLoanableDataGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner.py new file mode 100644 index 0000000..ac29dc5 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_loanable_data_get200_response_rows_inner import SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner + +class TestSapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner(unittest.TestCase): + """SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner: + """Test SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner` + """ + model = SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner() + if include_optional: + return SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner( + loan_coin = 'BNB', + flexible_interest_rate = '0.01', + flexible_min_limit = '100', + flexible_max_limit = '1000000' + ) + else: + return SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner( + loan_coin = 'BNB', + flexible_interest_rate = '0.01', + flexible_min_limit = '100', + flexible_max_limit = '1000000', + ) + """ + + def testSapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner(self): + """Test SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ltv_adjustment_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ltv_adjustment_history_get200_response.py new file mode 100644 index 0000000..5f49945 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ltv_adjustment_history_get200_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_ltv_adjustment_history_get200_response import SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response + +class TestSapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response(unittest.TestCase): + """SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response: + """Test SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response` + """ + model = SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response() + if include_optional: + return SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response_rows_inner._sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response_rows_inner( + loan_coin = 'BNB', + collateral_coin = 'BNB', + direction = 'ADDITIONAL', + collateral_amount = '5.75', + pre_ltv = '0.83', + after_ltv = '0.5', + adjust_time = 1575018510000, ) + ], + total = 1 + ) + else: + return SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response_rows_inner._sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response_rows_inner( + loan_coin = 'BNB', + collateral_coin = 'BNB', + direction = 'ADDITIONAL', + collateral_amount = '5.75', + pre_ltv = '0.83', + after_ltv = '0.5', + adjust_time = 1575018510000, ) + ], + total = 1, + ) + """ + + def testSapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response(self): + """Test SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner.py new file mode 100644 index 0000000..0d3d1a8 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_ltv_adjustment_history_get200_response_rows_inner import SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner + +class TestSapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner: + """Test SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner` + """ + model = SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner( + loan_coin = 'BNB', + collateral_coin = 'BNB', + direction = 'ADDITIONAL', + collateral_amount = '5.75', + pre_ltv = '0.83', + after_ltv = '0.5', + adjust_time = 1575018510000 + ) + else: + return SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner( + loan_coin = 'BNB', + collateral_coin = 'BNB', + direction = 'ADDITIONAL', + collateral_amount = '5.75', + pre_ltv = '0.83', + after_ltv = '0.5', + adjust_time = 1575018510000, + ) + """ + + def testSapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner(self): + """Test SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ongoing_orders_get200_response.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ongoing_orders_get200_response.py new file mode 100644 index 0000000..1f23f73 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ongoing_orders_get200_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_ongoing_orders_get200_response import SapiV2LoanFlexibleOngoingOrdersGet200Response + +class TestSapiV2LoanFlexibleOngoingOrdersGet200Response(unittest.TestCase): + """SapiV2LoanFlexibleOngoingOrdersGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleOngoingOrdersGet200Response: + """Test SapiV2LoanFlexibleOngoingOrdersGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleOngoingOrdersGet200Response` + """ + model = SapiV2LoanFlexibleOngoingOrdersGet200Response() + if include_optional: + return SapiV2LoanFlexibleOngoingOrdersGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v2_loan_flexible_ongoing_orders_get_200_response_rows_inner._sapi_v2_loan_flexible_ongoing_orders_get_200_response_rows_inner( + loan_coin = 'BUSD', + total_debt = '10000', + collateral_coin = 'BNB', + collateral_amount = '49.27565492', + current_ltv = '0.57', ) + ] + ) + else: + return SapiV2LoanFlexibleOngoingOrdersGet200Response( + total = 1, + rows = [ + openapi_client.models._sapi_v2_loan_flexible_ongoing_orders_get_200_response_rows_inner._sapi_v2_loan_flexible_ongoing_orders_get_200_response_rows_inner( + loan_coin = 'BUSD', + total_debt = '10000', + collateral_coin = 'BNB', + collateral_amount = '49.27565492', + current_ltv = '0.57', ) + ], + ) + """ + + def testSapiV2LoanFlexibleOngoingOrdersGet200Response(self): + """Test SapiV2LoanFlexibleOngoingOrdersGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner.py new file mode 100644 index 0000000..7547b3e --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_ongoing_orders_get200_response_rows_inner import SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner + +class TestSapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner(unittest.TestCase): + """SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner: + """Test SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner` + """ + model = SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner() + if include_optional: + return SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner( + loan_coin = 'BUSD', + total_debt = '10000', + collateral_coin = 'BNB', + collateral_amount = '49.27565492', + current_ltv = '0.57' + ) + else: + return SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner( + loan_coin = 'BUSD', + total_debt = '10000', + collateral_coin = 'BNB', + collateral_amount = '49.27565492', + current_ltv = '0.57', + ) + """ + + def testSapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner(self): + """Test SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_repay_history_get200_response.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_repay_history_get200_response.py new file mode 100644 index 0000000..33e0c45 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_repay_history_get200_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_repay_history_get200_response import SapiV2LoanFlexibleRepayHistoryGet200Response + +class TestSapiV2LoanFlexibleRepayHistoryGet200Response(unittest.TestCase): + """SapiV2LoanFlexibleRepayHistoryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleRepayHistoryGet200Response: + """Test SapiV2LoanFlexibleRepayHistoryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleRepayHistoryGet200Response` + """ + model = SapiV2LoanFlexibleRepayHistoryGet200Response() + if include_optional: + return SapiV2LoanFlexibleRepayHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v2_loan_flexible_repay_history_get_200_response_rows_inner._sapi_v2_loan_flexible_repay_history_get_200_response_rows_inner( + loan_coin = 'BUSD', + repay_amount = '10000', + collateral_coin = 'BNB', + collateral_return = '100', + repay_status = 'Repaid', + repay_time = 1575018510000, ) + ], + total = 1 + ) + else: + return SapiV2LoanFlexibleRepayHistoryGet200Response( + rows = [ + openapi_client.models._sapi_v2_loan_flexible_repay_history_get_200_response_rows_inner._sapi_v2_loan_flexible_repay_history_get_200_response_rows_inner( + loan_coin = 'BUSD', + repay_amount = '10000', + collateral_coin = 'BNB', + collateral_return = '100', + repay_status = 'Repaid', + repay_time = 1575018510000, ) + ], + total = 1, + ) + """ + + def testSapiV2LoanFlexibleRepayHistoryGet200Response(self): + """Test SapiV2LoanFlexibleRepayHistoryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_repay_history_get200_response_rows_inner.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_repay_history_get200_response_rows_inner.py new file mode 100644 index 0000000..e24ce49 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_repay_history_get200_response_rows_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_repay_history_get200_response_rows_inner import SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner + +class TestSapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner(unittest.TestCase): + """SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner: + """Test SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner` + """ + model = SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner() + if include_optional: + return SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner( + loan_coin = 'BUSD', + repay_amount = '10000', + collateral_coin = 'BNB', + collateral_return = '100', + repay_status = 'Repaid', + repay_time = 1575018510000 + ) + else: + return SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner( + loan_coin = 'BUSD', + repay_amount = '10000', + collateral_coin = 'BNB', + collateral_return = '100', + repay_status = 'Repaid', + repay_time = 1575018510000, + ) + """ + + def testSapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner(self): + """Test SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_repay_post200_response.py b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_repay_post200_response.py new file mode 100644 index 0000000..4d7ab51 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_loan_flexible_repay_post200_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_loan_flexible_repay_post200_response import SapiV2LoanFlexibleRepayPost200Response + +class TestSapiV2LoanFlexibleRepayPost200Response(unittest.TestCase): + """SapiV2LoanFlexibleRepayPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2LoanFlexibleRepayPost200Response: + """Test SapiV2LoanFlexibleRepayPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2LoanFlexibleRepayPost200Response` + """ + model = SapiV2LoanFlexibleRepayPost200Response() + if include_optional: + return SapiV2LoanFlexibleRepayPost200Response( + loan_coin = 'BUSD', + collateral_coin = 'BNB', + remaining_debt = '50.5', + remaining_collateral = '50.5', + full_repayment = False, + current_ltv = '50.5', + repay_status = 'Repaid' + ) + else: + return SapiV2LoanFlexibleRepayPost200Response( + loan_coin = 'BUSD', + collateral_coin = 'BNB', + remaining_debt = '50.5', + remaining_collateral = '50.5', + full_repayment = False, + current_ltv = '50.5', + repay_status = 'Repaid', + ) + """ + + def testSapiV2LoanFlexibleRepayPost200Response(self): + """Test SapiV2LoanFlexibleRepayPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_sub_account_futures_account_get200_response.py b/target/python/binance_openapi/test/test_sapi_v2_sub_account_futures_account_get200_response.py new file mode 100644 index 0000000..2a8d09d --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_sub_account_futures_account_get200_response.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_sub_account_futures_account_get200_response import SapiV2SubAccountFuturesAccountGet200Response + +class TestSapiV2SubAccountFuturesAccountGet200Response(unittest.TestCase): + """SapiV2SubAccountFuturesAccountGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2SubAccountFuturesAccountGet200Response: + """Test SapiV2SubAccountFuturesAccountGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2SubAccountFuturesAccountGet200Response` + """ + model = SapiV2SubAccountFuturesAccountGet200Response() + if include_optional: + return SapiV2SubAccountFuturesAccountGet200Response( + future_account_resp = openapi_client.models.sub_account_usdt_futures_details_future_account_resp.subAccountUSDTFuturesDetails_futureAccountResp( + email = 'abc@test.com', + assets = [ + openapi_client.models._sapi_v1_sub_account_futures_account_get_200_response_assets_inner._sapi_v1_sub_account_futures_account_get_200_response_assets_inner( + asset = 'USDT', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000', ) + ], + can_deposit = True, + can_trade = True, + can_withdraw = True, + fee_tier = 2, + max_withdraw_amount = '0.88308000', + total_initial_margin = '0.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '0.88308000', + total_open_order_initial_margin = '0.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '0.88308000', + update_time = 1576756674610, ), + email = 'abc@test.com', + assets = [ + openapi_client.models.sub_account_coin_futures_details_assets_inner.subAccountCOINFuturesDetails_assets_inner( + asset = 'BTC', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000', ) + ], + can_deposit = True, + can_trade = True, + can_withdraw = True, + fee_tier = 2, + update_time = 1598959682001 + ) + else: + return SapiV2SubAccountFuturesAccountGet200Response( + future_account_resp = openapi_client.models.sub_account_usdt_futures_details_future_account_resp.subAccountUSDTFuturesDetails_futureAccountResp( + email = 'abc@test.com', + assets = [ + openapi_client.models._sapi_v1_sub_account_futures_account_get_200_response_assets_inner._sapi_v1_sub_account_futures_account_get_200_response_assets_inner( + asset = 'USDT', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000', ) + ], + can_deposit = True, + can_trade = True, + can_withdraw = True, + fee_tier = 2, + max_withdraw_amount = '0.88308000', + total_initial_margin = '0.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '0.88308000', + total_open_order_initial_margin = '0.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '0.88308000', + update_time = 1576756674610, ), + email = 'abc@test.com', + assets = [ + openapi_client.models.sub_account_coin_futures_details_assets_inner.subAccountCOINFuturesDetails_assets_inner( + asset = 'BTC', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000', ) + ], + can_deposit = True, + can_trade = True, + can_withdraw = True, + fee_tier = 2, + update_time = 1598959682001, + ) + """ + + def testSapiV2SubAccountFuturesAccountGet200Response(self): + """Test SapiV2SubAccountFuturesAccountGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_sub_account_futures_account_summary_get200_response.py b/target/python/binance_openapi/test/test_sapi_v2_sub_account_futures_account_summary_get200_response.py new file mode 100644 index 0000000..43ce127 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_sub_account_futures_account_summary_get200_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_sub_account_futures_account_summary_get200_response import SapiV2SubAccountFuturesAccountSummaryGet200Response + +class TestSapiV2SubAccountFuturesAccountSummaryGet200Response(unittest.TestCase): + """SapiV2SubAccountFuturesAccountSummaryGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2SubAccountFuturesAccountSummaryGet200Response: + """Test SapiV2SubAccountFuturesAccountSummaryGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2SubAccountFuturesAccountSummaryGet200Response` + """ + model = SapiV2SubAccountFuturesAccountSummaryGet200Response() + if include_optional: + return SapiV2SubAccountFuturesAccountSummaryGet200Response( + future_account_summary_resp = openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp.subAccountUSDTFuturesSummary_futureAccountSummaryResp( + total_initial_margin = '9.83137400', + total_maintenance_margin = '0.41568700', + total_margin_balance = '23.03235621', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.83137400', + total_unrealized_profit = '0.03219710', + total_wallet_balance = '22.15879444', + asset = 'USD', + sub_account_list = [ + openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.subAccountUSDTFuturesSummary_futureAccountSummaryResp_subAccountList_inner( + email = '123@test.com', + total_initial_margin = '9.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '22.12659734', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '22.12659734', + asset = 'USD', ) + ], ), + delivery_account_summary_resp = openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp.subAccountCOINFuturesSummary_deliveryAccountSummaryResp( + total_margin_balance_of_btc = '25.03221121', + total_unrealized_profit_of_btc = '0.1223341', + total_wallet_balance_of_btc = '22.15879444', + asset = 'BTC', + sub_account_list = [ + openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.subAccountCOINFuturesSummary_deliveryAccountSummaryResp_subAccountList_inner( + email = '123@test.com', + total_margin_balance = '22.12659734', + total_unrealized_profit = '0.0', + total_wallet_balance = '22.12659734', + asset = 'BTC', ) + ], ) + ) + else: + return SapiV2SubAccountFuturesAccountSummaryGet200Response( + future_account_summary_resp = openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp.subAccountUSDTFuturesSummary_futureAccountSummaryResp( + total_initial_margin = '9.83137400', + total_maintenance_margin = '0.41568700', + total_margin_balance = '23.03235621', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.83137400', + total_unrealized_profit = '0.03219710', + total_wallet_balance = '22.15879444', + asset = 'USD', + sub_account_list = [ + openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.subAccountUSDTFuturesSummary_futureAccountSummaryResp_subAccountList_inner( + email = '123@test.com', + total_initial_margin = '9.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '22.12659734', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '22.12659734', + asset = 'USD', ) + ], ), + delivery_account_summary_resp = openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp.subAccountCOINFuturesSummary_deliveryAccountSummaryResp( + total_margin_balance_of_btc = '25.03221121', + total_unrealized_profit_of_btc = '0.1223341', + total_wallet_balance_of_btc = '22.15879444', + asset = 'BTC', + sub_account_list = [ + openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.subAccountCOINFuturesSummary_deliveryAccountSummaryResp_subAccountList_inner( + email = '123@test.com', + total_margin_balance = '22.12659734', + total_unrealized_profit = '0.0', + total_wallet_balance = '22.12659734', + asset = 'BTC', ) + ], ), + ) + """ + + def testSapiV2SubAccountFuturesAccountSummaryGet200Response(self): + """Test SapiV2SubAccountFuturesAccountSummaryGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_sub_account_futures_position_risk_get200_response.py b/target/python/binance_openapi/test/test_sapi_v2_sub_account_futures_position_risk_get200_response.py new file mode 100644 index 0000000..d72c5f9 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_sub_account_futures_position_risk_get200_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_sub_account_futures_position_risk_get200_response import SapiV2SubAccountFuturesPositionRiskGet200Response + +class TestSapiV2SubAccountFuturesPositionRiskGet200Response(unittest.TestCase): + """SapiV2SubAccountFuturesPositionRiskGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2SubAccountFuturesPositionRiskGet200Response: + """Test SapiV2SubAccountFuturesPositionRiskGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2SubAccountFuturesPositionRiskGet200Response` + """ + model = SapiV2SubAccountFuturesPositionRiskGet200Response() + if include_optional: + return SapiV2SubAccountFuturesPositionRiskGet200Response( + future_position_risk_vos = [ + openapi_client.models._sapi_v1_sub_account_futures_position_risk_get_200_response_inner._sapi_v1_sub_account_futures_positionRisk_get_200_response_inner( + entry_price = '9975.12000', + leverage = '50', + max_notional = '1000000', + liquidation_price = '7963.54', + mark_price = '9973.50770517', + position_amount = '0.010', + symbol = 'BTCUSDT', + unrealized_profit = '-0.01612295', ) + ], + delivery_position_risk_vos = [ + openapi_client.models.sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.subAccountCOINFuturesPositionRisk_deliveryPositionRiskVos_inner( + entry_price = '9975.12000', + mark_price = '9973.50770517', + leverage = '20', + isolated = 'false', + isolated_wallet = '9973.50770517', + isolated_margin = '0.00000000', + is_auto_add_margin = 'false', + position_side = 'BOTH', + position_amount = '1.230', + symbol = 'BTCUSD_201225', + unrealized_profit = '-0.01612295', ) + ] + ) + else: + return SapiV2SubAccountFuturesPositionRiskGet200Response( + future_position_risk_vos = [ + openapi_client.models._sapi_v1_sub_account_futures_position_risk_get_200_response_inner._sapi_v1_sub_account_futures_positionRisk_get_200_response_inner( + entry_price = '9975.12000', + leverage = '50', + max_notional = '1000000', + liquidation_price = '7963.54', + mark_price = '9973.50770517', + position_amount = '0.010', + symbol = 'BTCUSDT', + unrealized_profit = '-0.01612295', ) + ], + delivery_position_risk_vos = [ + openapi_client.models.sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.subAccountCOINFuturesPositionRisk_deliveryPositionRiskVos_inner( + entry_price = '9975.12000', + mark_price = '9973.50770517', + leverage = '20', + isolated = 'false', + isolated_wallet = '9973.50770517', + isolated_margin = '0.00000000', + is_auto_add_margin = 'false', + position_side = 'BOTH', + position_amount = '1.230', + symbol = 'BTCUSD_201225', + unrealized_profit = '-0.01612295', ) + ], + ) + """ + + def testSapiV2SubAccountFuturesPositionRiskGet200Response(self): + """Test SapiV2SubAccountFuturesPositionRiskGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response.py b/target/python/binance_openapi/test/test_sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response.py new file mode 100644 index 0000000..ef43ad3 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v2_sub_account_sub_account_api_ip_restriction_post200_response import SapiV2SubAccountSubAccountApiIpRestrictionPost200Response + +class TestSapiV2SubAccountSubAccountApiIpRestrictionPost200Response(unittest.TestCase): + """SapiV2SubAccountSubAccountApiIpRestrictionPost200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV2SubAccountSubAccountApiIpRestrictionPost200Response: + """Test SapiV2SubAccountSubAccountApiIpRestrictionPost200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV2SubAccountSubAccountApiIpRestrictionPost200Response` + """ + model = SapiV2SubAccountSubAccountApiIpRestrictionPost200Response() + if include_optional: + return SapiV2SubAccountSubAccountApiIpRestrictionPost200Response( + status = '2', + ip_list = ["69.210.67.14","8.34.21.10","thirdPartyName"], + update_time = 1636369557189, + api_key = 'k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf' + ) + else: + return SapiV2SubAccountSubAccountApiIpRestrictionPost200Response( + status = '2', + ip_list = ["69.210.67.14","8.34.21.10","thirdPartyName"], + update_time = 1636369557189, + api_key = 'k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf', + ) + """ + + def testSapiV2SubAccountSubAccountApiIpRestrictionPost200Response(self): + """Test SapiV2SubAccountSubAccountApiIpRestrictionPost200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v3_asset_get_user_asset_post200_response_inner.py b/target/python/binance_openapi/test/test_sapi_v3_asset_get_user_asset_post200_response_inner.py new file mode 100644 index 0000000..61d05d6 --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v3_asset_get_user_asset_post200_response_inner.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v3_asset_get_user_asset_post200_response_inner import SapiV3AssetGetUserAssetPost200ResponseInner + +class TestSapiV3AssetGetUserAssetPost200ResponseInner(unittest.TestCase): + """SapiV3AssetGetUserAssetPost200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV3AssetGetUserAssetPost200ResponseInner: + """Test SapiV3AssetGetUserAssetPost200ResponseInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV3AssetGetUserAssetPost200ResponseInner` + """ + model = SapiV3AssetGetUserAssetPost200ResponseInner() + if include_optional: + return SapiV3AssetGetUserAssetPost200ResponseInner( + asset = 'AVAX', + free = '1', + locked = '0', + freeze = '0', + withdrawing = '0', + ipoable = '0', + btc_valuation = '0' + ) + else: + return SapiV3AssetGetUserAssetPost200ResponseInner( + asset = 'AVAX', + free = '1', + locked = '0', + freeze = '0', + withdrawing = '0', + ipoable = '0', + btc_valuation = '0', + ) + """ + + def testSapiV3AssetGetUserAssetPost200ResponseInner(self): + """Test SapiV3AssetGetUserAssetPost200ResponseInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v3_sub_account_assets_get200_response.py b/target/python/binance_openapi/test/test_sapi_v3_sub_account_assets_get200_response.py new file mode 100644 index 0000000..844a2ea --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v3_sub_account_assets_get200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v3_sub_account_assets_get200_response import SapiV3SubAccountAssetsGet200Response + +class TestSapiV3SubAccountAssetsGet200Response(unittest.TestCase): + """SapiV3SubAccountAssetsGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV3SubAccountAssetsGet200Response: + """Test SapiV3SubAccountAssetsGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV3SubAccountAssetsGet200Response` + """ + model = SapiV3SubAccountAssetsGet200Response() + if include_optional: + return SapiV3SubAccountAssetsGet200Response( + balances = [ + openapi_client.models._sapi_v3_sub_account_assets_get_200_response_balances_inner._sapi_v3_sub_account_assets_get_200_response_balances_inner( + asset = 'ADA', + free = 10000, + locked = 0, ) + ] + ) + else: + return SapiV3SubAccountAssetsGet200Response( + balances = [ + openapi_client.models._sapi_v3_sub_account_assets_get_200_response_balances_inner._sapi_v3_sub_account_assets_get_200_response_balances_inner( + asset = 'ADA', + free = 10000, + locked = 0, ) + ], + ) + """ + + def testSapiV3SubAccountAssetsGet200Response(self): + """Test SapiV3SubAccountAssetsGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v3_sub_account_assets_get200_response_balances_inner.py b/target/python/binance_openapi/test/test_sapi_v3_sub_account_assets_get200_response_balances_inner.py new file mode 100644 index 0000000..85d7caf --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v3_sub_account_assets_get200_response_balances_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v3_sub_account_assets_get200_response_balances_inner import SapiV3SubAccountAssetsGet200ResponseBalancesInner + +class TestSapiV3SubAccountAssetsGet200ResponseBalancesInner(unittest.TestCase): + """SapiV3SubAccountAssetsGet200ResponseBalancesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV3SubAccountAssetsGet200ResponseBalancesInner: + """Test SapiV3SubAccountAssetsGet200ResponseBalancesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV3SubAccountAssetsGet200ResponseBalancesInner` + """ + model = SapiV3SubAccountAssetsGet200ResponseBalancesInner() + if include_optional: + return SapiV3SubAccountAssetsGet200ResponseBalancesInner( + asset = 'ADA', + free = 10000, + locked = 0 + ) + else: + return SapiV3SubAccountAssetsGet200ResponseBalancesInner( + asset = 'ADA', + free = 10000, + locked = 0, + ) + """ + + def testSapiV3SubAccountAssetsGet200ResponseBalancesInner(self): + """Test SapiV3SubAccountAssetsGet200ResponseBalancesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v4_sub_account_assets_get200_response.py b/target/python/binance_openapi/test/test_sapi_v4_sub_account_assets_get200_response.py new file mode 100644 index 0000000..e1fbe5b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v4_sub_account_assets_get200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v4_sub_account_assets_get200_response import SapiV4SubAccountAssetsGet200Response + +class TestSapiV4SubAccountAssetsGet200Response(unittest.TestCase): + """SapiV4SubAccountAssetsGet200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV4SubAccountAssetsGet200Response: + """Test SapiV4SubAccountAssetsGet200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV4SubAccountAssetsGet200Response` + """ + model = SapiV4SubAccountAssetsGet200Response() + if include_optional: + return SapiV4SubAccountAssetsGet200Response( + balances = [ + openapi_client.models._sapi_v4_sub_account_assets_get_200_response_balances_inner._sapi_v4_sub_account_assets_get_200_response_balances_inner( + asset = 'BNB', + free = '10000', + locked = '0', ) + ] + ) + else: + return SapiV4SubAccountAssetsGet200Response( + balances = [ + openapi_client.models._sapi_v4_sub_account_assets_get_200_response_balances_inner._sapi_v4_sub_account_assets_get_200_response_balances_inner( + asset = 'BNB', + free = '10000', + locked = '0', ) + ], + ) + """ + + def testSapiV4SubAccountAssetsGet200Response(self): + """Test SapiV4SubAccountAssetsGet200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sapi_v4_sub_account_assets_get200_response_balances_inner.py b/target/python/binance_openapi/test/test_sapi_v4_sub_account_assets_get200_response_balances_inner.py new file mode 100644 index 0000000..169b16b --- /dev/null +++ b/target/python/binance_openapi/test/test_sapi_v4_sub_account_assets_get200_response_balances_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sapi_v4_sub_account_assets_get200_response_balances_inner import SapiV4SubAccountAssetsGet200ResponseBalancesInner + +class TestSapiV4SubAccountAssetsGet200ResponseBalancesInner(unittest.TestCase): + """SapiV4SubAccountAssetsGet200ResponseBalancesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SapiV4SubAccountAssetsGet200ResponseBalancesInner: + """Test SapiV4SubAccountAssetsGet200ResponseBalancesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SapiV4SubAccountAssetsGet200ResponseBalancesInner` + """ + model = SapiV4SubAccountAssetsGet200ResponseBalancesInner() + if include_optional: + return SapiV4SubAccountAssetsGet200ResponseBalancesInner( + asset = 'BNB', + free = '10000', + locked = '0' + ) + else: + return SapiV4SubAccountAssetsGet200ResponseBalancesInner( + asset = 'BNB', + free = '10000', + locked = '0', + ) + """ + + def testSapiV4SubAccountAssetsGet200ResponseBalancesInner(self): + """Test SapiV4SubAccountAssetsGet200ResponseBalancesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_savings_api.py b/target/python/binance_openapi/test/test_savings_api.py new file mode 100644 index 0000000..9920f56 --- /dev/null +++ b/target/python/binance_openapi/test/test_savings_api.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.savings_api import SavingsApi + + +class TestSavingsApi(unittest.TestCase): + """SavingsApi unit test stubs""" + + def setUp(self) -> None: + self.api = SavingsApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_lending_customized_fixed_purchase_post(self) -> None: + """Test case for sapi_v1_lending_customized_fixed_purchase_post + + Purchase Fixed/Activity Project (USER_DATA) + """ + pass + + def test_sapi_v1_lending_position_changed_post(self) -> None: + """Test case for sapi_v1_lending_position_changed_post + + Change Fixed/Activity Position to Daily Position (USER_DATA) + """ + pass + + def test_sapi_v1_lending_project_list_get(self) -> None: + """Test case for sapi_v1_lending_project_list_get + + Get Fixed/Activity Project List(USER_DATA) + """ + pass + + def test_sapi_v1_lending_project_position_list_get(self) -> None: + """Test case for sapi_v1_lending_project_position_list_get + + Get Fixed/Activity Project Position (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_simple_earn_api.py b/target/python/binance_openapi/test/test_simple_earn_api.py new file mode 100644 index 0000000..d3ceb50 --- /dev/null +++ b/target/python/binance_openapi/test/test_simple_earn_api.py @@ -0,0 +1,192 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.simple_earn_api import SimpleEarnApi + + +class TestSimpleEarnApi(unittest.TestCase): + """SimpleEarnApi unit test stubs""" + + def setUp(self) -> None: + self.api = SimpleEarnApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_simple_earn_account_get(self) -> None: + """Test case for sapi_v1_simple_earn_account_get + + Simple Account (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_flexible_history_collateral_record_get(self) -> None: + """Test case for sapi_v1_simple_earn_flexible_history_collateral_record_get + + Get Collateral Record (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_flexible_history_rate_history_get(self) -> None: + """Test case for sapi_v1_simple_earn_flexible_history_rate_history_get + + Get Rate History (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_flexible_history_redemption_record_get(self) -> None: + """Test case for sapi_v1_simple_earn_flexible_history_redemption_record_get + + Get Flexible Redemption Record (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_flexible_history_rewards_record_get(self) -> None: + """Test case for sapi_v1_simple_earn_flexible_history_rewards_record_get + + Get Flexible Rewards History (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_flexible_history_subscription_record_get(self) -> None: + """Test case for sapi_v1_simple_earn_flexible_history_subscription_record_get + + Get Flexible Subscription Record (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_flexible_list_get(self) -> None: + """Test case for sapi_v1_simple_earn_flexible_list_get + + Get Simple Earn Flexible Product List (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_flexible_personal_left_quota_get(self) -> None: + """Test case for sapi_v1_simple_earn_flexible_personal_left_quota_get + + Get Flexible Personal Left Quota (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_flexible_position_get(self) -> None: + """Test case for sapi_v1_simple_earn_flexible_position_get + + Get Flexible Product Position (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_flexible_redeem_post(self) -> None: + """Test case for sapi_v1_simple_earn_flexible_redeem_post + + Redeem Flexible Product (TRADE) + """ + pass + + def test_sapi_v1_simple_earn_flexible_set_auto_subscribe_post(self) -> None: + """Test case for sapi_v1_simple_earn_flexible_set_auto_subscribe_post + + Set Flexible Auto Subscribe (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_flexible_subscribe_post(self) -> None: + """Test case for sapi_v1_simple_earn_flexible_subscribe_post + + Subscribe Flexible Product (TRADE) + """ + pass + + def test_sapi_v1_simple_earn_flexible_subscription_preview_get(self) -> None: + """Test case for sapi_v1_simple_earn_flexible_subscription_preview_get + + Get Flexible Subscription Preview (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_locked_history_redemption_record_get(self) -> None: + """Test case for sapi_v1_simple_earn_locked_history_redemption_record_get + + Get Locked Redemption Record (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_locked_history_rewards_record_get(self) -> None: + """Test case for sapi_v1_simple_earn_locked_history_rewards_record_get + + Get Locked Rewards History (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_locked_history_subscription_record_get(self) -> None: + """Test case for sapi_v1_simple_earn_locked_history_subscription_record_get + + Get Locked Subscription Record (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_locked_list_get(self) -> None: + """Test case for sapi_v1_simple_earn_locked_list_get + + Get Simple Earn Locked Product List (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_locked_personal_left_quota_get(self) -> None: + """Test case for sapi_v1_simple_earn_locked_personal_left_quota_get + + Get Locked Personal Left Quota (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_locked_position_get(self) -> None: + """Test case for sapi_v1_simple_earn_locked_position_get + + Get Locked Product Position (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_locked_redeem_post(self) -> None: + """Test case for sapi_v1_simple_earn_locked_redeem_post + + Redeem Locked Product (TRADE) + """ + pass + + def test_sapi_v1_simple_earn_locked_set_auto_subscribe_post(self) -> None: + """Test case for sapi_v1_simple_earn_locked_set_auto_subscribe_post + + Set Locked Auto Subscribe (USER_DATA) + """ + pass + + def test_sapi_v1_simple_earn_locked_subscribe_post(self) -> None: + """Test case for sapi_v1_simple_earn_locked_subscribe_post + + Subscribe Locked Product (TRADE) + """ + pass + + def test_sapi_v1_simple_earn_locked_subscription_preview_get(self) -> None: + """Test case for sapi_v1_simple_earn_locked_subscription_preview_get + + Get Locked Subscription Preview (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_snapshot_futures.py b/target/python/binance_openapi/test/test_snapshot_futures.py new file mode 100644 index 0000000..abd0674 --- /dev/null +++ b/target/python/binance_openapi/test/test_snapshot_futures.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.snapshot_futures import SnapshotFutures + +class TestSnapshotFutures(unittest.TestCase): + """SnapshotFutures unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotFutures: + """Test SnapshotFutures + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotFutures` + """ + model = SnapshotFutures() + if include_optional: + return SnapshotFutures( + code = 200, + msg = '', + snapshot_vos = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner.snapshotFutures_snapshotVos_inner( + data = openapi_client.models.snapshot_futures_snapshot_vos_inner_data.snapshotFutures_snapshotVos_inner_data( + assets = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_assets_inner.snapshotFutures_snapshotVos_inner_data_assets_inner( + asset = 'USDT', + margin_balance = '118.99782335', + wallet_balance = '120.23811389', ) + ], + position = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_position_inner.snapshotFutures_snapshotVos_inner_data_position_inner( + entry_price = '7130.41000000', + mark_price = '7257.66239673', + position_amt = '0.01000000', + symbol = 'BTCUSDT', + un_realized_profit = '1.24029054', ) + ], ), + type = 'futures', + update_time = 1576281599000, ) + ] + ) + else: + return SnapshotFutures( + code = 200, + msg = '', + snapshot_vos = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner.snapshotFutures_snapshotVos_inner( + data = openapi_client.models.snapshot_futures_snapshot_vos_inner_data.snapshotFutures_snapshotVos_inner_data( + assets = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_assets_inner.snapshotFutures_snapshotVos_inner_data_assets_inner( + asset = 'USDT', + margin_balance = '118.99782335', + wallet_balance = '120.23811389', ) + ], + position = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_position_inner.snapshotFutures_snapshotVos_inner_data_position_inner( + entry_price = '7130.41000000', + mark_price = '7257.66239673', + position_amt = '0.01000000', + symbol = 'BTCUSDT', + un_realized_profit = '1.24029054', ) + ], ), + type = 'futures', + update_time = 1576281599000, ) + ], + ) + """ + + def testSnapshotFutures(self): + """Test SnapshotFutures""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner.py b/target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner.py new file mode 100644 index 0000000..c0de210 --- /dev/null +++ b/target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.snapshot_futures_snapshot_vos_inner import SnapshotFuturesSnapshotVosInner + +class TestSnapshotFuturesSnapshotVosInner(unittest.TestCase): + """SnapshotFuturesSnapshotVosInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotFuturesSnapshotVosInner: + """Test SnapshotFuturesSnapshotVosInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotFuturesSnapshotVosInner` + """ + model = SnapshotFuturesSnapshotVosInner() + if include_optional: + return SnapshotFuturesSnapshotVosInner( + data = openapi_client.models.snapshot_futures_snapshot_vos_inner_data.snapshotFutures_snapshotVos_inner_data( + assets = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_assets_inner.snapshotFutures_snapshotVos_inner_data_assets_inner( + asset = 'USDT', + margin_balance = '118.99782335', + wallet_balance = '120.23811389', ) + ], + position = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_position_inner.snapshotFutures_snapshotVos_inner_data_position_inner( + entry_price = '7130.41000000', + mark_price = '7257.66239673', + position_amt = '0.01000000', + symbol = 'BTCUSDT', + un_realized_profit = '1.24029054', ) + ], ), + type = 'futures', + update_time = 1576281599000 + ) + else: + return SnapshotFuturesSnapshotVosInner( + data = openapi_client.models.snapshot_futures_snapshot_vos_inner_data.snapshotFutures_snapshotVos_inner_data( + assets = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_assets_inner.snapshotFutures_snapshotVos_inner_data_assets_inner( + asset = 'USDT', + margin_balance = '118.99782335', + wallet_balance = '120.23811389', ) + ], + position = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_position_inner.snapshotFutures_snapshotVos_inner_data_position_inner( + entry_price = '7130.41000000', + mark_price = '7257.66239673', + position_amt = '0.01000000', + symbol = 'BTCUSDT', + un_realized_profit = '1.24029054', ) + ], ), + type = 'futures', + update_time = 1576281599000, + ) + """ + + def testSnapshotFuturesSnapshotVosInner(self): + """Test SnapshotFuturesSnapshotVosInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner_data.py b/target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner_data.py new file mode 100644 index 0000000..aba9b86 --- /dev/null +++ b/target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner_data.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data import SnapshotFuturesSnapshotVosInnerData + +class TestSnapshotFuturesSnapshotVosInnerData(unittest.TestCase): + """SnapshotFuturesSnapshotVosInnerData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotFuturesSnapshotVosInnerData: + """Test SnapshotFuturesSnapshotVosInnerData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotFuturesSnapshotVosInnerData` + """ + model = SnapshotFuturesSnapshotVosInnerData() + if include_optional: + return SnapshotFuturesSnapshotVosInnerData( + assets = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_assets_inner.snapshotFutures_snapshotVos_inner_data_assets_inner( + asset = 'USDT', + margin_balance = '118.99782335', + wallet_balance = '120.23811389', ) + ], + position = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_position_inner.snapshotFutures_snapshotVos_inner_data_position_inner( + entry_price = '7130.41000000', + mark_price = '7257.66239673', + position_amt = '0.01000000', + symbol = 'BTCUSDT', + un_realized_profit = '1.24029054', ) + ] + ) + else: + return SnapshotFuturesSnapshotVosInnerData( + assets = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_assets_inner.snapshotFutures_snapshotVos_inner_data_assets_inner( + asset = 'USDT', + margin_balance = '118.99782335', + wallet_balance = '120.23811389', ) + ], + position = [ + openapi_client.models.snapshot_futures_snapshot_vos_inner_data_position_inner.snapshotFutures_snapshotVos_inner_data_position_inner( + entry_price = '7130.41000000', + mark_price = '7257.66239673', + position_amt = '0.01000000', + symbol = 'BTCUSDT', + un_realized_profit = '1.24029054', ) + ], + ) + """ + + def testSnapshotFuturesSnapshotVosInnerData(self): + """Test SnapshotFuturesSnapshotVosInnerData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner_data_assets_inner.py b/target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner_data_assets_inner.py new file mode 100644 index 0000000..6aed274 --- /dev/null +++ b/target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner_data_assets_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data_assets_inner import SnapshotFuturesSnapshotVosInnerDataAssetsInner + +class TestSnapshotFuturesSnapshotVosInnerDataAssetsInner(unittest.TestCase): + """SnapshotFuturesSnapshotVosInnerDataAssetsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotFuturesSnapshotVosInnerDataAssetsInner: + """Test SnapshotFuturesSnapshotVosInnerDataAssetsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotFuturesSnapshotVosInnerDataAssetsInner` + """ + model = SnapshotFuturesSnapshotVosInnerDataAssetsInner() + if include_optional: + return SnapshotFuturesSnapshotVosInnerDataAssetsInner( + asset = 'USDT', + margin_balance = '118.99782335', + wallet_balance = '120.23811389' + ) + else: + return SnapshotFuturesSnapshotVosInnerDataAssetsInner( + asset = 'USDT', + margin_balance = '118.99782335', + wallet_balance = '120.23811389', + ) + """ + + def testSnapshotFuturesSnapshotVosInnerDataAssetsInner(self): + """Test SnapshotFuturesSnapshotVosInnerDataAssetsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner_data_position_inner.py b/target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner_data_position_inner.py new file mode 100644 index 0000000..77e0899 --- /dev/null +++ b/target/python/binance_openapi/test/test_snapshot_futures_snapshot_vos_inner_data_position_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.snapshot_futures_snapshot_vos_inner_data_position_inner import SnapshotFuturesSnapshotVosInnerDataPositionInner + +class TestSnapshotFuturesSnapshotVosInnerDataPositionInner(unittest.TestCase): + """SnapshotFuturesSnapshotVosInnerDataPositionInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotFuturesSnapshotVosInnerDataPositionInner: + """Test SnapshotFuturesSnapshotVosInnerDataPositionInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotFuturesSnapshotVosInnerDataPositionInner` + """ + model = SnapshotFuturesSnapshotVosInnerDataPositionInner() + if include_optional: + return SnapshotFuturesSnapshotVosInnerDataPositionInner( + entry_price = '7130.41000000', + mark_price = '7257.66239673', + position_amt = '0.01000000', + symbol = 'BTCUSDT', + un_realized_profit = '1.24029054' + ) + else: + return SnapshotFuturesSnapshotVosInnerDataPositionInner( + entry_price = '7130.41000000', + mark_price = '7257.66239673', + position_amt = '0.01000000', + symbol = 'BTCUSDT', + un_realized_profit = '1.24029054', + ) + """ + + def testSnapshotFuturesSnapshotVosInnerDataPositionInner(self): + """Test SnapshotFuturesSnapshotVosInnerDataPositionInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_snapshot_margin.py b/target/python/binance_openapi/test/test_snapshot_margin.py new file mode 100644 index 0000000..e64a3df --- /dev/null +++ b/target/python/binance_openapi/test/test_snapshot_margin.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.snapshot_margin import SnapshotMargin + +class TestSnapshotMargin(unittest.TestCase): + """SnapshotMargin unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotMargin: + """Test SnapshotMargin + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotMargin` + """ + model = SnapshotMargin() + if include_optional: + return SnapshotMargin( + code = 200, + msg = '', + snapshot_vos = [ + openapi_client.models.snapshot_margin_snapshot_vos_inner.snapshotMargin_snapshotVos_inner( + data = openapi_client.models.snapshot_margin_snapshot_vos_inner_data.snapshotMargin_snapshotVos_inner_data( + margin_level = '2748.02909813', + total_asset_of_btc = '0.00274803', + total_liability_of_btc = '0.00000100', + total_net_asset_of_btc = '0.00274750', + user_assets = [ + openapi_client.models.snapshot_margin_snapshot_vos_inner_data_user_assets_inner.snapshotMargin_snapshotVos_inner_data_userAssets_inner( + asset = 'XRP', + borrowed = '0.00000000', + free = '1.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '1.00000000', ) + ], ), + type = 'margin', + update_time = 1576281599000, ) + ] + ) + else: + return SnapshotMargin( + code = 200, + msg = '', + snapshot_vos = [ + openapi_client.models.snapshot_margin_snapshot_vos_inner.snapshotMargin_snapshotVos_inner( + data = openapi_client.models.snapshot_margin_snapshot_vos_inner_data.snapshotMargin_snapshotVos_inner_data( + margin_level = '2748.02909813', + total_asset_of_btc = '0.00274803', + total_liability_of_btc = '0.00000100', + total_net_asset_of_btc = '0.00274750', + user_assets = [ + openapi_client.models.snapshot_margin_snapshot_vos_inner_data_user_assets_inner.snapshotMargin_snapshotVos_inner_data_userAssets_inner( + asset = 'XRP', + borrowed = '0.00000000', + free = '1.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '1.00000000', ) + ], ), + type = 'margin', + update_time = 1576281599000, ) + ], + ) + """ + + def testSnapshotMargin(self): + """Test SnapshotMargin""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_snapshot_margin_snapshot_vos_inner.py b/target/python/binance_openapi/test/test_snapshot_margin_snapshot_vos_inner.py new file mode 100644 index 0000000..c52727c --- /dev/null +++ b/target/python/binance_openapi/test/test_snapshot_margin_snapshot_vos_inner.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.snapshot_margin_snapshot_vos_inner import SnapshotMarginSnapshotVosInner + +class TestSnapshotMarginSnapshotVosInner(unittest.TestCase): + """SnapshotMarginSnapshotVosInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotMarginSnapshotVosInner: + """Test SnapshotMarginSnapshotVosInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotMarginSnapshotVosInner` + """ + model = SnapshotMarginSnapshotVosInner() + if include_optional: + return SnapshotMarginSnapshotVosInner( + data = openapi_client.models.snapshot_margin_snapshot_vos_inner_data.snapshotMargin_snapshotVos_inner_data( + margin_level = '2748.02909813', + total_asset_of_btc = '0.00274803', + total_liability_of_btc = '0.00000100', + total_net_asset_of_btc = '0.00274750', + user_assets = [ + openapi_client.models.snapshot_margin_snapshot_vos_inner_data_user_assets_inner.snapshotMargin_snapshotVos_inner_data_userAssets_inner( + asset = 'XRP', + borrowed = '0.00000000', + free = '1.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '1.00000000', ) + ], ), + type = 'margin', + update_time = 1576281599000 + ) + else: + return SnapshotMarginSnapshotVosInner( + data = openapi_client.models.snapshot_margin_snapshot_vos_inner_data.snapshotMargin_snapshotVos_inner_data( + margin_level = '2748.02909813', + total_asset_of_btc = '0.00274803', + total_liability_of_btc = '0.00000100', + total_net_asset_of_btc = '0.00274750', + user_assets = [ + openapi_client.models.snapshot_margin_snapshot_vos_inner_data_user_assets_inner.snapshotMargin_snapshotVos_inner_data_userAssets_inner( + asset = 'XRP', + borrowed = '0.00000000', + free = '1.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '1.00000000', ) + ], ), + type = 'margin', + update_time = 1576281599000, + ) + """ + + def testSnapshotMarginSnapshotVosInner(self): + """Test SnapshotMarginSnapshotVosInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_snapshot_margin_snapshot_vos_inner_data.py b/target/python/binance_openapi/test/test_snapshot_margin_snapshot_vos_inner_data.py new file mode 100644 index 0000000..38f93a6 --- /dev/null +++ b/target/python/binance_openapi/test/test_snapshot_margin_snapshot_vos_inner_data.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.snapshot_margin_snapshot_vos_inner_data import SnapshotMarginSnapshotVosInnerData + +class TestSnapshotMarginSnapshotVosInnerData(unittest.TestCase): + """SnapshotMarginSnapshotVosInnerData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotMarginSnapshotVosInnerData: + """Test SnapshotMarginSnapshotVosInnerData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotMarginSnapshotVosInnerData` + """ + model = SnapshotMarginSnapshotVosInnerData() + if include_optional: + return SnapshotMarginSnapshotVosInnerData( + margin_level = '2748.02909813', + total_asset_of_btc = '0.00274803', + total_liability_of_btc = '0.00000100', + total_net_asset_of_btc = '0.00274750', + user_assets = [ + openapi_client.models.snapshot_margin_snapshot_vos_inner_data_user_assets_inner.snapshotMargin_snapshotVos_inner_data_userAssets_inner( + asset = 'XRP', + borrowed = '0.00000000', + free = '1.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '1.00000000', ) + ] + ) + else: + return SnapshotMarginSnapshotVosInnerData( + margin_level = '2748.02909813', + total_asset_of_btc = '0.00274803', + total_liability_of_btc = '0.00000100', + total_net_asset_of_btc = '0.00274750', + user_assets = [ + openapi_client.models.snapshot_margin_snapshot_vos_inner_data_user_assets_inner.snapshotMargin_snapshotVos_inner_data_userAssets_inner( + asset = 'XRP', + borrowed = '0.00000000', + free = '1.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '1.00000000', ) + ], + ) + """ + + def testSnapshotMarginSnapshotVosInnerData(self): + """Test SnapshotMarginSnapshotVosInnerData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_snapshot_margin_snapshot_vos_inner_data_user_assets_inner.py b/target/python/binance_openapi/test/test_snapshot_margin_snapshot_vos_inner_data_user_assets_inner.py new file mode 100644 index 0000000..360559a --- /dev/null +++ b/target/python/binance_openapi/test/test_snapshot_margin_snapshot_vos_inner_data_user_assets_inner.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.snapshot_margin_snapshot_vos_inner_data_user_assets_inner import SnapshotMarginSnapshotVosInnerDataUserAssetsInner + +class TestSnapshotMarginSnapshotVosInnerDataUserAssetsInner(unittest.TestCase): + """SnapshotMarginSnapshotVosInnerDataUserAssetsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotMarginSnapshotVosInnerDataUserAssetsInner: + """Test SnapshotMarginSnapshotVosInnerDataUserAssetsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotMarginSnapshotVosInnerDataUserAssetsInner` + """ + model = SnapshotMarginSnapshotVosInnerDataUserAssetsInner() + if include_optional: + return SnapshotMarginSnapshotVosInnerDataUserAssetsInner( + asset = 'XRP', + borrowed = '0.00000000', + free = '1.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '1.00000000' + ) + else: + return SnapshotMarginSnapshotVosInnerDataUserAssetsInner( + asset = 'XRP', + borrowed = '0.00000000', + free = '1.00000000', + interest = '0.00000000', + locked = '0.00000000', + net_asset = '1.00000000', + ) + """ + + def testSnapshotMarginSnapshotVosInnerDataUserAssetsInner(self): + """Test SnapshotMarginSnapshotVosInnerDataUserAssetsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_snapshot_spot.py b/target/python/binance_openapi/test/test_snapshot_spot.py new file mode 100644 index 0000000..f227ca2 --- /dev/null +++ b/target/python/binance_openapi/test/test_snapshot_spot.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.snapshot_spot import SnapshotSpot + +class TestSnapshotSpot(unittest.TestCase): + """SnapshotSpot unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotSpot: + """Test SnapshotSpot + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotSpot` + """ + model = SnapshotSpot() + if include_optional: + return SnapshotSpot( + code = 200, + msg = '', + snapshot_vos = [ + openapi_client.models.snapshot_spot_snapshot_vos_inner.snapshotSpot_snapshotVos_inner( + data = openapi_client.models.snapshot_spot_snapshot_vos_inner_data.snapshotSpot_snapshotVos_inner_data( + balances = [ + openapi_client.models.snapshot_spot_snapshot_vos_inner_data_balances_inner.snapshotSpot_snapshotVos_inner_data_balances_inner( + asset = 'BTC', + free = '0.2', + locked = '0.001', ) + ], + total_asset_of_btc = '0.09905021', ), + type = 'spot', + update_time = 1576281599000, ) + ] + ) + else: + return SnapshotSpot( + code = 200, + msg = '', + snapshot_vos = [ + openapi_client.models.snapshot_spot_snapshot_vos_inner.snapshotSpot_snapshotVos_inner( + data = openapi_client.models.snapshot_spot_snapshot_vos_inner_data.snapshotSpot_snapshotVos_inner_data( + balances = [ + openapi_client.models.snapshot_spot_snapshot_vos_inner_data_balances_inner.snapshotSpot_snapshotVos_inner_data_balances_inner( + asset = 'BTC', + free = '0.2', + locked = '0.001', ) + ], + total_asset_of_btc = '0.09905021', ), + type = 'spot', + update_time = 1576281599000, ) + ], + ) + """ + + def testSnapshotSpot(self): + """Test SnapshotSpot""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_snapshot_spot_snapshot_vos_inner.py b/target/python/binance_openapi/test/test_snapshot_spot_snapshot_vos_inner.py new file mode 100644 index 0000000..12eb815 --- /dev/null +++ b/target/python/binance_openapi/test/test_snapshot_spot_snapshot_vos_inner.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.snapshot_spot_snapshot_vos_inner import SnapshotSpotSnapshotVosInner + +class TestSnapshotSpotSnapshotVosInner(unittest.TestCase): + """SnapshotSpotSnapshotVosInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotSpotSnapshotVosInner: + """Test SnapshotSpotSnapshotVosInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotSpotSnapshotVosInner` + """ + model = SnapshotSpotSnapshotVosInner() + if include_optional: + return SnapshotSpotSnapshotVosInner( + data = openapi_client.models.snapshot_spot_snapshot_vos_inner_data.snapshotSpot_snapshotVos_inner_data( + balances = [ + openapi_client.models.snapshot_spot_snapshot_vos_inner_data_balances_inner.snapshotSpot_snapshotVos_inner_data_balances_inner( + asset = 'BTC', + free = '0.2', + locked = '0.001', ) + ], + total_asset_of_btc = '0.09905021', ), + type = 'spot', + update_time = 1576281599000 + ) + else: + return SnapshotSpotSnapshotVosInner( + data = openapi_client.models.snapshot_spot_snapshot_vos_inner_data.snapshotSpot_snapshotVos_inner_data( + balances = [ + openapi_client.models.snapshot_spot_snapshot_vos_inner_data_balances_inner.snapshotSpot_snapshotVos_inner_data_balances_inner( + asset = 'BTC', + free = '0.2', + locked = '0.001', ) + ], + total_asset_of_btc = '0.09905021', ), + type = 'spot', + update_time = 1576281599000, + ) + """ + + def testSnapshotSpotSnapshotVosInner(self): + """Test SnapshotSpotSnapshotVosInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_snapshot_spot_snapshot_vos_inner_data.py b/target/python/binance_openapi/test/test_snapshot_spot_snapshot_vos_inner_data.py new file mode 100644 index 0000000..95f61c2 --- /dev/null +++ b/target/python/binance_openapi/test/test_snapshot_spot_snapshot_vos_inner_data.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.snapshot_spot_snapshot_vos_inner_data import SnapshotSpotSnapshotVosInnerData + +class TestSnapshotSpotSnapshotVosInnerData(unittest.TestCase): + """SnapshotSpotSnapshotVosInnerData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotSpotSnapshotVosInnerData: + """Test SnapshotSpotSnapshotVosInnerData + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotSpotSnapshotVosInnerData` + """ + model = SnapshotSpotSnapshotVosInnerData() + if include_optional: + return SnapshotSpotSnapshotVosInnerData( + balances = [ + openapi_client.models.snapshot_spot_snapshot_vos_inner_data_balances_inner.snapshotSpot_snapshotVos_inner_data_balances_inner( + asset = 'BTC', + free = '0.2', + locked = '0.001', ) + ], + total_asset_of_btc = '0.09905021' + ) + else: + return SnapshotSpotSnapshotVosInnerData( + balances = [ + openapi_client.models.snapshot_spot_snapshot_vos_inner_data_balances_inner.snapshotSpot_snapshotVos_inner_data_balances_inner( + asset = 'BTC', + free = '0.2', + locked = '0.001', ) + ], + total_asset_of_btc = '0.09905021', + ) + """ + + def testSnapshotSpotSnapshotVosInnerData(self): + """Test SnapshotSpotSnapshotVosInnerData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_snapshot_spot_snapshot_vos_inner_data_balances_inner.py b/target/python/binance_openapi/test/test_snapshot_spot_snapshot_vos_inner_data_balances_inner.py new file mode 100644 index 0000000..092e880 --- /dev/null +++ b/target/python/binance_openapi/test/test_snapshot_spot_snapshot_vos_inner_data_balances_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.snapshot_spot_snapshot_vos_inner_data_balances_inner import SnapshotSpotSnapshotVosInnerDataBalancesInner + +class TestSnapshotSpotSnapshotVosInnerDataBalancesInner(unittest.TestCase): + """SnapshotSpotSnapshotVosInnerDataBalancesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotSpotSnapshotVosInnerDataBalancesInner: + """Test SnapshotSpotSnapshotVosInnerDataBalancesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotSpotSnapshotVosInnerDataBalancesInner` + """ + model = SnapshotSpotSnapshotVosInnerDataBalancesInner() + if include_optional: + return SnapshotSpotSnapshotVosInnerDataBalancesInner( + asset = 'BTC', + free = '0.2', + locked = '0.001' + ) + else: + return SnapshotSpotSnapshotVosInnerDataBalancesInner( + asset = 'BTC', + free = '0.2', + locked = '0.001', + ) + """ + + def testSnapshotSpotSnapshotVosInnerDataBalancesInner(self): + """Test SnapshotSpotSnapshotVosInnerDataBalancesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_spot_algo_api.py b/target/python/binance_openapi/test/test_spot_algo_api.py new file mode 100644 index 0000000..9604a7f --- /dev/null +++ b/target/python/binance_openapi/test/test_spot_algo_api.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.spot_algo_api import SpotAlgoApi + + +class TestSpotAlgoApi(unittest.TestCase): + """SpotAlgoApi unit test stubs""" + + def setUp(self) -> None: + self.api = SpotAlgoApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_algo_spot_historical_orders_get(self) -> None: + """Test case for sapi_v1_algo_spot_historical_orders_get + + Query Historical Algo Orders + """ + pass + + def test_sapi_v1_algo_spot_new_order_twap_post(self) -> None: + """Test case for sapi_v1_algo_spot_new_order_twap_post + + Time-Weighted Average Price (Twap) New Order + """ + pass + + def test_sapi_v1_algo_spot_open_orders_get(self) -> None: + """Test case for sapi_v1_algo_spot_open_orders_get + + Query Current Algo Open Orders + """ + pass + + def test_sapi_v1_algo_spot_order_delete(self) -> None: + """Test case for sapi_v1_algo_spot_order_delete + + Cancel Algo Order + """ + pass + + def test_sapi_v1_algo_spot_sub_orders_get(self) -> None: + """Test case for sapi_v1_algo_spot_sub_orders_get + + Query Sub Orders + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_staking_api.py b/target/python/binance_openapi/test/test_staking_api.py new file mode 100644 index 0000000..a894563 --- /dev/null +++ b/target/python/binance_openapi/test/test_staking_api.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.staking_api import StakingApi + + +class TestStakingApi(unittest.TestCase): + """StakingApi unit test stubs""" + + def setUp(self) -> None: + self.api = StakingApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_eth_staking_eth_history_rate_history_get(self) -> None: + """Test case for sapi_v1_eth_staking_eth_history_rate_history_get + + Get WBETH Rate History (USER_DATA) + """ + pass + + def test_sapi_v1_eth_staking_eth_history_redemption_history_get(self) -> None: + """Test case for sapi_v1_eth_staking_eth_history_redemption_history_get + + Get ETH redemption history (USER_DATA) + """ + pass + + def test_sapi_v1_eth_staking_eth_history_rewards_history_get(self) -> None: + """Test case for sapi_v1_eth_staking_eth_history_rewards_history_get + + Get BETH rewards distribution history(USER_DATA) + """ + pass + + def test_sapi_v1_eth_staking_eth_history_staking_history_get(self) -> None: + """Test case for sapi_v1_eth_staking_eth_history_staking_history_get + + Get ETH staking history (USER_DATA) + """ + pass + + def test_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get(self) -> None: + """Test case for sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get + + Get WBETH rewards history(USER_DATA) + """ + pass + + def test_sapi_v1_eth_staking_eth_quota_get(self) -> None: + """Test case for sapi_v1_eth_staking_eth_quota_get + + Get current ETH staking quota (USER_DATA) + """ + pass + + def test_sapi_v1_eth_staking_eth_redeem_post(self) -> None: + """Test case for sapi_v1_eth_staking_eth_redeem_post + + Redeem ETH (TRADE) + """ + pass + + def test_sapi_v1_eth_staking_wbeth_history_unwrap_history_get(self) -> None: + """Test case for sapi_v1_eth_staking_wbeth_history_unwrap_history_get + + Get WBETH unwrap history (USER_DATA) + """ + pass + + def test_sapi_v1_eth_staking_wbeth_history_wrap_history_get(self) -> None: + """Test case for sapi_v1_eth_staking_wbeth_history_wrap_history_get + + Get WBETH wrap history (USER_DATA) + """ + pass + + def test_sapi_v1_eth_staking_wbeth_wrap_post(self) -> None: + """Test case for sapi_v1_eth_staking_wbeth_wrap_post + + Wrap BETH(TRADE) + """ + pass + + def test_sapi_v2_eth_staking_account_get(self) -> None: + """Test case for sapi_v2_eth_staking_account_get + + ETH Staking account V2(USER_DATA) + """ + pass + + def test_sapi_v2_eth_staking_eth_stake_post(self) -> None: + """Test case for sapi_v2_eth_staking_eth_stake_post + + Subscribe ETH Staking V2(TRADE) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_stream_api.py b/target/python/binance_openapi/test/test_stream_api.py new file mode 100644 index 0000000..5e66a7e --- /dev/null +++ b/target/python/binance_openapi/test/test_stream_api.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.stream_api import StreamApi + + +class TestStreamApi(unittest.TestCase): + """StreamApi unit test stubs""" + + def setUp(self) -> None: + self.api = StreamApi() + + def tearDown(self) -> None: + pass + + def test_api_v3_user_data_stream_delete(self) -> None: + """Test case for api_v3_user_data_stream_delete + + Close a ListenKey (USER_STREAM) + """ + pass + + def test_api_v3_user_data_stream_post(self) -> None: + """Test case for api_v3_user_data_stream_post + + Create a ListenKey (USER_STREAM) + """ + pass + + def test_api_v3_user_data_stream_put(self) -> None: + """Test case for api_v3_user_data_stream_put + + Ping/Keep-alive a ListenKey (USER_STREAM) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sub_account_api.py b/target/python/binance_openapi/test/test_sub_account_api.py new file mode 100644 index 0000000..1ccf77e --- /dev/null +++ b/target/python/binance_openapi/test/test_sub_account_api.py @@ -0,0 +1,346 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.sub_account_api import SubAccountApi + + +class TestSubAccountApi(unittest.TestCase): + """SubAccountApi unit test stubs""" + + def setUp(self) -> None: + self.api = SubAccountApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_capital_deposit_sub_address_get(self) -> None: + """Test case for sapi_v1_capital_deposit_sub_address_get + + Sub-account Spot Assets Summary (For Master Account) + """ + pass + + def test_sapi_v1_capital_deposit_sub_hisrec_get(self) -> None: + """Test case for sapi_v1_capital_deposit_sub_hisrec_get + + Sub-account Deposit History (For Master Account) + """ + pass + + def test_sapi_v1_managed_subaccount_account_snapshot_get(self) -> None: + """Test case for sapi_v1_managed_subaccount_account_snapshot_get + + Managed sub-account snapshot (For Investor Master Account) + """ + pass + + def test_sapi_v1_managed_subaccount_asset_get(self) -> None: + """Test case for sapi_v1_managed_subaccount_asset_get + + Managed sub-account asset details(For Investor Master Account) + """ + pass + + def test_sapi_v1_managed_subaccount_deposit_address_get(self) -> None: + """Test case for sapi_v1_managed_subaccount_deposit_address_get + + Get Managed Sub-account Deposit Address (For Investor Master Account) + """ + pass + + def test_sapi_v1_managed_subaccount_deposit_post(self) -> None: + """Test case for sapi_v1_managed_subaccount_deposit_post + + Deposit assets into the managed sub-account(For Investor Master Account) + """ + pass + + def test_sapi_v1_managed_subaccount_fetch_future_asset_get(self) -> None: + """Test case for sapi_v1_managed_subaccount_fetch_future_asset_get + + Query Managed Sub-account Futures Asset Details (For Investor Master Account) + """ + pass + + def test_sapi_v1_managed_subaccount_info_get(self) -> None: + """Test case for sapi_v1_managed_subaccount_info_get + + Query Managed Sub-account List (For Investor) + """ + pass + + def test_sapi_v1_managed_subaccount_margin_asset_get(self) -> None: + """Test case for sapi_v1_managed_subaccount_margin_asset_get + + Query Managed Sub-account Margin Asset Details (For Investor Master Account) + """ + pass + + def test_sapi_v1_managed_subaccount_query_trans_log_for_investor_get(self) -> None: + """Test case for sapi_v1_managed_subaccount_query_trans_log_for_investor_get + + Query Managed Sub Account Transfer Log (For Investor Master Account) + """ + pass + + def test_sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get(self) -> None: + """Test case for sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get + + Query Managed Sub Account Transfer Log (For Trading Team Master Account) + """ + pass + + def test_sapi_v1_managed_subaccount_query_trans_log_get(self) -> None: + """Test case for sapi_v1_managed_subaccount_query_trans_log_get + + Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA) + """ + pass + + def test_sapi_v1_managed_subaccount_withdraw_post(self) -> None: + """Test case for sapi_v1_managed_subaccount_withdraw_post + + Withdrawl assets from the managed sub-account(For Investor Master Account) + """ + pass + + def test_sapi_v1_sub_account_blvt_enable_post(self) -> None: + """Test case for sapi_v1_sub_account_blvt_enable_post + + Enable Leverage Token for Sub-account (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_eoptions_enable_post(self) -> None: + """Test case for sapi_v1_sub_account_eoptions_enable_post + + Enable Options for Sub-account (For Master Account)(USER_DATA) + """ + pass + + def test_sapi_v1_sub_account_futures_account_get(self) -> None: + """Test case for sapi_v1_sub_account_futures_account_get + + Detail on Sub-account's Futures Account (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_futures_account_summary_get(self) -> None: + """Test case for sapi_v1_sub_account_futures_account_summary_get + + Summary of Sub-account's Futures Account (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_futures_enable_post(self) -> None: + """Test case for sapi_v1_sub_account_futures_enable_post + + Enable Futures for Sub-account (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_futures_internal_transfer_get(self) -> None: + """Test case for sapi_v1_sub_account_futures_internal_transfer_get + + Sub-account Futures Asset Transfer History (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_futures_internal_transfer_post(self) -> None: + """Test case for sapi_v1_sub_account_futures_internal_transfer_post + + Sub-account Futures Asset Transfer (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_futures_position_risk_get(self) -> None: + """Test case for sapi_v1_sub_account_futures_position_risk_get + + Futures Position-Risk of Sub-account (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_futures_transfer_post(self) -> None: + """Test case for sapi_v1_sub_account_futures_transfer_post + + Transfer for Sub-account (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_list_get(self) -> None: + """Test case for sapi_v1_sub_account_list_get + + Query Sub-account List (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_margin_account_get(self) -> None: + """Test case for sapi_v1_sub_account_margin_account_get + + Detail on Sub-account's Margin Account (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_margin_account_summary_get(self) -> None: + """Test case for sapi_v1_sub_account_margin_account_summary_get + + Summary of Sub-account's Margin Account (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_margin_enable_post(self) -> None: + """Test case for sapi_v1_sub_account_margin_enable_post + + Enable Margin for Sub-account (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_margin_transfer_post(self) -> None: + """Test case for sapi_v1_sub_account_margin_transfer_post + + Margin Transfer for Sub-account (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_spot_summary_get(self) -> None: + """Test case for sapi_v1_sub_account_spot_summary_get + + Sub-account Spot Assets Summary (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_status_get(self) -> None: + """Test case for sapi_v1_sub_account_status_get + + Sub-account's Status on Margin/Futures (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_sub_account_api_ip_restriction_get(self) -> None: + """Test case for sapi_v1_sub_account_sub_account_api_ip_restriction_get + + Get IP Restriction for a Sub-account API Key (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete(self) -> None: + """Test case for sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete + + Delete IP List for a Sub-account API Key (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_sub_transfer_history_get(self) -> None: + """Test case for sapi_v1_sub_account_sub_transfer_history_get + + Sub-account Spot Asset Transfer History (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_transaction_statistics_get(self) -> None: + """Test case for sapi_v1_sub_account_transaction_statistics_get + + Query Sub-account Transaction Statistics (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_transfer_sub_to_master_post(self) -> None: + """Test case for sapi_v1_sub_account_transfer_sub_to_master_post + + Transfer to Master (For Sub-account) + """ + pass + + def test_sapi_v1_sub_account_transfer_sub_to_sub_post(self) -> None: + """Test case for sapi_v1_sub_account_transfer_sub_to_sub_post + + Transfer to Sub-account of Same Master (For Sub-account) + """ + pass + + def test_sapi_v1_sub_account_transfer_sub_user_history_get(self) -> None: + """Test case for sapi_v1_sub_account_transfer_sub_user_history_get + + Sub-account Transfer History (For Sub-account) + """ + pass + + def test_sapi_v1_sub_account_universal_transfer_get(self) -> None: + """Test case for sapi_v1_sub_account_universal_transfer_get + + Universal Transfer History (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_universal_transfer_post(self) -> None: + """Test case for sapi_v1_sub_account_universal_transfer_post + + Universal Transfer (For Master Account) + """ + pass + + def test_sapi_v1_sub_account_virtual_sub_account_post(self) -> None: + """Test case for sapi_v1_sub_account_virtual_sub_account_post + + Create a Virtual Sub-account(For Master Account) + """ + pass + + def test_sapi_v2_sub_account_futures_account_get(self) -> None: + """Test case for sapi_v2_sub_account_futures_account_get + + Detail on Sub-account's Futures Account V2 (For Master Account) + """ + pass + + def test_sapi_v2_sub_account_futures_account_summary_get(self) -> None: + """Test case for sapi_v2_sub_account_futures_account_summary_get + + Summary of Sub-account's Futures Account V2 (For Master Account) + """ + pass + + def test_sapi_v2_sub_account_futures_position_risk_get(self) -> None: + """Test case for sapi_v2_sub_account_futures_position_risk_get + + Futures Position-Risk of Sub-account V2 (For Master Account) + """ + pass + + def test_sapi_v2_sub_account_sub_account_api_ip_restriction_post(self) -> None: + """Test case for sapi_v2_sub_account_sub_account_api_ip_restriction_post + + Update IP Restriction for Sub-Account API key (For Master Account) + """ + pass + + def test_sapi_v3_sub_account_assets_get(self) -> None: + """Test case for sapi_v3_sub_account_assets_get + + Sub-account Assets (For Master Account) + """ + pass + + def test_sapi_v4_sub_account_assets_get(self) -> None: + """Test case for sapi_v4_sub_account_assets_get + + Query Sub-account Assets (For Master Account) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sub_account_coin_futures_details.py b/target/python/binance_openapi/test/test_sub_account_coin_futures_details.py new file mode 100644 index 0000000..1068dfe --- /dev/null +++ b/target/python/binance_openapi/test/test_sub_account_coin_futures_details.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sub_account_coin_futures_details import SubAccountCOINFuturesDetails + +class TestSubAccountCOINFuturesDetails(unittest.TestCase): + """SubAccountCOINFuturesDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubAccountCOINFuturesDetails: + """Test SubAccountCOINFuturesDetails + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubAccountCOINFuturesDetails` + """ + model = SubAccountCOINFuturesDetails() + if include_optional: + return SubAccountCOINFuturesDetails( + email = 'abc@test.com', + assets = [ + openapi_client.models.sub_account_coin_futures_details_assets_inner.subAccountCOINFuturesDetails_assets_inner( + asset = 'BTC', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000', ) + ], + can_deposit = True, + can_trade = True, + can_withdraw = True, + fee_tier = 2, + update_time = 1598959682001 + ) + else: + return SubAccountCOINFuturesDetails( + email = 'abc@test.com', + assets = [ + openapi_client.models.sub_account_coin_futures_details_assets_inner.subAccountCOINFuturesDetails_assets_inner( + asset = 'BTC', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000', ) + ], + can_deposit = True, + can_trade = True, + can_withdraw = True, + fee_tier = 2, + update_time = 1598959682001, + ) + """ + + def testSubAccountCOINFuturesDetails(self): + """Test SubAccountCOINFuturesDetails""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sub_account_coin_futures_details_assets_inner.py b/target/python/binance_openapi/test/test_sub_account_coin_futures_details_assets_inner.py new file mode 100644 index 0000000..0de7d15 --- /dev/null +++ b/target/python/binance_openapi/test/test_sub_account_coin_futures_details_assets_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sub_account_coin_futures_details_assets_inner import SubAccountCOINFuturesDetailsAssetsInner + +class TestSubAccountCOINFuturesDetailsAssetsInner(unittest.TestCase): + """SubAccountCOINFuturesDetailsAssetsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubAccountCOINFuturesDetailsAssetsInner: + """Test SubAccountCOINFuturesDetailsAssetsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubAccountCOINFuturesDetailsAssetsInner` + """ + model = SubAccountCOINFuturesDetailsAssetsInner() + if include_optional: + return SubAccountCOINFuturesDetailsAssetsInner( + asset = 'BTC', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000' + ) + else: + return SubAccountCOINFuturesDetailsAssetsInner( + asset = 'BTC', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000', + ) + """ + + def testSubAccountCOINFuturesDetailsAssetsInner(self): + """Test SubAccountCOINFuturesDetailsAssetsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sub_account_coin_futures_position_risk.py b/target/python/binance_openapi/test/test_sub_account_coin_futures_position_risk.py new file mode 100644 index 0000000..613589a --- /dev/null +++ b/target/python/binance_openapi/test/test_sub_account_coin_futures_position_risk.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sub_account_coin_futures_position_risk import SubAccountCOINFuturesPositionRisk + +class TestSubAccountCOINFuturesPositionRisk(unittest.TestCase): + """SubAccountCOINFuturesPositionRisk unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubAccountCOINFuturesPositionRisk: + """Test SubAccountCOINFuturesPositionRisk + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubAccountCOINFuturesPositionRisk` + """ + model = SubAccountCOINFuturesPositionRisk() + if include_optional: + return SubAccountCOINFuturesPositionRisk( + delivery_position_risk_vos = [ + openapi_client.models.sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.subAccountCOINFuturesPositionRisk_deliveryPositionRiskVos_inner( + entry_price = '9975.12000', + mark_price = '9973.50770517', + leverage = '20', + isolated = 'false', + isolated_wallet = '9973.50770517', + isolated_margin = '0.00000000', + is_auto_add_margin = 'false', + position_side = 'BOTH', + position_amount = '1.230', + symbol = 'BTCUSD_201225', + unrealized_profit = '-0.01612295', ) + ] + ) + else: + return SubAccountCOINFuturesPositionRisk( + delivery_position_risk_vos = [ + openapi_client.models.sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.subAccountCOINFuturesPositionRisk_deliveryPositionRiskVos_inner( + entry_price = '9975.12000', + mark_price = '9973.50770517', + leverage = '20', + isolated = 'false', + isolated_wallet = '9973.50770517', + isolated_margin = '0.00000000', + is_auto_add_margin = 'false', + position_side = 'BOTH', + position_amount = '1.230', + symbol = 'BTCUSD_201225', + unrealized_profit = '-0.01612295', ) + ], + ) + """ + + def testSubAccountCOINFuturesPositionRisk(self): + """Test SubAccountCOINFuturesPositionRisk""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.py b/target/python/binance_openapi/test/test_sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.py new file mode 100644 index 0000000..ccd3d35 --- /dev/null +++ b/target/python/binance_openapi/test/test_sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner import SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner + +class TestSubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner(unittest.TestCase): + """SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner: + """Test SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner` + """ + model = SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner() + if include_optional: + return SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner( + entry_price = '9975.12000', + mark_price = '9973.50770517', + leverage = '20', + isolated = 'false', + isolated_wallet = '9973.50770517', + isolated_margin = '0.00000000', + is_auto_add_margin = 'false', + position_side = 'BOTH', + position_amount = '1.230', + symbol = 'BTCUSD_201225', + unrealized_profit = '-0.01612295' + ) + else: + return SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner( + entry_price = '9975.12000', + mark_price = '9973.50770517', + leverage = '20', + isolated = 'false', + isolated_wallet = '9973.50770517', + isolated_margin = '0.00000000', + is_auto_add_margin = 'false', + position_side = 'BOTH', + position_amount = '1.230', + symbol = 'BTCUSD_201225', + unrealized_profit = '-0.01612295', + ) + """ + + def testSubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner(self): + """Test SubAccountCOINFuturesPositionRiskDeliveryPositionRiskVosInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sub_account_coin_futures_summary.py b/target/python/binance_openapi/test/test_sub_account_coin_futures_summary.py new file mode 100644 index 0000000..b7d89c1 --- /dev/null +++ b/target/python/binance_openapi/test/test_sub_account_coin_futures_summary.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sub_account_coin_futures_summary import SubAccountCOINFuturesSummary + +class TestSubAccountCOINFuturesSummary(unittest.TestCase): + """SubAccountCOINFuturesSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubAccountCOINFuturesSummary: + """Test SubAccountCOINFuturesSummary + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubAccountCOINFuturesSummary` + """ + model = SubAccountCOINFuturesSummary() + if include_optional: + return SubAccountCOINFuturesSummary( + delivery_account_summary_resp = openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp.subAccountCOINFuturesSummary_deliveryAccountSummaryResp( + total_margin_balance_of_btc = '25.03221121', + total_unrealized_profit_of_btc = '0.1223341', + total_wallet_balance_of_btc = '22.15879444', + asset = 'BTC', + sub_account_list = [ + openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.subAccountCOINFuturesSummary_deliveryAccountSummaryResp_subAccountList_inner( + email = '123@test.com', + total_margin_balance = '22.12659734', + total_unrealized_profit = '0.0', + total_wallet_balance = '22.12659734', + asset = 'BTC', ) + ], ) + ) + else: + return SubAccountCOINFuturesSummary( + delivery_account_summary_resp = openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp.subAccountCOINFuturesSummary_deliveryAccountSummaryResp( + total_margin_balance_of_btc = '25.03221121', + total_unrealized_profit_of_btc = '0.1223341', + total_wallet_balance_of_btc = '22.15879444', + asset = 'BTC', + sub_account_list = [ + openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.subAccountCOINFuturesSummary_deliveryAccountSummaryResp_subAccountList_inner( + email = '123@test.com', + total_margin_balance = '22.12659734', + total_unrealized_profit = '0.0', + total_wallet_balance = '22.12659734', + asset = 'BTC', ) + ], ), + ) + """ + + def testSubAccountCOINFuturesSummary(self): + """Test SubAccountCOINFuturesSummary""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sub_account_coin_futures_summary_delivery_account_summary_resp.py b/target/python/binance_openapi/test/test_sub_account_coin_futures_summary_delivery_account_summary_resp.py new file mode 100644 index 0000000..8a5da32 --- /dev/null +++ b/target/python/binance_openapi/test/test_sub_account_coin_futures_summary_delivery_account_summary_resp.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp import SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp + +class TestSubAccountCOINFuturesSummaryDeliveryAccountSummaryResp(unittest.TestCase): + """SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp: + """Test SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp` + """ + model = SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp() + if include_optional: + return SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp( + total_margin_balance_of_btc = '25.03221121', + total_unrealized_profit_of_btc = '0.1223341', + total_wallet_balance_of_btc = '22.15879444', + asset = 'BTC', + sub_account_list = [ + openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.subAccountCOINFuturesSummary_deliveryAccountSummaryResp_subAccountList_inner( + email = '123@test.com', + total_margin_balance = '22.12659734', + total_unrealized_profit = '0.0', + total_wallet_balance = '22.12659734', + asset = 'BTC', ) + ] + ) + else: + return SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp( + total_margin_balance_of_btc = '25.03221121', + total_unrealized_profit_of_btc = '0.1223341', + total_wallet_balance_of_btc = '22.15879444', + asset = 'BTC', + sub_account_list = [ + openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.subAccountCOINFuturesSummary_deliveryAccountSummaryResp_subAccountList_inner( + email = '123@test.com', + total_margin_balance = '22.12659734', + total_unrealized_profit = '0.0', + total_wallet_balance = '22.12659734', + asset = 'BTC', ) + ], + ) + """ + + def testSubAccountCOINFuturesSummaryDeliveryAccountSummaryResp(self): + """Test SubAccountCOINFuturesSummaryDeliveryAccountSummaryResp""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.py b/target/python/binance_openapi/test/test_sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.py new file mode 100644 index 0000000..fc68cc8 --- /dev/null +++ b/target/python/binance_openapi/test/test_sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner import SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner + +class TestSubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner(unittest.TestCase): + """SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner: + """Test SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner` + """ + model = SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner() + if include_optional: + return SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner( + email = '123@test.com', + total_margin_balance = '22.12659734', + total_unrealized_profit = '0.0', + total_wallet_balance = '22.12659734', + asset = 'BTC' + ) + else: + return SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner( + email = '123@test.com', + total_margin_balance = '22.12659734', + total_unrealized_profit = '0.0', + total_wallet_balance = '22.12659734', + asset = 'BTC', + ) + """ + + def testSubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner(self): + """Test SubAccountCOINFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sub_account_usdt_futures_details.py b/target/python/binance_openapi/test/test_sub_account_usdt_futures_details.py new file mode 100644 index 0000000..ee210c8 --- /dev/null +++ b/target/python/binance_openapi/test/test_sub_account_usdt_futures_details.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sub_account_usdt_futures_details import SubAccountUSDTFuturesDetails + +class TestSubAccountUSDTFuturesDetails(unittest.TestCase): + """SubAccountUSDTFuturesDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubAccountUSDTFuturesDetails: + """Test SubAccountUSDTFuturesDetails + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubAccountUSDTFuturesDetails` + """ + model = SubAccountUSDTFuturesDetails() + if include_optional: + return SubAccountUSDTFuturesDetails( + future_account_resp = openapi_client.models.sub_account_usdt_futures_details_future_account_resp.subAccountUSDTFuturesDetails_futureAccountResp( + email = 'abc@test.com', + assets = [ + openapi_client.models._sapi_v1_sub_account_futures_account_get_200_response_assets_inner._sapi_v1_sub_account_futures_account_get_200_response_assets_inner( + asset = 'USDT', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000', ) + ], + can_deposit = True, + can_trade = True, + can_withdraw = True, + fee_tier = 2, + max_withdraw_amount = '0.88308000', + total_initial_margin = '0.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '0.88308000', + total_open_order_initial_margin = '0.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '0.88308000', + update_time = 1576756674610, ) + ) + else: + return SubAccountUSDTFuturesDetails( + future_account_resp = openapi_client.models.sub_account_usdt_futures_details_future_account_resp.subAccountUSDTFuturesDetails_futureAccountResp( + email = 'abc@test.com', + assets = [ + openapi_client.models._sapi_v1_sub_account_futures_account_get_200_response_assets_inner._sapi_v1_sub_account_futures_account_get_200_response_assets_inner( + asset = 'USDT', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000', ) + ], + can_deposit = True, + can_trade = True, + can_withdraw = True, + fee_tier = 2, + max_withdraw_amount = '0.88308000', + total_initial_margin = '0.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '0.88308000', + total_open_order_initial_margin = '0.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '0.88308000', + update_time = 1576756674610, ), + ) + """ + + def testSubAccountUSDTFuturesDetails(self): + """Test SubAccountUSDTFuturesDetails""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sub_account_usdt_futures_details_future_account_resp.py b/target/python/binance_openapi/test/test_sub_account_usdt_futures_details_future_account_resp.py new file mode 100644 index 0000000..00f96f5 --- /dev/null +++ b/target/python/binance_openapi/test/test_sub_account_usdt_futures_details_future_account_resp.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sub_account_usdt_futures_details_future_account_resp import SubAccountUSDTFuturesDetailsFutureAccountResp + +class TestSubAccountUSDTFuturesDetailsFutureAccountResp(unittest.TestCase): + """SubAccountUSDTFuturesDetailsFutureAccountResp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubAccountUSDTFuturesDetailsFutureAccountResp: + """Test SubAccountUSDTFuturesDetailsFutureAccountResp + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubAccountUSDTFuturesDetailsFutureAccountResp` + """ + model = SubAccountUSDTFuturesDetailsFutureAccountResp() + if include_optional: + return SubAccountUSDTFuturesDetailsFutureAccountResp( + email = 'abc@test.com', + assets = [ + openapi_client.models._sapi_v1_sub_account_futures_account_get_200_response_assets_inner._sapi_v1_sub_account_futures_account_get_200_response_assets_inner( + asset = 'USDT', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000', ) + ], + can_deposit = True, + can_trade = True, + can_withdraw = True, + fee_tier = 2, + max_withdraw_amount = '0.88308000', + total_initial_margin = '0.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '0.88308000', + total_open_order_initial_margin = '0.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '0.88308000', + update_time = 1576756674610 + ) + else: + return SubAccountUSDTFuturesDetailsFutureAccountResp( + email = 'abc@test.com', + assets = [ + openapi_client.models._sapi_v1_sub_account_futures_account_get_200_response_assets_inner._sapi_v1_sub_account_futures_account_get_200_response_assets_inner( + asset = 'USDT', + initial_margin = '0.00000000', + maintenance_margin = '0.00000000', + margin_balance = '0.88308000', + max_withdraw_amount = '0.88308000', + open_order_initial_margin = '0.00000000', + position_initial_margin = '0.00000000', + unrealized_profit = '0.00000000', + wallet_balance = '0.88308000', ) + ], + can_deposit = True, + can_trade = True, + can_withdraw = True, + fee_tier = 2, + max_withdraw_amount = '0.88308000', + total_initial_margin = '0.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '0.88308000', + total_open_order_initial_margin = '0.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '0.88308000', + update_time = 1576756674610, + ) + """ + + def testSubAccountUSDTFuturesDetailsFutureAccountResp(self): + """Test SubAccountUSDTFuturesDetailsFutureAccountResp""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sub_account_usdt_futures_position_risk.py b/target/python/binance_openapi/test/test_sub_account_usdt_futures_position_risk.py new file mode 100644 index 0000000..8676d3b --- /dev/null +++ b/target/python/binance_openapi/test/test_sub_account_usdt_futures_position_risk.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sub_account_usdt_futures_position_risk import SubAccountUSDTFuturesPositionRisk + +class TestSubAccountUSDTFuturesPositionRisk(unittest.TestCase): + """SubAccountUSDTFuturesPositionRisk unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubAccountUSDTFuturesPositionRisk: + """Test SubAccountUSDTFuturesPositionRisk + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubAccountUSDTFuturesPositionRisk` + """ + model = SubAccountUSDTFuturesPositionRisk() + if include_optional: + return SubAccountUSDTFuturesPositionRisk( + future_position_risk_vos = [ + openapi_client.models._sapi_v1_sub_account_futures_position_risk_get_200_response_inner._sapi_v1_sub_account_futures_positionRisk_get_200_response_inner( + entry_price = '9975.12000', + leverage = '50', + max_notional = '1000000', + liquidation_price = '7963.54', + mark_price = '9973.50770517', + position_amount = '0.010', + symbol = 'BTCUSDT', + unrealized_profit = '-0.01612295', ) + ] + ) + else: + return SubAccountUSDTFuturesPositionRisk( + future_position_risk_vos = [ + openapi_client.models._sapi_v1_sub_account_futures_position_risk_get_200_response_inner._sapi_v1_sub_account_futures_positionRisk_get_200_response_inner( + entry_price = '9975.12000', + leverage = '50', + max_notional = '1000000', + liquidation_price = '7963.54', + mark_price = '9973.50770517', + position_amount = '0.010', + symbol = 'BTCUSDT', + unrealized_profit = '-0.01612295', ) + ], + ) + """ + + def testSubAccountUSDTFuturesPositionRisk(self): + """Test SubAccountUSDTFuturesPositionRisk""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sub_account_usdt_futures_summary.py b/target/python/binance_openapi/test/test_sub_account_usdt_futures_summary.py new file mode 100644 index 0000000..6c67ad6 --- /dev/null +++ b/target/python/binance_openapi/test/test_sub_account_usdt_futures_summary.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sub_account_usdt_futures_summary import SubAccountUSDTFuturesSummary + +class TestSubAccountUSDTFuturesSummary(unittest.TestCase): + """SubAccountUSDTFuturesSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubAccountUSDTFuturesSummary: + """Test SubAccountUSDTFuturesSummary + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubAccountUSDTFuturesSummary` + """ + model = SubAccountUSDTFuturesSummary() + if include_optional: + return SubAccountUSDTFuturesSummary( + future_account_summary_resp = openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp.subAccountUSDTFuturesSummary_futureAccountSummaryResp( + total_initial_margin = '9.83137400', + total_maintenance_margin = '0.41568700', + total_margin_balance = '23.03235621', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.83137400', + total_unrealized_profit = '0.03219710', + total_wallet_balance = '22.15879444', + asset = 'USD', + sub_account_list = [ + openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.subAccountUSDTFuturesSummary_futureAccountSummaryResp_subAccountList_inner( + email = '123@test.com', + total_initial_margin = '9.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '22.12659734', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '22.12659734', + asset = 'USD', ) + ], ) + ) + else: + return SubAccountUSDTFuturesSummary( + future_account_summary_resp = openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp.subAccountUSDTFuturesSummary_futureAccountSummaryResp( + total_initial_margin = '9.83137400', + total_maintenance_margin = '0.41568700', + total_margin_balance = '23.03235621', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.83137400', + total_unrealized_profit = '0.03219710', + total_wallet_balance = '22.15879444', + asset = 'USD', + sub_account_list = [ + openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.subAccountUSDTFuturesSummary_futureAccountSummaryResp_subAccountList_inner( + email = '123@test.com', + total_initial_margin = '9.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '22.12659734', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '22.12659734', + asset = 'USD', ) + ], ), + ) + """ + + def testSubAccountUSDTFuturesSummary(self): + """Test SubAccountUSDTFuturesSummary""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sub_account_usdt_futures_summary_future_account_summary_resp.py b/target/python/binance_openapi/test/test_sub_account_usdt_futures_summary_future_account_summary_resp.py new file mode 100644 index 0000000..df2116a --- /dev/null +++ b/target/python/binance_openapi/test/test_sub_account_usdt_futures_summary_future_account_summary_resp.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp import SubAccountUSDTFuturesSummaryFutureAccountSummaryResp + +class TestSubAccountUSDTFuturesSummaryFutureAccountSummaryResp(unittest.TestCase): + """SubAccountUSDTFuturesSummaryFutureAccountSummaryResp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubAccountUSDTFuturesSummaryFutureAccountSummaryResp: + """Test SubAccountUSDTFuturesSummaryFutureAccountSummaryResp + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubAccountUSDTFuturesSummaryFutureAccountSummaryResp` + """ + model = SubAccountUSDTFuturesSummaryFutureAccountSummaryResp() + if include_optional: + return SubAccountUSDTFuturesSummaryFutureAccountSummaryResp( + total_initial_margin = '9.83137400', + total_maintenance_margin = '0.41568700', + total_margin_balance = '23.03235621', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.83137400', + total_unrealized_profit = '0.03219710', + total_wallet_balance = '22.15879444', + asset = 'USD', + sub_account_list = [ + openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.subAccountUSDTFuturesSummary_futureAccountSummaryResp_subAccountList_inner( + email = '123@test.com', + total_initial_margin = '9.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '22.12659734', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '22.12659734', + asset = 'USD', ) + ] + ) + else: + return SubAccountUSDTFuturesSummaryFutureAccountSummaryResp( + total_initial_margin = '9.83137400', + total_maintenance_margin = '0.41568700', + total_margin_balance = '23.03235621', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.83137400', + total_unrealized_profit = '0.03219710', + total_wallet_balance = '22.15879444', + asset = 'USD', + sub_account_list = [ + openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.subAccountUSDTFuturesSummary_futureAccountSummaryResp_subAccountList_inner( + email = '123@test.com', + total_initial_margin = '9.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '22.12659734', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '22.12659734', + asset = 'USD', ) + ], + ) + """ + + def testSubAccountUSDTFuturesSummaryFutureAccountSummaryResp(self): + """Test SubAccountUSDTFuturesSummaryFutureAccountSummaryResp""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.py b/target/python/binance_openapi/test/test_sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.py new file mode 100644 index 0000000..edc0bb4 --- /dev/null +++ b/target/python/binance_openapi/test/test_sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner import SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner + +class TestSubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner(unittest.TestCase): + """SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner: + """Test SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner` + """ + model = SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner() + if include_optional: + return SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner( + email = '123@test.com', + total_initial_margin = '9.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '22.12659734', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '22.12659734', + asset = 'USD' + ) + else: + return SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner( + email = '123@test.com', + total_initial_margin = '9.00000000', + total_maintenance_margin = '0.00000000', + total_margin_balance = '22.12659734', + total_open_order_initial_margin = '9.00000000', + total_position_initial_margin = '0.00000000', + total_unrealized_profit = '0.00000000', + total_wallet_balance = '22.12659734', + asset = 'USD', + ) + """ + + def testSubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner(self): + """Test SubAccountUSDTFuturesSummaryFutureAccountSummaryRespSubAccountListInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_ticker.py b/target/python/binance_openapi/test/test_ticker.py new file mode 100644 index 0000000..095f3d2 --- /dev/null +++ b/target/python/binance_openapi/test/test_ticker.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.ticker import Ticker + +class TestTicker(unittest.TestCase): + """Ticker unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Ticker: + """Test Ticker + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Ticker` + """ + model = Ticker() + if include_optional: + return Ticker( + symbol = 'BNBBTC', + price_change = '0.17160000', + price_change_percent = '1.060', + prev_close_price = '16.35920000', + last_price = '27.84000000', + bid_price = '16.34488284', + bid_qty = '16.34488284', + ask_price = '16.35920000', + ask_qty = '25.06000000', + open_price = '16.18760000', + high_price = '16.55000000', + low_price = '16.16940000', + volume = '1678279.95000000', + quote_volume = '27431289.14792300', + open_time = 1592808788637, + close_time = 1592895188637, + first_id = 62683296, + last_id = 62739253, + count = 55958 + ) + else: + return Ticker( + symbol = 'BNBBTC', + price_change = '0.17160000', + price_change_percent = '1.060', + prev_close_price = '16.35920000', + last_price = '27.84000000', + bid_price = '16.34488284', + bid_qty = '16.34488284', + ask_price = '16.35920000', + ask_qty = '25.06000000', + open_price = '16.18760000', + high_price = '16.55000000', + low_price = '16.16940000', + volume = '1678279.95000000', + quote_volume = '27431289.14792300', + open_time = 1592808788637, + close_time = 1592895188637, + first_id = 62683296, + last_id = 62739253, + count = 55958, + ) + """ + + def testTicker(self): + """Test Ticker""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_trade.py b/target/python/binance_openapi/test/test_trade.py new file mode 100644 index 0000000..6802368 --- /dev/null +++ b/target/python/binance_openapi/test/test_trade.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.trade import Trade + +class TestTrade(unittest.TestCase): + """Trade unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Trade: + """Test Trade + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Trade` + """ + model = Trade() + if include_optional: + return Trade( + id = 345196462, + price = '9638.99000000', + qty = '0.02077200', + quote_qty = '0.02077200', + time = 1592887772684, + is_buyer_maker = True, + is_best_match = True + ) + else: + return Trade( + id = 345196462, + price = '9638.99000000', + qty = '0.02077200', + quote_qty = '0.02077200', + time = 1592887772684, + is_buyer_maker = True, + is_best_match = True, + ) + """ + + def testTrade(self): + """Test Trade""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_trade_api.py b/target/python/binance_openapi/test/test_trade_api.py new file mode 100644 index 0000000..913966f --- /dev/null +++ b/target/python/binance_openapi/test/test_trade_api.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.trade_api import TradeApi + + +class TestTradeApi(unittest.TestCase): + """TradeApi unit test stubs""" + + def setUp(self) -> None: + self.api = TradeApi() + + def tearDown(self) -> None: + pass + + def test_api_v3_account_commission_get(self) -> None: + """Test case for api_v3_account_commission_get + + Query Commission Rates (USER_DATA) + """ + pass + + def test_api_v3_account_get(self) -> None: + """Test case for api_v3_account_get + + Account Information (USER_DATA) + """ + pass + + def test_api_v3_all_order_list_get(self) -> None: + """Test case for api_v3_all_order_list_get + + Query all OCO (USER_DATA) + """ + pass + + def test_api_v3_all_orders_get(self) -> None: + """Test case for api_v3_all_orders_get + + All Orders (USER_DATA) + """ + pass + + def test_api_v3_my_allocations_get(self) -> None: + """Test case for api_v3_my_allocations_get + + Query Allocations (USER_DATA) + """ + pass + + def test_api_v3_my_prevented_matches_get(self) -> None: + """Test case for api_v3_my_prevented_matches_get + + Query Prevented Matches + """ + pass + + def test_api_v3_my_trades_get(self) -> None: + """Test case for api_v3_my_trades_get + + Account Trade List (USER_DATA) + """ + pass + + def test_api_v3_open_order_list_get(self) -> None: + """Test case for api_v3_open_order_list_get + + Query Open OCO (USER_DATA) + """ + pass + + def test_api_v3_open_orders_delete(self) -> None: + """Test case for api_v3_open_orders_delete + + Cancel all Open Orders on a Symbol (TRADE) + """ + pass + + def test_api_v3_open_orders_get(self) -> None: + """Test case for api_v3_open_orders_get + + Current Open Orders (USER_DATA) + """ + pass + + def test_api_v3_order_cancel_replace_post(self) -> None: + """Test case for api_v3_order_cancel_replace_post + + Cancel an Existing Order and Send a New Order (Trade) + """ + pass + + def test_api_v3_order_delete(self) -> None: + """Test case for api_v3_order_delete + + Cancel Order (TRADE) + """ + pass + + def test_api_v3_order_get(self) -> None: + """Test case for api_v3_order_get + + Query Order (USER_DATA) + """ + pass + + def test_api_v3_order_list_delete(self) -> None: + """Test case for api_v3_order_list_delete + + Cancel OCO (TRADE) + """ + pass + + def test_api_v3_order_list_get(self) -> None: + """Test case for api_v3_order_list_get + + Query OCO (USER_DATA) + """ + pass + + def test_api_v3_order_oco_post(self) -> None: + """Test case for api_v3_order_oco_post + + New OCO (TRADE) + """ + pass + + def test_api_v3_order_post(self) -> None: + """Test case for api_v3_order_post + + New Order (TRADE) + """ + pass + + def test_api_v3_order_test_post(self) -> None: + """Test case for api_v3_order_test_post + + Test New Order (TRADE) + """ + pass + + def test_api_v3_rate_limit_order_get(self) -> None: + """Test case for api_v3_rate_limit_order_get + + Query Current Order Count Usage (TRADE) + """ + pass + + def test_api_v3_sor_order_post(self) -> None: + """Test case for api_v3_sor_order_post + + New order using SOR (TRADE) + """ + pass + + def test_api_v3_sor_order_test_post(self) -> None: + """Test case for api_v3_sor_order_test_post + + Test new order using SOR (TRADE) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_transaction.py b/target/python/binance_openapi/test/test_transaction.py new file mode 100644 index 0000000..588c6d3 --- /dev/null +++ b/target/python/binance_openapi/test/test_transaction.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.models.transaction import Transaction + +class TestTransaction(unittest.TestCase): + """Transaction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Transaction: + """Test Transaction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Transaction` + """ + model = Transaction() + if include_optional: + return Transaction( + tran_id = 345196462 + ) + else: + return Transaction( + tran_id = 345196462, + ) + """ + + def testTransaction(self): + """Test Transaction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_vip_loans_api.py b/target/python/binance_openapi/test/test_vip_loans_api.py new file mode 100644 index 0000000..22a68b0 --- /dev/null +++ b/target/python/binance_openapi/test/test_vip_loans_api.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.vip_loans_api import VIPLoansApi + + +class TestVIPLoansApi(unittest.TestCase): + """VIPLoansApi unit test stubs""" + + def setUp(self) -> None: + self.api = VIPLoansApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_loan_vip_borrow_post(self) -> None: + """Test case for sapi_v1_loan_vip_borrow_post + + VIP Loan Borrow + """ + pass + + def test_sapi_v1_loan_vip_collateral_account_get(self) -> None: + """Test case for sapi_v1_loan_vip_collateral_account_get + + Check Locked Value of VIP Collateral Account (USER_DATA) + """ + pass + + def test_sapi_v1_loan_vip_collateral_data_get(self) -> None: + """Test case for sapi_v1_loan_vip_collateral_data_get + + Get Collateral Asset Data (USER_DATA) + """ + pass + + def test_sapi_v1_loan_vip_loanable_data_get(self) -> None: + """Test case for sapi_v1_loan_vip_loanable_data_get + + Get Loanable Assets Data + """ + pass + + def test_sapi_v1_loan_vip_ongoing_orders_get(self) -> None: + """Test case for sapi_v1_loan_vip_ongoing_orders_get + + Get VIP Loan Ongoing Orders (USER_DATA) + """ + pass + + def test_sapi_v1_loan_vip_renew_post(self) -> None: + """Test case for sapi_v1_loan_vip_renew_post + + VIP Loan Renew + """ + pass + + def test_sapi_v1_loan_vip_repay_history_get(self) -> None: + """Test case for sapi_v1_loan_vip_repay_history_get + + Get VIP Loan Repayment History (USER_DATA) + """ + pass + + def test_sapi_v1_loan_vip_repay_post(self) -> None: + """Test case for sapi_v1_loan_vip_repay_post + + VIP Loan Repay (TRADE) + """ + pass + + def test_sapi_v1_loan_vip_request_data_get(self) -> None: + """Test case for sapi_v1_loan_vip_request_data_get + + Query Application Status (USER_DATA) + """ + pass + + def test_sapi_v1_loan_vip_request_interest_rate_get(self) -> None: + """Test case for sapi_v1_loan_vip_request_interest_rate_get + + Get Borrow Interest Rate (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/test/test_wallet_api.py b/target/python/binance_openapi/test/test_wallet_api.py new file mode 100644 index 0000000..0505416 --- /dev/null +++ b/target/python/binance_openapi/test/test_wallet_api.py @@ -0,0 +1,269 @@ +# coding: utf-8 + +""" + Binance Public Spot API + + OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from openapi_client.api.wallet_api import WalletApi + + +class TestWalletApi(unittest.TestCase): + """WalletApi unit test stubs""" + + def setUp(self) -> None: + self.api = WalletApi() + + def tearDown(self) -> None: + pass + + def test_sapi_v1_account_api_restrictions_get(self) -> None: + """Test case for sapi_v1_account_api_restrictions_get + + Get API Key Permission (USER_DATA) + """ + pass + + def test_sapi_v1_account_api_trading_status_get(self) -> None: + """Test case for sapi_v1_account_api_trading_status_get + + Account API Trading Status (USER_DATA) + """ + pass + + def test_sapi_v1_account_disable_fast_withdraw_switch_post(self) -> None: + """Test case for sapi_v1_account_disable_fast_withdraw_switch_post + + Disable Fast Withdraw Switch (USER_DATA) + """ + pass + + def test_sapi_v1_account_enable_fast_withdraw_switch_post(self) -> None: + """Test case for sapi_v1_account_enable_fast_withdraw_switch_post + + Enable Fast Withdraw Switch (USER_DATA) + """ + pass + + def test_sapi_v1_account_info_get(self) -> None: + """Test case for sapi_v1_account_info_get + + Account info (USER_DATA) + """ + pass + + def test_sapi_v1_account_snapshot_get(self) -> None: + """Test case for sapi_v1_account_snapshot_get + + Daily Account Snapshot (USER_DATA) + """ + pass + + def test_sapi_v1_account_status_get(self) -> None: + """Test case for sapi_v1_account_status_get + + Account Status (USER_DATA) + """ + pass + + def test_sapi_v1_asset_asset_detail_get(self) -> None: + """Test case for sapi_v1_asset_asset_detail_get + + Asset Detail (USER_DATA) + """ + pass + + def test_sapi_v1_asset_asset_dividend_get(self) -> None: + """Test case for sapi_v1_asset_asset_dividend_get + + Asset Dividend Record (USER_DATA) + """ + pass + + def test_sapi_v1_asset_convert_transfer_post(self) -> None: + """Test case for sapi_v1_asset_convert_transfer_post + + Convert Transfer (USER_DATA) + """ + pass + + def test_sapi_v1_asset_convert_transfer_query_by_page_get(self) -> None: + """Test case for sapi_v1_asset_convert_transfer_query_by_page_get + + Query Convert Transfer (USER_DATA) + """ + pass + + def test_sapi_v1_asset_custody_transfer_history_get(self) -> None: + """Test case for sapi_v1_asset_custody_transfer_history_get + + Query User Delegation History(For Master Account) (USER_DATA) + """ + pass + + def test_sapi_v1_asset_dribblet_get(self) -> None: + """Test case for sapi_v1_asset_dribblet_get + + DustLog(USER_DATA) + """ + pass + + def test_sapi_v1_asset_dust_btc_post(self) -> None: + """Test case for sapi_v1_asset_dust_btc_post + + Get Assets That Can Be Converted Into BNB (USER_DATA) + """ + pass + + def test_sapi_v1_asset_dust_post(self) -> None: + """Test case for sapi_v1_asset_dust_post + + Dust Transfer (USER_DATA) + """ + pass + + def test_sapi_v1_asset_get_funding_asset_post(self) -> None: + """Test case for sapi_v1_asset_get_funding_asset_post + + Funding Wallet (USER_DATA) + """ + pass + + def test_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get(self) -> None: + """Test case for sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get + + Get Cloud-Mining payment and refund history (USER_DATA) + """ + pass + + def test_sapi_v1_asset_trade_fee_get(self) -> None: + """Test case for sapi_v1_asset_trade_fee_get + + Trade Fee (USER_DATA) + """ + pass + + def test_sapi_v1_asset_transfer_get(self) -> None: + """Test case for sapi_v1_asset_transfer_get + + Query User Universal Transfer History (USER_DATA) + """ + pass + + def test_sapi_v1_asset_transfer_post(self) -> None: + """Test case for sapi_v1_asset_transfer_post + + User Universal Transfer (USER_DATA) + """ + pass + + def test_sapi_v1_asset_wallet_balance_get(self) -> None: + """Test case for sapi_v1_asset_wallet_balance_get + + Query User Wallet Balance (USER_DATA) + """ + pass + + def test_sapi_v1_capital_config_getall_get(self) -> None: + """Test case for sapi_v1_capital_config_getall_get + + All Coins' Information (USER_DATA) + """ + pass + + def test_sapi_v1_capital_contract_convertible_coins_get(self) -> None: + """Test case for sapi_v1_capital_contract_convertible_coins_get + + Query auto-converting stable coins (USER_DATA) + """ + pass + + def test_sapi_v1_capital_contract_convertible_coins_post(self) -> None: + """Test case for sapi_v1_capital_contract_convertible_coins_post + + Switch on/off BUSD and stable coins conversion (USER_DATA) (USER_DATA) + """ + pass + + def test_sapi_v1_capital_deposit_address_get(self) -> None: + """Test case for sapi_v1_capital_deposit_address_get + + Deposit Address (supporting network) (USER_DATA) + """ + pass + + def test_sapi_v1_capital_deposit_address_list_get(self) -> None: + """Test case for sapi_v1_capital_deposit_address_list_get + + Fetch deposit address list with network (USER_DATA) + """ + pass + + def test_sapi_v1_capital_deposit_credit_apply_post(self) -> None: + """Test case for sapi_v1_capital_deposit_credit_apply_post + + One click arrival deposit apply (USER_DATA) + """ + pass + + def test_sapi_v1_capital_deposit_hisrec_get(self) -> None: + """Test case for sapi_v1_capital_deposit_hisrec_get + + Deposit History(supporting network) (USER_DATA) + """ + pass + + def test_sapi_v1_capital_withdraw_address_list_get(self) -> None: + """Test case for sapi_v1_capital_withdraw_address_list_get + + Fetch withdraw address list (USER_DATA) + """ + pass + + def test_sapi_v1_capital_withdraw_apply_post(self) -> None: + """Test case for sapi_v1_capital_withdraw_apply_post + + Withdraw (USER_DATA) + """ + pass + + def test_sapi_v1_capital_withdraw_history_get(self) -> None: + """Test case for sapi_v1_capital_withdraw_history_get + + Withdraw History (supporting network) (USER_DATA) + """ + pass + + def test_sapi_v1_spot_delist_schedule_get(self) -> None: + """Test case for sapi_v1_spot_delist_schedule_get + + Get symbols delist schedule for spot (MARKET_DATA) + """ + pass + + def test_sapi_v1_system_status_get(self) -> None: + """Test case for sapi_v1_system_status_get + + System Status (System) + """ + pass + + def test_sapi_v3_asset_get_user_asset_post(self) -> None: + """Test case for sapi_v3_asset_get_user_asset_post + + User Asset (USER_DATA) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/target/python/binance_openapi/tox.ini b/target/python/binance_openapi/tox.ini new file mode 100644 index 0000000..1a9028b --- /dev/null +++ b/target/python/binance_openapi/tox.ini @@ -0,0 +1,9 @@ +[tox] +envlist = py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + pytest --cov=openapi_client diff --git a/test_rust/.gitignore b/test_rust/.gitignore new file mode 100644 index 0000000..6aa1064 --- /dev/null +++ b/test_rust/.gitignore @@ -0,0 +1,3 @@ +/target/ +**/*.rs.bk +Cargo.lock diff --git a/test_rust/.openapi-generator-ignore b/test_rust/.openapi-generator-ignore new file mode 100644 index 0000000..e3d4137 --- /dev/null +++ b/test_rust/.openapi-generator-ignore @@ -0,0 +1,6 @@ +docs/* +target/* +.travis.yml +Cargo.lock +git_push.sh +README.md diff --git a/test_rust/.openapi-generator/FILES b/test_rust/.openapi-generator/FILES new file mode 100644 index 0000000..7e82573 --- /dev/null +++ b/test_rust/.openapi-generator/FILES @@ -0,0 +1,548 @@ +.gitignore +Cargo.toml +src/apis/auto_invest_api.rs +src/apis/blvt_api.rs +src/apis/c2_c_api.rs +src/apis/configuration.rs +src/apis/convert_api.rs +src/apis/crypto_loans_api.rs +src/apis/dual_investment_api.rs +src/apis/fiat_api.rs +src/apis/futures_algo_api.rs +src/apis/futures_api.rs +src/apis/gift_card_api.rs +src/apis/isolated_margin_stream_api.rs +src/apis/margin_api.rs +src/apis/margin_stream_api.rs +src/apis/market_api.rs +src/apis/mining_api.rs +src/apis/mod.rs +src/apis/nft_api.rs +src/apis/pay_api.rs +src/apis/portfolio_margin_api.rs +src/apis/rebate_api.rs +src/apis/savings_api.rs +src/apis/simple_earn_api.rs +src/apis/spot_algo_api.rs +src/apis/staking_api.rs +src/apis/stream_api.rs +src/apis/sub_account_api.rs +src/apis/trade_api.rs +src/apis/vip_loans_api.rs +src/apis/wallet_api.rs +src/lib.rs +src/models/_api_v3_account_commission_get_200_response.rs +src/models/_api_v3_account_commission_get_200_response_discount.rs +src/models/_api_v3_account_commission_get_200_response_standard_commission.rs +src/models/_api_v3_account_commission_get_200_response_tax_commission.rs +src/models/_api_v3_all_order_list_get_200_response_inner.rs +src/models/_api_v3_all_order_list_get_200_response_inner_orders_inner.rs +src/models/_api_v3_avg_price_get_200_response.rs +src/models/_api_v3_depth_get_200_response.rs +src/models/_api_v3_exchange_info_get_200_response.rs +src/models/_api_v3_exchange_info_get_200_response_rate_limits_inner.rs +src/models/_api_v3_exchange_info_get_200_response_symbols_inner.rs +src/models/_api_v3_exchange_info_get_200_response_symbols_inner_filters_inner.rs +src/models/_api_v3_klines_get_200_response_inner_inner.rs +src/models/_api_v3_my_allocations_get_200_response_inner.rs +src/models/_api_v3_my_prevented_matches_get_200_response_inner.rs +src/models/_api_v3_open_order_list_get_200_response_inner.rs +src/models/_api_v3_open_order_list_get_200_response_inner_orders_inner.rs +src/models/_api_v3_open_orders_delete_200_response_inner.rs +src/models/_api_v3_order_cancel_replace_post_200_response.rs +src/models/_api_v3_order_cancel_replace_post_200_response_cancel_response.rs +src/models/_api_v3_order_cancel_replace_post_200_response_new_order_response.rs +src/models/_api_v3_order_list_get_200_response.rs +src/models/_api_v3_order_list_get_200_response_orders_inner.rs +src/models/_api_v3_order_oco_post_200_response.rs +src/models/_api_v3_order_oco_post_200_response_order_reports_inner.rs +src/models/_api_v3_order_oco_post_200_response_orders_inner.rs +src/models/_api_v3_order_post_200_response.rs +src/models/_api_v3_rate_limit_order_get_200_response_inner.rs +src/models/_api_v3_sor_order_post_200_response.rs +src/models/_api_v3_sor_order_post_200_response_fills_inner.rs +src/models/_api_v3_ticker_24hr_get_200_response.rs +src/models/_api_v3_ticker_book_ticker_get_200_response.rs +src/models/_api_v3_ticker_get_200_response.rs +src/models/_api_v3_ticker_price_get_200_response.rs +src/models/_api_v3_ticker_trading_day_get_200_response.rs +src/models/_api_v3_time_get_200_response.rs +src/models/_api_v3_user_data_stream_post_200_response.rs +src/models/_sapi_v1_account_api_restrictions_get_200_response.rs +src/models/_sapi_v1_account_api_trading_status_get_200_response.rs +src/models/_sapi_v1_account_api_trading_status_get_200_response_data.rs +src/models/_sapi_v1_account_api_trading_status_get_200_response_data_indicators.rs +src/models/_sapi_v1_account_api_trading_status_get_200_response_data_indicators_btcusdt_inner.rs +src/models/_sapi_v1_account_api_trading_status_get_200_response_data_trigger_condition.rs +src/models/_sapi_v1_account_info_get_200_response.rs +src/models/_sapi_v1_account_snapshot_get_200_response.rs +src/models/_sapi_v1_account_status_get_200_response.rs +src/models/_sapi_v1_algo_futures_historical_orders_get_200_response.rs +src/models/_sapi_v1_algo_futures_historical_orders_get_200_response_orders_inner.rs +src/models/_sapi_v1_algo_futures_new_order_vp_post_200_response.rs +src/models/_sapi_v1_algo_futures_open_orders_get_200_response.rs +src/models/_sapi_v1_algo_futures_open_orders_get_200_response_orders_inner.rs +src/models/_sapi_v1_algo_futures_order_delete_200_response.rs +src/models/_sapi_v1_algo_futures_sub_orders_get_200_response.rs +src/models/_sapi_v1_algo_futures_sub_orders_get_200_response_sub_orders_inner.rs +src/models/_sapi_v1_algo_spot_historical_orders_get_200_response.rs +src/models/_sapi_v1_algo_spot_historical_orders_get_200_response_orders_inner.rs +src/models/_sapi_v1_algo_spot_new_order_twap_post_200_response.rs +src/models/_sapi_v1_algo_spot_open_orders_get_200_response.rs +src/models/_sapi_v1_algo_spot_open_orders_get_200_response_orders_inner.rs +src/models/_sapi_v1_algo_spot_order_delete_200_response.rs +src/models/_sapi_v1_algo_spot_sub_orders_get_200_response.rs +src/models/_sapi_v1_algo_spot_sub_orders_get_200_response_sub_orders_inner.rs +src/models/_sapi_v1_asset_asset_detail_get_200_response.rs +src/models/_sapi_v1_asset_asset_detail_get_200_response_ctr.rs +src/models/_sapi_v1_asset_asset_dividend_get_200_response.rs +src/models/_sapi_v1_asset_asset_dividend_get_200_response_rows_inner.rs +src/models/_sapi_v1_asset_convert_transfer_post_200_response.rs +src/models/_sapi_v1_asset_convert_transfer_query_by_page_get_200_response.rs +src/models/_sapi_v1_asset_convert_transfer_query_by_page_get_200_response_rows_inner.rs +src/models/_sapi_v1_asset_custody_transfer_history_get_200_response.rs +src/models/_sapi_v1_asset_custody_transfer_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_asset_dribblet_get_200_response.rs +src/models/_sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner.rs +src/models/_sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner.rs +src/models/_sapi_v1_asset_dust_btc_post_200_response.rs +src/models/_sapi_v1_asset_dust_btc_post_200_response_details_inner.rs +src/models/_sapi_v1_asset_dust_post_200_response.rs +src/models/_sapi_v1_asset_dust_post_200_response_transfer_result_inner.rs +src/models/_sapi_v1_asset_get_funding_asset_post_200_response_inner.rs +src/models/_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response.rs +src/models/_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response_rows_inner.rs +src/models/_sapi_v1_asset_trade_fee_get_200_response_inner.rs +src/models/_sapi_v1_asset_transfer_get_200_response.rs +src/models/_sapi_v1_asset_transfer_get_200_response_rows_inner.rs +src/models/_sapi_v1_asset_transfer_post_200_response.rs +src/models/_sapi_v1_asset_wallet_balance_get_200_response_inner.rs +src/models/_sapi_v1_blvt_redeem_post_200_response.rs +src/models/_sapi_v1_blvt_redeem_record_get_200_response_inner.rs +src/models/_sapi_v1_blvt_subscribe_post_200_response.rs +src/models/_sapi_v1_blvt_subscribe_record_get_200_response.rs +src/models/_sapi_v1_blvt_token_info_get_200_response_inner.rs +src/models/_sapi_v1_blvt_token_info_get_200_response_inner_current_baskets_inner.rs +src/models/_sapi_v1_blvt_user_limit_get_200_response_inner.rs +src/models/_sapi_v1_c2c_order_match_list_user_order_history_get_200_response.rs +src/models/_sapi_v1_c2c_order_match_list_user_order_history_get_200_response_data_inner.rs +src/models/_sapi_v1_capital_config_getall_get_200_response_inner.rs +src/models/_sapi_v1_capital_config_getall_get_200_response_inner_network_list_inner.rs +src/models/_sapi_v1_capital_contract_convertible_coins_get_200_response.rs +src/models/_sapi_v1_capital_contract_convertible_coins_get_200_response_exchange_rates.rs +src/models/_sapi_v1_capital_deposit_address_get_200_response.rs +src/models/_sapi_v1_capital_deposit_address_list_get_200_response_inner.rs +src/models/_sapi_v1_capital_deposit_credit_apply_post_200_response.rs +src/models/_sapi_v1_capital_deposit_hisrec_get_200_response_inner.rs +src/models/_sapi_v1_capital_deposit_sub_address_get_200_response.rs +src/models/_sapi_v1_capital_deposit_sub_hisrec_get_200_response_inner.rs +src/models/_sapi_v1_capital_withdraw_address_list_get_200_response_inner.rs +src/models/_sapi_v1_capital_withdraw_apply_post_200_response.rs +src/models/_sapi_v1_capital_withdraw_history_get_200_response_inner.rs +src/models/_sapi_v1_convert_accept_quote_post_200_response.rs +src/models/_sapi_v1_convert_asset_info_get_200_response_inner.rs +src/models/_sapi_v1_convert_exchange_info_get_200_response_inner.rs +src/models/_sapi_v1_convert_get_quote_post_200_response.rs +src/models/_sapi_v1_convert_limit_cancel_order_post_200_response.rs +src/models/_sapi_v1_convert_limit_place_order_post_200_response.rs +src/models/_sapi_v1_convert_limit_query_open_orders_get_200_response.rs +src/models/_sapi_v1_convert_limit_query_open_orders_get_200_response_list_inner.rs +src/models/_sapi_v1_convert_order_status_get_200_response.rs +src/models/_sapi_v1_convert_trade_flow_get_200_response.rs +src/models/_sapi_v1_convert_trade_flow_get_200_response_list_inner.rs +src/models/_sapi_v1_dci_product_accounts_get_200_response.rs +src/models/_sapi_v1_dci_product_auto_compound_edit_status_post_200_response.rs +src/models/_sapi_v1_dci_product_list_get_200_response.rs +src/models/_sapi_v1_dci_product_list_get_200_response_list_inner.rs +src/models/_sapi_v1_dci_product_positions_get_200_response.rs +src/models/_sapi_v1_dci_product_positions_get_200_response_list_inner.rs +src/models/_sapi_v1_dci_product_subscribe_post_200_response.rs +src/models/_sapi_v1_eth_staking_eth_history_rate_history_get_200_response.rs +src/models/_sapi_v1_eth_staking_eth_history_rate_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_eth_staking_eth_history_redemption_history_get_200_response.rs +src/models/_sapi_v1_eth_staking_eth_history_redemption_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_eth_staking_eth_history_rewards_history_get_200_response.rs +src/models/_sapi_v1_eth_staking_eth_history_rewards_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_eth_staking_eth_history_staking_history_get_200_response.rs +src/models/_sapi_v1_eth_staking_eth_history_staking_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response.rs +src/models/_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_eth_staking_eth_quota_get_200_response.rs +src/models/_sapi_v1_eth_staking_eth_redeem_post_200_response.rs +src/models/_sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response.rs +src/models/_sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response.rs +src/models/_sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_eth_staking_wbeth_wrap_post_200_response.rs +src/models/_sapi_v1_fiat_orders_get_200_response.rs +src/models/_sapi_v1_fiat_orders_get_200_response_data_inner.rs +src/models/_sapi_v1_fiat_payments_get_200_response.rs +src/models/_sapi_v1_fiat_payments_get_200_response_data_inner.rs +src/models/_sapi_v1_futures_hist_data_link_get_200_response.rs +src/models/_sapi_v1_futures_hist_data_link_get_200_response_data_inner.rs +src/models/_sapi_v1_futures_transfer_get_200_response.rs +src/models/_sapi_v1_futures_transfer_get_200_response_rows_inner.rs +src/models/_sapi_v1_giftcard_buy_code_token_limit_get_200_response.rs +src/models/_sapi_v1_giftcard_buy_code_token_limit_get_200_response_data.rs +src/models/_sapi_v1_giftcard_create_code_post_200_response.rs +src/models/_sapi_v1_giftcard_create_code_post_200_response_data.rs +src/models/_sapi_v1_giftcard_cryptography_rsa_public_key_get_200_response.rs +src/models/_sapi_v1_giftcard_redeem_code_post_200_response.rs +src/models/_sapi_v1_giftcard_redeem_code_post_200_response_data.rs +src/models/_sapi_v1_giftcard_verify_get_200_response.rs +src/models/_sapi_v1_giftcard_verify_get_200_response_data.rs +src/models/_sapi_v1_lending_auto_invest_all_asset_get_200_response.rs +src/models/_sapi_v1_lending_auto_invest_history_list_get_200_response_inner.rs +src/models/_sapi_v1_lending_auto_invest_index_info_get_200_response.rs +src/models/_sapi_v1_lending_auto_invest_index_info_get_200_response_asset_allocation_inner.rs +src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response.rs +src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response_asset_allocation_inner.rs +src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response_details_inner.rs +src/models/_sapi_v1_lending_auto_invest_one_off_post_200_response.rs +src/models/_sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner.rs +src/models/_sapi_v1_lending_auto_invest_one_off_status_get_200_response.rs +src/models/_sapi_v1_lending_auto_invest_plan_add_post_200_response.rs +src/models/_sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner.rs +src/models/_sapi_v1_lending_auto_invest_plan_edit_status_post_200_response.rs +src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response.rs +src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner.rs +src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner_details_inner.rs +src/models/_sapi_v1_lending_auto_invest_plan_list_get_200_response.rs +src/models/_sapi_v1_lending_auto_invest_plan_list_get_200_response_plan_inner.rs +src/models/_sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner.rs +src/models/_sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner_transaction_details_inner.rs +src/models/_sapi_v1_lending_auto_invest_redeem_history_get_200_response_inner.rs +src/models/_sapi_v1_lending_auto_invest_redeem_post_200_response.rs +src/models/_sapi_v1_lending_auto_invest_source_asset_list_get_200_response.rs +src/models/_sapi_v1_lending_auto_invest_source_asset_list_get_200_response_source_assets_inner.rs +src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response.rs +src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner.rs +src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner.rs +src/models/_sapi_v1_lending_auto_invest_target_asset_roi_list_get_200_response_inner.rs +src/models/_sapi_v1_lending_customized_fixed_purchase_post_200_response.rs +src/models/_sapi_v1_lending_position_changed_post_200_response.rs +src/models/_sapi_v1_lending_project_list_get_200_response_inner.rs +src/models/_sapi_v1_lending_project_position_list_get_200_response_inner.rs +src/models/_sapi_v1_loan_adjust_ltv_post_200_response.rs +src/models/_sapi_v1_loan_borrow_history_get_200_response.rs +src/models/_sapi_v1_loan_borrow_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_loan_borrow_post_200_response.rs +src/models/_sapi_v1_loan_collateral_data_get_200_response.rs +src/models/_sapi_v1_loan_collateral_data_get_200_response_rows_inner.rs +src/models/_sapi_v1_loan_customize_margin_call_post_200_response.rs +src/models/_sapi_v1_loan_customize_margin_call_post_200_response_rows_inner.rs +src/models/_sapi_v1_loan_income_get_200_response_inner.rs +src/models/_sapi_v1_loan_loanable_data_get_200_response.rs +src/models/_sapi_v1_loan_loanable_data_get_200_response_rows_inner.rs +src/models/_sapi_v1_loan_ltv_adjustment_history_get_200_response.rs +src/models/_sapi_v1_loan_ltv_adjustment_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_loan_ongoing_orders_get_200_response.rs +src/models/_sapi_v1_loan_ongoing_orders_get_200_response_rows_inner.rs +src/models/_sapi_v1_loan_repay_collateral_rate_get_200_response.rs +src/models/_sapi_v1_loan_repay_history_get_200_response.rs +src/models/_sapi_v1_loan_repay_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_loan_repay_post_200_response.rs +src/models/_sapi_v1_loan_vip_borrow_post_200_response.rs +src/models/_sapi_v1_loan_vip_collateral_account_get_200_response.rs +src/models/_sapi_v1_loan_vip_collateral_account_get_200_response_rows_inner.rs +src/models/_sapi_v1_loan_vip_collateral_data_get_200_response.rs +src/models/_sapi_v1_loan_vip_collateral_data_get_200_response_rows_inner.rs +src/models/_sapi_v1_loan_vip_loanable_data_get_200_response.rs +src/models/_sapi_v1_loan_vip_loanable_data_get_200_response_rows_inner.rs +src/models/_sapi_v1_loan_vip_ongoing_orders_get_200_response.rs +src/models/_sapi_v1_loan_vip_ongoing_orders_get_200_response_rows_inner.rs +src/models/_sapi_v1_loan_vip_renew_post_200_response.rs +src/models/_sapi_v1_loan_vip_repay_history_get_200_response.rs +src/models/_sapi_v1_loan_vip_repay_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_loan_vip_repay_post_200_response.rs +src/models/_sapi_v1_loan_vip_request_data_get_200_response.rs +src/models/_sapi_v1_loan_vip_request_data_get_200_response_rows_inner.rs +src/models/_sapi_v1_loan_vip_request_interest_rate_get_200_response_inner.rs +src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response.rs +src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner.rs +src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data.rs +src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data_balances_inner.rs +src/models/_sapi_v1_managed_subaccount_asset_get_200_response_inner.rs +src/models/_sapi_v1_managed_subaccount_deposit_address_get_200_response.rs +src/models/_sapi_v1_managed_subaccount_deposit_post_200_response.rs +src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response.rs +src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner.rs +src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data.rs +src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_assets_inner.rs +src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_position_inner.rs +src/models/_sapi_v1_managed_subaccount_info_get_200_response.rs +src/models/_sapi_v1_managed_subaccount_info_get_200_response_manager_sub_user_info_vo_list_inner.rs +src/models/_sapi_v1_managed_subaccount_margin_asset_get_200_response.rs +src/models/_sapi_v1_managed_subaccount_margin_asset_get_200_response_user_assets_inner.rs +src/models/_sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response.rs +src/models/_sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response_manager_sub_transfer_history_vos_inner.rs +src/models/_sapi_v1_managed_subaccount_query_trans_log_get_200_response.rs +src/models/_sapi_v1_managed_subaccount_query_trans_log_get_200_response_manager_sub_transfer_history_vos_inner.rs +src/models/_sapi_v1_margin_account_get_200_response.rs +src/models/_sapi_v1_margin_account_get_200_response_user_assets_inner.rs +src/models/_sapi_v1_margin_all_assets_get_200_response_inner.rs +src/models/_sapi_v1_margin_all_pairs_get_200_response_inner.rs +src/models/_sapi_v1_margin_available_inventory_get_200_response.rs +src/models/_sapi_v1_margin_available_inventory_get_200_response_assets.rs +src/models/_sapi_v1_margin_borrow_repay_get_200_response.rs +src/models/_sapi_v1_margin_borrow_repay_get_200_response_rows_inner.rs +src/models/_sapi_v1_margin_borrow_repay_post_200_response.rs +src/models/_sapi_v1_margin_capital_flow_get_200_response_inner.rs +src/models/_sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner.rs +src/models/_sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner_collaterals_inner.rs +src/models/_sapi_v1_margin_cross_margin_data_get_200_response_inner.rs +src/models/_sapi_v1_margin_delist_schedule_get_200_response_inner.rs +src/models/_sapi_v1_margin_exchange_small_liability_get_200_response_inner.rs +src/models/_sapi_v1_margin_exchange_small_liability_history_get_200_response.rs +src/models/_sapi_v1_margin_exchange_small_liability_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_margin_force_liquidation_rec_get_200_response.rs +src/models/_sapi_v1_margin_force_liquidation_rec_get_200_response_rows_inner.rs +src/models/_sapi_v1_margin_interest_history_get_200_response.rs +src/models/_sapi_v1_margin_interest_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_margin_interest_rate_history_get_200_response_inner.rs +src/models/_sapi_v1_margin_isolated_account_limit_get_200_response.rs +src/models/_sapi_v1_margin_isolated_account_post_200_response.rs +src/models/_sapi_v1_margin_isolated_all_pairs_get_200_response_inner.rs +src/models/_sapi_v1_margin_isolated_margin_data_get_200_response_inner.rs +src/models/_sapi_v1_margin_isolated_margin_data_get_200_response_inner_data_inner.rs +src/models/_sapi_v1_margin_isolated_margin_tier_get_200_response_inner.rs +src/models/_sapi_v1_margin_leverage_bracket_get_200_response_inner.rs +src/models/_sapi_v1_margin_leverage_bracket_get_200_response_inner_brackets_inner.rs +src/models/_sapi_v1_margin_max_borrowable_get_200_response.rs +src/models/_sapi_v1_margin_max_leverage_post_200_response.rs +src/models/_sapi_v1_margin_max_transferable_get_200_response.rs +src/models/_sapi_v1_margin_next_hourly_interest_rate_get_200_response_inner.rs +src/models/_sapi_v1_margin_open_order_list_get_200_response_inner.rs +src/models/_sapi_v1_margin_open_orders_delete_200_response_inner.rs +src/models/_sapi_v1_margin_order_list_get_200_response.rs +src/models/_sapi_v1_margin_order_oco_post_200_response.rs +src/models/_sapi_v1_margin_order_oco_post_200_response_order_reports_inner.rs +src/models/_sapi_v1_margin_order_oco_post_200_response_orders_inner.rs +src/models/_sapi_v1_margin_order_post_200_response.rs +src/models/_sapi_v1_margin_price_index_get_200_response.rs +src/models/_sapi_v1_margin_rate_limit_order_get_200_response_inner.rs +src/models/_sapi_v1_margin_trade_coeff_get_200_response.rs +src/models/_sapi_v1_margin_transfer_get_200_response.rs +src/models/_sapi_v1_margin_transfer_get_200_response_rows_inner.rs +src/models/_sapi_v1_mining_hash_transfer_config_cancel_post_200_response.rs +src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response.rs +src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data.rs +src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_config_details_inner.rs +src/models/_sapi_v1_mining_hash_transfer_config_post_200_response.rs +src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response.rs +src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response_data.rs +src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profit_transfer_details_inner.rs +src/models/_sapi_v1_mining_payment_list_get_200_response.rs +src/models/_sapi_v1_mining_payment_list_get_200_response_data.rs +src/models/_sapi_v1_mining_payment_list_get_200_response_data_account_profits_inner.rs +src/models/_sapi_v1_mining_payment_other_get_200_response.rs +src/models/_sapi_v1_mining_payment_other_get_200_response_data.rs +src/models/_sapi_v1_mining_payment_other_get_200_response_data_other_profits_inner.rs +src/models/_sapi_v1_mining_payment_uid_get_200_response.rs +src/models/_sapi_v1_mining_payment_uid_get_200_response_data.rs +src/models/_sapi_v1_mining_payment_uid_get_200_response_data_account_profits_inner.rs +src/models/_sapi_v1_mining_pub_algo_list_get_200_response.rs +src/models/_sapi_v1_mining_pub_algo_list_get_200_response_data_inner.rs +src/models/_sapi_v1_mining_pub_coin_list_get_200_response.rs +src/models/_sapi_v1_mining_pub_coin_list_get_200_response_data_inner.rs +src/models/_sapi_v1_mining_statistics_user_list_get_200_response.rs +src/models/_sapi_v1_mining_statistics_user_list_get_200_response_data_inner.rs +src/models/_sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner.rs +src/models/_sapi_v1_mining_statistics_user_status_get_200_response.rs +src/models/_sapi_v1_mining_statistics_user_status_get_200_response_data.rs +src/models/_sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today.rs +src/models/_sapi_v1_mining_worker_detail_get_200_response.rs +src/models/_sapi_v1_mining_worker_detail_get_200_response_data_inner.rs +src/models/_sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrate_datas_inner.rs +src/models/_sapi_v1_mining_worker_list_get_200_response.rs +src/models/_sapi_v1_mining_worker_list_get_200_response_data.rs +src/models/_sapi_v1_mining_worker_list_get_200_response_data_worker_datas_inner.rs +src/models/_sapi_v1_nft_history_deposit_get_200_response.rs +src/models/_sapi_v1_nft_history_deposit_get_200_response_list_inner.rs +src/models/_sapi_v1_nft_history_transactions_get_200_response.rs +src/models/_sapi_v1_nft_history_transactions_get_200_response_list_inner.rs +src/models/_sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner.rs +src/models/_sapi_v1_nft_history_withdraw_get_200_response.rs +src/models/_sapi_v1_nft_history_withdraw_get_200_response_list_inner.rs +src/models/_sapi_v1_nft_user_get_asset_get_200_response.rs +src/models/_sapi_v1_nft_user_get_asset_get_200_response_list_inner.rs +src/models/_sapi_v1_pay_transactions_get_200_response.rs +src/models/_sapi_v1_pay_transactions_get_200_response_data_inner.rs +src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_funds_detail_inner.rs +src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_payer_info.rs +src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info.rs +src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info_extend_inner.rs +src/models/_sapi_v1_portfolio_account_get_200_response.rs +src/models/_sapi_v1_portfolio_asset_index_price_get_200_response_inner.rs +src/models/_sapi_v1_portfolio_auto_collection_post_200_response.rs +src/models/_sapi_v1_portfolio_collateral_rate_get_200_response_inner.rs +src/models/_sapi_v1_portfolio_interest_history_get_200_response_inner.rs +src/models/_sapi_v1_portfolio_margin_asset_leverage_get_200_response_inner.rs +src/models/_sapi_v1_portfolio_pm_loan_get_200_response.rs +src/models/_sapi_v1_portfolio_repay_futures_switch_get_200_response.rs +src/models/_sapi_v1_portfolio_repay_post_200_response.rs +src/models/_sapi_v1_rebate_tax_query_get_200_response.rs +src/models/_sapi_v1_rebate_tax_query_get_200_response_data.rs +src/models/_sapi_v1_rebate_tax_query_get_200_response_data_data_inner.rs +src/models/_sapi_v1_simple_earn_account_get_200_response.rs +src/models/_sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response.rs +src/models/_sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response_rows_inner.rs +src/models/_sapi_v1_simple_earn_flexible_history_rate_history_get_200_response.rs +src/models/_sapi_v1_simple_earn_flexible_history_rate_history_get_200_response_rows_inner.rs +src/models/_sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response.rs +src/models/_sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response_rows_inner.rs +src/models/_sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response.rs +src/models/_sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response_rows_inner.rs +src/models/_sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response.rs +src/models/_sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response_rows_inner.rs +src/models/_sapi_v1_simple_earn_flexible_list_get_200_response.rs +src/models/_sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner.rs +src/models/_sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate.rs +src/models/_sapi_v1_simple_earn_flexible_personal_left_quota_get_200_response.rs +src/models/_sapi_v1_simple_earn_flexible_position_get_200_response.rs +src/models/_sapi_v1_simple_earn_flexible_position_get_200_response_rows_inner.rs +src/models/_sapi_v1_simple_earn_flexible_redeem_post_200_response.rs +src/models/_sapi_v1_simple_earn_flexible_subscribe_post_200_response.rs +src/models/_sapi_v1_simple_earn_flexible_subscription_preview_get_200_response.rs +src/models/_sapi_v1_simple_earn_locked_history_redemption_record_get_200_response.rs +src/models/_sapi_v1_simple_earn_locked_history_redemption_record_get_200_response_rows_inner.rs +src/models/_sapi_v1_simple_earn_locked_history_rewards_record_get_200_response.rs +src/models/_sapi_v1_simple_earn_locked_history_rewards_record_get_200_response_rows_inner.rs +src/models/_sapi_v1_simple_earn_locked_history_subscription_record_get_200_response.rs +src/models/_sapi_v1_simple_earn_locked_history_subscription_record_get_200_response_rows_inner.rs +src/models/_sapi_v1_simple_earn_locked_list_get_200_response.rs +src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner.rs +src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail.rs +src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota.rs +src/models/_sapi_v1_simple_earn_locked_position_get_200_response.rs +src/models/_sapi_v1_simple_earn_locked_position_get_200_response_rows_inner.rs +src/models/_sapi_v1_simple_earn_locked_subscribe_post_200_response.rs +src/models/_sapi_v1_simple_earn_locked_subscription_preview_get_200_response_inner.rs +src/models/_sapi_v1_spot_delist_schedule_get_200_response_inner.rs +src/models/_sapi_v1_sub_account_blvt_enable_post_200_response.rs +src/models/_sapi_v1_sub_account_eoptions_enable_post_200_response.rs +src/models/_sapi_v1_sub_account_futures_account_get_200_response.rs +src/models/_sapi_v1_sub_account_futures_account_get_200_response_assets_inner.rs +src/models/_sapi_v1_sub_account_futures_account_summary_get_200_response.rs +src/models/_sapi_v1_sub_account_futures_account_summary_get_200_response_sub_account_list_inner.rs +src/models/_sapi_v1_sub_account_futures_enable_post_200_response.rs +src/models/_sapi_v1_sub_account_futures_internal_transfer_get_200_response.rs +src/models/_sapi_v1_sub_account_futures_internal_transfer_get_200_response_transfers_inner.rs +src/models/_sapi_v1_sub_account_futures_internal_transfer_post_200_response.rs +src/models/_sapi_v1_sub_account_futures_position_risk_get_200_response_inner.rs +src/models/_sapi_v1_sub_account_futures_transfer_post_200_response.rs +src/models/_sapi_v1_sub_account_list_get_200_response.rs +src/models/_sapi_v1_sub_account_list_get_200_response_sub_accounts_inner.rs +src/models/_sapi_v1_sub_account_margin_account_get_200_response.rs +src/models/_sapi_v1_sub_account_margin_account_get_200_response_margin_trade_coeff_vo.rs +src/models/_sapi_v1_sub_account_margin_account_summary_get_200_response.rs +src/models/_sapi_v1_sub_account_margin_account_summary_get_200_response_sub_account_list_inner.rs +src/models/_sapi_v1_sub_account_margin_enable_post_200_response.rs +src/models/_sapi_v1_sub_account_spot_summary_get_200_response.rs +src/models/_sapi_v1_sub_account_spot_summary_get_200_response_spot_sub_user_asset_btc_vo_list_inner.rs +src/models/_sapi_v1_sub_account_status_get_200_response_inner.rs +src/models/_sapi_v1_sub_account_sub_account_api_ip_restriction_get_200_response.rs +src/models/_sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete_200_response.rs +src/models/_sapi_v1_sub_account_sub_transfer_history_get_200_response_inner.rs +src/models/_sapi_v1_sub_account_transaction_statistics_get_200_response.rs +src/models/_sapi_v1_sub_account_transaction_statistics_get_200_response_trade_info_vos_inner.rs +src/models/_sapi_v1_sub_account_transfer_sub_user_history_get_200_response_inner.rs +src/models/_sapi_v1_sub_account_universal_transfer_get_200_response_inner.rs +src/models/_sapi_v1_sub_account_universal_transfer_post_200_response.rs +src/models/_sapi_v1_sub_account_virtual_sub_account_post_200_response.rs +src/models/_sapi_v1_system_status_get_200_response.rs +src/models/_sapi_v1_user_data_stream_isolated_post_200_response.rs +src/models/_sapi_v2_eth_staking_account_get_200_response.rs +src/models/_sapi_v2_eth_staking_account_get_200_response_holdings.rs +src/models/_sapi_v2_eth_staking_account_get_200_response_profit.rs +src/models/_sapi_v2_eth_staking_eth_stake_post_200_response.rs +src/models/_sapi_v2_loan_flexible_adjust_ltv_post_200_response.rs +src/models/_sapi_v2_loan_flexible_borrow_history_get_200_response.rs +src/models/_sapi_v2_loan_flexible_borrow_history_get_200_response_rows_inner.rs +src/models/_sapi_v2_loan_flexible_borrow_post_200_response.rs +src/models/_sapi_v2_loan_flexible_collateral_data_get_200_response.rs +src/models/_sapi_v2_loan_flexible_collateral_data_get_200_response_rows_inner.rs +src/models/_sapi_v2_loan_flexible_loanable_data_get_200_response.rs +src/models/_sapi_v2_loan_flexible_loanable_data_get_200_response_rows_inner.rs +src/models/_sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response.rs +src/models/_sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response_rows_inner.rs +src/models/_sapi_v2_loan_flexible_ongoing_orders_get_200_response.rs +src/models/_sapi_v2_loan_flexible_ongoing_orders_get_200_response_rows_inner.rs +src/models/_sapi_v2_loan_flexible_repay_history_get_200_response.rs +src/models/_sapi_v2_loan_flexible_repay_history_get_200_response_rows_inner.rs +src/models/_sapi_v2_loan_flexible_repay_post_200_response.rs +src/models/_sapi_v2_sub_account_futures_account_get_200_response.rs +src/models/_sapi_v2_sub_account_futures_account_summary_get_200_response.rs +src/models/_sapi_v2_sub_account_futures_position_risk_get_200_response.rs +src/models/_sapi_v2_sub_account_sub_account_api_ip_restriction_post_200_response.rs +src/models/_sapi_v3_asset_get_user_asset_post_200_response_inner.rs +src/models/_sapi_v3_sub_account_assets_get_200_response.rs +src/models/_sapi_v3_sub_account_assets_get_200_response_balances_inner.rs +src/models/_sapi_v4_sub_account_assets_get_200_response.rs +src/models/_sapi_v4_sub_account_assets_get_200_response_balances_inner.rs +src/models/account.rs +src/models/account_balances_inner.rs +src/models/account_commission_rates.rs +src/models/agg_trade.rs +src/models/bnb_burn_status.rs +src/models/book_ticker.rs +src/models/canceled_margin_order_detail.rs +src/models/day_ticker.rs +src/models/error.rs +src/models/isolated_margin_account_info.rs +src/models/isolated_margin_account_info_assets_inner.rs +src/models/isolated_margin_account_info_assets_inner_base_asset.rs +src/models/isolated_margin_account_info_assets_inner_quote_asset.rs +src/models/margin_oco_order.rs +src/models/margin_oco_order_order_reports_inner.rs +src/models/margin_oco_order_orders_inner.rs +src/models/margin_order.rs +src/models/margin_order_detail.rs +src/models/margin_order_response_ack.rs +src/models/margin_order_response_full.rs +src/models/margin_order_response_result.rs +src/models/margin_trade.rs +src/models/margin_transfer_details.rs +src/models/margin_transfer_details_rows_inner.rs +src/models/mod.rs +src/models/my_trade.rs +src/models/oco_order.rs +src/models/oco_order_order_reports_inner.rs +src/models/order.rs +src/models/order_details.rs +src/models/order_response_ack.rs +src/models/order_response_full.rs +src/models/order_response_full_fills_inner.rs +src/models/order_response_result.rs +src/models/price_ticker.rs +src/models/repayment_info.rs +src/models/repayment_info2.rs +src/models/snapshot_futures.rs +src/models/snapshot_futures_snapshot_vos_inner.rs +src/models/snapshot_futures_snapshot_vos_inner_data.rs +src/models/snapshot_futures_snapshot_vos_inner_data_assets_inner.rs +src/models/snapshot_futures_snapshot_vos_inner_data_position_inner.rs +src/models/snapshot_margin.rs +src/models/snapshot_margin_snapshot_vos_inner.rs +src/models/snapshot_margin_snapshot_vos_inner_data.rs +src/models/snapshot_margin_snapshot_vos_inner_data_user_assets_inner.rs +src/models/snapshot_spot.rs +src/models/snapshot_spot_snapshot_vos_inner.rs +src/models/snapshot_spot_snapshot_vos_inner_data.rs +src/models/snapshot_spot_snapshot_vos_inner_data_balances_inner.rs +src/models/sub_account_coin_futures_details.rs +src/models/sub_account_coin_futures_details_assets_inner.rs +src/models/sub_account_coin_futures_position_risk.rs +src/models/sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.rs +src/models/sub_account_coin_futures_summary.rs +src/models/sub_account_coin_futures_summary_delivery_account_summary_resp.rs +src/models/sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.rs +src/models/sub_account_usdt_futures_details.rs +src/models/sub_account_usdt_futures_details_future_account_resp.rs +src/models/sub_account_usdt_futures_position_risk.rs +src/models/sub_account_usdt_futures_summary.rs +src/models/sub_account_usdt_futures_summary_future_account_summary_resp.rs +src/models/sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.rs +src/models/ticker.rs +src/models/trade.rs +src/models/transaction.rs diff --git a/test_rust/.openapi-generator/VERSION b/test_rust/.openapi-generator/VERSION new file mode 100644 index 0000000..1985849 --- /dev/null +++ b/test_rust/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.7.0 diff --git a/test_rust/Cargo.toml b/test_rust/Cargo.toml new file mode 100644 index 0000000..a313a24 --- /dev/null +++ b/test_rust/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "openapi" +version = "1.0.0" +authors = ["OpenAPI Generator team and contributors"] +description = "OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en)" +# Override this license by providing a License Object in the OpenAPI. +license = "Unlicense" +edition = "2021" + +[dependencies] +serde = { version = "^1.0", features = ["derive"] } +serde_json = "^1.0" +url = "^2.5" +uuid = { version = "^1.8", features = ["serde", "v4"] } +reqwest = { version = "^0.12", features = ["json", "multipart"] } diff --git a/test_rust/src/apis/auto_invest_api.rs b/test_rust/src/apis/auto_invest_api.rs new file mode 100644 index 0000000..7cc50d3 --- /dev/null +++ b/test_rust/src/apis/auto_invest_api.rs @@ -0,0 +1,1024 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_all_asset_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestAllAssetGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_history_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestHistoryListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_index_info_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestIndexInfoGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_index_user_summary_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestIndexUserSummaryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_one_off_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestOneOffPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_one_off_status_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestOneOffStatusGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_plan_add_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestPlanAddPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_plan_edit_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestPlanEditPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_plan_edit_status_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestPlanEditStatusPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_plan_id_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestPlanIdGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_plan_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestPlanListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_rebalance_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestRebalanceHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_redeem_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestRedeemHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_redeem_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestRedeemPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_source_asset_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestSourceAssetListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_target_asset_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestTargetAssetListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_auto_invest_target_asset_roi_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingAutoInvestTargetAssetRoiListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Query all source assets and target assets Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_all_asset_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/all/asset", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query subscription transaction history of a plan Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_history_list_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, plan_id: Option, start_time: Option, end_time: Option, target_asset: Option, plan_type: Option<&str>, size: Option, current: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/history/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = plan_id { + local_var_req_builder = local_var_req_builder.query(&[("planId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = target_asset { + local_var_req_builder = local_var_req_builder.query(&[("targetAsset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = plan_type { + local_var_req_builder = local_var_req_builder.query(&[("planType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query index details Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_index_info_get(configuration: &configuration::Configuration, index_id: i64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/index/info", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("indexId", &index_id.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Details on users Index-Linked plan position details Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_index_user_summary_get(configuration: &configuration::Configuration, index_id: i64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/index/user-summary", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("indexId", &index_id.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// One time transaction Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_one_off_post(configuration: &configuration::Configuration, source_type: &str, subscription_amount: f32, source_asset: &str, timestamp: i64, signature: &str, request_id: Option<&str>, flexible_allowed_to_use: Option, plan_id: Option, index_id: Option, details: Option>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/one-off", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("sourceType", &source_type.to_string())]); + if let Some(ref local_var_str) = request_id { + local_var_req_builder = local_var_req_builder.query(&[("requestId", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("subscriptionAmount", &subscription_amount.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("sourceAsset", &source_asset.to_string())]); + if let Some(ref local_var_str) = flexible_allowed_to_use { + local_var_req_builder = local_var_req_builder.query(&[("flexibleAllowedToUse", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = plan_id { + local_var_req_builder = local_var_req_builder.query(&[("planId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = index_id { + local_var_req_builder = local_var_req_builder.query(&[("indexId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = details { + local_var_req_builder = match "multi" { + "multi" => local_var_req_builder.query(&local_var_str.into_iter().map(|p| ("details".to_owned(), p.to_string())).collect::>()), + _ => local_var_req_builder.query(&[("details", &local_var_str.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Transaction status for one-time transaction Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_one_off_status_get(configuration: &configuration::Configuration, transaction_id: i64, timestamp: i64, signature: &str, request_id: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/one-off/status", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("transactionId", &transaction_id.to_string())]); + if let Some(ref local_var_str) = request_id { + local_var_req_builder = local_var_req_builder.query(&[("requestId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Post an investment plan creation Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_plan_add_post(configuration: &configuration::Configuration, source_type: &str, plan_type: &str, subscription_amount: f32, subscription_cycle: &str, subscription_start_time: i32, source_asset: &str, details: Vec, timestamp: i64, signature: &str, request_id: Option<&str>, index_id: Option, subscription_start_day: Option, subscription_start_weekday: Option<&str>, flexible_allowed_to_use: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/plan/add", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("sourceType", &source_type.to_string())]); + if let Some(ref local_var_str) = request_id { + local_var_req_builder = local_var_req_builder.query(&[("requestId", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("planType", &plan_type.to_string())]); + if let Some(ref local_var_str) = index_id { + local_var_req_builder = local_var_req_builder.query(&[("IndexId", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("subscriptionAmount", &subscription_amount.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("subscriptionCycle", &subscription_cycle.to_string())]); + if let Some(ref local_var_str) = subscription_start_day { + local_var_req_builder = local_var_req_builder.query(&[("subscriptionStartDay", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = subscription_start_weekday { + local_var_req_builder = local_var_req_builder.query(&[("subscriptionStartWeekday", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("subscriptionStartTime", &subscription_start_time.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("sourceAsset", &source_asset.to_string())]); + if let Some(ref local_var_str) = flexible_allowed_to_use { + local_var_req_builder = local_var_req_builder.query(&[("flexibleAllowedToUse", &local_var_str.to_string())]); + } + local_var_req_builder = match "multi" { + "multi" => local_var_req_builder.query(&details.into_iter().map(|p| ("details".to_owned(), p.to_string())).collect::>()), + _ => local_var_req_builder.query(&[("details", &details.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query Source Asset to be used for investment Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_plan_edit_post(configuration: &configuration::Configuration, plan_id: i32, subscription_amount: f32, subscription_cycle: &str, subscription_start_time: i32, source_asset: &str, timestamp: i64, signature: &str, subscription_start_day: Option, subscription_start_weekday: Option<&str>, flexible_allowed_to_use: Option, details: Option>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/plan/edit", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("planId", &plan_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("subscriptionAmount", &subscription_amount.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("subscriptionCycle", &subscription_cycle.to_string())]); + if let Some(ref local_var_str) = subscription_start_day { + local_var_req_builder = local_var_req_builder.query(&[("subscriptionStartDay", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = subscription_start_weekday { + local_var_req_builder = local_var_req_builder.query(&[("subscriptionStartWeekday", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("subscriptionStartTime", &subscription_start_time.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("sourceAsset", &source_asset.to_string())]); + if let Some(ref local_var_str) = flexible_allowed_to_use { + local_var_req_builder = local_var_req_builder.query(&[("flexibleAllowedToUse", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = details { + local_var_req_builder = match "multi" { + "multi" => local_var_req_builder.query(&local_var_str.into_iter().map(|p| ("details".to_owned(), p.to_string())).collect::>()), + _ => local_var_req_builder.query(&[("details", &local_var_str.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Change Plan Status Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_plan_edit_status_post(configuration: &configuration::Configuration, plan_id: i32, status: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/plan/edit-status", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("planId", &plan_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("status", &status.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query holding details of the plan Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_plan_id_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, plan_id: Option, request_id: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/plan/id", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = plan_id { + local_var_req_builder = local_var_req_builder.query(&[("planId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = request_id { + local_var_req_builder = local_var_req_builder.query(&[("requestId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query plan lists Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_plan_list_get(configuration: &configuration::Configuration, plan_type: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/plan/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("planType", &plan_type.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get the history of Index Linked Plan Redemption transactions Max 30 day difference between startTime and endTime If no startTime and endTime, default to show past 30 day records Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_rebalance_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, start_time: Option, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/rebalance/history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get the history of Index Linked Plan Redemption transactions Max 30 day difference between startTime and endTime If no startTime and endTime, default to show past 30 day records Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_redeem_history_get(configuration: &configuration::Configuration, request_id: i64, timestamp: i64, signature: &str, start_time: Option, end_time: Option, current: Option, asset: Option<&str>, size: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/redeem/history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("requestId", &request_id.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// To redeem index-Linked plan holdings Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_redeem_post(configuration: &configuration::Configuration, index_id: i64, redemption_percentage: i32, timestamp: i64, signature: &str, request_id: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/redeem", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("indexId", &index_id.to_string())]); + if let Some(ref local_var_str) = request_id { + local_var_req_builder = local_var_req_builder.query(&[("requestId", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("redemptionPercentage", &redemption_percentage.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query Source Asset to be used for investment Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_source_asset_list_get(configuration: &configuration::Configuration, usage_type: &str, timestamp: i64, signature: &str, target_asset: Option<&str>, index_id: Option, flexible_allowed_to_use: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/source-asset/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = target_asset { + local_var_req_builder = local_var_req_builder.query(&[("targetAsset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = index_id { + local_var_req_builder = local_var_req_builder.query(&[("indexId", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("usageType", &usage_type.to_string())]); + if let Some(ref local_var_str) = flexible_allowed_to_use { + local_var_req_builder = local_var_req_builder.query(&[("flexibleAllowedToUse", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_target_asset_list_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, target_asset: Option<&str>, size: Option, current: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/target-asset/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = target_asset { + local_var_req_builder = local_var_req_builder.query(&[("targetAsset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// ROI return list for target asset Weight(IP): 1 +pub async fn sapi_v1_lending_auto_invest_target_asset_roi_list_get(configuration: &configuration::Configuration, target_asset: &str, his_roi_type: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/auto-invest/target-asset/roi/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("targetAsset", &target_asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("hisRoiType", &his_roi_type.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/blvt_api.rs b/test_rust/src/apis/blvt_api.rs new file mode 100644 index 0000000..410576e --- /dev/null +++ b/test_rust/src/apis/blvt_api.rs @@ -0,0 +1,352 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_blvt_redeem_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1BlvtRedeemPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_blvt_redeem_record_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1BlvtRedeemRecordGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_blvt_subscribe_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1BlvtSubscribePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_blvt_subscribe_record_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1BlvtSubscribeRecordGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_blvt_token_info_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1BlvtTokenInfoGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_blvt_user_limit_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1BlvtUserLimitGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Weight(IP): 1 +pub async fn sapi_v1_blvt_redeem_post(configuration: &configuration::Configuration, token_name: &str, amount: f64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/blvt/redeem", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("tokenName", &token_name.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - Only the data of the latest 90 days is available Weight(IP): 1 +pub async fn sapi_v1_blvt_redeem_record_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, token_name: Option<&str>, id: Option, start_time: Option, end_time: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/blvt/redeem/record", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = token_name { + local_var_req_builder = local_var_req_builder.query(&[("tokenName", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = id { + local_var_req_builder = local_var_req_builder.query(&[("id", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_blvt_subscribe_post(configuration: &configuration::Configuration, token_name: &str, cost: f64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/blvt/subscribe", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("tokenName", &token_name.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("cost", &cost.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - Only the data of the latest 90 days is available Weight(IP): 1 +pub async fn sapi_v1_blvt_subscribe_record_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, token_name: Option<&str>, id: Option, start_time: Option, end_time: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/blvt/subscribe/record", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = token_name { + local_var_req_builder = local_var_req_builder.query(&[("tokenName", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = id { + local_var_req_builder = local_var_req_builder.query(&[("id", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_blvt_token_info_get(configuration: &configuration::Configuration, token_name: Option<&str>) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/blvt/tokenInfo", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = token_name { + local_var_req_builder = local_var_req_builder.query(&[("tokenName", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_blvt_user_limit_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, token_name: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/blvt/userLimit", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = token_name { + local_var_req_builder = local_var_req_builder.query(&[("tokenName", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/c2_c_api.rs b/test_rust/src/apis/c2_c_api.rs new file mode 100644 index 0000000..362d1fa --- /dev/null +++ b/test_rust/src/apis/c2_c_api.rs @@ -0,0 +1,81 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_c2c_order_match_list_user_order_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1C2cOrderMatchListUserOrderHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// - If startTimestamp and endTimestamp are not sent, the recent 30-day data will be returned. - The max interval between startTimestamp and endTimestamp is 30 days. Weight(IP): 1 +pub async fn sapi_v1_c2c_order_match_list_user_order_history_get(configuration: &configuration::Configuration, trade_type: &str, timestamp: i64, signature: &str, start_timestamp: Option, end_timestamp: Option, page: Option, rows: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/c2c/orderMatch/listUserOrderHistory", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("tradeType", &trade_type.to_string())]); + if let Some(ref local_var_str) = start_timestamp { + local_var_req_builder = local_var_req_builder.query(&[("startTimestamp", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_timestamp { + local_var_req_builder = local_var_req_builder.query(&[("endTimestamp", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = rows { + local_var_req_builder = local_var_req_builder.query(&[("rows", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/configuration.rs b/test_rust/src/apis/configuration.rs new file mode 100644 index 0000000..cd0fc7d --- /dev/null +++ b/test_rust/src/apis/configuration.rs @@ -0,0 +1,53 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + + +#[derive(Debug, Clone)] +pub struct Configuration { + pub base_path: String, + pub user_agent: Option, + pub client: reqwest::Client, + pub basic_auth: Option, + pub oauth_access_token: Option, + pub bearer_access_token: Option, + pub api_key: Option, + // TODO: take an oauth2 token source, similar to the go one +} + +pub type BasicAuth = (String, Option); + +#[derive(Debug, Clone)] +pub struct ApiKey { + pub prefix: Option, + pub key: String, +} + + +impl Configuration { + pub fn new() -> Configuration { + Configuration::default() + } +} + +impl Default for Configuration { + fn default() -> Self { + Configuration { + base_path: "https://api.binance.com".to_owned(), + user_agent: Some("OpenAPI-Generator/1.0/rust".to_owned()), + client: reqwest::Client::new(), + basic_auth: None, + oauth_access_token: None, + bearer_access_token: None, + api_key: None, + + } + } +} diff --git a/test_rust/src/apis/convert_api.rs b/test_rust/src/apis/convert_api.rs new file mode 100644 index 0000000..4c1eb95 --- /dev/null +++ b/test_rust/src/apis/convert_api.rs @@ -0,0 +1,504 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_convert_accept_quote_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ConvertAcceptQuotePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_convert_asset_info_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ConvertAssetInfoGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_convert_exchange_info_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ConvertExchangeInfoGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_convert_get_quote_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ConvertGetQuotePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_convert_limit_cancel_order_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ConvertLimitCancelOrderPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_convert_limit_place_order_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ConvertLimitPlaceOrderPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_convert_limit_query_open_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ConvertLimitQueryOpenOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_convert_order_status_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ConvertOrderStatusGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_convert_trade_flow_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ConvertTradeFlowGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Accept the offered quote by quote ID. Weight(UID): 500 +pub async fn sapi_v1_convert_accept_quote_post(configuration: &configuration::Configuration, quote_id: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/convert/acceptQuote", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("quoteId", "e_id.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query for supported asset precision information Weight(IP): 100 +pub async fn sapi_v1_convert_asset_info_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/convert/assetInfo", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query for all convertible token pairs and the tokens’ respective upper/lower limits Weight(IP): 3000 +pub async fn sapi_v1_convert_exchange_info_get(configuration: &configuration::Configuration, from_asset: Option<&str>, to_asset: Option<&str>) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/convert/exchangeInfo", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = from_asset { + local_var_req_builder = local_var_req_builder.query(&[("fromAsset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = to_asset { + local_var_req_builder = local_var_req_builder.query(&[("toAsset", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Request a quote for the requested token pairs Weight(UID): 200 +pub async fn sapi_v1_convert_get_quote_post(configuration: &configuration::Configuration, from_asset: &str, to_asset: &str, timestamp: i64, signature: &str, from_amount: Option, to_amount: Option, valid_time: Option<&str>, wallet_type: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/convert/getQuote", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("fromAsset", &from_asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("toAsset", &to_asset.to_string())]); + if let Some(ref local_var_str) = from_amount { + local_var_req_builder = local_var_req_builder.query(&[("fromAmount", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = to_amount { + local_var_req_builder = local_var_req_builder.query(&[("toAmount", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = valid_time { + local_var_req_builder = local_var_req_builder.query(&[("validTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = wallet_type { + local_var_req_builder = local_var_req_builder.query(&[("walletType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Enable users to cancel a limit order Weight(UID): 200 +pub async fn sapi_v1_convert_limit_cancel_order_post(configuration: &configuration::Configuration, order_id: i64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/convert/limit/cancelOrder", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("orderId", &order_id.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Enable users to place a limit order - baseAsset or quoteAsset can be determined via exchangeInfo endpoint. - Limit price is defined from baseAsset to quoteAsset. - Either baseAmount or quoteAmount is used. Weight(UID): 500 +pub async fn sapi_v1_convert_limit_place_order_post(configuration: &configuration::Configuration, base_asset: &str, quote_asset: &str, limit_price: f64, side: &str, timestamp: i64, signature: &str, base_amount: Option, quote_amount: Option, wallet_type: Option<&str>, expired_type: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/convert/limit/placeOrder", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("baseAsset", &base_asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("quoteAsset", "e_asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("limitPrice", &limit_price.to_string())]); + if let Some(ref local_var_str) = base_amount { + local_var_req_builder = local_var_req_builder.query(&[("baseAmount", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = quote_amount { + local_var_req_builder = local_var_req_builder.query(&[("quoteAmount", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("side", &side.to_string())]); + if let Some(ref local_var_str) = wallet_type { + local_var_req_builder = local_var_req_builder.query(&[("walletType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = expired_type { + local_var_req_builder = local_var_req_builder.query(&[("expiredType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Enable users to query for all existing limit orders Weight(UID): 3000 +pub async fn sapi_v1_convert_limit_query_open_orders_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/convert/limit/queryOpenOrders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query order status by order ID. Weight(UID): 100 +pub async fn sapi_v1_convert_order_status_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, order_id: Option<&str>, quote_id: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/convert/orderStatus", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = quote_id { + local_var_req_builder = local_var_req_builder.query(&[("quoteId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - The max interval between startTime and endTime is 30 days. Weight(UID): 3000 +pub async fn sapi_v1_convert_trade_flow_get(configuration: &configuration::Configuration, start_time: i64, end_time: i64, timestamp: i64, signature: &str, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/convert/tradeFlow", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("startTime", &start_time.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("endTime", &end_time.to_string())]); + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/crypto_loans_api.rs b/test_rust/src/apis/crypto_loans_api.rs new file mode 100644 index 0000000..f4ab219 --- /dev/null +++ b/test_rust/src/apis/crypto_loans_api.rs @@ -0,0 +1,1308 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_loan_adjust_ltv_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanAdjustLtvPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_borrow_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanBorrowHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_borrow_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanBorrowPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_collateral_data_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanCollateralDataGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_customize_margin_call_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanCustomizeMarginCallPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_income_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanIncomeGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_loanable_data_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanLoanableDataGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_ltv_adjustment_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanLtvAdjustmentHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_ongoing_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanOngoingOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_repay_collateral_rate_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanRepayCollateralRateGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_repay_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanRepayHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_repay_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanRepayPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_loan_flexible_adjust_ltv_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2LoanFlexibleAdjustLtvPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_loan_flexible_borrow_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2LoanFlexibleBorrowHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_loan_flexible_borrow_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2LoanFlexibleBorrowPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_loan_flexible_collateral_data_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2LoanFlexibleCollateralDataGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_loan_flexible_loanable_data_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2LoanFlexibleLoanableDataGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_loan_flexible_ltv_adjustment_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2LoanFlexibleLtvAdjustmentHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_loan_flexible_ongoing_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2LoanFlexibleOngoingOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_loan_flexible_repay_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2LoanFlexibleRepayHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_loan_flexible_repay_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2LoanFlexibleRepayPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Weight(UID): 6000 +pub async fn sapi_v1_loan_adjust_ltv_post(configuration: &configuration::Configuration, order_id: i64, amount: f64, direction: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/adjust/ltv", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("orderId", &order_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("direction", &direction.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 +pub async fn sapi_v1_loan_borrow_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, order_id: Option, loan_coin: Option<&str>, collateral_coin: Option<&str>, start_time: Option, end_time: Option, current: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/borrow/history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(UID): 6000 +pub async fn sapi_v1_loan_borrow_post(configuration: &configuration::Configuration, loan_coin: &str, collateral_coin: &str, loan_term: i32, timestamp: i64, signature: &str, loan_amount: Option, collateral_amount: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/borrow", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &loan_coin.to_string())]); + if let Some(ref local_var_str) = loan_amount { + local_var_req_builder = local_var_req_builder.query(&[("loanAmount", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &collateral_coin.to_string())]); + if let Some(ref local_var_str) = collateral_amount { + local_var_req_builder = local_var_req_builder.query(&[("collateralAmount", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("loanTerm", &loan_term.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 +pub async fn sapi_v1_loan_collateral_data_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, collateral_coin: Option<&str>, vip_level: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/collateral/data", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = vip_level { + local_var_req_builder = local_var_req_builder.query(&[("vipLevel", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Customize margin call for ongoing orders only. Weight(UID): 6000 +pub async fn sapi_v1_loan_customize_margin_call_post(configuration: &configuration::Configuration, margin_call: f32, timestamp: i64, signature: &str, order_id: Option, collateral_coin: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/customize/margin_call", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("marginCall", &margin_call.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - If startTime and endTime are not sent, the recent 7-day data will be returned. - The max interval between startTime and endTime is 30 days. Weight(UID): 6000 +pub async fn sapi_v1_loan_income_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, asset: Option<&str>, r#type: Option<&str>, start_time: Option, end_time: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/income", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = r#type { + local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 +pub async fn sapi_v1_loan_loanable_data_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, loan_coin: Option<&str>, vip_level: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/loanable/data", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = vip_level { + local_var_req_builder = local_var_req_builder.query(&[("vipLevel", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// If startTime and endTime are not sent, the recent 90-day data will be returned. The max interval between startTime and endTime is 180 days. Weight(IP): 400 +pub async fn sapi_v1_loan_ltv_adjustment_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, order_id: Option, loan_coin: Option<&str>, collateral_coin: Option<&str>, start_time: Option, end_time: Option, current: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/ltv/adjustment/history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 300 +pub async fn sapi_v1_loan_ongoing_orders_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, order_id: Option, loan_coin: Option<&str>, collateral_coin: Option<&str>, current: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/ongoing/orders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second. Weight(IP): 6000 +pub async fn sapi_v1_loan_repay_collateral_rate_get(configuration: &configuration::Configuration, loan_coin: &str, collateral_coin: &str, repay_amount: f32, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/repay/collateral/rate", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &loan_coin.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &collateral_coin.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("repayAmount", &repay_amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// If startTime and endTime are not sent, the recent 90-day data will be returned. The max interval between startTime and endTime is 180 days. Weight(IP): 400 +pub async fn sapi_v1_loan_repay_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, order_id: Option, loan_coin: Option<&str>, collateral_coin: Option<&str>, start_time: Option, end_time: Option, current: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/repay/history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(UID): 6000 +pub async fn sapi_v1_loan_repay_post(configuration: &configuration::Configuration, order_id: i64, amount: f64, timestamp: i64, signature: &str, r#type: Option, collateral_return: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/repay", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("orderId", &order_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = r#type { + local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_return { + local_var_req_builder = local_var_req_builder.query(&[("collateralReturn", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - API Key needs Spot & Margin Trading permission for this endpoint Weight(UID): 6000 +pub async fn sapi_v2_loan_flexible_adjust_ltv_post(configuration: &configuration::Configuration, adjustment_amount: f32, direction: &str, timestamp: i64, signature: &str, loan_coin: Option<&str>, collateral_coin: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/loan/flexible/adjust/ltv", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("adjustmentAmount", &adjustment_amount.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("direction", &direction.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 +pub async fn sapi_v2_loan_flexible_borrow_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, loan_coin: Option<&str>, collateral_coin: Option<&str>, start_time: Option, end_time: Option, current: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/loan/flexible/borrow/history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - Only available for master account Weight(UID): 6000 +pub async fn sapi_v2_loan_flexible_borrow_post(configuration: &configuration::Configuration, timestamp: i64, signature: &str, loan_coin: Option<&str>, loan_amount: Option, collateral_coin: Option<&str>, collateral_amount: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/loan/flexible/borrow", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = loan_amount { + local_var_req_builder = local_var_req_builder.query(&[("loanAmount", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_amount { + local_var_req_builder = local_var_req_builder.query(&[("collateralAmount", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 +pub async fn sapi_v2_loan_flexible_collateral_data_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, collateral_coin: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/loan/flexible/collateral/data", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 +pub async fn sapi_v2_loan_flexible_loanable_data_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, loan_coin: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/loan/flexible/loanable/data", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 +pub async fn sapi_v2_loan_flexible_ltv_adjustment_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, loan_coin: Option<&str>, collateral_coin: Option<&str>, start_time: Option, end_time: Option, current: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/loan/flexible/ltv/adjustment/history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 300 +pub async fn sapi_v2_loan_flexible_ongoing_orders_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, loan_coin: Option<&str>, collateral_coin: Option<&str>, current: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/loan/flexible/ongoing/orders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 +pub async fn sapi_v2_loan_flexible_repay_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, loan_coin: Option<&str>, collateral_coin: Option<&str>, start_time: Option, end_time: Option, current: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/loan/flexible/repay/history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - repayAmount is mandatory even fullRepayment = FALSE Weight(IP): 6000 +pub async fn sapi_v2_loan_flexible_repay_post(configuration: &configuration::Configuration, repay_amount: f32, timestamp: i64, signature: &str, loan_coin: Option<&str>, collateral_coin: Option<&str>, collateral_return: Option, full_repayment: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/loan/flexible/repay", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("repayAmount", &repay_amount.to_string())]); + if let Some(ref local_var_str) = collateral_return { + local_var_req_builder = local_var_req_builder.query(&[("collateralReturn", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = full_repayment { + local_var_req_builder = local_var_req_builder.query(&[("fullRepayment", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/dual_investment_api.rs b/test_rust/src/apis/dual_investment_api.rs new file mode 100644 index 0000000..3677569 --- /dev/null +++ b/test_rust/src/apis/dual_investment_api.rs @@ -0,0 +1,292 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_dci_product_accounts_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1DciProductAccountsGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_dci_product_auto_compound_edit_status_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1DciProductAutoCompoundEditStatusPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_dci_product_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1DciProductListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_dci_product_positions_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1DciProductPositionsGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_dci_product_subscribe_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1DciProductSubscribePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Check Dual Investment accounts Weight(IP): 1 +pub async fn sapi_v1_dci_product_accounts_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/dci/product/accounts", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Change Auto-Compound status - 15:31 ~ 16:00 UTC+8 This function is disabled Weight(IP): 1 Rate Limit: Maximum 1 time/s per account +pub async fn sapi_v1_dci_product_auto_compound_edit_status_post(configuration: &configuration::Configuration, position_id: i64, auto_compound_plan: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/dci/product/auto_compound/edit-status", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("positionId", &position_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("autoCompoundPlan", &auto_compound_plan.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get Dual Investment product list Weight(IP): 1 +pub async fn sapi_v1_dci_product_list_get(configuration: &configuration::Configuration, option_type: &str, exercised_coin: &str, invest_coin: &str, timestamp: i64, signature: &str, page_size: Option<&str>, page_index: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/dci/product/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("optionType", &option_type.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("exercisedCoin", &exercised_coin.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("investCoin", &invest_coin.to_string())]); + if let Some(ref local_var_str) = page_size { + local_var_req_builder = local_var_req_builder.query(&[("pageSize", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_index { + local_var_req_builder = local_var_req_builder.query(&[("pageIndex", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get Dual Investment positions (batch) Weight(IP): 1 +pub async fn sapi_v1_dci_product_positions_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, status: Option<&str>, page_size: Option<&str>, page_index: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/dci/product/positions", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = status { + local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_size { + local_var_req_builder = local_var_req_builder.query(&[("pageSize", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_index { + local_var_req_builder = local_var_req_builder.query(&[("pageIndex", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Subscribe Dual Investment products - `Products are not available.` means that the APR changes to lower value, or the orders are not available. - `Failed` is a system or network errors. Weight(IP): 1 +pub async fn sapi_v1_dci_product_subscribe_post(configuration: &configuration::Configuration, id: &str, order_id: &str, deposit_amount: f64, auto_compound_plan: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/dci/product/subscribe", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("id", &id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("orderId", &order_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("depositAmount", &deposit_amount.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("autoCompoundPlan", &auto_compound_plan.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/fiat_api.rs b/test_rust/src/apis/fiat_api.rs new file mode 100644 index 0000000..e7851d5 --- /dev/null +++ b/test_rust/src/apis/fiat_api.rs @@ -0,0 +1,144 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_fiat_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1FiatOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_fiat_payments_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1FiatPaymentsGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(UID): 90000 +pub async fn sapi_v1_fiat_orders_get(configuration: &configuration::Configuration, transaction_type: i32, timestamp: i64, signature: &str, begin_time: Option, end_time: Option, page: Option, rows: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/fiat/orders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("transactionType", &transaction_type.to_string())]); + if let Some(ref local_var_str) = begin_time { + local_var_req_builder = local_var_req_builder.query(&[("beginTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = rows { + local_var_req_builder = local_var_req_builder.query(&[("rows", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(IP): 1 +pub async fn sapi_v1_fiat_payments_get(configuration: &configuration::Configuration, transaction_type: i32, timestamp: i64, signature: &str, begin_time: Option, end_time: Option, page: Option, rows: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/fiat/payments", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("transactionType", &transaction_type.to_string())]); + if let Some(ref local_var_str) = begin_time { + local_var_req_builder = local_var_req_builder.query(&[("beginTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = rows { + local_var_req_builder = local_var_req_builder.query(&[("rows", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/futures_algo_api.rs b/test_rust/src/apis/futures_algo_api.rs new file mode 100644 index 0000000..d8caa70 --- /dev/null +++ b/test_rust/src/apis/futures_algo_api.rs @@ -0,0 +1,376 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_algo_futures_historical_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AlgoFuturesHistoricalOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_algo_futures_new_order_twap_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AlgoFuturesNewOrderTwapPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_algo_futures_new_order_vp_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AlgoFuturesNewOrderVpPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_algo_futures_open_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AlgoFuturesOpenOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_algo_futures_order_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AlgoFuturesOrderDeleteError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_algo_futures_sub_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AlgoFuturesSubOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 +pub async fn sapi_v1_algo_futures_historical_orders_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, symbol: Option<&str>, side: Option<&str>, start_time: Option, end_time: Option, page: Option, page_size: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/algo/futures/historicalOrders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = side { + local_var_req_builder = local_var_req_builder.query(&[("side", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_size { + local_var_req_builder = local_var_req_builder.query(&[("pageSize", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Send in a Twap new order. Only support on USDⓈ-M Contracts. You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com - Total Algo open orders max allowed: 10 orders. - Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. - Receiving \"success\": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive \"success\": true, but the order status will be expired after we check it. - quantity * 60 / duration should be larger than minQty - duration cannot be less than 5 mins or more than 24 hours. - For delivery contracts, TWAP end time should be one hour earlier than the delivery time of the symbol. Weight(UID): 3000 +pub async fn sapi_v1_algo_futures_new_order_twap_post(configuration: &configuration::Configuration, symbol: &str, side: &str, quantity: f64, duration: i64, timestamp: i64, signature: &str, position_side: Option<&str>, client_algo_id: Option<&str>, reduce_only: Option, limit_price: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/algo/futures/newOrderTwap", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("side", &side.to_string())]); + if let Some(ref local_var_str) = position_side { + local_var_req_builder = local_var_req_builder.query(&[("positionSide", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("quantity", &quantity.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("duration", &duration.to_string())]); + if let Some(ref local_var_str) = client_algo_id { + local_var_req_builder = local_var_req_builder.query(&[("clientAlgoId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = reduce_only { + local_var_req_builder = local_var_req_builder.query(&[("reduceOnly", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit_price { + local_var_req_builder = local_var_req_builder.query(&[("limitPrice", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Send in a VP new order. Only support on USDⓈ-M Contracts. - You need to enable `Futures Trading Permission` for the api key which requests this endpoint. - Base URL: https://api.binance.com - Total Algo open orders max allowed: 10 orders. - Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. - Receiving \"success\": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive \"success\": true, but the order status will be expired after we check it. Weight(UID): 3000 +pub async fn sapi_v1_algo_futures_new_order_vp_post(configuration: &configuration::Configuration, symbol: &str, side: &str, quantity: f64, urgency: &str, timestamp: i64, signature: &str, position_side: Option<&str>, client_algo_id: Option<&str>, reduce_only: Option, limit_price: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/algo/futures/newOrderVp", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("side", &side.to_string())]); + if let Some(ref local_var_str) = position_side { + local_var_req_builder = local_var_req_builder.query(&[("positionSide", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("quantity", &quantity.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("urgency", &urgency.to_string())]); + if let Some(ref local_var_str) = client_algo_id { + local_var_req_builder = local_var_req_builder.query(&[("clientAlgoId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = reduce_only { + local_var_req_builder = local_var_req_builder.query(&[("reduceOnly", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit_price { + local_var_req_builder = local_var_req_builder.query(&[("limitPrice", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 +pub async fn sapi_v1_algo_futures_open_orders_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/algo/futures/openOrders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Cancel an active order. - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 +pub async fn sapi_v1_algo_futures_order_delete(configuration: &configuration::Configuration, algo_id: i64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/algo/futures/order", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("algoId", &algo_id.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 +pub async fn sapi_v1_algo_futures_sub_orders_get(configuration: &configuration::Configuration, algo_id: i64, timestamp: i64, signature: &str, page: Option, page_size: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/algo/futures/subOrders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("algoId", &algo_id.to_string())]); + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_size { + local_var_req_builder = local_var_req_builder.query(&[("pageSize", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/futures_api.rs b/test_rust/src/apis/futures_api.rs new file mode 100644 index 0000000..2bf8a2d --- /dev/null +++ b/test_rust/src/apis/futures_api.rs @@ -0,0 +1,190 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_futures_hist_data_link_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1FuturesHistDataLinkGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_futures_transfer_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1FuturesTransferGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_futures_transfer_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1FuturesTransferPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Weight(IP): 1 +pub async fn sapi_v1_futures_hist_data_link_get(configuration: &configuration::Configuration, symbol: &str, data_type: &str, timestamp: i64, signature: &str, start_time: Option, end_time: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/futures/histDataLink", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("dataType", &data_type.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 10 +pub async fn sapi_v1_futures_transfer_get(configuration: &configuration::Configuration, asset: &str, start_time: i64, timestamp: i64, signature: &str, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/futures/transfer", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("startTime", &start_time.to_string())]); + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Execute transfer between spot account and futures account. Weight(IP): 1 +pub async fn sapi_v1_futures_transfer_post(configuration: &configuration::Configuration, asset: &str, amount: f64, r#type: i64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/futures/transfer", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/gift_card_api.rs b/test_rust/src/apis/gift_card_api.rs new file mode 100644 index 0000000..c27b517 --- /dev/null +++ b/test_rust/src/apis/gift_card_api.rs @@ -0,0 +1,329 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_giftcard_buy_code_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1GiftcardBuyCodePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_giftcard_buy_code_token_limit_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1GiftcardBuyCodeTokenLimitGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_giftcard_create_code_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1GiftcardCreateCodePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_giftcard_cryptography_rsa_public_key_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1GiftcardCryptographyRsaPublicKeyGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_giftcard_redeem_code_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1GiftcardRedeemCodePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_giftcard_verify_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1GiftcardVerifyGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// This API is for buying a fixed-value Binance Code, which means your Binance Code will be redeemable to a token that is different to the token that you are paying in. If the token you’re paying and the redeemable token are the same, please use the Create Binance Code endpoint. You can use supported crypto currency or fiat token as baseToken to buy Binance Code that is redeemable to your chosen faceToken. Once successfully purchased, the amount of baseToken would be deducted from your funding wallet. To get started with, please make sure: - You have a Binance account - You have passed kyc - You have a sufficient balance in your Binance funding wallet - You need Enable Withdrawals for the API Key which requests this endpoint. Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H Weight(IP): 1 +pub async fn sapi_v1_giftcard_buy_code_post(configuration: &configuration::Configuration, base_token: &str, face_token: &str, base_token_amount: f64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/giftcard/buyCode", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("baseToken", &base_token.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("faceToken", &face_token.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("baseTokenAmount", &base_token_amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// This API is to help you verify which tokens are available for you to purchase fixed-value gift cards as mentioned in section 2 and it's limitation. Weight(IP): 1 +pub async fn sapi_v1_giftcard_buy_code_token_limit_get(configuration: &configuration::Configuration, base_token: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/giftcard/buyCode/token-limit", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("baseToken", &base_token.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// This API is for creating a Binance Code. To get started with, please make sure: - You have a Binance account - You have passed kyc - You have a sufficient balance in your Binance funding wallet - You need Enable Withdrawals for the API Key which requests this endpoint. Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H Weight(IP): 1 +pub async fn sapi_v1_giftcard_create_code_post(configuration: &configuration::Configuration, token: &str, amount: f64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/giftcard/createCode", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("token", &token.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// This API is for fetching the RSA Public Key. This RSA Public key will be used to encrypt the card code. Please note that the RSA Public key fetched is valid only for the current day. Weight(IP): 1 +pub async fn sapi_v1_giftcard_cryptography_rsa_public_key_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/giftcard/cryptography/rsa-public-key", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// This API is for redeeming the Binance Code. Once redeemed, the coins will be deposited in your funding wallet. Please note that if you enter the wrong code 5 times within 24 hours, you will no longer be able to redeem any Binance Code that day. Weight(IP): 1 +pub async fn sapi_v1_giftcard_redeem_code_post(configuration: &configuration::Configuration, code: &str, timestamp: i64, signature: &str, external_uid: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/giftcard/redeemCode", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("code", &code.to_string())]); + if let Some(ref local_var_str) = external_uid { + local_var_req_builder = local_var_req_builder.query(&[("externalUid", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// This API is for verifying whether the Binance Code is valid or not by entering Binance Code or reference number. Please note that if you enter the wrong binance code 5 times within an hour, you will no longer be able to verify any binance code for that hour. Weight(IP): 1 +pub async fn sapi_v1_giftcard_verify_get(configuration: &configuration::Configuration, reference_no: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/giftcard/verify", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("referenceNo", &reference_no.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/isolated_margin_stream_api.rs b/test_rust/src/apis/isolated_margin_stream_api.rs new file mode 100644 index 0000000..f5e6c5f --- /dev/null +++ b/test_rust/src/apis/isolated_margin_stream_api.rs @@ -0,0 +1,155 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_user_data_stream_isolated_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1UserDataStreamIsolatedDeleteError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_user_data_stream_isolated_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1UserDataStreamIsolatedPostError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_user_data_stream_isolated_put`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1UserDataStreamIsolatedPutError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Close out a user data stream. Weight: 1 +pub async fn sapi_v1_user_data_stream_isolated_delete(configuration: &configuration::Configuration, listen_key: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/userDataStream/isolated", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = listen_key { + local_var_req_builder = local_var_req_builder.query(&[("listenKey", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 +pub async fn sapi_v1_user_data_stream_isolated_post(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/userDataStream/isolated", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 1 +pub async fn sapi_v1_user_data_stream_isolated_put(configuration: &configuration::Configuration, listen_key: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/userDataStream/isolated", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = listen_key { + local_var_req_builder = local_var_req_builder.query(&[("listenKey", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/margin_api.rs b/test_rust/src/apis/margin_api.rs new file mode 100644 index 0000000..09a75ec --- /dev/null +++ b/test_rust/src/apis/margin_api.rs @@ -0,0 +1,2650 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_bnb_burn_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1BnbBurnGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_bnb_burn_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1BnbBurnPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_account_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginAccountGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_all_assets_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginAllAssetsGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_all_order_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginAllOrderListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_all_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginAllOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_all_pairs_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginAllPairsGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_available_inventory_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginAvailableInventoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_borrow_repay_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginBorrowRepayGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_borrow_repay_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginBorrowRepayPostError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_capital_flow_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginCapitalFlowGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_cross_margin_collateral_ratio_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginCrossMarginCollateralRatioGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_cross_margin_data_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginCrossMarginDataGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_delist_schedule_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginDelistScheduleGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_exchange_small_liability_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginExchangeSmallLiabilityGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_exchange_small_liability_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginExchangeSmallLiabilityHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_force_liquidation_rec_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginForceLiquidationRecGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_interest_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginInterestHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_interest_rate_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginInterestRateHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_isolated_account_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginIsolatedAccountDeleteError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_isolated_account_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginIsolatedAccountGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_isolated_account_limit_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginIsolatedAccountLimitGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_isolated_account_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginIsolatedAccountPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_isolated_all_pairs_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginIsolatedAllPairsGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_isolated_margin_data_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginIsolatedMarginDataGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_isolated_margin_tier_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginIsolatedMarginTierGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_leverage_bracket_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginLeverageBracketGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_manual_liquidation_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginManualLiquidationPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_max_borrowable_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginMaxBorrowableGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_max_leverage_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginMaxLeveragePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_max_transferable_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginMaxTransferableGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_my_trades_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginMyTradesGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_next_hourly_interest_rate_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginNextHourlyInterestRateGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_open_order_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginOpenOrderListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_open_orders_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginOpenOrdersDeleteError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_open_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginOpenOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_order_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginOrderDeleteError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_order_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginOrderGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_order_list_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginOrderListDeleteError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_order_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginOrderListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_order_oco_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginOrderOcoPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_order_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginOrderPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_price_index_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginPriceIndexGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_rate_limit_order_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginRateLimitOrderGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_trade_coeff_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginTradeCoeffGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_margin_transfer_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginTransferGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Weight(IP): 1 +pub async fn sapi_v1_bnb_burn_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/bnbBurn", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - \"spotBNBBurn\" and \"interestBNBBurn\" should be sent at least one. Weight(IP): 1 +pub async fn sapi_v1_bnb_burn_post(configuration: &configuration::Configuration, timestamp: i64, signature: &str, spot_bnb_burn: Option<&str>, interest_bnb_burn: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/bnbBurn", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = spot_bnb_burn { + local_var_req_builder = local_var_req_builder.query(&[("spotBNBBurn", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = interest_bnb_burn { + local_var_req_builder = local_var_req_builder.query(&[("interestBNBBurn", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 10 +pub async fn sapi_v1_margin_account_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/account", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_margin_all_assets_get(configuration: &configuration::Configuration, asset: &str) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/allAssets", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Retrieves all OCO for a specific margin account based on provided optional parameters Weight(IP): 200 +pub async fn sapi_v1_margin_all_order_list_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, is_isolated: Option<&str>, symbol: Option<&str>, from_id: Option<&str>, start_time: Option, end_time: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/allOrderList", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = is_isolated { + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = from_id { + local_var_req_builder = local_var_req_builder.query(&[("fromId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - If `orderId` is set, it will get orders >= that orderId. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 200 Request Limit: 60 times/min per IP +pub async fn sapi_v1_margin_all_orders_get(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, is_isolated: Option<&str>, order_id: Option, start_time: Option, end_time: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/allOrders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = is_isolated { + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_margin_all_pairs_get(configuration: &configuration::Configuration, symbol: &str) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/allPairs", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Margin available Inventory query Weight(UID): 50 +pub async fn sapi_v1_margin_available_inventory_get(configuration: &configuration::Configuration, r#type: &str, timestamp: i64, signature: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/available-inventory", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query borrow/repay records in Margin account - txId or startTime must be sent. txId takes precedence. Response in descending order - If an asset is sent, data within 30 days before endTime; If an asset is not sent, data within 7 days before endTime - If neither startTime nor endTime is sent, the recent 7-day data will be returned. - startTime set as endTime - 7 days by default, endTime set as current time by default Weight(IP): 10 +pub async fn sapi_v1_margin_borrow_repay_get(configuration: &configuration::Configuration, asset: &str, r#type: &str, timestamp: i64, signature: &str, isolated_symbol: Option<&str>, tx_id: Option, start_time: Option, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/borrow-repay", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + if let Some(ref local_var_str) = isolated_symbol { + local_var_req_builder = local_var_req_builder.query(&[("isolatedSymbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = tx_id { + local_var_req_builder = local_var_req_builder.query(&[("txId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Margin account borrow/repay(MARGIN) Weight(UID): 3000 +pub async fn sapi_v1_margin_borrow_repay_post(configuration: &configuration::Configuration, asset: &str, is_isolated: &str, symbol: &str, amount: f64, r#type: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/borrow-repay", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &is_isolated.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get cross or isolated margin capital flow Weight(IP): 100 +pub async fn sapi_v1_margin_capital_flow_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, asset: Option<&str>, symbol: Option<&str>, r#type: Option<&str>, start_time: Option, end_time: Option, from_id: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/capital-flow", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = r#type { + local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = from_id { + local_var_req_builder = local_var_req_builder.query(&[("fromId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 100 +pub async fn sapi_v1_margin_cross_margin_collateral_ratio_get(configuration: &configuration::Configuration, ) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/crossMarginCollateralRatio", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight(IP): 1 when coin is specified; 5 when the coin parameter is omitted +pub async fn sapi_v1_margin_cross_margin_data_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, vip_level: Option, coin: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/crossMarginData", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = vip_level { + local_var_req_builder = local_var_req_builder.query(&[("vipLevel", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = coin { + local_var_req_builder = local_var_req_builder.query(&[("coin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get tokens or symbols delist schedule for cross margin and isolated margin Weight(IP): 100 +pub async fn sapi_v1_margin_delist_schedule_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/delist-schedule", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query the coins which can be small liability exchange Weight(UID): 100 +pub async fn sapi_v1_margin_exchange_small_liability_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/exchange-small-liability", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get Small liability Exchange History Weight(UID): 100 +pub async fn sapi_v1_margin_exchange_small_liability_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, current: Option, size: Option, start_time: Option, end_time: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/exchange-small-liability-history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - Response in descending order Weight(IP): 1 +pub async fn sapi_v1_margin_force_liquidation_rec_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, start_time: Option, end_time: Option, isolated_symbol: Option<&str>, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/forceLiquidationRec", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = isolated_symbol { + local_var_req_builder = local_var_req_builder.query(&[("isolatedSymbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - Response in descending order - If `isolatedSymbol` is not sent, crossed margin data will be returned - Set `archived` to `true` to query data from 6 months ago - `type` in response has 4 enums: - `PERIODIC` interest charged per hour - `ON_BORROW` first interest charged on borrow - `PERIODIC_CONVERTED` interest charged per hour converted into BNB - `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB Weight(IP): 1 +pub async fn sapi_v1_margin_interest_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, asset: Option<&str>, isolated_symbol: Option<&str>, start_time: Option, end_time: Option, current: Option, size: Option, archived: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/interestHistory", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = isolated_symbol { + local_var_req_builder = local_var_req_builder.query(&[("isolatedSymbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = archived { + local_var_req_builder = local_var_req_builder.query(&[("archived", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// The max interval between startTime and endTime is 30 days. Weight(IP): 1 +pub async fn sapi_v1_margin_interest_rate_history_get(configuration: &configuration::Configuration, asset: &str, timestamp: i64, signature: &str, vip_level: Option, start_time: Option, end_time: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/interestRateHistory", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + if let Some(ref local_var_str) = vip_level { + local_var_req_builder = local_var_req_builder.query(&[("vipLevel", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours . Weight(UID): 300 +pub async fn sapi_v1_margin_isolated_account_delete(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/isolated/account", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - If \"symbols\" is not sent, all isolated assets will be returned. - If \"symbols\" is sent, only the isolated assets of the sent symbols will be returned. Weight(IP): 10 +pub async fn sapi_v1_margin_isolated_account_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, symbols: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/isolated/account", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = symbols { + local_var_req_builder = local_var_req_builder.query(&[("symbols", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query enabled isolated margin account limit. Weight(IP): 1 +pub async fn sapi_v1_margin_isolated_account_limit_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/isolated/accountLimit", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Enable isolated margin account for a specific symbol. Weight(UID): 300 +pub async fn sapi_v1_margin_isolated_account_post(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/isolated/account", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 10 +pub async fn sapi_v1_margin_isolated_all_pairs_get(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/isolated/allPairs", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight(IP): 1 when a single is specified; 10 when the symbol parameter is omitted +pub async fn sapi_v1_margin_isolated_margin_data_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, vip_level: Option, symbol: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/isolatedMarginData", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = vip_level { + local_var_req_builder = local_var_req_builder.query(&[("vipLevel", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data Weight(IP): 1 +pub async fn sapi_v1_margin_isolated_margin_tier_get(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, tier: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/isolatedMarginTier", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = tier { + local_var_req_builder = local_var_req_builder.query(&[("tier", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Liability Coin Leverage Bracket in Cross Margin Pro Mode Weight(IP): 1 +pub async fn sapi_v1_margin_leverage_bracket_get(configuration: &configuration::Configuration, ) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/leverageBracket", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Margin manual liquidation Weight(UID): 3000 +pub async fn sapi_v1_margin_manual_liquidation_post(configuration: &configuration::Configuration, r#type: &str, timestamp: i64, signature: &str, symbol: Option<&str>) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/manual-liquidation", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - If `isolatedSymbol` is not sent, crossed margin data will be sent. - `borrowLimit` is also available from https://www.binance.com/en/margin-fee Weight(IP): 50 +pub async fn sapi_v1_margin_max_borrowable_get(configuration: &configuration::Configuration, asset: &str, timestamp: i64, signature: &str, isolated_symbol: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/maxBorrowable", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + if let Some(ref local_var_str) = isolated_symbol { + local_var_req_builder = local_var_req_builder.query(&[("isolatedSymbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Adjust cross margin max leverage Weight(UID): 3000 +pub async fn sapi_v1_margin_max_leverage_post(configuration: &configuration::Configuration, max_leverage: i32, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/max-leverage", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("maxLeverage", &max_leverage.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - If `isolatedSymbol` is not sent, crossed margin data will be sent. Weight(IP): 50 +pub async fn sapi_v1_margin_max_transferable_get(configuration: &configuration::Configuration, asset: &str, timestamp: i64, signature: &str, isolated_symbol: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/maxTransferable", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + if let Some(ref local_var_str) = isolated_symbol { + local_var_req_builder = local_var_req_builder.query(&[("isolatedSymbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - If `fromId` is set, it will get orders >= that `fromId`. Otherwise most recent trades are returned. Weight(IP): 10 +pub async fn sapi_v1_margin_my_trades_get(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, is_isolated: Option<&str>, start_time: Option, end_time: Option, from_id: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/myTrades", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = is_isolated { + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = from_id { + local_var_req_builder = local_var_req_builder.query(&[("fromId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get user the next hourly estimate interest Weight(UID): 100 +pub async fn sapi_v1_margin_next_hourly_interest_rate_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, assets: Option<&str>, is_isolated: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/next-hourly-interest-rate", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = assets { + local_var_req_builder = local_var_req_builder.query(&[("assets", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = is_isolated { + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 10 +pub async fn sapi_v1_margin_open_order_list_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, is_isolated: Option<&str>, symbol: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/openOrderList", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = is_isolated { + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - Cancels all active orders on a symbol for margin account. - This includes OCO orders. Weight(IP): 1 +pub async fn sapi_v1_margin_open_orders_delete(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, is_isolated: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/openOrders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = is_isolated { + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - If the `symbol` is not sent, orders for all symbols will be returned in an array. - When all symbols are returned, the number of requests counted against the rate limiter is equal to the number of symbols currently trading on the exchange - If isIsolated =\"TRUE\", symbol must be sent. Weight(IP): 10 +pub async fn sapi_v1_margin_open_orders_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, symbol: Option<&str>, is_isolated: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/openOrders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = is_isolated { + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Cancel an active order for margin account. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 10 +pub async fn sapi_v1_margin_order_delete(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, is_isolated: Option<&str>, order_id: Option, orig_client_order_id: Option<&str>, new_client_order_id: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/order", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = is_isolated { + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = orig_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("origClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("newClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - Either `orderId` or `origClientOrderId` must be sent. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 10 +pub async fn sapi_v1_margin_order_get(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, is_isolated: Option<&str>, order_id: Option, orig_client_order_id: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/order", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = is_isolated { + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = orig_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("origClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Cancel an entire Order List for a margin account - Canceling an individual leg will cancel the entire OCO - Either `orderListId` or `listClientOrderId` must be provided Weight(UID): 1 +pub async fn sapi_v1_margin_order_list_delete(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, is_isolated: Option<&str>, order_list_id: Option, list_client_order_id: Option<&str>, new_client_order_id: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/orderList", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = is_isolated { + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = order_list_id { + local_var_req_builder = local_var_req_builder.query(&[("orderListId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = list_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("listClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("newClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Retrieves a specific OCO based on provided optional parameters - Either `orderListId` or `origClientOrderId` must be provided Weight(IP): 10 +pub async fn sapi_v1_margin_order_list_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, is_isolated: Option<&str>, symbol: Option<&str>, order_list_id: Option, orig_client_order_id: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/orderList", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = is_isolated { + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = order_list_id { + local_var_req_builder = local_var_req_builder.query(&[("orderListId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = orig_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("origClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Send in a new OCO for a margin account - Price Restrictions: - SELL: Limit Price > Last Price > Stop Price - BUY: Limit Price < Last Price < Stop Price - Quantity Restrictions: - Both legs must have the same quantity - ICEBERG quantities however do not have to be the same. - Order Rate Limit - OCO counts as 2 orders against the order rate limit. Weight(UID): 6 +pub async fn sapi_v1_margin_order_oco_post(configuration: &configuration::Configuration, symbol: &str, side: &str, quantity: f64, price: f64, stop_price: f64, timestamp: i64, signature: &str, is_isolated: Option<&str>, list_client_order_id: Option<&str>, limit_client_order_id: Option<&str>, limit_iceberg_qty: Option, stop_client_order_id: Option<&str>, stop_limit_price: Option, stop_iceberg_qty: Option, stop_limit_time_in_force: Option<&str>, new_order_resp_type: Option<&str>, side_effect_type: Option<&str>, self_trade_prevention_mode: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/order/oco", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = is_isolated { + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = list_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("listClientOrderId", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("side", &side.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("quantity", &quantity.to_string())]); + if let Some(ref local_var_str) = limit_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("limitClientOrderId", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("price", &price.to_string())]); + if let Some(ref local_var_str) = limit_iceberg_qty { + local_var_req_builder = local_var_req_builder.query(&[("limitIcebergQty", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = stop_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("stopClientOrderId", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("stopPrice", &stop_price.to_string())]); + if let Some(ref local_var_str) = stop_limit_price { + local_var_req_builder = local_var_req_builder.query(&[("stopLimitPrice", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = stop_iceberg_qty { + local_var_req_builder = local_var_req_builder.query(&[("stopIcebergQty", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = stop_limit_time_in_force { + local_var_req_builder = local_var_req_builder.query(&[("stopLimitTimeInForce", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_order_resp_type { + local_var_req_builder = local_var_req_builder.query(&[("newOrderRespType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = side_effect_type { + local_var_req_builder = local_var_req_builder.query(&[("sideEffectType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = self_trade_prevention_mode { + local_var_req_builder = local_var_req_builder.query(&[("selfTradePreventionMode", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Post a new order for margin account. Weight(UID): 6 +pub async fn sapi_v1_margin_order_post(configuration: &configuration::Configuration, symbol: &str, side: &str, r#type: &str, quantity: f64, auto_repay_at_cancel: bool, timestamp: i64, signature: &str, is_isolated: Option<&str>, quote_order_qty: Option, price: Option, stop_price: Option, new_client_order_id: Option<&str>, iceberg_qty: Option, new_order_resp_type: Option<&str>, side_effect_type: Option<&str>, time_in_force: Option<&str>, self_trade_prevention_mode: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/order", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = is_isolated { + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("side", &side.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("quantity", &quantity.to_string())]); + if let Some(ref local_var_str) = quote_order_qty { + local_var_req_builder = local_var_req_builder.query(&[("quoteOrderQty", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = price { + local_var_req_builder = local_var_req_builder.query(&[("price", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = stop_price { + local_var_req_builder = local_var_req_builder.query(&[("stopPrice", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("newClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = iceberg_qty { + local_var_req_builder = local_var_req_builder.query(&[("icebergQty", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_order_resp_type { + local_var_req_builder = local_var_req_builder.query(&[("newOrderRespType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = side_effect_type { + local_var_req_builder = local_var_req_builder.query(&[("sideEffectType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = time_in_force { + local_var_req_builder = local_var_req_builder.query(&[("timeInForce", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("autoRepayAtCancel", &auto_repay_at_cancel.to_string())]); + if let Some(ref local_var_str) = self_trade_prevention_mode { + local_var_req_builder = local_var_req_builder.query(&[("selfTradePreventionMode", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 10 +pub async fn sapi_v1_margin_price_index_get(configuration: &configuration::Configuration, symbol: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/priceIndex", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Displays the user's current margin order count usage for all intervals. Weight(IP): 20 +pub async fn sapi_v1_margin_rate_limit_order_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, is_isolated: Option<&str>, symbol: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/rateLimit/order", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = is_isolated { + local_var_req_builder = local_var_req_builder.query(&[("isIsolated", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get personal margin level information Weight(IP): 10 +pub async fn sapi_v1_margin_trade_coeff_get(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/tradeCoeff", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - Response in descending order - Returns data for last 7 days by default - Set `archived` to `true` to query data from 6 months ago Weight(IP): 1 +pub async fn sapi_v1_margin_transfer_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, asset: Option<&str>, r#type: Option<&str>, start_time: Option, end_time: Option, current: Option, size: Option, isolated_symbol: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/margin/transfer", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = r#type { + local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = isolated_symbol { + local_var_req_builder = local_var_req_builder.query(&[("isolatedSymbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/margin_stream_api.rs b/test_rust/src/apis/margin_stream_api.rs new file mode 100644 index 0000000..4d1811f --- /dev/null +++ b/test_rust/src/apis/margin_stream_api.rs @@ -0,0 +1,155 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_user_data_stream_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1UserDataStreamDeleteError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_user_data_stream_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1UserDataStreamPostError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_user_data_stream_put`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1UserDataStreamPutError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Close out a user data stream. Weight: 1 +pub async fn sapi_v1_user_data_stream_delete(configuration: &configuration::Configuration, listen_key: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/userDataStream", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = listen_key { + local_var_req_builder = local_var_req_builder.query(&[("listenKey", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 +pub async fn sapi_v1_user_data_stream_post(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/userDataStream", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 1 +pub async fn sapi_v1_user_data_stream_put(configuration: &configuration::Configuration, listen_key: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/userDataStream", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = listen_key { + local_var_req_builder = local_var_req_builder.query(&[("listenKey", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/market_api.rs b/test_rust/src/apis/market_api.rs new file mode 100644 index 0000000..ee2541b --- /dev/null +++ b/test_rust/src/apis/market_api.rs @@ -0,0 +1,666 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`api_v3_agg_trades_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3AggTradesGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_avg_price_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3AvgPriceGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_depth_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3DepthGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_exchange_info_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3ExchangeInfoGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_historical_trades_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3HistoricalTradesGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_klines_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3KlinesGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_ping_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3PingGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_ticker24hr_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3Ticker24hrGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_ticker_book_ticker_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3TickerBookTickerGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_ticker_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3TickerGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_ticker_price_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3TickerPriceGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_ticker_trading_day_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3TickerTradingDayGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_time_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3TimeGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_trades_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3TradesGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_ui_klines_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3UiKlinesGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated. - If `fromId`, `startTime`, and `endTime` are not sent, the most recent aggregate trades will be returned. - Note that if a trade has the following values, this was a duplicate aggregate trade and marked as invalid: p = '0' // price q = '0' // qty f = -1 // first_trade_id l = -1 // last_trade_id Weight(IP): 2 +pub async fn api_v3_agg_trades_get(configuration: &configuration::Configuration, symbol: &str, from_id: Option, start_time: Option, end_time: Option, limit: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/aggTrades", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = from_id { + local_var_req_builder = local_var_req_builder.query(&[("fromId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Current average price for a symbol. Weight(IP): 2 +pub async fn api_v3_avg_price_get(configuration: &configuration::Configuration, symbol: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/avgPrice", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// | Limit | Weight(IP) | |---------------------|-------------| | 1-100 | 5 | | 101-500 | 25 | | 501-1000 | 50 | | 1001-5000 | 250 | +pub async fn api_v3_depth_get(configuration: &configuration::Configuration, symbol: &str, limit: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/depth", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Current exchange trading rules and symbol information - If any symbol provided in either symbol or symbols do not exist, the endpoint will throw an error. - All parameters are optional. - permissions can support single or multiple values (e.g. SPOT, [\"MARGIN\",\"LEVERAGED\"]) - If permissions parameter not provided, the default values will be [\"SPOT\",\"MARGIN\",\"LEVERAGED\"]. - To display all permissions you need to specify them explicitly. (e.g. SPOT, MARGIN,...) Examples of Symbol Permissions Interpretation from the Response: - [[\"A\",\"B\"]] means you may place an order if your account has either permission \"A\" or permission \"B\". - [[\"A\"],[\"B\"]] means you can place an order if your account has permission \"A\" and permission \"B\". - [[\"A\"],[\"B\",\"C\"]] means you can place an order if your account has permission \"A\" and permission \"B\" or permission \"C\". (Inclusive or is applied here, not exclusive or, so your account may have both permission \"B\" and permission \"C\".) Weight(IP): 10 +pub async fn api_v3_exchange_info_get(configuration: &configuration::Configuration, symbol: Option<&str>, symbols: Option<&str>, permissions: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/exchangeInfo", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = symbols { + local_var_req_builder = local_var_req_builder.query(&[("symbols", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = permissions { + local_var_req_builder = local_var_req_builder.query(&[("permissions", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get older market trades. Weight(IP): 10 +pub async fn api_v3_historical_trades_get(configuration: &configuration::Configuration, symbol: &str, limit: Option, from_id: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/historicalTrades", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = from_id { + local_var_req_builder = local_var_req_builder.query(&[("fromId", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. - If `startTime` and `endTime` are not sent, the most recent klines are returned. Weight(IP): 2 +pub async fn api_v3_klines_get(configuration: &configuration::Configuration, symbol: &str, interval: &str, start_time: Option, end_time: Option, time_zone: Option<&str>, limit: Option) -> Result>, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/klines", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("interval", &interval.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = time_zone { + local_var_req_builder = local_var_req_builder.query(&[("timeZone", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Test connectivity to the Rest API. Weight(IP): 1 +pub async fn api_v3_ping_get(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/ping", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 24 hour rolling window price change statistics. Careful when accessing this with no symbol. - If the symbol is not sent, tickers for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `80` when the symbol parameter is omitted; +pub async fn api_v3_ticker24hr_get(configuration: &configuration::Configuration, symbol: Option<&str>, symbols: Option<&str>, r#type: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/ticker/24hr", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = symbols { + local_var_req_builder = local_var_req_builder.query(&[("symbols", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = r#type { + local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Best price/qty on the order book for a symbol or symbols. - If the symbol is not sent, bookTickers for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `4` when the symbol parameter is omitted; +pub async fn api_v3_ticker_book_ticker_get(configuration: &configuration::Configuration, symbol: Option<&str>, symbols: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/ticker/bookTicker", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = symbols { + local_var_req_builder = local_var_req_builder.query(&[("symbols", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// The window used to compute statistics is typically slightly wider than requested windowSize. openTime for /api/v3/ticker always starts on a minute, while the closeTime is the current time of the request. As such, the effective window might be up to 1 minute wider than requested. E.g. If the closeTime is 1641287867099 (January 04, 2022 09:17:47:099 UTC) , and the windowSize is 1d. the openTime will be: 1641201420000 (January 3, 2022, 09:17:00 UTC) Weight(IP): 4 for each requested symbol regardless of windowSize. The weight for this request will cap at 200 once the number of symbols in the request is more than 50. +pub async fn api_v3_ticker_get(configuration: &configuration::Configuration, symbol: Option<&str>, symbols: Option<&str>, window_size: Option<&str>, r#type: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/ticker", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = symbols { + local_var_req_builder = local_var_req_builder.query(&[("symbols", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = window_size { + local_var_req_builder = local_var_req_builder.query(&[("windowSize", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = r#type { + local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Latest price for a symbol or symbols. - If the symbol is not sent, prices for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `4` when the symbol parameter is omitted; +pub async fn api_v3_ticker_price_get(configuration: &configuration::Configuration, symbol: Option<&str>, symbols: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/ticker/price", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = symbols { + local_var_req_builder = local_var_req_builder.query(&[("symbols", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Price change statistics for a trading day. Notes: - Supported values for timeZone: - Hours and minutes (e.g. -1:00, 05:45) - Only hours (e.g. 0, 8, 4) Weight: - `4` for each requested symbol. - The weight for this request will cap at `200` once the number of symbols in the request is more than `50`. +pub async fn api_v3_ticker_trading_day_get(configuration: &configuration::Configuration, symbol: Option<&str>, symbols: Option<&str>, time_zone: Option<&str>, r#type: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/ticker/tradingDay", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = symbols { + local_var_req_builder = local_var_req_builder.query(&[("symbols", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = time_zone { + local_var_req_builder = local_var_req_builder.query(&[("timeZone", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = r#type { + local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Test connectivity to the Rest API and get the current server time. Weight(IP): 1 +pub async fn api_v3_time_get(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/time", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get recent trades. Weight(IP): 10 +pub async fn api_v3_trades_get(configuration: &configuration::Configuration, symbol: &str, limit: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/trades", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// The request is similar to klines having the same parameters and response. uiKlines return modified kline data, optimized for presentation of candlestick charts. Weight(IP): 2 +pub async fn api_v3_ui_klines_get(configuration: &configuration::Configuration, symbol: &str, interval: &str, start_time: Option, end_time: Option, time_zone: Option<&str>, limit: Option) -> Result>, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/uiKlines", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("interval", &interval.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = time_zone { + local_var_req_builder = local_var_req_builder.query(&[("timeZone", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/mining_api.rs b/test_rust/src/apis/mining_api.rs new file mode 100644 index 0000000..6450a5e --- /dev/null +++ b/test_rust/src/apis/mining_api.rs @@ -0,0 +1,750 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_mining_hash_transfer_config_cancel_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MiningHashTransferConfigCancelPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_mining_hash_transfer_config_details_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MiningHashTransferConfigDetailsListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_mining_hash_transfer_config_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MiningHashTransferConfigPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_mining_hash_transfer_profit_details_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MiningHashTransferProfitDetailsGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_mining_payment_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MiningPaymentListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_mining_payment_other_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MiningPaymentOtherGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_mining_payment_uid_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MiningPaymentUidGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_mining_pub_algo_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MiningPubAlgoListGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_mining_pub_coin_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MiningPubCoinListGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_mining_statistics_user_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MiningStatisticsUserListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_mining_statistics_user_status_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MiningStatisticsUserStatusGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_mining_worker_detail_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MiningWorkerDetailGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_mining_worker_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MiningWorkerListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Weight(IP): 5 +pub async fn sapi_v1_mining_hash_transfer_config_cancel_post(configuration: &configuration::Configuration, config_id: &str, user_name: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/mining/hash-transfer/config/cancel", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("configId", &config_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("userName", &user_name.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 5 +pub async fn sapi_v1_mining_hash_transfer_config_details_list_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, page_index: Option, page_size: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/mining/hash-transfer/config/details/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = page_index { + local_var_req_builder = local_var_req_builder.query(&[("pageIndex", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_size { + local_var_req_builder = local_var_req_builder.query(&[("pageSize", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 5 +pub async fn sapi_v1_mining_hash_transfer_config_post(configuration: &configuration::Configuration, user_name: &str, algo: &str, to_pool_user: &str, hash_rate: &str, timestamp: i64, signature: &str, start_date: Option<&str>, end_date: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/mining/hash-transfer/config", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("userName", &user_name.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("algo", &algo.to_string())]); + if let Some(ref local_var_str) = start_date { + local_var_req_builder = local_var_req_builder.query(&[("startDate", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_date { + local_var_req_builder = local_var_req_builder.query(&[("endDate", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("toPoolUser", &to_pool_user.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("hashRate", &hash_rate.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 5 +pub async fn sapi_v1_mining_hash_transfer_profit_details_get(configuration: &configuration::Configuration, config_id: &str, user_name: &str, timestamp: i64, signature: &str, page_index: Option, page_size: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/mining/hash-transfer/profit/details", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("configId", &config_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("userName", &user_name.to_string())]); + if let Some(ref local_var_str) = page_index { + local_var_req_builder = local_var_req_builder.query(&[("pageIndex", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_size { + local_var_req_builder = local_var_req_builder.query(&[("pageSize", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 5 +pub async fn sapi_v1_mining_payment_list_get(configuration: &configuration::Configuration, algo: &str, user_name: &str, timestamp: i64, signature: &str, coin: Option<&str>, start_date: Option<&str>, end_date: Option<&str>, page_index: Option, page_size: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/mining/payment/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("algo", &algo.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("userName", &user_name.to_string())]); + if let Some(ref local_var_str) = coin { + local_var_req_builder = local_var_req_builder.query(&[("coin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_date { + local_var_req_builder = local_var_req_builder.query(&[("startDate", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_date { + local_var_req_builder = local_var_req_builder.query(&[("endDate", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_index { + local_var_req_builder = local_var_req_builder.query(&[("pageIndex", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_size { + local_var_req_builder = local_var_req_builder.query(&[("pageSize", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 5 +pub async fn sapi_v1_mining_payment_other_get(configuration: &configuration::Configuration, algo: &str, user_name: &str, timestamp: i64, signature: &str, coin: Option<&str>, start_date: Option<&str>, end_date: Option<&str>, page_index: Option, page_size: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/mining/payment/other", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("algo", &algo.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("userName", &user_name.to_string())]); + if let Some(ref local_var_str) = coin { + local_var_req_builder = local_var_req_builder.query(&[("coin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_date { + local_var_req_builder = local_var_req_builder.query(&[("startDate", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_date { + local_var_req_builder = local_var_req_builder.query(&[("endDate", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_index { + local_var_req_builder = local_var_req_builder.query(&[("pageIndex", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_size { + local_var_req_builder = local_var_req_builder.query(&[("pageSize", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 5 +pub async fn sapi_v1_mining_payment_uid_get(configuration: &configuration::Configuration, algo: &str, timestamp: i64, signature: &str, start_date: Option<&str>, end_date: Option<&str>, page_index: Option, page_size: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/mining/payment/uid", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("algo", &algo.to_string())]); + if let Some(ref local_var_str) = start_date { + local_var_req_builder = local_var_req_builder.query(&[("startDate", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_date { + local_var_req_builder = local_var_req_builder.query(&[("endDate", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_index { + local_var_req_builder = local_var_req_builder.query(&[("pageIndex", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_size { + local_var_req_builder = local_var_req_builder.query(&[("pageSize", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_mining_pub_algo_list_get(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/mining/pub/algoList", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_mining_pub_coin_list_get(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/mining/pub/coinList", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 5 +pub async fn sapi_v1_mining_statistics_user_list_get(configuration: &configuration::Configuration, algo: &str, user_name: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/mining/statistics/user/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("algo", &algo.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("userName", &user_name.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 5 +pub async fn sapi_v1_mining_statistics_user_status_get(configuration: &configuration::Configuration, algo: &str, user_name: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/mining/statistics/user/status", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("algo", &algo.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("userName", &user_name.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 5 +pub async fn sapi_v1_mining_worker_detail_get(configuration: &configuration::Configuration, algo: &str, user_name: &str, worker_name: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/mining/worker/detail", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("algo", &algo.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("userName", &user_name.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("workerName", &worker_name.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 5 +pub async fn sapi_v1_mining_worker_list_get(configuration: &configuration::Configuration, algo: &str, user_name: &str, timestamp: i64, signature: &str, page_index: Option, sort: Option, sort_column: Option, worker_status: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/mining/worker/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("algo", &algo.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("userName", &user_name.to_string())]); + if let Some(ref local_var_str) = page_index { + local_var_req_builder = local_var_req_builder.query(&[("pageIndex", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = sort { + local_var_req_builder = local_var_req_builder.query(&[("sort", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = sort_column { + local_var_req_builder = local_var_req_builder.query(&[("sortColumn", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = worker_status { + local_var_req_builder = local_var_req_builder.query(&[("workerStatus", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/mod.rs b/test_rust/src/apis/mod.rs new file mode 100644 index 0000000..86c7b34 --- /dev/null +++ b/test_rust/src/apis/mod.rs @@ -0,0 +1,122 @@ +use std::error; +use std::fmt; + +#[derive(Debug, Clone)] +pub struct ResponseContent { + pub status: reqwest::StatusCode, + pub content: String, + pub entity: Option, +} + +#[derive(Debug)] +pub enum Error { + Reqwest(reqwest::Error), + Serde(serde_json::Error), + Io(std::io::Error), + ResponseError(ResponseContent), +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let (module, e) = match self { + Error::Reqwest(e) => ("reqwest", e.to_string()), + Error::Serde(e) => ("serde", e.to_string()), + Error::Io(e) => ("IO", e.to_string()), + Error::ResponseError(e) => ("response", format!("status code {}", e.status)), + }; + write!(f, "error in {}: {}", module, e) + } +} + +impl error::Error for Error { + fn source(&self) -> Option<&(dyn error::Error + 'static)> { + Some(match self { + Error::Reqwest(e) => e, + Error::Serde(e) => e, + Error::Io(e) => e, + Error::ResponseError(_) => return None, + }) + } +} + +impl From for Error { + fn from(e: reqwest::Error) -> Self { + Error::Reqwest(e) + } +} + +impl From for Error { + fn from(e: serde_json::Error) -> Self { + Error::Serde(e) + } +} + +impl From for Error { + fn from(e: std::io::Error) -> Self { + Error::Io(e) + } +} + +pub fn urlencode>(s: T) -> String { + ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() +} + +pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { + if let serde_json::Value::Object(object) = value { + let mut params = vec![]; + + for (key, value) in object { + match value { + serde_json::Value::Object(_) => params.append(&mut parse_deep_object( + &format!("{}[{}]", prefix, key), + value, + )), + serde_json::Value::Array(array) => { + for (i, value) in array.iter().enumerate() { + params.append(&mut parse_deep_object( + &format!("{}[{}][{}]", prefix, key, i), + value, + )); + } + }, + serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), + } + } + + return params; + } + + unimplemented!("Only objects are supported with style=deepObject") +} + +pub mod auto_invest_api; +pub mod blvt_api; +pub mod c2_c_api; +pub mod convert_api; +pub mod crypto_loans_api; +pub mod dual_investment_api; +pub mod fiat_api; +pub mod futures_api; +pub mod futures_algo_api; +pub mod gift_card_api; +pub mod isolated_margin_stream_api; +pub mod margin_api; +pub mod margin_stream_api; +pub mod market_api; +pub mod mining_api; +pub mod nft_api; +pub mod pay_api; +pub mod portfolio_margin_api; +pub mod rebate_api; +pub mod savings_api; +pub mod simple_earn_api; +pub mod spot_algo_api; +pub mod staking_api; +pub mod stream_api; +pub mod sub_account_api; +pub mod trade_api; +pub mod vip_loans_api; +pub mod wallet_api; + +pub mod configuration; diff --git a/test_rust/src/apis/nft_api.rs b/test_rust/src/apis/nft_api.rs new file mode 100644 index 0000000..5cb4335 --- /dev/null +++ b/test_rust/src/apis/nft_api.rs @@ -0,0 +1,261 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_nft_history_deposit_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1NftHistoryDepositGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_nft_history_transactions_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1NftHistoryTransactionsGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_nft_history_withdraw_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1NftHistoryWithdrawGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_nft_user_get_asset_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1NftUserGetAssetGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 +pub async fn sapi_v1_nft_history_deposit_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, start_time: Option, end_time: Option, limit: Option, page: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/nft/history/deposit", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 +pub async fn sapi_v1_nft_history_transactions_get(configuration: &configuration::Configuration, order_type: i32, timestamp: i64, signature: &str, start_time: Option, end_time: Option, limit: Option, page: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/nft/history/transactions", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("orderType", &order_type.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 +pub async fn sapi_v1_nft_history_withdraw_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, start_time: Option, end_time: Option, limit: Option, page: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/nft/history/withdraw", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(UID): 3000 +pub async fn sapi_v1_nft_user_get_asset_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, limit: Option, page: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/nft/user/getAsset", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/pay_api.rs b/test_rust/src/apis/pay_api.rs new file mode 100644 index 0000000..e3f1259 --- /dev/null +++ b/test_rust/src/apis/pay_api.rs @@ -0,0 +1,77 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_pay_transactions_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1PayTransactionsGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// - If startTime and endTime are not sent, the recent 90 days' data will be returned. - The max interval between startTime and endTime is 90 days. - Support for querying orders within the last 18 months. Weight(UID): 3000 +pub async fn sapi_v1_pay_transactions_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, start_time: Option, end_time: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/pay/transactions", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/portfolio_margin_api.rs b/test_rust/src/apis/portfolio_margin_api.rs new file mode 100644 index 0000000..32879bb --- /dev/null +++ b/test_rust/src/apis/portfolio_margin_api.rs @@ -0,0 +1,663 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_portfolio_account_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1PortfolioAccountGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_portfolio_asset_collection_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1PortfolioAssetCollectionPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_portfolio_asset_index_price_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1PortfolioAssetIndexPriceGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_portfolio_auto_collection_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1PortfolioAutoCollectionPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_portfolio_bnb_transfer_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1PortfolioBnbTransferPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_portfolio_collateral_rate_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1PortfolioCollateralRateGetError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_portfolio_interest_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1PortfolioInterestHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_portfolio_margin_asset_leverage_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1PortfolioMarginAssetLeverageGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_portfolio_pm_loan_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1PortfolioPmLoanGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_portfolio_repay_futures_negative_balance_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1PortfolioRepayFuturesNegativeBalancePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_portfolio_repay_futures_switch_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1PortfolioRepayFuturesSwitchGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_portfolio_repay_futures_switch_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1PortfolioRepayFuturesSwitchPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_portfolio_repay_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1PortfolioRepayPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Get the account info 'Weight(IP): 1' +pub async fn sapi_v1_portfolio_account_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/portfolio/account", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Transfers specific asset from Futures Account to Margin account Weight(IP): 60 +pub async fn sapi_v1_portfolio_asset_collection_post(configuration: &configuration::Configuration, asset: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/portfolio/asset-collection", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query Portfolio Margin Asset Index Price Weight(IP): - 1 if send asset - 50 if not send asset +pub async fn sapi_v1_portfolio_asset_index_price_get(configuration: &configuration::Configuration, asset: Option<&str>) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/portfolio/asset-index-price", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Transfers all assets from Futures Account to Margin account Weight(IP): 1500 +pub async fn sapi_v1_portfolio_auto_collection_post(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/portfolio/auto-collection", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// BNB transfer can be between Margin Account and USDM Account Weight(IP): 1500 +pub async fn sapi_v1_portfolio_bnb_transfer_post(configuration: &configuration::Configuration, transfer_side: &str, amount: f64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/portfolio/bnb-transfer", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("transferSide", &transfer_side.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Portfolio Margin Collateral Rate. Weight(IP): 50 +pub async fn sapi_v1_portfolio_collateral_rate_get(configuration: &configuration::Configuration, ) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/portfolio/collateralRate", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query interest history of negative balance for portfolio margin. Weight(IP): 50 +pub async fn sapi_v1_portfolio_interest_history_get(configuration: &configuration::Configuration, asset: &str, timestamp: i64, signature: &str, start_time: Option, end_time: Option, size: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/portfolio/interest-history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 50 +pub async fn sapi_v1_portfolio_margin_asset_leverage_get(configuration: &configuration::Configuration, ) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/portfolio/margin-asset-leverage", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query Portfolio Margin Bankruptcy Loan Amount. Weight(UID): 500 +pub async fn sapi_v1_portfolio_pm_loan_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/portfolio/pmLoan", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Repay futures Negative Balance Weight(IP): 1500 +pub async fn sapi_v1_portfolio_repay_futures_negative_balance_post(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/portfolio/repay-futures-negative-balance", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query Auto-repay-futures Status Weight(IP): 30 +pub async fn sapi_v1_portfolio_repay_futures_switch_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/portfolio/repay-futures-switch", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Change Auto-repay-futures Status Weight(IP): 1500 +pub async fn sapi_v1_portfolio_repay_futures_switch_post(configuration: &configuration::Configuration, auto_repay: bool, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/portfolio/repay-futures-switch", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("autoRepay", &auto_repay.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Repay Portfolio Margin Bankruptcy Loan. Weight(UID): 3000 +pub async fn sapi_v1_portfolio_repay_post(configuration: &configuration::Configuration, timestamp: i64, signature: &str, from: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/portfolio/repay", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = from { + local_var_req_builder = local_var_req_builder.query(&[("from", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/rebate_api.rs b/test_rust/src/apis/rebate_api.rs new file mode 100644 index 0000000..9ae831e --- /dev/null +++ b/test_rust/src/apis/rebate_api.rs @@ -0,0 +1,77 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_rebate_tax_query_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1RebateTaxQueryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. - The earliest startTime is supported on June 10, 2020 Weight(UID): 3000 +pub async fn sapi_v1_rebate_tax_query_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, start_time: Option, end_time: Option, page: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/rebate/taxQuery", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/savings_api.rs b/test_rust/src/apis/savings_api.rs new file mode 100644 index 0000000..ae04d32 --- /dev/null +++ b/test_rust/src/apis/savings_api.rs @@ -0,0 +1,251 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_lending_customized_fixed_purchase_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingCustomizedFixedPurchasePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_position_changed_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingPositionChangedPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_project_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingProjectListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_lending_project_position_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LendingProjectPositionListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Weight(IP): 1 +pub async fn sapi_v1_lending_customized_fixed_purchase_post(configuration: &configuration::Configuration, project_id: &str, lot: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/customizedFixed/purchase", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("projectId", &project_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("lot", &lot.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - PositionId is mandatory parameter for fixed position. Weight(IP): 1 +pub async fn sapi_v1_lending_position_changed_post(configuration: &configuration::Configuration, project_id: &str, lot: &str, timestamp: i64, signature: &str, position_id: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/positionChanged", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("projectId", &project_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("lot", &lot.to_string())]); + if let Some(ref local_var_str) = position_id { + local_var_req_builder = local_var_req_builder.query(&[("positionId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_lending_project_list_get(configuration: &configuration::Configuration, r#type: &str, timestamp: i64, signature: &str, asset: Option<&str>, status: Option<&str>, is_sort_asc: Option, sort_by: Option<&str>, current: Option, size: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/project/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_str) = status { + local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = is_sort_asc { + local_var_req_builder = local_var_req_builder.query(&[("isSortAsc", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = sort_by { + local_var_req_builder = local_var_req_builder.query(&[("sortBy", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_lending_project_position_list_get(configuration: &configuration::Configuration, asset: &str, timestamp: i64, signature: &str, project_id: Option<&str>, status: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/lending/project/position/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + if let Some(ref local_var_str) = project_id { + local_var_req_builder = local_var_req_builder.query(&[("projectId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = status { + local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/simple_earn_api.rs b/test_rust/src/apis/simple_earn_api.rs new file mode 100644 index 0000000..d86e54b --- /dev/null +++ b/test_rust/src/apis/simple_earn_api.rs @@ -0,0 +1,1380 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_simple_earn_account_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnAccountGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_flexible_history_collateral_record_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnFlexibleHistoryCollateralRecordGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_flexible_history_rate_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnFlexibleHistoryRateHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_flexible_history_redemption_record_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_flexible_history_rewards_record_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnFlexibleHistoryRewardsRecordGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_flexible_history_subscription_record_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_flexible_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnFlexibleListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_flexible_personal_left_quota_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnFlexiblePersonalLeftQuotaGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_flexible_position_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnFlexiblePositionGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_flexible_redeem_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnFlexibleRedeemPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_flexible_set_auto_subscribe_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnFlexibleSetAutoSubscribePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_flexible_subscribe_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnFlexibleSubscribePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_flexible_subscription_preview_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnFlexibleSubscriptionPreviewGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_locked_history_redemption_record_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnLockedHistoryRedemptionRecordGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_locked_history_rewards_record_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnLockedHistoryRewardsRecordGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_locked_history_subscription_record_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnLockedHistorySubscriptionRecordGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_locked_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnLockedListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_locked_personal_left_quota_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnLockedPersonalLeftQuotaGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_locked_position_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnLockedPositionGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_locked_redeem_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnLockedRedeemPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_locked_set_auto_subscribe_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnLockedSetAutoSubscribePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_locked_subscribe_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnLockedSubscribePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_simple_earn_locked_subscription_preview_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SimpleEarnLockedSubscriptionPreviewGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_account_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/account", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_flexible_history_collateral_record_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, product_id: Option<&str>, start_time: Option, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/flexible/history/collateralRecord", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = product_id { + local_var_req_builder = local_var_req_builder.query(&[("productId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_flexible_history_rate_history_get(configuration: &configuration::Configuration, product_id: &str, timestamp: i64, signature: &str, start_time: Option, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/flexible/history/rateHistory", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("productId", &product_id.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_flexible_history_redemption_record_get(configuration: &configuration::Configuration, product_id: Option<&str>, redeem_id: Option<&str>, asset: Option<&str>, start_time: Option, end_time: Option, current: Option, size: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/flexible/history/redemptionRecord", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = product_id { + local_var_req_builder = local_var_req_builder.query(&[("productId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = redeem_id { + local_var_req_builder = local_var_req_builder.query(&[("redeemId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_flexible_history_rewards_record_get(configuration: &configuration::Configuration, r#type: &str, product_id: Option<&str>, asset: Option<&str>, start_time: Option, end_time: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/flexible/history/rewardsRecord", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = product_id { + local_var_req_builder = local_var_req_builder.query(&[("productId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_flexible_history_subscription_record_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, product_id: Option<&str>, purchase_id: Option<&str>, asset: Option<&str>, start_time: Option, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/flexible/history/subscriptionRecord", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = product_id { + local_var_req_builder = local_var_req_builder.query(&[("productId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = purchase_id { + local_var_req_builder = local_var_req_builder.query(&[("purchaseId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get available Simple Earn flexible product list Weight(IP): 150 +pub async fn sapi_v1_simple_earn_flexible_list_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, asset: Option<&str>, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/flexible/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_flexible_personal_left_quota_get(configuration: &configuration::Configuration, product_id: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/flexible/personalLeftQuota", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("productId", &product_id.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_flexible_position_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, asset: Option<&str>, product_id: Option<&str>, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/flexible/position", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = product_id { + local_var_req_builder = local_var_req_builder.query(&[("productId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 Rate Limit: 1/3s per account +pub async fn sapi_v1_simple_earn_flexible_redeem_post(configuration: &configuration::Configuration, product_id: &str, timestamp: i64, signature: &str, redeem_all: Option, amount: Option, dest_account: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/flexible/redeem", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("productId", &product_id.to_string())]); + if let Some(ref local_var_str) = redeem_all { + local_var_req_builder = local_var_req_builder.query(&[("redeemAll", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = amount { + local_var_req_builder = local_var_req_builder.query(&[("amount", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = dest_account { + local_var_req_builder = local_var_req_builder.query(&[("destAccount", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_flexible_set_auto_subscribe_post(configuration: &configuration::Configuration, product_id: &str, auto_subscribe: bool, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/flexible/setAutoSubscribe", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("productId", &product_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("autoSubscribe", &auto_subscribe.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 Rate Limit: 1/3s per account +pub async fn sapi_v1_simple_earn_flexible_subscribe_post(configuration: &configuration::Configuration, product_id: &str, amount: f64, timestamp: i64, signature: &str, auto_subscribe: Option, source_account: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/flexible/subscribe", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("productId", &product_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = auto_subscribe { + local_var_req_builder = local_var_req_builder.query(&[("autoSubscribe", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = source_account { + local_var_req_builder = local_var_req_builder.query(&[("sourceAccount", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_flexible_subscription_preview_get(configuration: &configuration::Configuration, product_id: &str, amount: f64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/flexible/subscriptionPreview", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("productId", &product_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_locked_history_redemption_record_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, position_id: Option<&str>, redeem_id: Option<&str>, asset: Option<&str>, start_time: Option, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/locked/history/redemptionRecord", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = position_id { + local_var_req_builder = local_var_req_builder.query(&[("positionId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = redeem_id { + local_var_req_builder = local_var_req_builder.query(&[("redeemId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_locked_history_rewards_record_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, position_id: Option<&str>, asset: Option<&str>, start_time: Option, end_time: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/locked/history/rewardsRecord", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = position_id { + local_var_req_builder = local_var_req_builder.query(&[("positionId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_locked_history_subscription_record_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, purchase_id: Option<&str>, asset: Option<&str>, start_time: Option, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/locked/history/subscriptionRecord", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = purchase_id { + local_var_req_builder = local_var_req_builder.query(&[("purchaseId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_locked_list_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, asset: Option<&str>, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/locked/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_locked_personal_left_quota_get(configuration: &configuration::Configuration, project_id: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/locked/personalLeftQuota", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("projectId", &project_id.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_locked_position_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, asset: Option<&str>, position_id: Option<&str>, project_id: Option<&str>, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/locked/position", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = position_id { + local_var_req_builder = local_var_req_builder.query(&[("positionId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = project_id { + local_var_req_builder = local_var_req_builder.query(&[("projectId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 Rate Limit: 1/3s per account +pub async fn sapi_v1_simple_earn_locked_redeem_post(configuration: &configuration::Configuration, position_id: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/locked/redeem", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("positionId", &position_id.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_locked_set_auto_subscribe_post(configuration: &configuration::Configuration, position_id: &str, auto_subscribe: bool, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/locked/setAutoSubscribe", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("positionId", &position_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("autoSubscribe", &auto_subscribe.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 Rate Limit: 1/3s per account +pub async fn sapi_v1_simple_earn_locked_subscribe_post(configuration: &configuration::Configuration, project_id: &str, amount: f64, timestamp: i64, signature: &str, auto_subscribe: Option, source_account: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/locked/subscribe", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("projectId", &project_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = auto_subscribe { + local_var_req_builder = local_var_req_builder.query(&[("autoSubscribe", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = source_account { + local_var_req_builder = local_var_req_builder.query(&[("sourceAccount", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_simple_earn_locked_subscription_preview_get(configuration: &configuration::Configuration, project_id: &str, amount: f64, timestamp: i64, signature: &str, auto_subscribe: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/simple-earn/locked/subscriptionPreview", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("projectId", &project_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = auto_subscribe { + local_var_req_builder = local_var_req_builder.query(&[("autoSubscribe", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/spot_algo_api.rs b/test_rust/src/apis/spot_algo_api.rs new file mode 100644 index 0000000..c9104cf --- /dev/null +++ b/test_rust/src/apis/spot_algo_api.rs @@ -0,0 +1,300 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_algo_spot_historical_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AlgoSpotHistoricalOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_algo_spot_new_order_twap_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AlgoSpotNewOrderTwapPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_algo_spot_open_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AlgoSpotOpenOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_algo_spot_order_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AlgoSpotOrderDeleteError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_algo_spot_sub_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AlgoSpotSubOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Get all historical SPOT TWAP orders Weight(IP): 1 +pub async fn sapi_v1_algo_spot_historical_orders_get(configuration: &configuration::Configuration, symbol: &str, side: &str, timestamp: i64, signature: &str, start_time: Option, end_time: Option, page: Option, page_size: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/algo/spot/historicalOrders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("side", &side.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_size { + local_var_req_builder = local_var_req_builder.query(&[("pageSize", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Place a new spot TWAP order with Algo service. Weight(UID): 3000 +pub async fn sapi_v1_algo_spot_new_order_twap_post(configuration: &configuration::Configuration, symbol: &str, side: &str, quantity: f64, duration: i32, timestamp: i64, signature: &str, client_algo_id: Option<&str>, limit_price: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/algo/spot/newOrderTwap", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("side", &side.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("quantity", &quantity.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("duration", &duration.to_string())]); + if let Some(ref local_var_str) = client_algo_id { + local_var_req_builder = local_var_req_builder.query(&[("clientAlgoId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit_price { + local_var_req_builder = local_var_req_builder.query(&[("limitPrice", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get all open SPOT TWAP orders Weight(IP): 1 +pub async fn sapi_v1_algo_spot_open_orders_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/algo/spot/openOrders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Cancel an open TWAP order Weight(IP): 1 +pub async fn sapi_v1_algo_spot_order_delete(configuration: &configuration::Configuration, algo_id: i64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/algo/spot/order", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("algoId", &algo_id.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get respective sub orders for a specified algoId Weight(IP): 1 +pub async fn sapi_v1_algo_spot_sub_orders_get(configuration: &configuration::Configuration, algo_id: i64, timestamp: i64, signature: &str, page: Option, page_size: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/algo/spot/subOrders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("algoId", &algo_id.to_string())]); + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page_size { + local_var_req_builder = local_var_req_builder.query(&[("pageSize", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/staking_api.rs b/test_rust/src/apis/staking_api.rs new file mode 100644 index 0000000..6542259 --- /dev/null +++ b/test_rust/src/apis/staking_api.rs @@ -0,0 +1,708 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_eth_staking_eth_history_rate_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1EthStakingEthHistoryRateHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_eth_staking_eth_history_redemption_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1EthStakingEthHistoryRedemptionHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_eth_staking_eth_history_rewards_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1EthStakingEthHistoryRewardsHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_eth_staking_eth_history_staking_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1EthStakingEthHistoryStakingHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1EthStakingEthHistoryWbethRewardsHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_eth_staking_eth_quota_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1EthStakingEthQuotaGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_eth_staking_eth_redeem_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1EthStakingEthRedeemPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_eth_staking_wbeth_history_unwrap_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1EthStakingWbethHistoryUnwrapHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_eth_staking_wbeth_history_wrap_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1EthStakingWbethHistoryWrapHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_eth_staking_wbeth_wrap_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1EthStakingWbethWrapPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_eth_staking_account_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2EthStakingAccountGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_eth_staking_eth_stake_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2EthStakingEthStakePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 +pub async fn sapi_v1_eth_staking_eth_history_rate_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, start_time: Option, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/eth-staking/eth/history/rateHistory", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 +pub async fn sapi_v1_eth_staking_eth_history_redemption_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, start_time: Option, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/eth-staking/eth/history/redemptionHistory", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 +pub async fn sapi_v1_eth_staking_eth_history_rewards_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, start_time: Option, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/eth-staking/eth/history/rewardsHistory", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 +pub async fn sapi_v1_eth_staking_eth_history_staking_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, start_time: Option, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/eth-staking/eth/history/stakingHistory", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 +pub async fn sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, start_time: Option, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/eth-staking/eth/history/wbethRewardsHistory", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v1_eth_staking_eth_quota_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/eth-staking/eth/quota", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Redeem WBETH or BETH and get ETH - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 +pub async fn sapi_v1_eth_staking_eth_redeem_post(configuration: &configuration::Configuration, amount: f64, timestamp: i64, signature: &str, asset: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/eth-staking/eth/redeem", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 +pub async fn sapi_v1_eth_staking_wbeth_history_unwrap_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, start_time: Option, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/eth-staking/wbeth/history/unwrapHistory", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 +pub async fn sapi_v1_eth_staking_wbeth_history_wrap_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, start_time: Option, end_time: Option, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/eth-staking/wbeth/history/wrapHistory", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 +pub async fn sapi_v1_eth_staking_wbeth_wrap_post(configuration: &configuration::Configuration, amount: f64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/eth-staking/wbeth/wrap", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 150 +pub async fn sapi_v2_eth_staking_account_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/eth-staking/account", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Stake ETH to get WBETH - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 +pub async fn sapi_v2_eth_staking_eth_stake_post(configuration: &configuration::Configuration, amount: f64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/eth-staking/eth/stake", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/stream_api.rs b/test_rust/src/apis/stream_api.rs new file mode 100644 index 0000000..b159213 --- /dev/null +++ b/test_rust/src/apis/stream_api.rs @@ -0,0 +1,155 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`api_v3_user_data_stream_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3UserDataStreamDeleteError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_user_data_stream_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3UserDataStreamPostError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_user_data_stream_put`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3UserDataStreamPutError { + Status400(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Close out a user data stream. Weight: 2 +pub async fn api_v3_user_data_stream_delete(configuration: &configuration::Configuration, listen_key: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/userDataStream", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = listen_key { + local_var_req_builder = local_var_req_builder.query(&[("listenKey", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 2 +pub async fn api_v3_user_data_stream_post(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/userDataStream", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 2 +pub async fn api_v3_user_data_stream_put(configuration: &configuration::Configuration, listen_key: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/userDataStream", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = listen_key { + local_var_req_builder = local_var_req_builder.query(&[("listenKey", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/sub_account_api.rs b/test_rust/src/apis/sub_account_api.rs new file mode 100644 index 0000000..8f10e58 --- /dev/null +++ b/test_rust/src/apis/sub_account_api.rs @@ -0,0 +1,2536 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_capital_deposit_sub_address_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1CapitalDepositSubAddressGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_capital_deposit_sub_hisrec_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1CapitalDepositSubHisrecGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_managed_subaccount_account_snapshot_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ManagedSubaccountAccountSnapshotGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_managed_subaccount_asset_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ManagedSubaccountAssetGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_managed_subaccount_deposit_address_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ManagedSubaccountDepositAddressGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_managed_subaccount_deposit_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ManagedSubaccountDepositPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_managed_subaccount_fetch_future_asset_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ManagedSubaccountFetchFutureAssetGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_managed_subaccount_info_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ManagedSubaccountInfoGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_managed_subaccount_margin_asset_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ManagedSubaccountMarginAssetGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_managed_subaccount_query_trans_log_for_investor_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ManagedSubaccountQueryTransLogForInvestorGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ManagedSubaccountQueryTransLogForTradeParentGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_managed_subaccount_query_trans_log_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ManagedSubaccountQueryTransLogGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_managed_subaccount_withdraw_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1ManagedSubaccountWithdrawPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_blvt_enable_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountBlvtEnablePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_eoptions_enable_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountEoptionsEnablePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_futures_account_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountFuturesAccountGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_futures_account_summary_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountFuturesAccountSummaryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_futures_enable_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountFuturesEnablePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_futures_internal_transfer_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountFuturesInternalTransferGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_futures_internal_transfer_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountFuturesInternalTransferPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_futures_position_risk_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountFuturesPositionRiskGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_futures_transfer_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountFuturesTransferPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_margin_account_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountMarginAccountGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_margin_account_summary_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountMarginAccountSummaryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_margin_enable_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountMarginEnablePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_margin_transfer_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountMarginTransferPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_spot_summary_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountSpotSummaryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_status_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountStatusGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_sub_account_api_ip_restriction_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountSubAccountApiIpRestrictionGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountSubAccountApiIpRestrictionIpListDeleteError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_sub_transfer_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountSubTransferHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_transaction_statistics_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountTransactionStatisticsGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_transfer_sub_to_master_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountTransferSubToMasterPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_transfer_sub_to_sub_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountTransferSubToSubPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_transfer_sub_user_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountTransferSubUserHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_universal_transfer_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountUniversalTransferGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_universal_transfer_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountUniversalTransferPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_sub_account_virtual_sub_account_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SubAccountVirtualSubAccountPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_sub_account_futures_account_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2SubAccountFuturesAccountGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_sub_account_futures_account_summary_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2SubAccountFuturesAccountSummaryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_sub_account_futures_position_risk_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2SubAccountFuturesPositionRiskGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v2_sub_account_sub_account_api_ip_restriction_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2SubAccountSubAccountApiIpRestrictionPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v3_sub_account_assets_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV3SubAccountAssetsGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v4_sub_account_assets_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV4SubAccountAssetsGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Fetch sub-account deposit address Weight(IP): 1 +pub async fn sapi_v1_capital_deposit_sub_address_get(configuration: &configuration::Configuration, email: &str, coin: &str, timestamp: i64, signature: &str, network: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/capital/deposit/subAddress", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("coin", &coin.to_string())]); + if let Some(ref local_var_str) = network { + local_var_req_builder = local_var_req_builder.query(&[("network", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Fetch sub-account deposit history Weight(IP): 1 +pub async fn sapi_v1_capital_deposit_sub_hisrec_get(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, coin: Option<&str>, status: Option, start_time: Option, end_time: Option, limit: Option, offset: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/capital/deposit/subHisrec", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = coin { + local_var_req_builder = local_var_req_builder.query(&[("coin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = status { + local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = offset { + local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - The query time period must be less then 30 days - Support query within the last one month only - If `startTime` and `endTime` not sent, return records of the last 7 days by default Weight(IP): 2400 +pub async fn sapi_v1_managed_subaccount_account_snapshot_get(configuration: &configuration::Configuration, email: &str, r#type: &str, timestamp: i64, signature: &str, start_time: Option, end_time: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/managed-subaccount/accountSnapshot", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_managed_subaccount_asset_get(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/managed-subaccount/asset", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get investor's managed sub-account deposit address Weight(UID): 1 +pub async fn sapi_v1_managed_subaccount_deposit_address_get(configuration: &configuration::Configuration, email: &str, coin: &str, timestamp: i64, signature: &str, network: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/managed-subaccount/deposit/address", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("coin", &coin.to_string())]); + if let Some(ref local_var_str) = network { + local_var_req_builder = local_var_req_builder.query(&[("network", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_managed_subaccount_deposit_post(configuration: &configuration::Configuration, to_email: &str, asset: &str, amount: f64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/managed-subaccount/deposit", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("toEmail", &to_email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Investor can use this api to query managed sub account futures asset details +pub async fn sapi_v1_managed_subaccount_fetch_future_asset_get(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/managed-subaccount/fetch-future-asset", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get investor's managed sub-account list. Weight(UID): 60 +pub async fn sapi_v1_managed_subaccount_info_get(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, page: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/managed-subaccount/info", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Investor can use this api to query managed sub account margin asset details +pub async fn sapi_v1_managed_subaccount_margin_asset_get(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/managed-subaccount/marginAsset", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Investor can use this api to query managed sub account transfer log. This endpoint is available for investor of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Weight(IP): 1 +pub async fn sapi_v1_managed_subaccount_query_trans_log_for_investor_get(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, start_time: Option, end_time: Option, page: Option, limit: Option, transfers: Option<&str>, transfer_function_account_type: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/managed-subaccount/queryTransLogForInvestor", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = transfers { + local_var_req_builder = local_var_req_builder.query(&[("transfers", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = transfer_function_account_type { + local_var_req_builder = local_var_req_builder.query(&[("transferFunctionAccountType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Trading team can use this api to query managed sub account transfer log. This endpoint is available for trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team Weight(IP): 60 +pub async fn sapi_v1_managed_subaccount_query_trans_log_for_trade_parent_get(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, start_time: Option, end_time: Option, page: Option, limit: Option, transfers: Option<&str>, transfer_function_account_type: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/managed-subaccount/queryTransLogForTradeParent", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = transfers { + local_var_req_builder = local_var_req_builder.query(&[("transfers", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = transfer_function_account_type { + local_var_req_builder = local_var_req_builder.query(&[("transferFunctionAccountType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight(UID): 60 +pub async fn sapi_v1_managed_subaccount_query_trans_log_get(configuration: &configuration::Configuration, transfers: &str, transfer_function_account_type: &str, timestamp: i64, signature: &str, start_time: Option, end_time: Option, page: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/managed-subaccount/query-trans-log", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("transfers", &transfers.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("transferFunctionAccountType", &transfer_function_account_type.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_managed_subaccount_withdraw_post(configuration: &configuration::Configuration, from_email: &str, asset: &str, amount: f64, timestamp: i64, signature: &str, transfer_date: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/managed-subaccount/withdraw", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("fromEmail", &from_email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = transfer_date { + local_var_req_builder = local_var_req_builder.query(&[("transferDate", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_sub_account_blvt_enable_post(configuration: &configuration::Configuration, email: &str, enable_blvt: bool, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/blvt/enable", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("enableBlvt", &enable_blvt.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Enable Options for Sub-account (For Master Account). Weight(IP): 1 +pub async fn sapi_v1_sub_account_eoptions_enable_post(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/eoptions/enable", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 10 +pub async fn sapi_v1_sub_account_futures_account_get(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/futures/account", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_sub_account_futures_account_summary_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/futures/accountSummary", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_sub_account_futures_enable_post(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/futures/enable", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_sub_account_futures_internal_transfer_get(configuration: &configuration::Configuration, email: &str, futures_type: i32, timestamp: i64, signature: &str, start_time: Option, end_time: Option, page: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/futures/internalTransfer", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("futuresType", &futures_type.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - Master account can transfer max 2000 times a minute Weight(IP): 1 +pub async fn sapi_v1_sub_account_futures_internal_transfer_post(configuration: &configuration::Configuration, from_email: &str, to_email: &str, futures_type: i32, asset: &str, amount: f64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/futures/internalTransfer", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("fromEmail", &from_email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("toEmail", &to_email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("futuresType", &futures_type.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 10 +pub async fn sapi_v1_sub_account_futures_position_risk_get(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/futures/positionRisk", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_sub_account_futures_transfer_post(configuration: &configuration::Configuration, email: &str, asset: &str, amount: f64, r#type: i32, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/futures/transfer", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_sub_account_list_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, email: Option<&str>, is_freeze: Option<&str>, page: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = email { + local_var_req_builder = local_var_req_builder.query(&[("email", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = is_freeze { + local_var_req_builder = local_var_req_builder.query(&[("isFreeze", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 10 +pub async fn sapi_v1_sub_account_margin_account_get(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/margin/account", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 10 +pub async fn sapi_v1_sub_account_margin_account_summary_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/margin/accountSummary", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_sub_account_margin_enable_post(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/margin/enable", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_sub_account_margin_transfer_post(configuration: &configuration::Configuration, email: &str, asset: &str, amount: f64, r#type: i32, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/margin/transfer", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get BTC valued asset summary of subaccounts. Weight(IP): 1 +pub async fn sapi_v1_sub_account_spot_summary_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, email: Option<&str>, page: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/spotSummary", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = email { + local_var_req_builder = local_var_req_builder.query(&[("email", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - If no `email` sent, all sub-accounts' information will be returned. Weight(IP): 10 +pub async fn sapi_v1_sub_account_status_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, email: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/status", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = email { + local_var_req_builder = local_var_req_builder.query(&[("email", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(UID): 3000 +pub async fn sapi_v1_sub_account_sub_account_api_ip_restriction_get(configuration: &configuration::Configuration, email: &str, sub_account_api_key: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/subAccountApi/ipRestriction", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("subAccountApiKey", &sub_account_api_key.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(UID): 3000 +pub async fn sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete(configuration: &configuration::Configuration, email: &str, sub_account_api_key: &str, timestamp: i64, signature: &str, ip_address: Option<&str>, third_party_name: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/subAccountApi/ipRestriction/ipList", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("subAccountApiKey", &sub_account_api_key.to_string())]); + if let Some(ref local_var_str) = ip_address { + local_var_req_builder = local_var_req_builder.query(&[("ipAddress", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = third_party_name { + local_var_req_builder = local_var_req_builder.query(&[("thirdPartyName", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - fromEmail and toEmail cannot be sent at the same time. - Return fromEmail equal master account email by default. Weight(IP): 1 +pub async fn sapi_v1_sub_account_sub_transfer_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, from_email: Option<&str>, to_email: Option<&str>, start_time: Option, end_time: Option, page: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/sub/transfer/history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = from_email { + local_var_req_builder = local_var_req_builder.query(&[("fromEmail", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = to_email { + local_var_req_builder = local_var_req_builder.query(&[("toEmail", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query Sub-account Transaction statistics (For Master Account). Weight(UID): 60 +pub async fn sapi_v1_sub_account_transaction_statistics_get(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/transaction-statistics", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_sub_account_transfer_sub_to_master_post(configuration: &configuration::Configuration, asset: &str, amount: f64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/transfer/subToMaster", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_sub_account_transfer_sub_to_sub_post(configuration: &configuration::Configuration, to_email: &str, asset: &str, amount: f64, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/transfer/subToSub", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("toEmail", &to_email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - If `type` is not sent, the records of type 2: transfer out will be returned by default. - If `startTime` and `endTime` are not sent, the recent 30-day data will be returned. Weight(IP): 1 +pub async fn sapi_v1_sub_account_transfer_sub_user_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, asset: Option<&str>, r#type: Option, start_time: Option, end_time: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/transfer/subUserHistory", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = r#type { + local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - `fromEmail` and `toEmail` cannot be sent at the same time. - Return `fromEmail` equal master account email by default. - The query time period must be less then 30 days. - If startTime and endTime not sent, return records of the last 30 days by default. Weight(IP): 1 +pub async fn sapi_v1_sub_account_universal_transfer_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, from_email: Option<&str>, to_email: Option<&str>, client_tran_id: Option<&str>, start_time: Option, end_time: Option, page: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/universalTransfer", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = from_email { + local_var_req_builder = local_var_req_builder.query(&[("fromEmail", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = to_email { + local_var_req_builder = local_var_req_builder.query(&[("toEmail", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = client_tran_id { + local_var_req_builder = local_var_req_builder.query(&[("clientTranId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - You need to enable \"internal transfer\" option for the api key which requests this endpoint. - Transfer from master account by default if fromEmail is not sent. - Transfer to master account by default if toEmail is not sent. - Supported transfer scenarios: - Master account SPOT transfer to sub-account SPOT,USDT_FUTURE,COIN_FUTURE,MARGIN(Cross),ISOLATED_MARGIN - Sub-account SPOT,USDT_FUTURE,COIN_FUTURE,MARGIN(Cross),ISOLATED_MARGIN transfer to master account SPOT - Transfer between two sub-account SPOT accounts Weight(IP): 1 +pub async fn sapi_v1_sub_account_universal_transfer_post(configuration: &configuration::Configuration, from_account_type: &str, to_account_type: &str, asset: &str, amount: f64, timestamp: i64, signature: &str, from_email: Option<&str>, to_email: Option<&str>, client_tran_id: Option<&str>, symbol: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/universalTransfer", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = from_email { + local_var_req_builder = local_var_req_builder.query(&[("fromEmail", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = to_email { + local_var_req_builder = local_var_req_builder.query(&[("toEmail", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("fromAccountType", &from_account_type.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("toAccountType", &to_account_type.to_string())]); + if let Some(ref local_var_str) = client_tran_id { + local_var_req_builder = local_var_req_builder.query(&[("clientTranId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - This request will generate a virtual sub account under your master account. - You need to enable \"trade\" option for the api key which requests this endpoint. Weight(IP): 1 +pub async fn sapi_v1_sub_account_virtual_sub_account_post(configuration: &configuration::Configuration, sub_account_string: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/sub-account/virtualSubAccount", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("subAccountString", &sub_account_string.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v2_sub_account_futures_account_get(configuration: &configuration::Configuration, email: &str, futures_type: i32, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/sub-account/futures/account", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("futuresType", &futures_type.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 10 +pub async fn sapi_v2_sub_account_futures_account_summary_get(configuration: &configuration::Configuration, futures_type: i32, timestamp: i64, signature: &str, page: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/sub-account/futures/accountSummary", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("futuresType", &futures_type.to_string())]); + if let Some(ref local_var_str) = page { + local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v2_sub_account_futures_position_risk_get(configuration: &configuration::Configuration, email: &str, futures_type: i32, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/sub-account/futures/positionRisk", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("futuresType", &futures_type.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Update IP Restriction for Sub-Account API key Weight(UID): 3000 +pub async fn sapi_v2_sub_account_sub_account_api_ip_restriction_post(configuration: &configuration::Configuration, email: &str, sub_account_api_key: &str, status: &str, timestamp: i64, signature: &str, third_party_name: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v2/sub-account/subAccountApi/ipRestriction", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("subAccountApiKey", &sub_account_api_key.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("status", &status.to_string())]); + if let Some(ref local_var_str) = third_party_name { + local_var_req_builder = local_var_req_builder.query(&[("thirdPartyName", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Fetch sub-account assets Weight(IP): 1 +pub async fn sapi_v3_sub_account_assets_get(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v3/sub-account/assets", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Fetch sub-account assets Weight(UID): 60 +pub async fn sapi_v4_sub_account_assets_get(configuration: &configuration::Configuration, email: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v4/sub-account/assets", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/trade_api.rs b/test_rust/src/apis/trade_api.rs new file mode 100644 index 0000000..c48c624 --- /dev/null +++ b/test_rust/src/apis/trade_api.rs @@ -0,0 +1,1412 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`api_v3_account_commission_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3AccountCommissionGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_account_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3AccountGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_all_order_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3AllOrderListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_all_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3AllOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_my_allocations_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3MyAllocationsGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_my_prevented_matches_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3MyPreventedMatchesGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_my_trades_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3MyTradesGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_open_order_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3OpenOrderListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_open_orders_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3OpenOrdersDeleteError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_open_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3OpenOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_order_cancel_replace_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3OrderCancelReplacePostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_order_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3OrderDeleteError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_order_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3OrderGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_order_list_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3OrderListDeleteError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_order_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3OrderListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_order_oco_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3OrderOcoPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_order_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3OrderPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_order_test_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3OrderTestPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_rate_limit_order_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3RateLimitOrderGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_sor_order_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3SorOrderPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v3_sor_order_test_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3SorOrderTestPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Get current account commission rates. Weight: 20 +pub async fn api_v3_account_commission_get(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/account/commission", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get current account information. Weight(IP): 20 +pub async fn api_v3_account_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/account", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Retrieves all OCO based on provided optional parameters Weight(IP): 20 +pub async fn api_v3_all_order_list_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, from_id: Option, start_time: Option, end_time: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/allOrderList", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = from_id { + local_var_req_builder = local_var_req_builder.query(&[("fromId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get all account orders; active, canceled, or filled.. - If `orderId` is set, it will get orders >= that `orderId`. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. - If `startTime` and/or `endTime` provided, `orderId` is not required Weight(IP): 20 +pub async fn api_v3_all_orders_get(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, order_id: Option, start_time: Option, end_time: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/allOrders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Retrieves allocations resulting from SOR order placement. Weight: 20 Supported parameter combinations: Parameters Response symbol allocations from oldest to newest symbol + startTime oldest allocations since startTime symbol + endTime newest allocations until endTime symbol + startTime + endTime allocations within the time range symbol + fromAllocationId allocations by allocation ID symbol + orderId allocations related to an order starting with oldest symbol + orderId + fromAllocationId allocations related to an order by allocation ID Note: The time between startTime and endTime can't be longer than 24 hours. +pub async fn api_v3_my_allocations_get(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, start_time: Option, end_time: Option, from_allocation_id: Option, limit: Option, order_id: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/myAllocations", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = from_allocation_id { + local_var_req_builder = local_var_req_builder.query(&[("fromAllocationId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Displays the list of orders that were expired because of STP. For additional information on what a Prevented match is, as well as Self Trade Prevention (STP), please refer to our STP FAQ page. These are the combinations supported: * symbol + preventedMatchId * symbol + orderId * symbol + orderId + fromPreventedMatchId (limit will default to 500) * symbol + orderId + fromPreventedMatchId + limit Weight(IP): Case Weight If symbol is invalid: 2 Querying by preventedMatchId: 2 Querying by orderId: 20 +pub async fn api_v3_my_prevented_matches_get(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, prevented_match_id: Option, order_id: Option, from_prevented_match_id: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/myPreventedMatches", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = prevented_match_id { + local_var_req_builder = local_var_req_builder.query(&[("preventedMatchId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = from_prevented_match_id { + local_var_req_builder = local_var_req_builder.query(&[("fromPreventedMatchId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get trades for a specific account and symbol. If `fromId` is set, it will get id >= that `fromId`. Otherwise most recent orders are returned. The time between startTime and endTime can't be longer than 24 hours. These are the supported combinations of all parameters: symbol symbol + orderId symbol + startTime symbol + endTime symbol + fromId symbol + startTime + endTime symbol+ orderId + fromId Weight(IP): 20 +pub async fn api_v3_my_trades_get(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, order_id: Option, start_time: Option, end_time: Option, from_id: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/myTrades", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = from_id { + local_var_req_builder = local_var_req_builder.query(&[("fromId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 6 +pub async fn api_v3_open_order_list_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/openOrderList", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Cancels all active orders on a symbol. This includes OCO orders. Weight(IP): 1 +pub async fn api_v3_open_orders_delete(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/openOrders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get all open orders on a symbol. Careful when accessing this with no symbol. Weight(IP): - `6` for a single symbol; - `80` when the symbol parameter is omitted; +pub async fn api_v3_open_orders_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, symbol: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/openOrders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Cancels an existing order and places a new order on the same symbol. Filters and Order Count are evaluated before the processing of the cancellation and order placement occurs. A new order that was not attempted (i.e. when newOrderResult: NOT_ATTEMPTED), will still increase the order count by 1. Weight(IP): 1 +pub async fn api_v3_order_cancel_replace_post(configuration: &configuration::Configuration, symbol: &str, side: &str, r#type: &str, cancel_replace_mode: &str, timestamp: i64, signature: &str, cancel_restrictions: Option<&str>, time_in_force: Option<&str>, quantity: Option, quote_order_qty: Option, price: Option, cancel_new_client_order_id: Option<&str>, cancel_orig_client_order_id: Option<&str>, cancel_order_id: Option, new_client_order_id: Option<&str>, strategy_id: Option, strategy_type: Option, stop_price: Option, trailing_delta: Option, iceberg_qty: Option, new_order_resp_type: Option<&str>, self_trade_prevention_mode: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/order/cancelReplace", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("side", &side.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("cancelReplaceMode", &cancel_replace_mode.to_string())]); + if let Some(ref local_var_str) = cancel_restrictions { + local_var_req_builder = local_var_req_builder.query(&[("cancelRestrictions", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = time_in_force { + local_var_req_builder = local_var_req_builder.query(&[("timeInForce", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = quantity { + local_var_req_builder = local_var_req_builder.query(&[("quantity", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = quote_order_qty { + local_var_req_builder = local_var_req_builder.query(&[("quoteOrderQty", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = price { + local_var_req_builder = local_var_req_builder.query(&[("price", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = cancel_new_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("cancelNewClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = cancel_orig_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("cancelOrigClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = cancel_order_id { + local_var_req_builder = local_var_req_builder.query(&[("cancelOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("newClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = strategy_id { + local_var_req_builder = local_var_req_builder.query(&[("strategyId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = strategy_type { + local_var_req_builder = local_var_req_builder.query(&[("strategyType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = stop_price { + local_var_req_builder = local_var_req_builder.query(&[("stopPrice", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = trailing_delta { + local_var_req_builder = local_var_req_builder.query(&[("trailingDelta", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = iceberg_qty { + local_var_req_builder = local_var_req_builder.query(&[("icebergQty", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_order_resp_type { + local_var_req_builder = local_var_req_builder.query(&[("newOrderRespType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = self_trade_prevention_mode { + local_var_req_builder = local_var_req_builder.query(&[("selfTradePreventionMode", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Cancel an active order. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 1 +pub async fn api_v3_order_delete(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, order_id: Option, orig_client_order_id: Option<&str>, new_client_order_id: Option<&str>, cancel_restrictions: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/order", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = orig_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("origClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("newClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = cancel_restrictions { + local_var_req_builder = local_var_req_builder.query(&[("cancelRestrictions", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Check an order's status. - Either `orderId` or `origClientOrderId` must be sent. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 4 +pub async fn api_v3_order_get(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, order_id: Option, orig_client_order_id: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/order", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = orig_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("origClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Cancel an entire Order List Canceling an individual leg will cancel the entire OCO Weight(IP): 1 +pub async fn api_v3_order_list_delete(configuration: &configuration::Configuration, symbol: &str, timestamp: i64, signature: &str, order_list_id: Option, list_client_order_id: Option<&str>, new_client_order_id: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/orderList", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = order_list_id { + local_var_req_builder = local_var_req_builder.query(&[("orderListId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = list_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("listClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("newClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Retrieves a specific OCO based on provided optional parameters Weight(IP): 4 +pub async fn api_v3_order_list_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, order_list_id: Option, orig_client_order_id: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/orderList", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = order_list_id { + local_var_req_builder = local_var_req_builder.query(&[("orderListId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = orig_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("origClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Send in a new OCO - Price Restrictions: - `SELL`: Limit Price > Last Price > Stop Price - `BUY`: Limit Price < Last Price < Stop Price - Quantity Restrictions: - Both legs must have the same quantity - `ICEBERG` quantities however do not have to be the same - Order Rate Limit - `OCO` counts as 2 orders against the order rate limit. Weight(IP): 1 +pub async fn api_v3_order_oco_post(configuration: &configuration::Configuration, symbol: &str, side: &str, quantity: f64, price: f64, stop_price: f64, timestamp: i64, signature: &str, list_client_order_id: Option<&str>, limit_client_order_id: Option<&str>, limit_strategy_id: Option, limit_strategy_type: Option, limit_iceberg_qty: Option, trailing_delta: Option, stop_client_order_id: Option<&str>, stop_strategy_id: Option, stop_strategy_type: Option, stop_limit_price: Option, stop_iceberg_qty: Option, stop_limit_time_in_force: Option<&str>, new_order_resp_type: Option<&str>, self_trade_prevention_mode: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/order/oco", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + if let Some(ref local_var_str) = list_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("listClientOrderId", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("side", &side.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("quantity", &quantity.to_string())]); + if let Some(ref local_var_str) = limit_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("limitClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit_strategy_id { + local_var_req_builder = local_var_req_builder.query(&[("limitStrategyId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit_strategy_type { + local_var_req_builder = local_var_req_builder.query(&[("limitStrategyType", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("price", &price.to_string())]); + if let Some(ref local_var_str) = limit_iceberg_qty { + local_var_req_builder = local_var_req_builder.query(&[("limitIcebergQty", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = trailing_delta { + local_var_req_builder = local_var_req_builder.query(&[("trailingDelta", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = stop_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("stopClientOrderId", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("stopPrice", &stop_price.to_string())]); + if let Some(ref local_var_str) = stop_strategy_id { + local_var_req_builder = local_var_req_builder.query(&[("stopStrategyId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = stop_strategy_type { + local_var_req_builder = local_var_req_builder.query(&[("stopStrategyType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = stop_limit_price { + local_var_req_builder = local_var_req_builder.query(&[("stopLimitPrice", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = stop_iceberg_qty { + local_var_req_builder = local_var_req_builder.query(&[("stopIcebergQty", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = stop_limit_time_in_force { + local_var_req_builder = local_var_req_builder.query(&[("stopLimitTimeInForce", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_order_resp_type { + local_var_req_builder = local_var_req_builder.query(&[("newOrderRespType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = self_trade_prevention_mode { + local_var_req_builder = local_var_req_builder.query(&[("selfTradePreventionMode", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Send in a new order. - `LIMIT_MAKER` are `LIMIT` orders that will be rejected if they would immediately match and trade as a taker. - `STOP_LOSS` and `TAKE_PROFIT` will execute a `MARKET` order when the `stopPrice` is reached. - Any `LIMIT` or `LIMIT_MAKER` type order can be made an iceberg order by sending an `icebergQty`. - Any order with an `icebergQty` MUST have `timeInForce` set to `GTC`. - `MARKET` orders using `quantity` specifies how much a user wants to buy or sell based on the market price. - `MARKET` orders using `quoteOrderQty` specifies the amount the user wants to spend (when buying) or receive (when selling) of the quote asset; the correct quantity will be determined based on the market liquidity and `quoteOrderQty`. - `MARKET` orders using `quoteOrderQty` will not break `LOT_SIZE` filter rules; the order will execute a quantity that will have the notional value as close as possible to `quoteOrderQty`. - same `newClientOrderId` can be accepted only when the previous one is filled, otherwise the order will be rejected. Trigger order price rules against market price for both `MARKET` and `LIMIT` versions: - Price above market price: `STOP_LOSS` `BUY`, `TAKE_PROFIT` `SELL` - Price below market price: `STOP_LOSS` `SELL`, `TAKE_PROFIT` `BUY` Weight(IP): 1 +pub async fn api_v3_order_post(configuration: &configuration::Configuration, symbol: &str, side: &str, r#type: &str, timestamp: i64, signature: &str, time_in_force: Option<&str>, quantity: Option, quote_order_qty: Option, price: Option, new_client_order_id: Option<&str>, strategy_id: Option, strategy_type: Option, stop_price: Option, trailing_delta: Option, iceberg_qty: Option, new_order_resp_type: Option<&str>, self_trade_prevention_mode: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/order", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("side", &side.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_str) = time_in_force { + local_var_req_builder = local_var_req_builder.query(&[("timeInForce", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = quantity { + local_var_req_builder = local_var_req_builder.query(&[("quantity", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = quote_order_qty { + local_var_req_builder = local_var_req_builder.query(&[("quoteOrderQty", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = price { + local_var_req_builder = local_var_req_builder.query(&[("price", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("newClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = strategy_id { + local_var_req_builder = local_var_req_builder.query(&[("strategyId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = strategy_type { + local_var_req_builder = local_var_req_builder.query(&[("strategyType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = stop_price { + local_var_req_builder = local_var_req_builder.query(&[("stopPrice", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = trailing_delta { + local_var_req_builder = local_var_req_builder.query(&[("trailingDelta", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = iceberg_qty { + local_var_req_builder = local_var_req_builder.query(&[("icebergQty", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_order_resp_type { + local_var_req_builder = local_var_req_builder.query(&[("newOrderRespType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = self_trade_prevention_mode { + local_var_req_builder = local_var_req_builder.query(&[("selfTradePreventionMode", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine. Weight(IP): - Without computeCommissionRates: `1` - With computeCommissionRates: `20` +pub async fn api_v3_order_test_post(configuration: &configuration::Configuration, symbol: &str, side: &str, r#type: &str, timestamp: i64, signature: &str, time_in_force: Option<&str>, quantity: Option, quote_order_qty: Option, price: Option, new_client_order_id: Option<&str>, strategy_id: Option, strategy_type: Option, stop_price: Option, trailing_delta: Option, iceberg_qty: Option, new_order_resp_type: Option<&str>, recv_window: Option, compute_commission_rates: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/order/test", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("side", &side.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_str) = time_in_force { + local_var_req_builder = local_var_req_builder.query(&[("timeInForce", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = quantity { + local_var_req_builder = local_var_req_builder.query(&[("quantity", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = quote_order_qty { + local_var_req_builder = local_var_req_builder.query(&[("quoteOrderQty", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = price { + local_var_req_builder = local_var_req_builder.query(&[("price", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("newClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = strategy_id { + local_var_req_builder = local_var_req_builder.query(&[("strategyId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = strategy_type { + local_var_req_builder = local_var_req_builder.query(&[("strategyType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = stop_price { + local_var_req_builder = local_var_req_builder.query(&[("stopPrice", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = trailing_delta { + local_var_req_builder = local_var_req_builder.query(&[("trailingDelta", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = iceberg_qty { + local_var_req_builder = local_var_req_builder.query(&[("icebergQty", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_order_resp_type { + local_var_req_builder = local_var_req_builder.query(&[("newOrderRespType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = compute_commission_rates { + local_var_req_builder = local_var_req_builder.query(&[("computeCommissionRates", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Displays the user's current order count usage for all intervals. Weight(IP): 40 +pub async fn api_v3_rate_limit_order_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/rateLimit/order", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 6 +pub async fn api_v3_sor_order_post(configuration: &configuration::Configuration, symbol: &str, side: &str, r#type: &str, quantity: f64, timestamp: i64, signature: &str, time_in_force: Option<&str>, price: Option, new_client_order_id: Option<&str>, strategy_id: Option, strategy_type: Option, iceberg_qty: Option, new_order_resp_type: Option<&str>, self_trade_prevention_mode: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/sor/order", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("side", &side.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_str) = time_in_force { + local_var_req_builder = local_var_req_builder.query(&[("timeInForce", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("quantity", &quantity.to_string())]); + if let Some(ref local_var_str) = price { + local_var_req_builder = local_var_req_builder.query(&[("price", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("newClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = strategy_id { + local_var_req_builder = local_var_req_builder.query(&[("strategyId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = strategy_type { + local_var_req_builder = local_var_req_builder.query(&[("strategyType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = iceberg_qty { + local_var_req_builder = local_var_req_builder.query(&[("icebergQty", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_order_resp_type { + local_var_req_builder = local_var_req_builder.query(&[("newOrderRespType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = self_trade_prevention_mode { + local_var_req_builder = local_var_req_builder.query(&[("selfTradePreventionMode", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Test new order creation and signature/recvWindow using smart order routing (SOR). Creates and validates a new order but does not send it into the matching engine. Weight(IP): - Without computeCommissionRates: `1` - With computeCommissionRates: `20` +pub async fn api_v3_sor_order_test_post(configuration: &configuration::Configuration, symbol: &str, side: &str, r#type: &str, quantity: f64, timestamp: i64, signature: &str, time_in_force: Option<&str>, price: Option, new_client_order_id: Option<&str>, strategy_id: Option, strategy_type: Option, iceberg_qty: Option, new_order_resp_type: Option<&str>, self_trade_prevention_mode: Option<&str>, compute_commission_rates: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/api/v3/sor/order/test", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("symbol", &symbol.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("side", &side.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_str) = time_in_force { + local_var_req_builder = local_var_req_builder.query(&[("timeInForce", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("quantity", &quantity.to_string())]); + if let Some(ref local_var_str) = price { + local_var_req_builder = local_var_req_builder.query(&[("price", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_client_order_id { + local_var_req_builder = local_var_req_builder.query(&[("newClientOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = strategy_id { + local_var_req_builder = local_var_req_builder.query(&[("strategyId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = strategy_type { + local_var_req_builder = local_var_req_builder.query(&[("strategyType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = iceberg_qty { + local_var_req_builder = local_var_req_builder.query(&[("icebergQty", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = new_order_resp_type { + local_var_req_builder = local_var_req_builder.query(&[("newOrderRespType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = self_trade_prevention_mode { + local_var_req_builder = local_var_req_builder.query(&[("selfTradePreventionMode", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = compute_commission_rates { + local_var_req_builder = local_var_req_builder.query(&[("computeCommissionRates", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/vip_loans_api.rs b/test_rust/src/apis/vip_loans_api.rs new file mode 100644 index 0000000..0ab71e0 --- /dev/null +++ b/test_rust/src/apis/vip_loans_api.rs @@ -0,0 +1,599 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_loan_vip_borrow_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanVipBorrowPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_vip_collateral_account_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanVipCollateralAccountGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_vip_collateral_data_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanVipCollateralDataGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_vip_loanable_data_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanVipLoanableDataGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_vip_ongoing_orders_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanVipOngoingOrdersGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_vip_renew_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanVipRenewPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_vip_repay_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanVipRepayHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_vip_repay_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanVipRepayPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_vip_request_data_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanVipRequestDataGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_loan_vip_request_interest_rate_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanVipRequestInterestRateGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// VIP loan is available for VIP users only. Weight(UID): 6000 +pub async fn sapi_v1_loan_vip_borrow_post(configuration: &configuration::Configuration, loan_account_id: i64, loan_amount: f32, collateral_account_id: &str, collateral_coin: &str, is_flexible_rate: &str, timestamp: i64, signature: &str, loan_coin: Option<&str>, loan_term: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/vip/borrow", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("loanAccountId", &loan_account_id.to_string())]); + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("loanAmount", &loan_amount.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("collateralAccountId", &collateral_account_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &collateral_coin.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("isFlexibleRate", &is_flexible_rate.to_string())]); + if let Some(ref local_var_str) = loan_term { + local_var_req_builder = local_var_req_builder.query(&[("loanTerm", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// VIP loan is available for VIP users only. Weight(IP): 6000 +pub async fn sapi_v1_loan_vip_collateral_account_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, order_id: Option, collateral_account_id: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/vip/collateral/account", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_account_id { + local_var_req_builder = local_var_req_builder.query(&[("collateralAccountId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get collateral asset data. Weight(IP): 400 +pub async fn sapi_v1_loan_vip_collateral_data_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, collateral_coin: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/vip/collateral/data", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 +pub async fn sapi_v1_loan_vip_loanable_data_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, loan_coin: Option<&str>, vip_level: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/vip/loanable/data", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = vip_level { + local_var_req_builder = local_var_req_builder.query(&[("vipLevel", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// VIP loan is available for VIP users only. Weight(IP): 400 +pub async fn sapi_v1_loan_vip_ongoing_orders_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, order_id: Option, collateral_account_id: Option, loan_coin: Option<&str>, collateral_coin: Option<&str>, current: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/vip/ongoing/orders", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_account_id { + local_var_req_builder = local_var_req_builder.query(&[("collateralAccountId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = collateral_coin { + local_var_req_builder = local_var_req_builder.query(&[("collateralCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// VIP loan is available for VIP users only. Weight(UID): 6000 +pub async fn sapi_v1_loan_vip_renew_post(configuration: &configuration::Configuration, timestamp: i64, signature: &str, order_id: Option, loan_term: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/vip/renew", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = loan_term { + local_var_req_builder = local_var_req_builder.query(&[("loanTerm", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// VIP loan is available for VIP users only. Weight(IP): 400 +pub async fn sapi_v1_loan_vip_repay_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, order_id: Option, loan_coin: Option<&str>, start_time: Option, end_time: Option, current: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/vip/repay/history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// VIP loan is available for VIP users only. Weight(UID): 6000 +pub async fn sapi_v1_loan_vip_repay_post(configuration: &configuration::Configuration, amount: f64, timestamp: i64, signature: &str, order_id: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/vip/repay", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = order_id { + local_var_req_builder = local_var_req_builder.query(&[("orderId", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get Application Status Weight(UID): 400 +pub async fn sapi_v1_loan_vip_request_data_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, current: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/vip/request/data", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get borrow interest rate. Weight(UID): 400 +pub async fn sapi_v1_loan_vip_request_interest_rate_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, loan_coin: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/loan/vip/request/interestRate", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = loan_coin { + local_var_req_builder = local_var_req_builder.query(&[("loanCoin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/apis/wallet_api.rs b/test_rust/src/apis/wallet_api.rs new file mode 100644 index 0000000..cb87cdb --- /dev/null +++ b/test_rust/src/apis/wallet_api.rs @@ -0,0 +1,1908 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`sapi_v1_account_api_restrictions_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AccountApiRestrictionsGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_account_api_trading_status_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AccountApiTradingStatusGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_account_disable_fast_withdraw_switch_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AccountDisableFastWithdrawSwitchPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_account_enable_fast_withdraw_switch_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AccountEnableFastWithdrawSwitchPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_account_info_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AccountInfoGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_account_snapshot_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AccountSnapshotGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_account_status_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AccountStatusGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_asset_asset_detail_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AssetAssetDetailGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_asset_asset_dividend_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AssetAssetDividendGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_asset_convert_transfer_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AssetConvertTransferPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_asset_convert_transfer_query_by_page_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AssetConvertTransferQueryByPageGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_asset_custody_transfer_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AssetCustodyTransferHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_asset_dribblet_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AssetDribbletGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_asset_dust_btc_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AssetDustBtcPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_asset_dust_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AssetDustPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_asset_get_funding_asset_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AssetGetFundingAssetPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AssetLedgerTransferCloudMiningQueryByPageGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_asset_trade_fee_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AssetTradeFeeGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_asset_transfer_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AssetTransferGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_asset_transfer_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AssetTransferPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_asset_wallet_balance_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AssetWalletBalanceGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_capital_config_getall_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1CapitalConfigGetallGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_capital_contract_convertible_coins_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1CapitalContractConvertibleCoinsGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_capital_contract_convertible_coins_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1CapitalContractConvertibleCoinsPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_capital_deposit_address_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1CapitalDepositAddressGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_capital_deposit_address_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1CapitalDepositAddressListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_capital_deposit_credit_apply_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1CapitalDepositCreditApplyPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_capital_deposit_hisrec_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1CapitalDepositHisrecGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_capital_withdraw_address_list_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1CapitalWithdrawAddressListGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_capital_withdraw_apply_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1CapitalWithdrawApplyPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_capital_withdraw_history_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1CapitalWithdrawHistoryGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_spot_delist_schedule_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SpotDelistScheduleGetError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v1_system_status_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1SystemStatusGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sapi_v3_asset_get_user_asset_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV3AssetGetUserAssetPostError { + Status400(models::Error), + Status401(models::Error), + UnknownValue(serde_json::Value), +} + + +/// Weight(IP): 1 +pub async fn sapi_v1_account_api_restrictions_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/account/apiRestrictions", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Fetch account API trading status with details. Weight(IP): 1 +pub async fn sapi_v1_account_api_trading_status_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/account/apiTradingStatus", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - This request will disable fastwithdraw switch under your account. - You need to enable \"trade\" option for the api key which requests this endpoint. Weight(IP): 1 +pub async fn sapi_v1_account_disable_fast_withdraw_switch_post(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/account/disableFastWithdrawSwitch", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - This request will enable fastwithdraw switch under your account. You need to enable \"trade\" option for the api key which requests this endpoint. - When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee. Weight(IP): 1 +pub async fn sapi_v1_account_enable_fast_withdraw_switch_post(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/account/enableFastWithdrawSwitch", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Fetch account info detail. Weight(IP): 1 +pub async fn sapi_v1_account_info_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/account/info", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - The query time period must be less than 30 days - Support query within the last one month only - If startTimeand endTime not sent, return records of the last 7 days by default Weight(IP): 2400 +pub async fn sapi_v1_account_snapshot_get(configuration: &configuration::Configuration, r#type: &str, timestamp: i64, signature: &str, start_time: Option, end_time: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/accountSnapshot", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Fetch account status detail. Weight(IP): 1 +pub async fn sapi_v1_account_status_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/account/status", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Fetch details of assets supported on Binance. - Please get network and other deposit or withdraw details from `GET /sapi/v1/capital/config/getall`. Weight(IP): 1 +pub async fn sapi_v1_asset_asset_detail_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, asset: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/asset/assetDetail", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query asset Dividend Record Weight(IP): 10 +pub async fn sapi_v1_asset_asset_dividend_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, asset: Option<&str>, start_time: Option, end_time: Option, limit: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/asset/assetDividend", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Convert transfer, convert between BUSD and stablecoins. If the clientId has been used before, will not do the convert transfer, the original transfer will be returned. Weight(UID): 5 +pub async fn sapi_v1_asset_convert_transfer_post(configuration: &configuration::Configuration, client_tran_id: &str, asset: &str, amount: f64, target_asset: &str, timestamp: i64, signature: &str, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/asset/convert-transfer", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("clientTranId", &client_tran_id.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("targetAsset", &target_asset.to_string())]); + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(UID): 5 +pub async fn sapi_v1_asset_convert_transfer_query_by_page_get(configuration: &configuration::Configuration, start_time: i64, end_time: i64, timestamp: i64, signature: &str, tran_id: Option, asset: Option<&str>, account_type: Option<&str>, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/asset/convert-transfer/queryByPage", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = tran_id { + local_var_req_builder = local_var_req_builder.query(&[("tranId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("startTime", &start_time.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("endTime", &end_time.to_string())]); + if let Some(ref local_var_str) = account_type { + local_var_req_builder = local_var_req_builder.query(&[("accountType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query User Delegation History Weight(IP): 60 +pub async fn sapi_v1_asset_custody_transfer_history_get(configuration: &configuration::Configuration, email: &str, start_time: i64, end_time: i64, asset: &str, timestamp: i64, signature: &str, r#type: Option<&str>, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/asset/custody/transfer-history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("email", &email.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("startTime", &start_time.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("endTime", &end_time.to_string())]); + if let Some(ref local_var_str) = r#type { + local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_asset_dribblet_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, account_type: Option<&str>, start_time: Option, end_time: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/asset/dribblet", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = account_type { + local_var_req_builder = local_var_req_builder.query(&[("accountType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Weight(IP): 1 +pub async fn sapi_v1_asset_dust_btc_post(configuration: &configuration::Configuration, timestamp: i64, signature: &str, account_type: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/asset/dust-btc", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = account_type { + local_var_req_builder = local_var_req_builder.query(&[("accountType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Convert dust assets to BNB. Weight(UID): 10 +pub async fn sapi_v1_asset_dust_post(configuration: &configuration::Configuration, asset: Vec, timestamp: i64, signature: &str, account_type: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/asset/dust", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = match "multi" { + "multi" => local_var_req_builder.query(&asset.into_iter().map(|p| ("asset".to_owned(), p.to_string())).collect::>()), + _ => local_var_req_builder.query(&[("asset", &asset.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + if let Some(ref local_var_str) = account_type { + local_var_req_builder = local_var_req_builder.query(&[("accountType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token Weight(IP): 1 +pub async fn sapi_v1_asset_get_funding_asset_post(configuration: &configuration::Configuration, timestamp: i64, signature: &str, asset: Option<&str>, need_btc_valuation: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/asset/get-funding-asset", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = need_btc_valuation { + local_var_req_builder = local_var_req_builder.query(&[("needBtcValuation", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// The query of Cloud-Mining payment and refund history Weight(UID): 600 +pub async fn sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get(configuration: &configuration::Configuration, start_time: i64, end_time: i64, timestamp: i64, signature: &str, tran_id: Option, client_tran_id: Option<&str>, asset: Option<&str>, current: Option, size: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = tran_id { + local_var_req_builder = local_var_req_builder.query(&[("tranId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = client_tran_id { + local_var_req_builder = local_var_req_builder.query(&[("clientTranId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("startTime", &start_time.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("endTime", &end_time.to_string())]); + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Fetch trade fee Weight(IP): 1 +pub async fn sapi_v1_asset_trade_fee_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, symbol: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/asset/tradeFee", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = symbol { + local_var_req_builder = local_var_req_builder.query(&[("symbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// - `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - Support query within the last 6 months only - If `startTime` and `endTime` not sent, return records of the last 7 days by default Weight(IP): 1 +pub async fn sapi_v1_asset_transfer_get(configuration: &configuration::Configuration, r#type: &str, timestamp: i64, signature: &str, start_time: Option, end_time: Option, current: Option, size: Option, from_symbol: Option<&str>, to_symbol: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/asset/transfer", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = current { + local_var_req_builder = local_var_req_builder.query(&[("current", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = size { + local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = from_symbol { + local_var_req_builder = local_var_req_builder.query(&[("fromSymbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = to_symbol { + local_var_req_builder = local_var_req_builder.query(&[("toSymbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// You need to enable `Permits Universal Transfer` option for the api key which requests this endpoint. - `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN ENUM of transfer types: - MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account - MAIN_CMFUTURE Spot account transfer to COIN-M Futures account - MAIN_MARGIN Spot account transfer to Margin(cross)account - UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account - UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account - CMFUTURE_MAIN COIN-M Futures account transfer to Spot account - CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account - MARGIN_MAIN Margin(cross)account transfer to Spot account - MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures - MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures - ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account - MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account - ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account - MAIN_FUNDING Spot account transfer to Funding account - FUNDING_MAIN Funding account transfer to Spot account - FUNDING_UMFUTURE Funding account transfer to UMFUTURE account - UMFUTURE_FUNDING UMFUTURE account transfer to Funding account - MARGIN_FUNDING MARGIN account transfer to Funding account - FUNDING_MARGIN Funding account transfer to Margin account - FUNDING_CMFUTURE Funding account transfer to CMFUTURE account - CMFUTURE_FUNDING CMFUTURE account transfer to Funding account - MAIN_OPTION Spot account transfer to Options account - OPTION_MAIN Options account transfer to Spot account - UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account - OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures account - MARGIN_OPTION Margin(cross)account transfer to Options account - OPTION_MARGIN Options account transfer to Margin(cross)account - FUNDING_OPTION Funding account transfer to Options account - OPTION_FUNDING Options account transfer to Funding account - MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin account - PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account - MAIN_ISOLATED_MARGIN Spot account transfer to Isolated margin account - ISOLATED_MARGIN_MAIN Isolated margin account transfer to Spot account Weight(IP): 1 +pub async fn sapi_v1_asset_transfer_post(configuration: &configuration::Configuration, r#type: &str, asset: &str, amount: f64, timestamp: i64, signature: &str, from_symbol: Option<&str>, to_symbol: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/asset/transfer", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("type", &r#type.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("asset", &asset.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = from_symbol { + local_var_req_builder = local_var_req_builder.query(&[("fromSymbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = to_symbol { + local_var_req_builder = local_var_req_builder.query(&[("toSymbol", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Query User Wallet Balance Weight(IP): 60 +pub async fn sapi_v1_asset_wallet_balance_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/asset/wallet/balance", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get information of coins (available for deposit and withdraw) for user. Weight(IP): 10 +pub async fn sapi_v1_capital_config_getall_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/capital/config/getall", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get a user's auto-conversion settings in deposit/withdrawal Weight(UID): 600' +pub async fn sapi_v1_capital_contract_convertible_coins_get(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/capital/contract/convertible-coins", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// User can use it to turn on or turn off the BUSD auto-conversion from/to a specific stable coin. Weight(UID): 600' +pub async fn sapi_v1_capital_contract_convertible_coins_post(configuration: &configuration::Configuration, coin: &str, enable: bool) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/capital/contract/convertible-coins", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("coin", &coin.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("enable", &enable.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Fetch deposit address with network. - If network is not send, return with default network of the coin. - You can get network and isDefault in networkList in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256). Weight(IP): 10 +pub async fn sapi_v1_capital_deposit_address_get(configuration: &configuration::Configuration, coin: &str, timestamp: i64, signature: &str, network: Option<&str>, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/capital/deposit/address", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("coin", &coin.to_string())]); + if let Some(ref local_var_str) = network { + local_var_req_builder = local_var_req_builder.query(&[("network", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Fetch deposit address list with network. Weight(IP): 10 +pub async fn sapi_v1_capital_deposit_address_list_get(configuration: &configuration::Configuration, coin: &str, timestamp: i64, signature: &str, network: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/capital/deposit/address/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("coin", &coin.to_string())]); + if let Some(ref local_var_str) = network { + local_var_req_builder = local_var_req_builder.query(&[("network", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Apply deposit credit for expired address (One click arrival) Weight(IP): 1 +pub async fn sapi_v1_capital_deposit_credit_apply_post(configuration: &configuration::Configuration, timestamp: i64, signature: &str, deposit_id: Option, tx_id: Option<&str>, sub_account_id: Option, sub_user_id: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/capital/deposit/credit-apply", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = deposit_id { + local_var_req_builder = local_var_req_builder.query(&[("depositId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = tx_id { + local_var_req_builder = local_var_req_builder.query(&[("txId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = sub_account_id { + local_var_req_builder = local_var_req_builder.query(&[("subAccountId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = sub_user_id { + local_var_req_builder = local_var_req_builder.query(&[("subUserId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Fetch deposit history. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days. Weight(IP): 1 +pub async fn sapi_v1_capital_deposit_hisrec_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, coin: Option<&str>, status: Option, start_time: Option, end_time: Option, offset: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/capital/deposit/hisrec", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = coin { + local_var_req_builder = local_var_req_builder.query(&[("coin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = status { + local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = offset { + local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Fetch withdraw address list Weight(IP): 10 +pub async fn sapi_v1_capital_withdraw_address_list_get(configuration: &configuration::Configuration, ) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/capital/withdraw/address/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Submit a withdraw request. - If `network` not send, return with default network of the coin. - You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. Weight(IP): 1 +pub async fn sapi_v1_capital_withdraw_apply_post(configuration: &configuration::Configuration, coin: &str, address: &str, amount: f64, timestamp: i64, signature: &str, withdraw_order_id: Option<&str>, network: Option<&str>, address_tag: Option<&str>, transaction_fee_flag: Option, name: Option<&str>, wallet_type: Option, recv_window: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/capital/withdraw/apply", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("coin", &coin.to_string())]); + if let Some(ref local_var_str) = withdraw_order_id { + local_var_req_builder = local_var_req_builder.query(&[("withdrawOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = network { + local_var_req_builder = local_var_req_builder.query(&[("network", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("address", &address.to_string())]); + if let Some(ref local_var_str) = address_tag { + local_var_req_builder = local_var_req_builder.query(&[("addressTag", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("amount", &amount.to_string())]); + if let Some(ref local_var_str) = transaction_fee_flag { + local_var_req_builder = local_var_req_builder.query(&[("transactionFeeFlag", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = name { + local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = wallet_type { + local_var_req_builder = local_var_req_builder.query(&[("walletType", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Fetch withdraw history. This endpoint specifically uses per second UID rate limit, user's total second level IP rate limit is 180000/second. Response from the endpoint contains header key X-SAPI-USED-UID-WEIGHT-1S, which defines weight used by the current IP. - `network` may not be in the response for old withdraw. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days - If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days. - If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default. Weight(UID): 18000 Request Limit: 10 requests per second +pub async fn sapi_v1_capital_withdraw_history_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, coin: Option<&str>, withdraw_order_id: Option<&str>, status: Option, start_time: Option, end_time: Option, offset: Option, limit: Option, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/capital/withdraw/history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = coin { + local_var_req_builder = local_var_req_builder.query(&[("coin", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = withdraw_order_id { + local_var_req_builder = local_var_req_builder.query(&[("withdrawOrderId", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = status { + local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = start_time { + local_var_req_builder = local_var_req_builder.query(&[("startTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = end_time { + local_var_req_builder = local_var_req_builder.query(&[("endTime", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = offset { + local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get symbols delist schedule for spot Weight(IP): 100 +pub async fn sapi_v1_spot_delist_schedule_get(configuration: &configuration::Configuration, timestamp: i64, signature: &str, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/spot/delist-schedule", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Fetch system status. Weight(IP): 1 +pub async fn sapi_v1_system_status_get(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v1/system/status", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Get user assets, just for positive data. Weight(IP): 5 +pub async fn sapi_v3_asset_get_user_asset_post(configuration: &configuration::Configuration, timestamp: i64, signature: &str, asset: Option<&str>, need_btc_valuation: Option<&str>, recv_window: Option) -> Result, Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/sapi/v3/asset/getUserAsset", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = asset { + local_var_req_builder = local_var_req_builder.query(&[("asset", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = need_btc_valuation { + local_var_req_builder = local_var_req_builder.query(&[("needBtcValuation", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = recv_window { + local_var_req_builder = local_var_req_builder.query(&[("recvWindow", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("timestamp", ×tamp.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("signature", &signature.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("X-MBX-APIKEY", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/test_rust/src/lib.rs b/test_rust/src/lib.rs new file mode 100644 index 0000000..a1837b9 --- /dev/null +++ b/test_rust/src/lib.rs @@ -0,0 +1,10 @@ +#![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] + +extern crate serde; +extern crate serde_json; +extern crate url; +extern crate reqwest; + +pub mod apis; +pub mod models; diff --git a/test_rust/src/models/_api_v3_account_commission_get_200_response.rs b/test_rust/src/models/_api_v3_account_commission_get_200_response.rs new file mode 100644 index 0000000..efbd42e --- /dev/null +++ b/test_rust/src/models/_api_v3_account_commission_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3AccountCommissionGet200Response { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "standardCommission")] + pub standard_commission: Box, + #[serde(rename = "taxCommission")] + pub tax_commission: Box, + #[serde(rename = "discount")] + pub discount: Box, +} + +impl ApiV3AccountCommissionGet200Response { + pub fn new(symbol: String, standard_commission: models::ApiV3AccountCommissionGet200ResponseStandardCommission, tax_commission: models::ApiV3AccountCommissionGet200ResponseTaxCommission, discount: models::ApiV3AccountCommissionGet200ResponseDiscount) -> ApiV3AccountCommissionGet200Response { + ApiV3AccountCommissionGet200Response { + symbol, + standard_commission: Box::new(standard_commission), + tax_commission: Box::new(tax_commission), + discount: Box::new(discount), + } + } +} + diff --git a/test_rust/src/models/_api_v3_account_commission_get_200_response_discount.rs b/test_rust/src/models/_api_v3_account_commission_get_200_response_discount.rs new file mode 100644 index 0000000..61318db --- /dev/null +++ b/test_rust/src/models/_api_v3_account_commission_get_200_response_discount.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ApiV3AccountCommissionGet200ResponseDiscount : Discount commission when paying in BNB. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3AccountCommissionGet200ResponseDiscount { + #[serde(rename = "enabledForAccount", skip_serializing_if = "Option::is_none")] + pub enabled_for_account: Option, + #[serde(rename = "enabledForSymbol", skip_serializing_if = "Option::is_none")] + pub enabled_for_symbol: Option, + #[serde(rename = "discountAsset", skip_serializing_if = "Option::is_none")] + pub discount_asset: Option, + /// Standard commission is reduced by this rate when paying commission in BNB. + #[serde(rename = "discount", skip_serializing_if = "Option::is_none")] + pub discount: Option, +} + +impl ApiV3AccountCommissionGet200ResponseDiscount { + /// Discount commission when paying in BNB. + pub fn new() -> ApiV3AccountCommissionGet200ResponseDiscount { + ApiV3AccountCommissionGet200ResponseDiscount { + enabled_for_account: None, + enabled_for_symbol: None, + discount_asset: None, + discount: None, + } + } +} + diff --git a/test_rust/src/models/_api_v3_account_commission_get_200_response_standard_commission.rs b/test_rust/src/models/_api_v3_account_commission_get_200_response_standard_commission.rs new file mode 100644 index 0000000..a3826e4 --- /dev/null +++ b/test_rust/src/models/_api_v3_account_commission_get_200_response_standard_commission.rs @@ -0,0 +1,38 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ApiV3AccountCommissionGet200ResponseStandardCommission : Standard commission rates on trades from the order. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3AccountCommissionGet200ResponseStandardCommission { + #[serde(rename = "maker")] + pub maker: String, + #[serde(rename = "taker")] + pub taker: String, + #[serde(rename = "buyer")] + pub buyer: String, + #[serde(rename = "seller")] + pub seller: String, +} + +impl ApiV3AccountCommissionGet200ResponseStandardCommission { + /// Standard commission rates on trades from the order. + pub fn new(maker: String, taker: String, buyer: String, seller: String) -> ApiV3AccountCommissionGet200ResponseStandardCommission { + ApiV3AccountCommissionGet200ResponseStandardCommission { + maker, + taker, + buyer, + seller, + } + } +} + diff --git a/test_rust/src/models/_api_v3_account_commission_get_200_response_tax_commission.rs b/test_rust/src/models/_api_v3_account_commission_get_200_response_tax_commission.rs new file mode 100644 index 0000000..cd19c9c --- /dev/null +++ b/test_rust/src/models/_api_v3_account_commission_get_200_response_tax_commission.rs @@ -0,0 +1,38 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ApiV3AccountCommissionGet200ResponseTaxCommission : Tax commission rates for trades from the order. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3AccountCommissionGet200ResponseTaxCommission { + #[serde(rename = "maker")] + pub maker: String, + #[serde(rename = "taker")] + pub taker: String, + #[serde(rename = "buyer")] + pub buyer: String, + #[serde(rename = "seller")] + pub seller: String, +} + +impl ApiV3AccountCommissionGet200ResponseTaxCommission { + /// Tax commission rates for trades from the order. + pub fn new(maker: String, taker: String, buyer: String, seller: String) -> ApiV3AccountCommissionGet200ResponseTaxCommission { + ApiV3AccountCommissionGet200ResponseTaxCommission { + maker, + taker, + buyer, + seller, + } + } +} + diff --git a/test_rust/src/models/_api_v3_all_order_list_get_200_response_inner.rs b/test_rust/src/models/_api_v3_all_order_list_get_200_response_inner.rs new file mode 100644 index 0000000..836950b --- /dev/null +++ b/test_rust/src/models/_api_v3_all_order_list_get_200_response_inner.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3AllOrderListGet200ResponseInner { + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "contingencyType")] + pub contingency_type: String, + #[serde(rename = "listStatusType")] + pub list_status_type: String, + #[serde(rename = "listOrderStatus")] + pub list_order_status: String, + #[serde(rename = "listClientOrderId")] + pub list_client_order_id: String, + #[serde(rename = "transactionTime")] + pub transaction_time: i64, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "isIsolated")] + pub is_isolated: bool, + #[serde(rename = "orders")] + pub orders: Vec, +} + +impl ApiV3AllOrderListGet200ResponseInner { + pub fn new(order_list_id: i64, contingency_type: String, list_status_type: String, list_order_status: String, list_client_order_id: String, transaction_time: i64, symbol: String, is_isolated: bool, orders: Vec) -> ApiV3AllOrderListGet200ResponseInner { + ApiV3AllOrderListGet200ResponseInner { + order_list_id, + contingency_type, + list_status_type, + list_order_status, + list_client_order_id, + transaction_time, + symbol, + is_isolated, + orders, + } + } +} + diff --git a/test_rust/src/models/_api_v3_all_order_list_get_200_response_inner_orders_inner.rs b/test_rust/src/models/_api_v3_all_order_list_get_200_response_inner_orders_inner.rs new file mode 100644 index 0000000..79b7dea --- /dev/null +++ b/test_rust/src/models/_api_v3_all_order_list_get_200_response_inner_orders_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3AllOrderListGet200ResponseInnerOrdersInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, +} + +impl ApiV3AllOrderListGet200ResponseInnerOrdersInner { + pub fn new(symbol: String, order_id: i64, client_order_id: String) -> ApiV3AllOrderListGet200ResponseInnerOrdersInner { + ApiV3AllOrderListGet200ResponseInnerOrdersInner { + symbol, + order_id, + client_order_id, + } + } +} + diff --git a/test_rust/src/models/_api_v3_avg_price_get_200_response.rs b/test_rust/src/models/_api_v3_avg_price_get_200_response.rs new file mode 100644 index 0000000..e4f4e3d --- /dev/null +++ b/test_rust/src/models/_api_v3_avg_price_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3AvgPriceGet200Response { + /// Average price interval (in minutes) + #[serde(rename = "mins")] + pub mins: i64, + /// Average price + #[serde(rename = "price")] + pub price: String, + /// Last trade time + #[serde(rename = "closeTime")] + pub close_time: i64, +} + +impl ApiV3AvgPriceGet200Response { + pub fn new(mins: i64, price: String, close_time: i64) -> ApiV3AvgPriceGet200Response { + ApiV3AvgPriceGet200Response { + mins, + price, + close_time, + } + } +} + diff --git a/test_rust/src/models/_api_v3_depth_get_200_response.rs b/test_rust/src/models/_api_v3_depth_get_200_response.rs new file mode 100644 index 0000000..3dde6e3 --- /dev/null +++ b/test_rust/src/models/_api_v3_depth_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3DepthGet200Response { + #[serde(rename = "lastUpdateId")] + pub last_update_id: i64, + #[serde(rename = "bids")] + pub bids: Vec>, + #[serde(rename = "asks")] + pub asks: Vec>, +} + +impl ApiV3DepthGet200Response { + pub fn new(last_update_id: i64, bids: Vec>, asks: Vec>) -> ApiV3DepthGet200Response { + ApiV3DepthGet200Response { + last_update_id, + bids, + asks, + } + } +} + diff --git a/test_rust/src/models/_api_v3_exchange_info_get_200_response.rs b/test_rust/src/models/_api_v3_exchange_info_get_200_response.rs new file mode 100644 index 0000000..d3fbc2e --- /dev/null +++ b/test_rust/src/models/_api_v3_exchange_info_get_200_response.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3ExchangeInfoGet200Response { + #[serde(rename = "timezone")] + pub timezone: String, + #[serde(rename = "serverTime")] + pub server_time: i64, + #[serde(rename = "rateLimits")] + pub rate_limits: Vec, + #[serde(rename = "exchangeFilters")] + pub exchange_filters: Vec, + #[serde(rename = "symbols")] + pub symbols: Vec, +} + +impl ApiV3ExchangeInfoGet200Response { + pub fn new(timezone: String, server_time: i64, rate_limits: Vec, exchange_filters: Vec, symbols: Vec) -> ApiV3ExchangeInfoGet200Response { + ApiV3ExchangeInfoGet200Response { + timezone, + server_time, + rate_limits, + exchange_filters, + symbols, + } + } +} + diff --git a/test_rust/src/models/_api_v3_exchange_info_get_200_response_rate_limits_inner.rs b/test_rust/src/models/_api_v3_exchange_info_get_200_response_rate_limits_inner.rs new file mode 100644 index 0000000..4437142 --- /dev/null +++ b/test_rust/src/models/_api_v3_exchange_info_get_200_response_rate_limits_inner.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3ExchangeInfoGet200ResponseRateLimitsInner { + #[serde(rename = "rateLimitType")] + pub rate_limit_type: String, + #[serde(rename = "interval")] + pub interval: String, + #[serde(rename = "intervalNum")] + pub interval_num: i32, + #[serde(rename = "limit")] + pub limit: i32, +} + +impl ApiV3ExchangeInfoGet200ResponseRateLimitsInner { + pub fn new(rate_limit_type: String, interval: String, interval_num: i32, limit: i32) -> ApiV3ExchangeInfoGet200ResponseRateLimitsInner { + ApiV3ExchangeInfoGet200ResponseRateLimitsInner { + rate_limit_type, + interval, + interval_num, + limit, + } + } +} + diff --git a/test_rust/src/models/_api_v3_exchange_info_get_200_response_symbols_inner.rs b/test_rust/src/models/_api_v3_exchange_info_get_200_response_symbols_inner.rs new file mode 100644 index 0000000..28b8d5f --- /dev/null +++ b/test_rust/src/models/_api_v3_exchange_info_get_200_response_symbols_inner.rs @@ -0,0 +1,90 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3ExchangeInfoGet200ResponseSymbolsInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "baseAsset")] + pub base_asset: String, + #[serde(rename = "baseAssetPrecision")] + pub base_asset_precision: i32, + #[serde(rename = "quoteAsset")] + pub quote_asset: String, + #[serde(rename = "quoteAssetPrecision")] + pub quote_asset_precision: i32, + #[serde(rename = "baseCommissionPrecision")] + pub base_commission_precision: i32, + #[serde(rename = "quoteCommissionPrecision")] + pub quote_commission_precision: i32, + #[serde(rename = "orderTypes")] + pub order_types: Vec, + #[serde(rename = "icebergAllowed")] + pub iceberg_allowed: bool, + #[serde(rename = "ocoAllowed")] + pub oco_allowed: bool, + #[serde(rename = "otoAllowed")] + pub oto_allowed: bool, + #[serde(rename = "quoteOrderQtyMarketAllowed")] + pub quote_order_qty_market_allowed: bool, + #[serde(rename = "allowTrailingStop")] + pub allow_trailing_stop: bool, + #[serde(rename = "cancelReplaceAllowed")] + pub cancel_replace_allowed: bool, + #[serde(rename = "isSpotTradingAllowed")] + pub is_spot_trading_allowed: bool, + #[serde(rename = "isMarginTradingAllowed")] + pub is_margin_trading_allowed: bool, + #[serde(rename = "filters")] + pub filters: Vec, + #[serde(rename = "permissions")] + pub permissions: Vec, + #[serde(rename = "permissionSets")] + pub permission_sets: Vec>, + #[serde(rename = "defaultSelfTradePreventionMode")] + pub default_self_trade_prevention_mode: String, + #[serde(rename = "allowedSelfTradePreventionModes")] + pub allowed_self_trade_prevention_modes: Vec, +} + +impl ApiV3ExchangeInfoGet200ResponseSymbolsInner { + pub fn new(symbol: String, status: String, base_asset: String, base_asset_precision: i32, quote_asset: String, quote_asset_precision: i32, base_commission_precision: i32, quote_commission_precision: i32, order_types: Vec, iceberg_allowed: bool, oco_allowed: bool, oto_allowed: bool, quote_order_qty_market_allowed: bool, allow_trailing_stop: bool, cancel_replace_allowed: bool, is_spot_trading_allowed: bool, is_margin_trading_allowed: bool, filters: Vec, permissions: Vec, permission_sets: Vec>, default_self_trade_prevention_mode: String, allowed_self_trade_prevention_modes: Vec) -> ApiV3ExchangeInfoGet200ResponseSymbolsInner { + ApiV3ExchangeInfoGet200ResponseSymbolsInner { + symbol, + status, + base_asset, + base_asset_precision, + quote_asset, + quote_asset_precision, + base_commission_precision, + quote_commission_precision, + order_types, + iceberg_allowed, + oco_allowed, + oto_allowed, + quote_order_qty_market_allowed, + allow_trailing_stop, + cancel_replace_allowed, + is_spot_trading_allowed, + is_margin_trading_allowed, + filters, + permissions, + permission_sets, + default_self_trade_prevention_mode, + allowed_self_trade_prevention_modes, + } + } +} + diff --git a/test_rust/src/models/_api_v3_exchange_info_get_200_response_symbols_inner_filters_inner.rs b/test_rust/src/models/_api_v3_exchange_info_get_200_response_symbols_inner_filters_inner.rs new file mode 100644 index 0000000..76ad09f --- /dev/null +++ b/test_rust/src/models/_api_v3_exchange_info_get_200_response_symbols_inner_filters_inner.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner { + #[serde(rename = "filterType")] + pub filter_type: String, + #[serde(rename = "minPrice")] + pub min_price: String, + #[serde(rename = "maxPrice")] + pub max_price: String, + #[serde(rename = "tickSize")] + pub tick_size: String, +} + +impl ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner { + pub fn new(filter_type: String, min_price: String, max_price: String, tick_size: String) -> ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner { + ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner { + filter_type, + min_price, + max_price, + tick_size, + } + } +} + diff --git a/test_rust/src/models/_api_v3_klines_get_200_response_inner_inner.rs b/test_rust/src/models/_api_v3_klines_get_200_response_inner_inner.rs new file mode 100644 index 0000000..1c55522 --- /dev/null +++ b/test_rust/src/models/_api_v3_klines_get_200_response_inner_inner.rs @@ -0,0 +1,26 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3KlinesGet200ResponseInnerInner { + Integer(i64), + String(String), +} + +impl Default for ApiV3KlinesGet200ResponseInnerInner { + fn default() -> Self { + Self::Integer(Default::default()) + } +} + diff --git a/test_rust/src/models/_api_v3_my_allocations_get_200_response_inner.rs b/test_rust/src/models/_api_v3_my_allocations_get_200_response_inner.rs new file mode 100644 index 0000000..a512d39 --- /dev/null +++ b/test_rust/src/models/_api_v3_my_allocations_get_200_response_inner.rs @@ -0,0 +1,66 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3MyAllocationsGet200ResponseInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "allocationId")] + pub allocation_id: i64, + #[serde(rename = "allocationType")] + pub allocation_type: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "qty")] + pub qty: String, + #[serde(rename = "quoteQty")] + pub quote_qty: String, + #[serde(rename = "commission")] + pub commission: String, + #[serde(rename = "commissionAsset")] + pub commission_asset: String, + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "isBuyer")] + pub is_buyer: bool, + #[serde(rename = "isMaker")] + pub is_maker: bool, + #[serde(rename = "isAllocator")] + pub is_allocator: bool, +} + +impl ApiV3MyAllocationsGet200ResponseInner { + pub fn new(symbol: String, allocation_id: i64, allocation_type: String, order_id: i64, order_list_id: i64, price: String, qty: String, quote_qty: String, commission: String, commission_asset: String, time: i64, is_buyer: bool, is_maker: bool, is_allocator: bool) -> ApiV3MyAllocationsGet200ResponseInner { + ApiV3MyAllocationsGet200ResponseInner { + symbol, + allocation_id, + allocation_type, + order_id, + order_list_id, + price, + qty, + quote_qty, + commission, + commission_asset, + time, + is_buyer, + is_maker, + is_allocator, + } + } +} + diff --git a/test_rust/src/models/_api_v3_my_prevented_matches_get_200_response_inner.rs b/test_rust/src/models/_api_v3_my_prevented_matches_get_200_response_inner.rs new file mode 100644 index 0000000..f7cbd94 --- /dev/null +++ b/test_rust/src/models/_api_v3_my_prevented_matches_get_200_response_inner.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3MyPreventedMatchesGet200ResponseInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "preventedMatchId")] + pub prevented_match_id: i64, + #[serde(rename = "takerOrderId")] + pub taker_order_id: i64, + #[serde(rename = "makerOrderId")] + pub maker_order_id: i64, + #[serde(rename = "tradeGroupId")] + pub trade_group_id: i64, + #[serde(rename = "selfTradePreventionMode")] + pub self_trade_prevention_mode: String, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "makerPreventedQuantity")] + pub maker_prevented_quantity: String, + #[serde(rename = "transactTime")] + pub transact_time: i64, +} + +impl ApiV3MyPreventedMatchesGet200ResponseInner { + pub fn new(symbol: String, prevented_match_id: i64, taker_order_id: i64, maker_order_id: i64, trade_group_id: i64, self_trade_prevention_mode: String, price: String, maker_prevented_quantity: String, transact_time: i64) -> ApiV3MyPreventedMatchesGet200ResponseInner { + ApiV3MyPreventedMatchesGet200ResponseInner { + symbol, + prevented_match_id, + taker_order_id, + maker_order_id, + trade_group_id, + self_trade_prevention_mode, + price, + maker_prevented_quantity, + transact_time, + } + } +} + diff --git a/test_rust/src/models/_api_v3_open_order_list_get_200_response_inner.rs b/test_rust/src/models/_api_v3_open_order_list_get_200_response_inner.rs new file mode 100644 index 0000000..a2764f2 --- /dev/null +++ b/test_rust/src/models/_api_v3_open_order_list_get_200_response_inner.rs @@ -0,0 +1,48 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3OpenOrderListGet200ResponseInner { + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "contingencyType")] + pub contingency_type: String, + #[serde(rename = "listStatusType")] + pub list_status_type: String, + #[serde(rename = "listOrderStatus")] + pub list_order_status: String, + #[serde(rename = "listClientOrderId")] + pub list_client_order_id: String, + #[serde(rename = "transactionTime")] + pub transaction_time: i64, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orders")] + pub orders: Vec, +} + +impl ApiV3OpenOrderListGet200ResponseInner { + pub fn new(order_list_id: i64, contingency_type: String, list_status_type: String, list_order_status: String, list_client_order_id: String, transaction_time: i64, symbol: String, orders: Vec) -> ApiV3OpenOrderListGet200ResponseInner { + ApiV3OpenOrderListGet200ResponseInner { + order_list_id, + contingency_type, + list_status_type, + list_order_status, + list_client_order_id, + transaction_time, + symbol, + orders, + } + } +} + diff --git a/test_rust/src/models/_api_v3_open_order_list_get_200_response_inner_orders_inner.rs b/test_rust/src/models/_api_v3_open_order_list_get_200_response_inner_orders_inner.rs new file mode 100644 index 0000000..a456ad9 --- /dev/null +++ b/test_rust/src/models/_api_v3_open_order_list_get_200_response_inner_orders_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3OpenOrderListGet200ResponseInnerOrdersInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, +} + +impl ApiV3OpenOrderListGet200ResponseInnerOrdersInner { + pub fn new(symbol: String, order_id: i64, client_order_id: String) -> ApiV3OpenOrderListGet200ResponseInnerOrdersInner { + ApiV3OpenOrderListGet200ResponseInnerOrdersInner { + symbol, + order_id, + client_order_id, + } + } +} + diff --git a/test_rust/src/models/_api_v3_open_orders_delete_200_response_inner.rs b/test_rust/src/models/_api_v3_open_orders_delete_200_response_inner.rs new file mode 100644 index 0000000..872ad4c --- /dev/null +++ b/test_rust/src/models/_api_v3_open_orders_delete_200_response_inner.rs @@ -0,0 +1,90 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3OpenOrdersDelete200ResponseInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "origClientOrderId")] + pub orig_client_order_id: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "transactTime")] + pub transact_time: i64, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "selfTradePreventionMode")] + pub self_trade_prevention_mode: String, + #[serde(rename = "contingencyType")] + pub contingency_type: String, + #[serde(rename = "listStatusType")] + pub list_status_type: String, + #[serde(rename = "listOrderStatus")] + pub list_order_status: String, + #[serde(rename = "listClientOrderId")] + pub list_client_order_id: String, + #[serde(rename = "transactionTime")] + pub transaction_time: i64, + #[serde(rename = "orders")] + pub orders: Vec, + #[serde(rename = "orderReports")] + pub order_reports: Vec, +} + +impl ApiV3OpenOrdersDelete200ResponseInner { + pub fn new(symbol: String, orig_client_order_id: String, order_id: i64, order_list_id: i64, client_order_id: String, transact_time: i64, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String, self_trade_prevention_mode: String, contingency_type: String, list_status_type: String, list_order_status: String, list_client_order_id: String, transaction_time: i64, orders: Vec, order_reports: Vec) -> ApiV3OpenOrdersDelete200ResponseInner { + ApiV3OpenOrdersDelete200ResponseInner { + symbol, + orig_client_order_id, + order_id, + order_list_id, + client_order_id, + transact_time, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + self_trade_prevention_mode, + contingency_type, + list_status_type, + list_order_status, + list_client_order_id, + transaction_time, + orders, + order_reports, + } + } +} + diff --git a/test_rust/src/models/_api_v3_order_cancel_replace_post_200_response.rs b/test_rust/src/models/_api_v3_order_cancel_replace_post_200_response.rs new file mode 100644 index 0000000..19f49a0 --- /dev/null +++ b/test_rust/src/models/_api_v3_order_cancel_replace_post_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3OrderCancelReplacePost200Response { + #[serde(rename = "cancelResult")] + pub cancel_result: String, + #[serde(rename = "newOrderResult")] + pub new_order_result: String, + #[serde(rename = "cancelResponse")] + pub cancel_response: Box, + #[serde(rename = "newOrderResponse")] + pub new_order_response: Box, +} + +impl ApiV3OrderCancelReplacePost200Response { + pub fn new(cancel_result: String, new_order_result: String, cancel_response: models::ApiV3OrderCancelReplacePost200ResponseCancelResponse, new_order_response: models::ApiV3OrderCancelReplacePost200ResponseNewOrderResponse) -> ApiV3OrderCancelReplacePost200Response { + ApiV3OrderCancelReplacePost200Response { + cancel_result, + new_order_result, + cancel_response: Box::new(cancel_response), + new_order_response: Box::new(new_order_response), + } + } +} + diff --git a/test_rust/src/models/_api_v3_order_cancel_replace_post_200_response_cancel_response.rs b/test_rust/src/models/_api_v3_order_cancel_replace_post_200_response_cancel_response.rs new file mode 100644 index 0000000..4a20de4 --- /dev/null +++ b/test_rust/src/models/_api_v3_order_cancel_replace_post_200_response_cancel_response.rs @@ -0,0 +1,69 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3OrderCancelReplacePost200ResponseCancelResponse { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "origClientOrderId")] + pub orig_client_order_id: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "selfTradePreventionMode")] + pub self_trade_prevention_mode: String, + #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] + pub transact_time: Option, +} + +impl ApiV3OrderCancelReplacePost200ResponseCancelResponse { + pub fn new(symbol: String, orig_client_order_id: String, order_id: i64, order_list_id: i64, client_order_id: String, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String, self_trade_prevention_mode: String) -> ApiV3OrderCancelReplacePost200ResponseCancelResponse { + ApiV3OrderCancelReplacePost200ResponseCancelResponse { + symbol, + orig_client_order_id, + order_id, + order_list_id, + client_order_id, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + self_trade_prevention_mode, + transact_time: None, + } + } +} + diff --git a/test_rust/src/models/_api_v3_order_cancel_replace_post_200_response_new_order_response.rs b/test_rust/src/models/_api_v3_order_cancel_replace_post_200_response_new_order_response.rs new file mode 100644 index 0000000..0881872 --- /dev/null +++ b/test_rust/src/models/_api_v3_order_cancel_replace_post_200_response_new_order_response.rs @@ -0,0 +1,72 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3OrderCancelReplacePost200ResponseNewOrderResponse { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "transactTime")] + pub transact_time: i64, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "workingTime")] + pub working_time: i64, + #[serde(rename = "fills")] + pub fills: Vec, + #[serde(rename = "selfTradePreventionMode")] + pub self_trade_prevention_mode: String, +} + +impl ApiV3OrderCancelReplacePost200ResponseNewOrderResponse { + pub fn new(symbol: String, order_id: i64, order_list_id: i64, client_order_id: String, transact_time: i64, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String, working_time: i64, fills: Vec, self_trade_prevention_mode: String) -> ApiV3OrderCancelReplacePost200ResponseNewOrderResponse { + ApiV3OrderCancelReplacePost200ResponseNewOrderResponse { + symbol, + order_id, + order_list_id, + client_order_id, + transact_time, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + working_time, + fills, + self_trade_prevention_mode, + } + } +} + diff --git a/test_rust/src/models/_api_v3_order_list_get_200_response.rs b/test_rust/src/models/_api_v3_order_list_get_200_response.rs new file mode 100644 index 0000000..5e87e21 --- /dev/null +++ b/test_rust/src/models/_api_v3_order_list_get_200_response.rs @@ -0,0 +1,48 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3OrderListGet200Response { + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "contingencyType")] + pub contingency_type: String, + #[serde(rename = "listStatusType")] + pub list_status_type: String, + #[serde(rename = "listOrderStatus")] + pub list_order_status: String, + #[serde(rename = "listClientOrderId")] + pub list_client_order_id: String, + #[serde(rename = "transactionTime")] + pub transaction_time: i64, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orders")] + pub orders: Vec, +} + +impl ApiV3OrderListGet200Response { + pub fn new(order_list_id: i64, contingency_type: String, list_status_type: String, list_order_status: String, list_client_order_id: String, transaction_time: i64, symbol: String, orders: Vec) -> ApiV3OrderListGet200Response { + ApiV3OrderListGet200Response { + order_list_id, + contingency_type, + list_status_type, + list_order_status, + list_client_order_id, + transaction_time, + symbol, + orders, + } + } +} + diff --git a/test_rust/src/models/_api_v3_order_list_get_200_response_orders_inner.rs b/test_rust/src/models/_api_v3_order_list_get_200_response_orders_inner.rs new file mode 100644 index 0000000..258738a --- /dev/null +++ b/test_rust/src/models/_api_v3_order_list_get_200_response_orders_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3OrderListGet200ResponseOrdersInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, +} + +impl ApiV3OrderListGet200ResponseOrdersInner { + pub fn new(symbol: String, order_id: i64, client_order_id: String) -> ApiV3OrderListGet200ResponseOrdersInner { + ApiV3OrderListGet200ResponseOrdersInner { + symbol, + order_id, + client_order_id, + } + } +} + diff --git a/test_rust/src/models/_api_v3_order_oco_post_200_response.rs b/test_rust/src/models/_api_v3_order_oco_post_200_response.rs new file mode 100644 index 0000000..3a5b7d7 --- /dev/null +++ b/test_rust/src/models/_api_v3_order_oco_post_200_response.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3OrderOcoPost200Response { + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "contingencyType")] + pub contingency_type: String, + #[serde(rename = "listStatusType")] + pub list_status_type: String, + #[serde(rename = "listOrderStatus")] + pub list_order_status: String, + #[serde(rename = "listClientOrderId")] + pub list_client_order_id: String, + #[serde(rename = "transactionTime")] + pub transaction_time: i64, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orders")] + pub orders: Vec, + #[serde(rename = "orderReports")] + pub order_reports: Vec, +} + +impl ApiV3OrderOcoPost200Response { + pub fn new(order_list_id: i64, contingency_type: String, list_status_type: String, list_order_status: String, list_client_order_id: String, transaction_time: i64, symbol: String, orders: Vec, order_reports: Vec) -> ApiV3OrderOcoPost200Response { + ApiV3OrderOcoPost200Response { + order_list_id, + contingency_type, + list_status_type, + list_order_status, + list_client_order_id, + transaction_time, + symbol, + orders, + order_reports, + } + } +} + diff --git a/test_rust/src/models/_api_v3_order_oco_post_200_response_order_reports_inner.rs b/test_rust/src/models/_api_v3_order_oco_post_200_response_order_reports_inner.rs new file mode 100644 index 0000000..5806328 --- /dev/null +++ b/test_rust/src/models/_api_v3_order_oco_post_200_response_order_reports_inner.rs @@ -0,0 +1,72 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3OrderOcoPost200ResponseOrderReportsInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "transactTime")] + pub transact_time: i64, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "stopPrice")] + pub stop_price: String, + #[serde(rename = "workingTime")] + pub working_time: String, + #[serde(rename = "selfTradePreventionMode")] + pub self_trade_prevention_mode: String, +} + +impl ApiV3OrderOcoPost200ResponseOrderReportsInner { + pub fn new(symbol: String, order_id: i64, order_list_id: i64, client_order_id: String, transact_time: i64, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String, stop_price: String, working_time: String, self_trade_prevention_mode: String) -> ApiV3OrderOcoPost200ResponseOrderReportsInner { + ApiV3OrderOcoPost200ResponseOrderReportsInner { + symbol, + order_id, + order_list_id, + client_order_id, + transact_time, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + stop_price, + working_time, + self_trade_prevention_mode, + } + } +} + diff --git a/test_rust/src/models/_api_v3_order_oco_post_200_response_orders_inner.rs b/test_rust/src/models/_api_v3_order_oco_post_200_response_orders_inner.rs new file mode 100644 index 0000000..67408f8 --- /dev/null +++ b/test_rust/src/models/_api_v3_order_oco_post_200_response_orders_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3OrderOcoPost200ResponseOrdersInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, +} + +impl ApiV3OrderOcoPost200ResponseOrdersInner { + pub fn new(symbol: String, order_id: i64, client_order_id: String) -> ApiV3OrderOcoPost200ResponseOrdersInner { + ApiV3OrderOcoPost200ResponseOrdersInner { + symbol, + order_id, + client_order_id, + } + } +} + diff --git a/test_rust/src/models/_api_v3_order_post_200_response.rs b/test_rust/src/models/_api_v3_order_post_200_response.rs new file mode 100644 index 0000000..35061d7 --- /dev/null +++ b/test_rust/src/models/_api_v3_order_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3OrderPost200Response { + OrderResponseAck(Box), + OrderResponseResult(Box), + OrderResponseFull(Box), +} + +impl Default for ApiV3OrderPost200Response { + fn default() -> Self { + Self::OrderResponseAck(Default::default()) + } +} + diff --git a/test_rust/src/models/_api_v3_rate_limit_order_get_200_response_inner.rs b/test_rust/src/models/_api_v3_rate_limit_order_get_200_response_inner.rs new file mode 100644 index 0000000..d5a0135 --- /dev/null +++ b/test_rust/src/models/_api_v3_rate_limit_order_get_200_response_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3RateLimitOrderGet200ResponseInner { + #[serde(rename = "rateLimitType")] + pub rate_limit_type: String, + #[serde(rename = "interval")] + pub interval: String, + #[serde(rename = "intervalNum")] + pub interval_num: i32, + #[serde(rename = "limit")] + pub limit: i32, + #[serde(rename = "count", skip_serializing_if = "Option::is_none")] + pub count: Option, +} + +impl ApiV3RateLimitOrderGet200ResponseInner { + pub fn new(rate_limit_type: String, interval: String, interval_num: i32, limit: i32) -> ApiV3RateLimitOrderGet200ResponseInner { + ApiV3RateLimitOrderGet200ResponseInner { + rate_limit_type, + interval, + interval_num, + limit, + count: None, + } + } +} + diff --git a/test_rust/src/models/_api_v3_sor_order_post_200_response.rs b/test_rust/src/models/_api_v3_sor_order_post_200_response.rs new file mode 100644 index 0000000..9d0edeb --- /dev/null +++ b/test_rust/src/models/_api_v3_sor_order_post_200_response.rs @@ -0,0 +1,78 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3SorOrderPost200Response { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "transactTime")] + pub transact_time: i64, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "workingTime")] + pub working_time: i64, + #[serde(rename = "fills")] + pub fills: Vec, + #[serde(rename = "workingFloor")] + pub working_floor: String, + #[serde(rename = "selfTradePreventionMode")] + pub self_trade_prevention_mode: String, + #[serde(rename = "usedSor")] + pub used_sor: bool, +} + +impl ApiV3SorOrderPost200Response { + pub fn new(symbol: String, order_id: i64, order_list_id: i64, client_order_id: String, transact_time: i64, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String, working_time: i64, fills: Vec, working_floor: String, self_trade_prevention_mode: String, used_sor: bool) -> ApiV3SorOrderPost200Response { + ApiV3SorOrderPost200Response { + symbol, + order_id, + order_list_id, + client_order_id, + transact_time, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + working_time, + fills, + working_floor, + self_trade_prevention_mode, + used_sor, + } + } +} + diff --git a/test_rust/src/models/_api_v3_sor_order_post_200_response_fills_inner.rs b/test_rust/src/models/_api_v3_sor_order_post_200_response_fills_inner.rs new file mode 100644 index 0000000..68a6ff8 --- /dev/null +++ b/test_rust/src/models/_api_v3_sor_order_post_200_response_fills_inner.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3SorOrderPost200ResponseFillsInner { + #[serde(rename = "matchType")] + pub match_type: String, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "qty")] + pub qty: String, + #[serde(rename = "commission")] + pub commission: String, + #[serde(rename = "commissionAsset")] + pub commission_asset: String, + #[serde(rename = "tradeId")] + pub trade_id: i64, + #[serde(rename = "allocId")] + pub alloc_id: i64, +} + +impl ApiV3SorOrderPost200ResponseFillsInner { + pub fn new(match_type: String, price: String, qty: String, commission: String, commission_asset: String, trade_id: i64, alloc_id: i64) -> ApiV3SorOrderPost200ResponseFillsInner { + ApiV3SorOrderPost200ResponseFillsInner { + match_type, + price, + qty, + commission, + commission_asset, + trade_id, + alloc_id, + } + } +} + diff --git a/test_rust/src/models/_api_v3_ticker_24hr_get_200_response.rs b/test_rust/src/models/_api_v3_ticker_24hr_get_200_response.rs new file mode 100644 index 0000000..107f89e --- /dev/null +++ b/test_rust/src/models/_api_v3_ticker_24hr_get_200_response.rs @@ -0,0 +1,26 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3Ticker24hrGet200Response { + Ticker(Box), + TickerList(Vec), +} + +impl Default for ApiV3Ticker24hrGet200Response { + fn default() -> Self { + Self::Ticker(Default::default()) + } +} + diff --git a/test_rust/src/models/_api_v3_ticker_book_ticker_get_200_response.rs b/test_rust/src/models/_api_v3_ticker_book_ticker_get_200_response.rs new file mode 100644 index 0000000..d2df7ca --- /dev/null +++ b/test_rust/src/models/_api_v3_ticker_book_ticker_get_200_response.rs @@ -0,0 +1,26 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3TickerBookTickerGet200Response { + BookTicker(Box), + BookTickerList(Vec), +} + +impl Default for ApiV3TickerBookTickerGet200Response { + fn default() -> Self { + Self::BookTicker(Default::default()) + } +} + diff --git a/test_rust/src/models/_api_v3_ticker_get_200_response.rs b/test_rust/src/models/_api_v3_ticker_get_200_response.rs new file mode 100644 index 0000000..022f267 --- /dev/null +++ b/test_rust/src/models/_api_v3_ticker_get_200_response.rs @@ -0,0 +1,69 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3TickerGet200Response { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "priceChange")] + pub price_change: String, + #[serde(rename = "priceChangePercent")] + pub price_change_percent: String, + #[serde(rename = "weightedAvgPrice")] + pub weighted_avg_price: String, + #[serde(rename = "openPrice")] + pub open_price: String, + #[serde(rename = "highPrice")] + pub high_price: String, + #[serde(rename = "lowPrice")] + pub low_price: String, + #[serde(rename = "lastPrice")] + pub last_price: String, + #[serde(rename = "volume")] + pub volume: String, + #[serde(rename = "quoteVolume")] + pub quote_volume: String, + #[serde(rename = "openTime")] + pub open_time: i64, + #[serde(rename = "closeTime")] + pub close_time: i64, + #[serde(rename = "firstId")] + pub first_id: i64, + #[serde(rename = "lastId")] + pub last_id: i64, + #[serde(rename = "count")] + pub count: i64, +} + +impl ApiV3TickerGet200Response { + pub fn new(symbol: String, price_change: String, price_change_percent: String, weighted_avg_price: String, open_price: String, high_price: String, low_price: String, last_price: String, volume: String, quote_volume: String, open_time: i64, close_time: i64, first_id: i64, last_id: i64, count: i64) -> ApiV3TickerGet200Response { + ApiV3TickerGet200Response { + symbol, + price_change, + price_change_percent, + weighted_avg_price, + open_price, + high_price, + low_price, + last_price, + volume, + quote_volume, + open_time, + close_time, + first_id, + last_id, + count, + } + } +} + diff --git a/test_rust/src/models/_api_v3_ticker_price_get_200_response.rs b/test_rust/src/models/_api_v3_ticker_price_get_200_response.rs new file mode 100644 index 0000000..87bc7be --- /dev/null +++ b/test_rust/src/models/_api_v3_ticker_price_get_200_response.rs @@ -0,0 +1,26 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3TickerPriceGet200Response { + PriceTicker(Box), + PriceTickerList(Vec), +} + +impl Default for ApiV3TickerPriceGet200Response { + fn default() -> Self { + Self::PriceTicker(Default::default()) + } +} + diff --git a/test_rust/src/models/_api_v3_ticker_trading_day_get_200_response.rs b/test_rust/src/models/_api_v3_ticker_trading_day_get_200_response.rs new file mode 100644 index 0000000..178ff2a --- /dev/null +++ b/test_rust/src/models/_api_v3_ticker_trading_day_get_200_response.rs @@ -0,0 +1,26 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV3TickerTradingDayGet200Response { + DayTicker(Box), + DayTickerList(Vec), +} + +impl Default for ApiV3TickerTradingDayGet200Response { + fn default() -> Self { + Self::DayTicker(Default::default()) + } +} + diff --git a/test_rust/src/models/_api_v3_time_get_200_response.rs b/test_rust/src/models/_api_v3_time_get_200_response.rs new file mode 100644 index 0000000..6c9bd31 --- /dev/null +++ b/test_rust/src/models/_api_v3_time_get_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3TimeGet200Response { + #[serde(rename = "serverTime")] + pub server_time: i64, +} + +impl ApiV3TimeGet200Response { + pub fn new(server_time: i64) -> ApiV3TimeGet200Response { + ApiV3TimeGet200Response { + server_time, + } + } +} + diff --git a/test_rust/src/models/_api_v3_user_data_stream_post_200_response.rs b/test_rust/src/models/_api_v3_user_data_stream_post_200_response.rs new file mode 100644 index 0000000..dad0368 --- /dev/null +++ b/test_rust/src/models/_api_v3_user_data_stream_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiV3UserDataStreamPost200Response { + #[serde(rename = "listenKey")] + pub listen_key: String, +} + +impl ApiV3UserDataStreamPost200Response { + pub fn new(listen_key: String) -> ApiV3UserDataStreamPost200Response { + ApiV3UserDataStreamPost200Response { + listen_key, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_account_api_restrictions_get_200_response.rs b/test_rust/src/models/_sapi_v1_account_api_restrictions_get_200_response.rs new file mode 100644 index 0000000..7743ae8 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_account_api_restrictions_get_200_response.rs @@ -0,0 +1,68 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AccountApiRestrictionsGet200Response { + #[serde(rename = "ipRestrict")] + pub ip_restrict: bool, + #[serde(rename = "createTime")] + pub create_time: i64, + /// This option authorizes this key to transfer funds between your master account and your sub account instantly + #[serde(rename = "enableInternalTransfer")] + pub enable_internal_transfer: bool, + /// API Key created before your futures account opened does not support futures API service + #[serde(rename = "enableFutures")] + pub enable_futures: bool, + /// API Key created before your activate portfolio margin does not support portfolio margin API service + #[serde(rename = "enablePortfolioMarginTrading", skip_serializing_if = "Option::is_none")] + pub enable_portfolio_margin_trading: Option, + /// Authorizes this key to Vanilla options trading + #[serde(rename = "enableVanillaOptions")] + pub enable_vanilla_options: bool, + /// 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 + #[serde(rename = "permitsUniversalTransfer")] + pub permits_universal_transfer: bool, + #[serde(rename = "enableReading")] + pub enable_reading: bool, + #[serde(rename = "enableSpotAndMarginTrading")] + pub enable_spot_and_margin_trading: bool, + /// This option allows you to withdraw via API. You must apply the IP Access Restriction filter in order to enable withdrawals + #[serde(rename = "enableWithdrawals")] + pub enable_withdrawals: bool, + /// This option can be adjusted after the Cross Margin account transfer is completed + #[serde(rename = "enableMargin")] + pub enable_margin: bool, + /// Expiration time for spot and margin trading permission + #[serde(rename = "tradingAuthorityExpirationTime")] + pub trading_authority_expiration_time: i64, +} + +impl SapiV1AccountApiRestrictionsGet200Response { + pub fn new(ip_restrict: bool, create_time: i64, enable_internal_transfer: bool, enable_futures: bool, enable_vanilla_options: bool, permits_universal_transfer: bool, enable_reading: bool, enable_spot_and_margin_trading: bool, enable_withdrawals: bool, enable_margin: bool, trading_authority_expiration_time: i64) -> SapiV1AccountApiRestrictionsGet200Response { + SapiV1AccountApiRestrictionsGet200Response { + ip_restrict, + create_time, + enable_internal_transfer, + enable_futures, + enable_portfolio_margin_trading: None, + enable_vanilla_options, + permits_universal_transfer, + enable_reading, + enable_spot_and_margin_trading, + enable_withdrawals, + enable_margin, + trading_authority_expiration_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response.rs b/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response.rs new file mode 100644 index 0000000..ea451ae --- /dev/null +++ b/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AccountApiTradingStatusGet200Response { + #[serde(rename = "data")] + pub data: Box, +} + +impl SapiV1AccountApiTradingStatusGet200Response { + pub fn new(data: models::SapiV1AccountApiTradingStatusGet200ResponseData) -> SapiV1AccountApiTradingStatusGet200Response { + SapiV1AccountApiTradingStatusGet200Response { + data: Box::new(data), + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data.rs b/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data.rs new file mode 100644 index 0000000..e547926 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data.rs @@ -0,0 +1,41 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AccountApiTradingStatusGet200ResponseData { + /// API trading function is locked or not + #[serde(rename = "isLocked")] + pub is_locked: bool, + /// If API trading function is locked, this is the planned recover time + #[serde(rename = "plannedRecoverTime")] + pub planned_recover_time: i64, + #[serde(rename = "triggerCondition")] + pub trigger_condition: Box, + #[serde(rename = "indicators")] + pub indicators: Box, + #[serde(rename = "updateTime")] + pub update_time: i64, +} + +impl SapiV1AccountApiTradingStatusGet200ResponseData { + pub fn new(is_locked: bool, planned_recover_time: i64, trigger_condition: models::SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition, indicators: models::SapiV1AccountApiTradingStatusGet200ResponseDataIndicators, update_time: i64) -> SapiV1AccountApiTradingStatusGet200ResponseData { + SapiV1AccountApiTradingStatusGet200ResponseData { + is_locked, + planned_recover_time, + trigger_condition: Box::new(trigger_condition), + indicators: Box::new(indicators), + update_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data_indicators.rs b/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data_indicators.rs new file mode 100644 index 0000000..f2bf7c7 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data_indicators.rs @@ -0,0 +1,29 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// SapiV1AccountApiTradingStatusGet200ResponseDataIndicators : The indicators updated every 30 seconds +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AccountApiTradingStatusGet200ResponseDataIndicators { + #[serde(rename = "BTCUSDT")] + pub btcusdt: Vec, +} + +impl SapiV1AccountApiTradingStatusGet200ResponseDataIndicators { + /// The indicators updated every 30 seconds + pub fn new(btcusdt: Vec) -> SapiV1AccountApiTradingStatusGet200ResponseDataIndicators { + SapiV1AccountApiTradingStatusGet200ResponseDataIndicators { + btcusdt, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data_indicators_btcusdt_inner.rs b/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data_indicators_btcusdt_inner.rs new file mode 100644 index 0000000..f49c958 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data_indicators_btcusdt_inner.rs @@ -0,0 +1,40 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBtcusdtInner { + /// Unfilled Ratio (UFR) + #[serde(rename = "i")] + pub i: String, + /// Count of all orders + #[serde(rename = "c")] + pub c: i64, + /// Current UFR value + #[serde(rename = "v")] + pub v: f32, + /// Trigger UFR value + #[serde(rename = "t")] + pub t: f32, +} + +impl SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBtcusdtInner { + pub fn new(i: String, c: i64, v: f32, t: f32) -> SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBtcusdtInner { + SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBtcusdtInner { + i, + c, + v, + t, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data_trigger_condition.rs b/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data_trigger_condition.rs new file mode 100644 index 0000000..47a986c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_account_api_trading_status_get_200_response_data_trigger_condition.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition { + /// Number of GTC orders + #[serde(rename = "GCR")] + pub gcr: i64, + /// Number of FOK/IOC orders + #[serde(rename = "IFER")] + pub ifer: i64, + /// Number of orders + #[serde(rename = "UFR")] + pub ufr: i64, +} + +impl SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition { + pub fn new(gcr: i64, ifer: i64, ufr: i64) -> SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition { + SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition { + gcr, + ifer, + ufr, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_account_info_get_200_response.rs b/test_rust/src/models/_sapi_v1_account_info_get_200_response.rs new file mode 100644 index 0000000..b1cd063 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_account_info_get_200_response.rs @@ -0,0 +1,35 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AccountInfoGet200Response { + #[serde(rename = "vipLevel")] + pub vip_level: i32, + /// true or false for margin. + #[serde(rename = "isMarginEnabled")] + pub is_margin_enabled: bool, + /// true or false for futures. + #[serde(rename = "isFutureEnabled")] + pub is_future_enabled: bool, +} + +impl SapiV1AccountInfoGet200Response { + pub fn new(vip_level: i32, is_margin_enabled: bool, is_future_enabled: bool) -> SapiV1AccountInfoGet200Response { + SapiV1AccountInfoGet200Response { + vip_level, + is_margin_enabled, + is_future_enabled, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_account_snapshot_get_200_response.rs b/test_rust/src/models/_sapi_v1_account_snapshot_get_200_response.rs new file mode 100644 index 0000000..4c78018 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_account_snapshot_get_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1AccountSnapshotGet200Response { + SnapshotSpot(Box), + SnapshotMargin(Box), + SnapshotFutures(Box), +} + +impl Default for SapiV1AccountSnapshotGet200Response { + fn default() -> Self { + Self::SnapshotSpot(Default::default()) + } +} + diff --git a/test_rust/src/models/_sapi_v1_account_status_get_200_response.rs b/test_rust/src/models/_sapi_v1_account_status_get_200_response.rs new file mode 100644 index 0000000..e952d16 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_account_status_get_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AccountStatusGet200Response { + #[serde(rename = "data")] + pub data: String, +} + +impl SapiV1AccountStatusGet200Response { + pub fn new(data: String) -> SapiV1AccountStatusGet200Response { + SapiV1AccountStatusGet200Response { + data, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_futures_historical_orders_get_200_response.rs b/test_rust/src/models/_sapi_v1_algo_futures_historical_orders_get_200_response.rs new file mode 100644 index 0000000..ae62533 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_futures_historical_orders_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoFuturesHistoricalOrdersGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "orders")] + pub orders: Vec, +} + +impl SapiV1AlgoFuturesHistoricalOrdersGet200Response { + pub fn new(total: i32, orders: Vec) -> SapiV1AlgoFuturesHistoricalOrdersGet200Response { + SapiV1AlgoFuturesHistoricalOrdersGet200Response { + total, + orders, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_futures_historical_orders_get_200_response_orders_inner.rs b/test_rust/src/models/_sapi_v1_algo_futures_historical_orders_get_200_response_orders_inner.rs new file mode 100644 index 0000000..eb8b227 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_futures_historical_orders_get_200_response_orders_inner.rs @@ -0,0 +1,66 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner { + #[serde(rename = "algoId")] + pub algo_id: i64, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "positionSide")] + pub position_side: String, + #[serde(rename = "totalQty")] + pub total_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "executedAmt")] + pub executed_amt: String, + #[serde(rename = "avgPrice")] + pub avg_price: String, + #[serde(rename = "clientAlgoId")] + pub client_algo_id: String, + #[serde(rename = "bookTime")] + pub book_time: i64, + #[serde(rename = "endTime")] + pub end_time: i64, + #[serde(rename = "algoStatus")] + pub algo_status: String, + #[serde(rename = "algoType")] + pub algo_type: String, + #[serde(rename = "urgency")] + pub urgency: String, +} + +impl SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner { + pub fn new(algo_id: i64, symbol: String, side: String, position_side: String, total_qty: String, executed_qty: String, executed_amt: String, avg_price: String, client_algo_id: String, book_time: i64, end_time: i64, algo_status: String, algo_type: String, urgency: String) -> SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner { + SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner { + algo_id, + symbol, + side, + position_side, + total_qty, + executed_qty, + executed_amt, + avg_price, + client_algo_id, + book_time, + end_time, + algo_status, + algo_type, + urgency, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_futures_new_order_vp_post_200_response.rs b/test_rust/src/models/_sapi_v1_algo_futures_new_order_vp_post_200_response.rs new file mode 100644 index 0000000..b9135e2 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_futures_new_order_vp_post_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoFuturesNewOrderVpPost200Response { + #[serde(rename = "clientAlgoId")] + pub client_algo_id: String, + #[serde(rename = "success")] + pub success: bool, + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, +} + +impl SapiV1AlgoFuturesNewOrderVpPost200Response { + pub fn new(client_algo_id: String, success: bool, code: i64, msg: String) -> SapiV1AlgoFuturesNewOrderVpPost200Response { + SapiV1AlgoFuturesNewOrderVpPost200Response { + client_algo_id, + success, + code, + msg, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_futures_open_orders_get_200_response.rs b/test_rust/src/models/_sapi_v1_algo_futures_open_orders_get_200_response.rs new file mode 100644 index 0000000..c716349 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_futures_open_orders_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoFuturesOpenOrdersGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] + pub orders: Option>, +} + +impl SapiV1AlgoFuturesOpenOrdersGet200Response { + pub fn new(total: i32) -> SapiV1AlgoFuturesOpenOrdersGet200Response { + SapiV1AlgoFuturesOpenOrdersGet200Response { + total, + orders: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_futures_open_orders_get_200_response_orders_inner.rs b/test_rust/src/models/_sapi_v1_algo_futures_open_orders_get_200_response_orders_inner.rs new file mode 100644 index 0000000..bf29520 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_futures_open_orders_get_200_response_orders_inner.rs @@ -0,0 +1,66 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner { + #[serde(rename = "algoId")] + pub algo_id: i64, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "positionSide")] + pub position_side: String, + #[serde(rename = "totalQty")] + pub total_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "executedAmt")] + pub executed_amt: String, + #[serde(rename = "avgPrice")] + pub avg_price: String, + #[serde(rename = "clientAlgoId")] + pub client_algo_id: String, + #[serde(rename = "bookTime")] + pub book_time: i64, + #[serde(rename = "endTime")] + pub end_time: i64, + #[serde(rename = "algoStatus")] + pub algo_status: String, + #[serde(rename = "algoType")] + pub algo_type: String, + #[serde(rename = "urgency")] + pub urgency: String, +} + +impl SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner { + pub fn new(algo_id: i64, symbol: String, side: String, position_side: String, total_qty: String, executed_qty: String, executed_amt: String, avg_price: String, client_algo_id: String, book_time: i64, end_time: i64, algo_status: String, algo_type: String, urgency: String) -> SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner { + SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner { + algo_id, + symbol, + side, + position_side, + total_qty, + executed_qty, + executed_amt, + avg_price, + client_algo_id, + book_time, + end_time, + algo_status, + algo_type, + urgency, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_futures_order_delete_200_response.rs b/test_rust/src/models/_sapi_v1_algo_futures_order_delete_200_response.rs new file mode 100644 index 0000000..71b9152 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_futures_order_delete_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoFuturesOrderDelete200Response { + #[serde(rename = "algoId")] + pub algo_id: i64, + #[serde(rename = "success")] + pub success: bool, + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, +} + +impl SapiV1AlgoFuturesOrderDelete200Response { + pub fn new(algo_id: i64, success: bool, code: i64, msg: String) -> SapiV1AlgoFuturesOrderDelete200Response { + SapiV1AlgoFuturesOrderDelete200Response { + algo_id, + success, + code, + msg, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_futures_sub_orders_get_200_response.rs b/test_rust/src/models/_sapi_v1_algo_futures_sub_orders_get_200_response.rs new file mode 100644 index 0000000..473bc11 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_futures_sub_orders_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoFuturesSubOrdersGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "executedAmt")] + pub executed_amt: String, + #[serde(rename = "subOrders")] + pub sub_orders: Vec, +} + +impl SapiV1AlgoFuturesSubOrdersGet200Response { + pub fn new(total: i32, executed_qty: String, executed_amt: String, sub_orders: Vec) -> SapiV1AlgoFuturesSubOrdersGet200Response { + SapiV1AlgoFuturesSubOrdersGet200Response { + total, + executed_qty, + executed_amt, + sub_orders, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_futures_sub_orders_get_200_response_sub_orders_inner.rs b/test_rust/src/models/_sapi_v1_algo_futures_sub_orders_get_200_response_sub_orders_inner.rs new file mode 100644 index 0000000..3fe2352 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_futures_sub_orders_get_200_response_sub_orders_inner.rs @@ -0,0 +1,66 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner { + #[serde(rename = "algoId")] + pub algo_id: i64, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderStatus")] + pub order_status: String, + #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] + pub executed_qty: Option, + #[serde(rename = "executedAmt")] + pub executed_amt: String, + #[serde(rename = "feeAmt")] + pub fee_amt: String, + #[serde(rename = "feeAsset")] + pub fee_asset: String, + #[serde(rename = "bookTime")] + pub book_time: i64, + #[serde(rename = "avgPrice")] + pub avg_price: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "subId")] + pub sub_id: i64, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "origQty")] + pub orig_qty: String, +} + +impl SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner { + pub fn new(algo_id: i64, order_id: i64, order_status: String, executed_amt: String, fee_amt: String, fee_asset: String, book_time: i64, avg_price: String, side: String, symbol: String, sub_id: i64, time_in_force: String, orig_qty: String) -> SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner { + SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner { + algo_id, + order_id, + order_status, + executed_qty: None, + executed_amt, + fee_amt, + fee_asset, + book_time, + avg_price, + side, + symbol, + sub_id, + time_in_force, + orig_qty, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_spot_historical_orders_get_200_response.rs b/test_rust/src/models/_sapi_v1_algo_spot_historical_orders_get_200_response.rs new file mode 100644 index 0000000..1754100 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_spot_historical_orders_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoSpotHistoricalOrdersGet200Response { + #[serde(rename = "total")] + pub total: i64, + #[serde(rename = "orders")] + pub orders: Vec, +} + +impl SapiV1AlgoSpotHistoricalOrdersGet200Response { + pub fn new(total: i64, orders: Vec) -> SapiV1AlgoSpotHistoricalOrdersGet200Response { + SapiV1AlgoSpotHistoricalOrdersGet200Response { + total, + orders, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_spot_historical_orders_get_200_response_orders_inner.rs b/test_rust/src/models/_sapi_v1_algo_spot_historical_orders_get_200_response_orders_inner.rs new file mode 100644 index 0000000..2aa9bdf --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_spot_historical_orders_get_200_response_orders_inner.rs @@ -0,0 +1,63 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner { + #[serde(rename = "algoId")] + pub algo_id: i32, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "totalQty")] + pub total_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "executedAmt")] + pub executed_amt: String, + #[serde(rename = "avgPrice")] + pub avg_price: String, + #[serde(rename = "clientAlgoId")] + pub client_algo_id: String, + #[serde(rename = "bookTime")] + pub book_time: i64, + #[serde(rename = "endTime")] + pub end_time: i64, + #[serde(rename = "algoStatus")] + pub algo_status: String, + #[serde(rename = "algoType")] + pub algo_type: String, + #[serde(rename = "urgency")] + pub urgency: String, +} + +impl SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner { + pub fn new(algo_id: i32, symbol: String, side: String, total_qty: String, executed_qty: String, executed_amt: String, avg_price: String, client_algo_id: String, book_time: i64, end_time: i64, algo_status: String, algo_type: String, urgency: String) -> SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner { + SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner { + algo_id, + symbol, + side, + total_qty, + executed_qty, + executed_amt, + avg_price, + client_algo_id, + book_time, + end_time, + algo_status, + algo_type, + urgency, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_spot_new_order_twap_post_200_response.rs b/test_rust/src/models/_sapi_v1_algo_spot_new_order_twap_post_200_response.rs new file mode 100644 index 0000000..061a150 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_spot_new_order_twap_post_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoSpotNewOrderTwapPost200Response { + #[serde(rename = "clientAlgoId")] + pub client_algo_id: String, + #[serde(rename = "success")] + pub success: bool, + #[serde(rename = "code")] + pub code: i32, + #[serde(rename = "msg")] + pub msg: String, +} + +impl SapiV1AlgoSpotNewOrderTwapPost200Response { + pub fn new(client_algo_id: String, success: bool, code: i32, msg: String) -> SapiV1AlgoSpotNewOrderTwapPost200Response { + SapiV1AlgoSpotNewOrderTwapPost200Response { + client_algo_id, + success, + code, + msg, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_spot_open_orders_get_200_response.rs b/test_rust/src/models/_sapi_v1_algo_spot_open_orders_get_200_response.rs new file mode 100644 index 0000000..ca756bb --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_spot_open_orders_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoSpotOpenOrdersGet200Response { + #[serde(rename = "total")] + pub total: i64, + #[serde(rename = "orders")] + pub orders: Vec, +} + +impl SapiV1AlgoSpotOpenOrdersGet200Response { + pub fn new(total: i64, orders: Vec) -> SapiV1AlgoSpotOpenOrdersGet200Response { + SapiV1AlgoSpotOpenOrdersGet200Response { + total, + orders, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_spot_open_orders_get_200_response_orders_inner.rs b/test_rust/src/models/_sapi_v1_algo_spot_open_orders_get_200_response_orders_inner.rs new file mode 100644 index 0000000..a589005 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_spot_open_orders_get_200_response_orders_inner.rs @@ -0,0 +1,63 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner { + #[serde(rename = "algoId")] + pub algo_id: i32, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "totalQty")] + pub total_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "executedAmt")] + pub executed_amt: String, + #[serde(rename = "avgPrice")] + pub avg_price: String, + #[serde(rename = "clientAlgoId")] + pub client_algo_id: String, + #[serde(rename = "bookTime")] + pub book_time: i64, + #[serde(rename = "endTime")] + pub end_time: i64, + #[serde(rename = "algoStatus")] + pub algo_status: String, + #[serde(rename = "algoType")] + pub algo_type: String, + #[serde(rename = "urgency")] + pub urgency: String, +} + +impl SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner { + pub fn new(algo_id: i32, symbol: String, side: String, total_qty: String, executed_qty: String, executed_amt: String, avg_price: String, client_algo_id: String, book_time: i64, end_time: i64, algo_status: String, algo_type: String, urgency: String) -> SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner { + SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner { + algo_id, + symbol, + side, + total_qty, + executed_qty, + executed_amt, + avg_price, + client_algo_id, + book_time, + end_time, + algo_status, + algo_type, + urgency, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_spot_order_delete_200_response.rs b/test_rust/src/models/_sapi_v1_algo_spot_order_delete_200_response.rs new file mode 100644 index 0000000..d2ae0bd --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_spot_order_delete_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoSpotOrderDelete200Response { + #[serde(rename = "algoId")] + pub algo_id: i64, + #[serde(rename = "success")] + pub success: bool, + #[serde(rename = "code")] + pub code: i32, + #[serde(rename = "msg")] + pub msg: String, +} + +impl SapiV1AlgoSpotOrderDelete200Response { + pub fn new(algo_id: i64, success: bool, code: i32, msg: String) -> SapiV1AlgoSpotOrderDelete200Response { + SapiV1AlgoSpotOrderDelete200Response { + algo_id, + success, + code, + msg, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_spot_sub_orders_get_200_response.rs b/test_rust/src/models/_sapi_v1_algo_spot_sub_orders_get_200_response.rs new file mode 100644 index 0000000..0a0780c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_spot_sub_orders_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoSpotSubOrdersGet200Response { + #[serde(rename = "total")] + pub total: i64, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "executedAmt")] + pub executed_amt: String, + #[serde(rename = "subOrders")] + pub sub_orders: Vec, +} + +impl SapiV1AlgoSpotSubOrdersGet200Response { + pub fn new(total: i64, executed_qty: String, executed_amt: String, sub_orders: Vec) -> SapiV1AlgoSpotSubOrdersGet200Response { + SapiV1AlgoSpotSubOrdersGet200Response { + total, + executed_qty, + executed_amt, + sub_orders, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_algo_spot_sub_orders_get_200_response_sub_orders_inner.rs b/test_rust/src/models/_sapi_v1_algo_spot_sub_orders_get_200_response_sub_orders_inner.rs new file mode 100644 index 0000000..672de30 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_algo_spot_sub_orders_get_200_response_sub_orders_inner.rs @@ -0,0 +1,66 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner { + #[serde(rename = "algoId")] + pub algo_id: i32, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderStatus")] + pub order_status: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "executedAmt")] + pub executed_amt: String, + #[serde(rename = "feeAmt")] + pub fee_amt: String, + #[serde(rename = "feeAsset")] + pub fee_asset: String, + #[serde(rename = "bookTime")] + pub book_time: i64, + #[serde(rename = "avgPrice")] + pub avg_price: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "subId")] + pub sub_id: i32, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "origQty")] + pub orig_qty: String, +} + +impl SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner { + pub fn new(algo_id: i32, order_id: i64, order_status: String, executed_qty: String, executed_amt: String, fee_amt: String, fee_asset: String, book_time: i64, avg_price: String, side: String, symbol: String, sub_id: i32, time_in_force: String, orig_qty: String) -> SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner { + SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner { + algo_id, + order_id, + order_status, + executed_qty, + executed_amt, + fee_amt, + fee_asset, + book_time, + avg_price, + side, + symbol, + sub_id, + time_in_force, + orig_qty, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_asset_detail_get_200_response.rs b/test_rust/src/models/_sapi_v1_asset_asset_detail_get_200_response.rs new file mode 100644 index 0000000..fc58099 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_asset_detail_get_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetAssetDetailGet200Response { + #[serde(rename = "CTR")] + pub ctr: Box, +} + +impl SapiV1AssetAssetDetailGet200Response { + pub fn new(ctr: models::SapiV1AssetAssetDetailGet200ResponseCtr) -> SapiV1AssetAssetDetailGet200Response { + SapiV1AssetAssetDetailGet200Response { + ctr: Box::new(ctr), + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_asset_detail_get_200_response_ctr.rs b/test_rust/src/models/_sapi_v1_asset_asset_detail_get_200_response_ctr.rs new file mode 100644 index 0000000..a366921 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_asset_detail_get_200_response_ctr.rs @@ -0,0 +1,41 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetAssetDetailGet200ResponseCtr { + #[serde(rename = "minWithdrawAmount")] + pub min_withdraw_amount: String, + /// deposit status (false if ALL of networks' are false) + #[serde(rename = "depositStatus")] + pub deposit_status: bool, + #[serde(rename = "withdrawFee")] + pub withdraw_fee: i64, + /// withdrawStatus status (false if ALL of networks' are false) + #[serde(rename = "withdrawStatus")] + pub withdraw_status: bool, + #[serde(rename = "depositTip")] + pub deposit_tip: String, +} + +impl SapiV1AssetAssetDetailGet200ResponseCtr { + pub fn new(min_withdraw_amount: String, deposit_status: bool, withdraw_fee: i64, withdraw_status: bool, deposit_tip: String) -> SapiV1AssetAssetDetailGet200ResponseCtr { + SapiV1AssetAssetDetailGet200ResponseCtr { + min_withdraw_amount, + deposit_status, + withdraw_fee, + withdraw_status, + deposit_tip, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_asset_dividend_get_200_response.rs b/test_rust/src/models/_sapi_v1_asset_asset_dividend_get_200_response.rs new file mode 100644 index 0000000..3b294d2 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_asset_dividend_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetAssetDividendGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1AssetAssetDividendGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1AssetAssetDividendGet200Response { + SapiV1AssetAssetDividendGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_asset_dividend_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_asset_asset_dividend_get_200_response_rows_inner.rs new file mode 100644 index 0000000..882eb87 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_asset_dividend_get_200_response_rows_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetAssetDividendGet200ResponseRowsInner { + #[serde(rename = "id")] + pub id: i64, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "divTime")] + pub div_time: i64, + #[serde(rename = "enInfo")] + pub en_info: String, + #[serde(rename = "tranId")] + pub tran_id: i64, +} + +impl SapiV1AssetAssetDividendGet200ResponseRowsInner { + pub fn new(id: i64, amount: String, asset: String, div_time: i64, en_info: String, tran_id: i64) -> SapiV1AssetAssetDividendGet200ResponseRowsInner { + SapiV1AssetAssetDividendGet200ResponseRowsInner { + id, + amount, + asset, + div_time, + en_info, + tran_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_convert_transfer_post_200_response.rs b/test_rust/src/models/_sapi_v1_asset_convert_transfer_post_200_response.rs new file mode 100644 index 0000000..cb84033 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_convert_transfer_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetConvertTransferPost200Response { + #[serde(rename = "tranId")] + pub tran_id: i64, + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1AssetConvertTransferPost200Response { + pub fn new(tran_id: i64, status: String) -> SapiV1AssetConvertTransferPost200Response { + SapiV1AssetConvertTransferPost200Response { + tran_id, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_convert_transfer_query_by_page_get_200_response.rs b/test_rust/src/models/_sapi_v1_asset_convert_transfer_query_by_page_get_200_response.rs new file mode 100644 index 0000000..80684df --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_convert_transfer_query_by_page_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetConvertTransferQueryByPageGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "rows")] + pub rows: Vec, +} + +impl SapiV1AssetConvertTransferQueryByPageGet200Response { + pub fn new(total: i32, rows: Vec) -> SapiV1AssetConvertTransferQueryByPageGet200Response { + SapiV1AssetConvertTransferQueryByPageGet200Response { + total, + rows, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_convert_transfer_query_by_page_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_asset_convert_transfer_query_by_page_get_200_response_rows_inner.rs new file mode 100644 index 0000000..3b442a4 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_convert_transfer_query_by_page_get_200_response_rows_inner.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner { + #[serde(rename = "tranId")] + pub tran_id: i64, + #[serde(rename = "type")] + pub r#type: i64, + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "deductedAsset")] + pub deducted_asset: String, + #[serde(rename = "deductedAmount")] + pub deducted_amount: String, + #[serde(rename = "targetAsset")] + pub target_asset: String, + #[serde(rename = "targetAmount")] + pub target_amount: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "accountType")] + pub account_type: String, +} + +impl SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner { + pub fn new(tran_id: i64, r#type: i64, time: i64, deducted_asset: String, deducted_amount: String, target_asset: String, target_amount: String, status: String, account_type: String) -> SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner { + SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner { + tran_id, + r#type, + time, + deducted_asset, + deducted_amount, + target_asset, + target_amount, + status, + account_type, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_custody_transfer_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_asset_custody_transfer_history_get_200_response.rs new file mode 100644 index 0000000..cff7473 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_custody_transfer_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetCustodyTransferHistoryGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "rows")] + pub rows: Vec, +} + +impl SapiV1AssetCustodyTransferHistoryGet200Response { + pub fn new(total: i32, rows: Vec) -> SapiV1AssetCustodyTransferHistoryGet200Response { + SapiV1AssetCustodyTransferHistoryGet200Response { + total, + rows, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_custody_transfer_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_asset_custody_transfer_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..b5252ea --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_custody_transfer_history_get_200_response_rows_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner { + #[serde(rename = "clientTranId")] + pub client_tran_id: String, + #[serde(rename = "transferType")] + pub transfer_type: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "time")] + pub time: i64, +} + +impl SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner { + pub fn new(client_tran_id: String, transfer_type: String, asset: String, amount: String, time: i64) -> SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner { + SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner { + client_tran_id, + transfer_type, + asset, + amount, + time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_dribblet_get_200_response.rs b/test_rust/src/models/_sapi_v1_asset_dribblet_get_200_response.rs new file mode 100644 index 0000000..8e94c46 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_dribblet_get_200_response.rs @@ -0,0 +1,31 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetDribbletGet200Response { + /// Total counts of exchange + #[serde(rename = "total")] + pub total: i64, + #[serde(rename = "userAssetDribblets")] + pub user_asset_dribblets: Vec, +} + +impl SapiV1AssetDribbletGet200Response { + pub fn new(total: i64, user_asset_dribblets: Vec) -> SapiV1AssetDribbletGet200Response { + SapiV1AssetDribbletGet200Response { + total, + user_asset_dribblets, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner.rs b/test_rust/src/models/_sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner.rs new file mode 100644 index 0000000..13062a9 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner.rs @@ -0,0 +1,41 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner { + #[serde(rename = "operateTime")] + pub operate_time: i64, + /// Total transfered BNB amount for this exchange. + #[serde(rename = "totalTransferedAmount")] + pub total_transfered_amount: String, + /// Total service charge amount for this exchange. + #[serde(rename = "totalServiceChargeAmount")] + pub total_service_charge_amount: String, + #[serde(rename = "transId")] + pub trans_id: i64, + #[serde(rename = "userAssetDribbletDetails")] + pub user_asset_dribblet_details: Vec, +} + +impl SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner { + pub fn new(operate_time: i64, total_transfered_amount: String, total_service_charge_amount: String, trans_id: i64, user_asset_dribblet_details: Vec) -> SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner { + SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner { + operate_time, + total_transfered_amount, + total_service_charge_amount, + trans_id, + user_asset_dribblet_details, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner.rs b/test_rust/src/models/_sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner.rs new file mode 100644 index 0000000..45e98ef --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner { + #[serde(rename = "transId")] + pub trans_id: i64, + #[serde(rename = "serviceChargeAmount")] + pub service_charge_amount: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "operateTime")] + pub operate_time: i64, + #[serde(rename = "transferedAmount")] + pub transfered_amount: String, + #[serde(rename = "fromAsset")] + pub from_asset: String, +} + +impl SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner { + pub fn new(trans_id: i64, service_charge_amount: String, amount: String, operate_time: i64, transfered_amount: String, from_asset: String) -> SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner { + SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner { + trans_id, + service_charge_amount, + amount, + operate_time, + transfered_amount, + from_asset, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_dust_btc_post_200_response.rs b/test_rust/src/models/_sapi_v1_asset_dust_btc_post_200_response.rs new file mode 100644 index 0000000..32026ff --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_dust_btc_post_200_response.rs @@ -0,0 +1,37 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetDustBtcPost200Response { + #[serde(rename = "details")] + pub details: Vec, + #[serde(rename = "totalTransferBtc")] + pub total_transfer_btc: String, + #[serde(rename = "totalTransferBNB")] + pub total_transfer_bnb: String, + /// Commission fee + #[serde(rename = "dribbletPercentage")] + pub dribblet_percentage: String, +} + +impl SapiV1AssetDustBtcPost200Response { + pub fn new(details: Vec, total_transfer_btc: String, total_transfer_bnb: String, dribblet_percentage: String) -> SapiV1AssetDustBtcPost200Response { + SapiV1AssetDustBtcPost200Response { + details, + total_transfer_btc, + total_transfer_bnb, + dribblet_percentage, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_dust_btc_post_200_response_details_inner.rs b/test_rust/src/models/_sapi_v1_asset_dust_btc_post_200_response_details_inner.rs new file mode 100644 index 0000000..81b4101 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_dust_btc_post_200_response_details_inner.rs @@ -0,0 +1,50 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetDustBtcPost200ResponseDetailsInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "assetFullName")] + pub asset_full_name: String, + /// Convertible amount + #[serde(rename = "amountFree")] + pub amount_free: String, + /// BTC amount + #[serde(rename = "toBTC")] + pub to_btc: String, + /// BNB amount(Not deducted commission fee + #[serde(rename = "toBNB")] + pub to_bnb: String, + /// BNB amount(Deducted commission fee + #[serde(rename = "toBNBOffExchange")] + pub to_bnb_off_exchange: String, + /// Commission fee + #[serde(rename = "exchange")] + pub exchange: String, +} + +impl SapiV1AssetDustBtcPost200ResponseDetailsInner { + pub fn new(asset: String, asset_full_name: String, amount_free: String, to_btc: String, to_bnb: String, to_bnb_off_exchange: String, exchange: String) -> SapiV1AssetDustBtcPost200ResponseDetailsInner { + SapiV1AssetDustBtcPost200ResponseDetailsInner { + asset, + asset_full_name, + amount_free, + to_btc, + to_bnb, + to_bnb_off_exchange, + exchange, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_dust_post_200_response.rs b/test_rust/src/models/_sapi_v1_asset_dust_post_200_response.rs new file mode 100644 index 0000000..58c0c15 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_dust_post_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetDustPost200Response { + #[serde(rename = "totalServiceCharge")] + pub total_service_charge: String, + #[serde(rename = "totalTransfered")] + pub total_transfered: String, + #[serde(rename = "transferResult")] + pub transfer_result: Vec, +} + +impl SapiV1AssetDustPost200Response { + pub fn new(total_service_charge: String, total_transfered: String, transfer_result: Vec) -> SapiV1AssetDustPost200Response { + SapiV1AssetDustPost200Response { + total_service_charge, + total_transfered, + transfer_result, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_dust_post_200_response_transfer_result_inner.rs b/test_rust/src/models/_sapi_v1_asset_dust_post_200_response_transfer_result_inner.rs new file mode 100644 index 0000000..31ae2c7 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_dust_post_200_response_transfer_result_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetDustPost200ResponseTransferResultInner { + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "fromAsset")] + pub from_asset: String, + #[serde(rename = "operateTime")] + pub operate_time: i64, + #[serde(rename = "serviceChargeAmount")] + pub service_charge_amount: String, + #[serde(rename = "tranId")] + pub tran_id: i64, + #[serde(rename = "transferedAmount")] + pub transfered_amount: String, +} + +impl SapiV1AssetDustPost200ResponseTransferResultInner { + pub fn new(amount: String, from_asset: String, operate_time: i64, service_charge_amount: String, tran_id: i64, transfered_amount: String) -> SapiV1AssetDustPost200ResponseTransferResultInner { + SapiV1AssetDustPost200ResponseTransferResultInner { + amount, + from_asset, + operate_time, + service_charge_amount, + tran_id, + transfered_amount, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_get_funding_asset_post_200_response_inner.rs b/test_rust/src/models/_sapi_v1_asset_get_funding_asset_post_200_response_inner.rs new file mode 100644 index 0000000..5241c16 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_get_funding_asset_post_200_response_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetGetFundingAssetPost200ResponseInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "free")] + pub free: String, + #[serde(rename = "locked")] + pub locked: String, + #[serde(rename = "freeze")] + pub freeze: String, + #[serde(rename = "withdrawing")] + pub withdrawing: String, + #[serde(rename = "btcValuation")] + pub btc_valuation: String, +} + +impl SapiV1AssetGetFundingAssetPost200ResponseInner { + pub fn new(asset: String, free: String, locked: String, freeze: String, withdrawing: String, btc_valuation: String) -> SapiV1AssetGetFundingAssetPost200ResponseInner { + SapiV1AssetGetFundingAssetPost200ResponseInner { + asset, + free, + locked, + freeze, + withdrawing, + btc_valuation, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response.rs b/test_rust/src/models/_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response.rs new file mode 100644 index 0000000..d4f0a3c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "rows")] + pub rows: Vec, +} + +impl SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response { + pub fn new(total: i32, rows: Vec) -> SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response { + SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response { + total, + rows, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response_rows_inner.rs new file mode 100644 index 0000000..3ebb16d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response_rows_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner { + #[serde(rename = "createTime")] + pub create_time: i64, + #[serde(rename = "tranId")] + pub tran_id: i64, + #[serde(rename = "type")] + pub r#type: i64, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner { + pub fn new(create_time: i64, tran_id: i64, r#type: i64, asset: String, amount: String, status: String) -> SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner { + SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner { + create_time, + tran_id, + r#type, + asset, + amount, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_trade_fee_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_asset_trade_fee_get_200_response_inner.rs new file mode 100644 index 0000000..5d1f959 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_trade_fee_get_200_response_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetTradeFeeGet200ResponseInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "makerCommission")] + pub maker_commission: String, + #[serde(rename = "takerCommission")] + pub taker_commission: String, +} + +impl SapiV1AssetTradeFeeGet200ResponseInner { + pub fn new(symbol: String, maker_commission: String, taker_commission: String) -> SapiV1AssetTradeFeeGet200ResponseInner { + SapiV1AssetTradeFeeGet200ResponseInner { + symbol, + maker_commission, + taker_commission, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_transfer_get_200_response.rs b/test_rust/src/models/_sapi_v1_asset_transfer_get_200_response.rs new file mode 100644 index 0000000..7358ce1 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_transfer_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetTransferGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "rows")] + pub rows: Vec, +} + +impl SapiV1AssetTransferGet200Response { + pub fn new(total: i32, rows: Vec) -> SapiV1AssetTransferGet200Response { + SapiV1AssetTransferGet200Response { + total, + rows, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_transfer_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_asset_transfer_get_200_response_rows_inner.rs new file mode 100644 index 0000000..0ee5848 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_transfer_get_200_response_rows_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetTransferGet200ResponseRowsInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "tranId")] + pub tran_id: i64, + #[serde(rename = "timestamp")] + pub timestamp: i64, +} + +impl SapiV1AssetTransferGet200ResponseRowsInner { + pub fn new(asset: String, amount: String, r#type: String, status: String, tran_id: i64, timestamp: i64) -> SapiV1AssetTransferGet200ResponseRowsInner { + SapiV1AssetTransferGet200ResponseRowsInner { + asset, + amount, + r#type, + status, + tran_id, + timestamp, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_transfer_post_200_response.rs b/test_rust/src/models/_sapi_v1_asset_transfer_post_200_response.rs new file mode 100644 index 0000000..424307a --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_transfer_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetTransferPost200Response { + #[serde(rename = "tranId")] + pub tran_id: i64, +} + +impl SapiV1AssetTransferPost200Response { + pub fn new(tran_id: i64) -> SapiV1AssetTransferPost200Response { + SapiV1AssetTransferPost200Response { + tran_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_asset_wallet_balance_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_asset_wallet_balance_get_200_response_inner.rs new file mode 100644 index 0000000..7a8a928 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_asset_wallet_balance_get_200_response_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1AssetWalletBalanceGet200ResponseInner { + #[serde(rename = "activate")] + pub activate: bool, + #[serde(rename = "balance")] + pub balance: String, + #[serde(rename = "walletName")] + pub wallet_name: String, +} + +impl SapiV1AssetWalletBalanceGet200ResponseInner { + pub fn new(activate: bool, balance: String, wallet_name: String) -> SapiV1AssetWalletBalanceGet200ResponseInner { + SapiV1AssetWalletBalanceGet200ResponseInner { + activate, + balance, + wallet_name, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_blvt_redeem_post_200_response.rs b/test_rust/src/models/_sapi_v1_blvt_redeem_post_200_response.rs new file mode 100644 index 0000000..ef4de68 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_blvt_redeem_post_200_response.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1BlvtRedeemPost200Response { + #[serde(rename = "id")] + pub id: i64, + /// S, P, and F for \"success\", \"pending\", and \"failure\" + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "tokenName")] + pub token_name: String, + /// Redemption token amount + #[serde(rename = "redeemAmount")] + pub redeem_amount: String, + /// Redemption value in usdt + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "timestamp")] + pub timestamp: i64, +} + +impl SapiV1BlvtRedeemPost200Response { + pub fn new(id: i64, status: String, token_name: String, redeem_amount: String, amount: String, timestamp: i64) -> SapiV1BlvtRedeemPost200Response { + SapiV1BlvtRedeemPost200Response { + id, + status, + token_name, + redeem_amount, + amount, + timestamp, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_blvt_redeem_record_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_blvt_redeem_record_get_200_response_inner.rs new file mode 100644 index 0000000..2f294e6 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_blvt_redeem_record_get_200_response_inner.rs @@ -0,0 +1,49 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1BlvtRedeemRecordGet200ResponseInner { + #[serde(rename = "id")] + pub id: i64, + #[serde(rename = "tokenName")] + pub token_name: String, + /// Redemption amount + #[serde(rename = "amount")] + pub amount: String, + /// NAV of redemption + #[serde(rename = "nav")] + pub nav: String, + /// Reemption fee + #[serde(rename = "fee")] + pub fee: String, + /// Net redemption value in usdt + #[serde(rename = "netProceed")] + pub net_proceed: String, + #[serde(rename = "timestamp")] + pub timestamp: i64, +} + +impl SapiV1BlvtRedeemRecordGet200ResponseInner { + pub fn new(id: i64, token_name: String, amount: String, nav: String, fee: String, net_proceed: String, timestamp: i64) -> SapiV1BlvtRedeemRecordGet200ResponseInner { + SapiV1BlvtRedeemRecordGet200ResponseInner { + id, + token_name, + amount, + nav, + fee, + net_proceed, + timestamp, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_blvt_subscribe_post_200_response.rs b/test_rust/src/models/_sapi_v1_blvt_subscribe_post_200_response.rs new file mode 100644 index 0000000..b7d952e --- /dev/null +++ b/test_rust/src/models/_sapi_v1_blvt_subscribe_post_200_response.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1BlvtSubscribePost200Response { + #[serde(rename = "id")] + pub id: i64, + /// S, P, and F for \"success\", \"pending\", and \"failure\" + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "tokenName")] + pub token_name: String, + /// subscribed token amount + #[serde(rename = "amount")] + pub amount: String, + /// subscription cost in usdt + #[serde(rename = "cost")] + pub cost: String, + #[serde(rename = "timestamp")] + pub timestamp: i64, +} + +impl SapiV1BlvtSubscribePost200Response { + pub fn new(id: i64, status: String, token_name: String, amount: String, cost: String, timestamp: i64) -> SapiV1BlvtSubscribePost200Response { + SapiV1BlvtSubscribePost200Response { + id, + status, + token_name, + amount, + cost, + timestamp, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_blvt_subscribe_record_get_200_response.rs b/test_rust/src/models/_sapi_v1_blvt_subscribe_record_get_200_response.rs new file mode 100644 index 0000000..80d2e94 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_blvt_subscribe_record_get_200_response.rs @@ -0,0 +1,49 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1BlvtSubscribeRecordGet200Response { + #[serde(rename = "id")] + pub id: i64, + #[serde(rename = "tokenName")] + pub token_name: String, + /// Subscription amount + #[serde(rename = "amount")] + pub amount: String, + /// NAV price of subscription + #[serde(rename = "nav")] + pub nav: String, + /// Subscription fee in usdt + #[serde(rename = "fee")] + pub fee: String, + /// Subscription cost in usdt + #[serde(rename = "totalCharge")] + pub total_charge: String, + #[serde(rename = "timestamp")] + pub timestamp: i64, +} + +impl SapiV1BlvtSubscribeRecordGet200Response { + pub fn new(id: i64, token_name: String, amount: String, nav: String, fee: String, total_charge: String, timestamp: i64) -> SapiV1BlvtSubscribeRecordGet200Response { + SapiV1BlvtSubscribeRecordGet200Response { + id, + token_name, + amount, + nav, + fee, + total_charge, + timestamp, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_blvt_token_info_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_blvt_token_info_get_200_response_inner.rs new file mode 100644 index 0000000..a9ed815 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_blvt_token_info_get_200_response_inner.rs @@ -0,0 +1,69 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1BlvtTokenInfoGet200ResponseInner { + #[serde(rename = "tokenName")] + pub token_name: String, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "underlying")] + pub underlying: String, + #[serde(rename = "tokenIssued")] + pub token_issued: String, + #[serde(rename = "basket")] + pub basket: String, + #[serde(rename = "currentBaskets")] + pub current_baskets: Vec, + #[serde(rename = "nav")] + pub nav: String, + #[serde(rename = "realLeverage")] + pub real_leverage: String, + #[serde(rename = "fundingRate")] + pub funding_rate: String, + #[serde(rename = "dailyManagementFee")] + pub daily_management_fee: String, + #[serde(rename = "purchaseFeePct")] + pub purchase_fee_pct: String, + #[serde(rename = "dailyPurchaseLimit")] + pub daily_purchase_limit: String, + #[serde(rename = "redeemFeePct")] + pub redeem_fee_pct: String, + #[serde(rename = "dailyRedeemLimit")] + pub daily_redeem_limit: String, + #[serde(rename = "timestamp")] + pub timestamp: i64, +} + +impl SapiV1BlvtTokenInfoGet200ResponseInner { + pub fn new(token_name: String, description: String, underlying: String, token_issued: String, basket: String, current_baskets: Vec, nav: String, real_leverage: String, funding_rate: String, daily_management_fee: String, purchase_fee_pct: String, daily_purchase_limit: String, redeem_fee_pct: String, daily_redeem_limit: String, timestamp: i64) -> SapiV1BlvtTokenInfoGet200ResponseInner { + SapiV1BlvtTokenInfoGet200ResponseInner { + token_name, + description, + underlying, + token_issued, + basket, + current_baskets, + nav, + real_leverage, + funding_rate, + daily_management_fee, + purchase_fee_pct, + daily_purchase_limit, + redeem_fee_pct, + daily_redeem_limit, + timestamp, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_blvt_token_info_get_200_response_inner_current_baskets_inner.rs b/test_rust/src/models/_sapi_v1_blvt_token_info_get_200_response_inner_current_baskets_inner.rs new file mode 100644 index 0000000..aa76698 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_blvt_token_info_get_200_response_inner_current_baskets_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "notionalValue")] + pub notional_value: String, +} + +impl SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner { + pub fn new(symbol: String, amount: String, notional_value: String) -> SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner { + SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner { + symbol, + amount, + notional_value, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_blvt_user_limit_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_blvt_user_limit_get_200_response_inner.rs new file mode 100644 index 0000000..8afff13 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_blvt_user_limit_get_200_response_inner.rs @@ -0,0 +1,35 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1BlvtUserLimitGet200ResponseInner { + #[serde(rename = "tokenName")] + pub token_name: String, + /// USDT + #[serde(rename = "userDailyTotalPurchaseLimit")] + pub user_daily_total_purchase_limit: String, + /// USDT + #[serde(rename = "userDailyTotalRedeemLimit")] + pub user_daily_total_redeem_limit: String, +} + +impl SapiV1BlvtUserLimitGet200ResponseInner { + pub fn new(token_name: String, user_daily_total_purchase_limit: String, user_daily_total_redeem_limit: String) -> SapiV1BlvtUserLimitGet200ResponseInner { + SapiV1BlvtUserLimitGet200ResponseInner { + token_name, + user_daily_total_purchase_limit, + user_daily_total_redeem_limit, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_c2c_order_match_list_user_order_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_c2c_order_match_list_user_order_history_get_200_response.rs new file mode 100644 index 0000000..f769ee0 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_c2c_order_match_list_user_order_history_get_200_response.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1C2cOrderMatchListUserOrderHistoryGet200Response { + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "data")] + pub data: Vec, + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "success")] + pub success: bool, +} + +impl SapiV1C2cOrderMatchListUserOrderHistoryGet200Response { + pub fn new(code: String, message: String, data: Vec, total: i32, success: bool) -> SapiV1C2cOrderMatchListUserOrderHistoryGet200Response { + SapiV1C2cOrderMatchListUserOrderHistoryGet200Response { + code, + message, + data, + total, + success, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_c2c_order_match_list_user_order_history_get_200_response_data_inner.rs b/test_rust/src/models/_sapi_v1_c2c_order_match_list_user_order_history_get_200_response_data_inner.rs new file mode 100644 index 0000000..0ab27d3 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_c2c_order_match_list_user_order_history_get_200_response_data_inner.rs @@ -0,0 +1,70 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner { + #[serde(rename = "orderNumber")] + pub order_number: String, + #[serde(rename = "advNo")] + pub adv_no: String, + #[serde(rename = "tradeType")] + pub trade_type: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "fiat")] + pub fiat: String, + #[serde(rename = "fiatSymbol")] + pub fiat_symbol: String, + /// Quantity (in Crypto) + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "totalPrice")] + pub total_price: String, + /// Unit Price (in Fiat) + #[serde(rename = "unitPrice")] + pub unit_price: String, + /// PENDING, TRADING, BUYER_PAYED, DISTRIBUTING, COMPLETED, IN_APPEAL, CANCELLED, CANCELLED_BY_SYSTEM + #[serde(rename = "orderStatus")] + pub order_status: String, + #[serde(rename = "createTime")] + pub create_time: i64, + /// Transaction Fee (in Crypto) + #[serde(rename = "commission")] + pub commission: String, + #[serde(rename = "counterPartNickName")] + pub counter_part_nick_name: String, + #[serde(rename = "advertisementRole")] + pub advertisement_role: String, +} + +impl SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner { + pub fn new(order_number: String, adv_no: String, trade_type: String, asset: String, fiat: String, fiat_symbol: String, amount: String, total_price: String, unit_price: String, order_status: String, create_time: i64, commission: String, counter_part_nick_name: String, advertisement_role: String) -> SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner { + SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner { + order_number, + adv_no, + trade_type, + asset, + fiat, + fiat_symbol, + amount, + total_price, + unit_price, + order_status, + create_time, + commission, + counter_part_nick_name, + advertisement_role, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_capital_config_getall_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_capital_config_getall_get_200_response_inner.rs new file mode 100644 index 0000000..50b0275 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_capital_config_getall_get_200_response_inner.rs @@ -0,0 +1,66 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1CapitalConfigGetallGet200ResponseInner { + #[serde(rename = "coin")] + pub coin: String, + #[serde(rename = "depositAllEnable")] + pub deposit_all_enable: bool, + #[serde(rename = "free")] + pub free: String, + #[serde(rename = "freeze")] + pub freeze: String, + #[serde(rename = "ipoable")] + pub ipoable: String, + #[serde(rename = "ipoing")] + pub ipoing: String, + #[serde(rename = "isLegalMoney")] + pub is_legal_money: bool, + #[serde(rename = "locked")] + pub locked: String, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "networkList")] + pub network_list: Vec, + #[serde(rename = "storage")] + pub storage: String, + #[serde(rename = "trading")] + pub trading: bool, + #[serde(rename = "withdrawAllEnable")] + pub withdraw_all_enable: bool, + #[serde(rename = "withdrawing")] + pub withdrawing: String, +} + +impl SapiV1CapitalConfigGetallGet200ResponseInner { + pub fn new(coin: String, deposit_all_enable: bool, free: String, freeze: String, ipoable: String, ipoing: String, is_legal_money: bool, locked: String, name: String, network_list: Vec, storage: String, trading: bool, withdraw_all_enable: bool, withdrawing: String) -> SapiV1CapitalConfigGetallGet200ResponseInner { + SapiV1CapitalConfigGetallGet200ResponseInner { + coin, + deposit_all_enable, + free, + freeze, + ipoable, + ipoing, + is_legal_money, + locked, + name, + network_list, + storage, + trading, + withdraw_all_enable, + withdrawing, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_capital_config_getall_get_200_response_inner_network_list_inner.rs b/test_rust/src/models/_sapi_v1_capital_config_getall_get_200_response_inner_network_list_inner.rs new file mode 100644 index 0000000..af2b51c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_capital_config_getall_get_200_response_inner_network_list_inner.rs @@ -0,0 +1,82 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner { + #[serde(rename = "addressRegex")] + pub address_regex: String, + #[serde(rename = "coin")] + pub coin: String, + /// shown only when \"depositEnable\" is false. + #[serde(rename = "depositDesc")] + pub deposit_desc: String, + #[serde(rename = "depositEnable")] + pub deposit_enable: bool, + #[serde(rename = "isDefault")] + pub is_default: bool, + #[serde(rename = "memoRegex")] + pub memo_regex: String, + /// min number for balance confirmation. + #[serde(rename = "minConfirm")] + pub min_confirm: i64, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "network")] + pub network: String, + #[serde(rename = "specialTips")] + pub special_tips: String, + /// confirmation number for balance unlock. + #[serde(rename = "unLockConfirm")] + pub un_lock_confirm: i64, + /// shown only when \"withdrawEnable\" is false + #[serde(rename = "withdrawDesc")] + pub withdraw_desc: String, + #[serde(rename = "withdrawEnable")] + pub withdraw_enable: bool, + #[serde(rename = "withdrawFee")] + pub withdraw_fee: String, + #[serde(rename = "withdrawIntegerMultiple")] + pub withdraw_integer_multiple: String, + #[serde(rename = "withdrawMax")] + pub withdraw_max: String, + #[serde(rename = "withdrawMin")] + pub withdraw_min: String, + #[serde(rename = "sameAddress")] + pub same_address: bool, +} + +impl SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner { + pub fn new(address_regex: String, coin: String, deposit_desc: String, deposit_enable: bool, is_default: bool, memo_regex: String, min_confirm: i64, name: String, network: String, special_tips: String, un_lock_confirm: i64, withdraw_desc: String, withdraw_enable: bool, withdraw_fee: String, withdraw_integer_multiple: String, withdraw_max: String, withdraw_min: String, same_address: bool) -> SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner { + SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner { + address_regex, + coin, + deposit_desc, + deposit_enable, + is_default, + memo_regex, + min_confirm, + name, + network, + special_tips, + un_lock_confirm, + withdraw_desc, + withdraw_enable, + withdraw_fee, + withdraw_integer_multiple, + withdraw_max, + withdraw_min, + same_address, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_capital_contract_convertible_coins_get_200_response.rs b/test_rust/src/models/_sapi_v1_capital_contract_convertible_coins_get_200_response.rs new file mode 100644 index 0000000..3ca5fb0 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_capital_contract_convertible_coins_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1CapitalContractConvertibleCoinsGet200Response { + #[serde(rename = "convertEnabled")] + pub convert_enabled: bool, + #[serde(rename = "coins")] + pub coins: Vec, + #[serde(rename = "exchangeRates")] + pub exchange_rates: Box, +} + +impl SapiV1CapitalContractConvertibleCoinsGet200Response { + pub fn new(convert_enabled: bool, coins: Vec, exchange_rates: models::SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates) -> SapiV1CapitalContractConvertibleCoinsGet200Response { + SapiV1CapitalContractConvertibleCoinsGet200Response { + convert_enabled, + coins, + exchange_rates: Box::new(exchange_rates), + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_capital_contract_convertible_coins_get_200_response_exchange_rates.rs b/test_rust/src/models/_sapi_v1_capital_contract_convertible_coins_get_200_response_exchange_rates.rs new file mode 100644 index 0000000..7b56914 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_capital_contract_convertible_coins_get_200_response_exchange_rates.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates { + #[serde(rename = "USDC")] + pub usdc: String, + #[serde(rename = "TUSD")] + pub tusd: String, + #[serde(rename = "USDP")] + pub usdp: String, +} + +impl SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates { + pub fn new(usdc: String, tusd: String, usdp: String) -> SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates { + SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates { + usdc, + tusd, + usdp, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_capital_deposit_address_get_200_response.rs b/test_rust/src/models/_sapi_v1_capital_deposit_address_get_200_response.rs new file mode 100644 index 0000000..130c862 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_capital_deposit_address_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1CapitalDepositAddressGet200Response { + #[serde(rename = "address")] + pub address: String, + #[serde(rename = "coin")] + pub coin: String, + #[serde(rename = "tag")] + pub tag: String, + #[serde(rename = "url")] + pub url: String, +} + +impl SapiV1CapitalDepositAddressGet200Response { + pub fn new(address: String, coin: String, tag: String, url: String) -> SapiV1CapitalDepositAddressGet200Response { + SapiV1CapitalDepositAddressGet200Response { + address, + coin, + tag, + url, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_capital_deposit_address_list_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_capital_deposit_address_list_get_200_response_inner.rs new file mode 100644 index 0000000..08929d9 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_capital_deposit_address_list_get_200_response_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1CapitalDepositAddressListGet200ResponseInner { + #[serde(rename = "coin")] + pub coin: String, + #[serde(rename = "address")] + pub address: String, + #[serde(rename = "isDefault")] + pub is_default: i32, +} + +impl SapiV1CapitalDepositAddressListGet200ResponseInner { + pub fn new(coin: String, address: String, is_default: i32) -> SapiV1CapitalDepositAddressListGet200ResponseInner { + SapiV1CapitalDepositAddressListGet200ResponseInner { + coin, + address, + is_default, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_capital_deposit_credit_apply_post_200_response.rs b/test_rust/src/models/_sapi_v1_capital_deposit_credit_apply_post_200_response.rs new file mode 100644 index 0000000..f83fb51 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_capital_deposit_credit_apply_post_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1CapitalDepositCreditApplyPost200Response { + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "data")] + pub data: bool, + #[serde(rename = "success")] + pub success: bool, +} + +impl SapiV1CapitalDepositCreditApplyPost200Response { + pub fn new(code: String, message: String, data: bool, success: bool) -> SapiV1CapitalDepositCreditApplyPost200Response { + SapiV1CapitalDepositCreditApplyPost200Response { + code, + message, + data, + success, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_capital_deposit_hisrec_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_capital_deposit_hisrec_get_200_response_inner.rs new file mode 100644 index 0000000..8d5e7b0 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_capital_deposit_hisrec_get_200_response_inner.rs @@ -0,0 +1,58 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1CapitalDepositHisrecGet200ResponseInner { + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "coin")] + pub coin: String, + #[serde(rename = "network")] + pub network: String, + #[serde(rename = "status")] + pub status: i32, + #[serde(rename = "address")] + pub address: String, + #[serde(rename = "addressTag")] + pub address_tag: String, + #[serde(rename = "txId")] + pub tx_id: String, + #[serde(rename = "insertTime")] + pub insert_time: i64, + #[serde(rename = "transferType")] + pub transfer_type: i32, + /// confirm times for unlocking + #[serde(rename = "unlockConfirm")] + pub unlock_confirm: String, + #[serde(rename = "confirmTimes")] + pub confirm_times: String, +} + +impl SapiV1CapitalDepositHisrecGet200ResponseInner { + pub fn new(amount: String, coin: String, network: String, status: i32, address: String, address_tag: String, tx_id: String, insert_time: i64, transfer_type: i32, unlock_confirm: String, confirm_times: String) -> SapiV1CapitalDepositHisrecGet200ResponseInner { + SapiV1CapitalDepositHisrecGet200ResponseInner { + amount, + coin, + network, + status, + address, + address_tag, + tx_id, + insert_time, + transfer_type, + unlock_confirm, + confirm_times, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_capital_deposit_sub_address_get_200_response.rs b/test_rust/src/models/_sapi_v1_capital_deposit_sub_address_get_200_response.rs new file mode 100644 index 0000000..e946a55 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_capital_deposit_sub_address_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1CapitalDepositSubAddressGet200Response { + #[serde(rename = "address")] + pub address: String, + #[serde(rename = "coin")] + pub coin: String, + #[serde(rename = "tag")] + pub tag: String, + #[serde(rename = "url")] + pub url: String, +} + +impl SapiV1CapitalDepositSubAddressGet200Response { + pub fn new(address: String, coin: String, tag: String, url: String) -> SapiV1CapitalDepositSubAddressGet200Response { + SapiV1CapitalDepositSubAddressGet200Response { + address, + coin, + tag, + url, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_capital_deposit_sub_hisrec_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_capital_deposit_sub_hisrec_get_200_response_inner.rs new file mode 100644 index 0000000..0a52c74 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_capital_deposit_sub_hisrec_get_200_response_inner.rs @@ -0,0 +1,54 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1CapitalDepositSubHisrecGet200ResponseInner { + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "coin")] + pub coin: String, + #[serde(rename = "network")] + pub network: String, + #[serde(rename = "status")] + pub status: i32, + #[serde(rename = "address")] + pub address: String, + #[serde(rename = "addressTag")] + pub address_tag: String, + #[serde(rename = "txId")] + pub tx_id: String, + #[serde(rename = "insertTime")] + pub insert_time: i64, + #[serde(rename = "transferType")] + pub transfer_type: i32, + #[serde(rename = "confirmTimes")] + pub confirm_times: String, +} + +impl SapiV1CapitalDepositSubHisrecGet200ResponseInner { + pub fn new(amount: String, coin: String, network: String, status: i32, address: String, address_tag: String, tx_id: String, insert_time: i64, transfer_type: i32, confirm_times: String) -> SapiV1CapitalDepositSubHisrecGet200ResponseInner { + SapiV1CapitalDepositSubHisrecGet200ResponseInner { + amount, + coin, + network, + status, + address, + address_tag, + tx_id, + insert_time, + transfer_type, + confirm_times, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_capital_withdraw_address_list_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_capital_withdraw_address_list_get_200_response_inner.rs new file mode 100644 index 0000000..96bc165 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_capital_withdraw_address_list_get_200_response_inner.rs @@ -0,0 +1,48 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1CapitalWithdrawAddressListGet200ResponseInner { + #[serde(rename = "address")] + pub address: String, + #[serde(rename = "addressTag")] + pub address_tag: String, + #[serde(rename = "coin")] + pub coin: String, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "network")] + pub network: String, + #[serde(rename = "origin")] + pub origin: String, + #[serde(rename = "originType")] + pub origin_type: String, + #[serde(rename = "whiteStatus")] + pub white_status: bool, +} + +impl SapiV1CapitalWithdrawAddressListGet200ResponseInner { + pub fn new(address: String, address_tag: String, coin: String, name: String, network: String, origin: String, origin_type: String, white_status: bool) -> SapiV1CapitalWithdrawAddressListGet200ResponseInner { + SapiV1CapitalWithdrawAddressListGet200ResponseInner { + address, + address_tag, + coin, + name, + network, + origin, + origin_type, + white_status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_capital_withdraw_apply_post_200_response.rs b/test_rust/src/models/_sapi_v1_capital_withdraw_apply_post_200_response.rs new file mode 100644 index 0000000..235bc5a --- /dev/null +++ b/test_rust/src/models/_sapi_v1_capital_withdraw_apply_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1CapitalWithdrawApplyPost200Response { + #[serde(rename = "id")] + pub id: String, +} + +impl SapiV1CapitalWithdrawApplyPost200Response { + pub fn new(id: String) -> SapiV1CapitalWithdrawApplyPost200Response { + SapiV1CapitalWithdrawApplyPost200Response { + id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_capital_withdraw_history_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_capital_withdraw_history_get_200_response_inner.rs new file mode 100644 index 0000000..d746026 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_capital_withdraw_history_get_200_response_inner.rs @@ -0,0 +1,66 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1CapitalWithdrawHistoryGet200ResponseInner { + #[serde(rename = "address")] + pub address: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "applyTime")] + pub apply_time: String, + #[serde(rename = "coin")] + pub coin: String, + #[serde(rename = "id")] + pub id: String, + /// will not be returned if there's no withdrawOrderId for this withdraw. + #[serde(rename = "withdrawOrderId")] + pub withdraw_order_id: String, + #[serde(rename = "network")] + pub network: String, + /// 1 for internal transfer, 0 for external transfer + #[serde(rename = "transferType")] + pub transfer_type: i32, + #[serde(rename = "status")] + pub status: i32, + #[serde(rename = "transactionFee")] + pub transaction_fee: String, + #[serde(rename = "confirmNo", skip_serializing_if = "Option::is_none")] + pub confirm_no: Option, + /// Reason for withdrawal failure + #[serde(rename = "info", skip_serializing_if = "Option::is_none")] + pub info: Option, + #[serde(rename = "txId")] + pub tx_id: String, +} + +impl SapiV1CapitalWithdrawHistoryGet200ResponseInner { + pub fn new(address: String, amount: String, apply_time: String, coin: String, id: String, withdraw_order_id: String, network: String, transfer_type: i32, status: i32, transaction_fee: String, tx_id: String) -> SapiV1CapitalWithdrawHistoryGet200ResponseInner { + SapiV1CapitalWithdrawHistoryGet200ResponseInner { + address, + amount, + apply_time, + coin, + id, + withdraw_order_id, + network, + transfer_type, + status, + transaction_fee, + confirm_no: None, + info: None, + tx_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_convert_accept_quote_post_200_response.rs b/test_rust/src/models/_sapi_v1_convert_accept_quote_post_200_response.rs new file mode 100644 index 0000000..96e3764 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_convert_accept_quote_post_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ConvertAcceptQuotePost200Response { + #[serde(rename = "orderId")] + pub order_id: String, + #[serde(rename = "createTime")] + pub create_time: i64, + #[serde(rename = "orderStatus")] + pub order_status: String, +} + +impl SapiV1ConvertAcceptQuotePost200Response { + pub fn new(order_id: String, create_time: i64, order_status: String) -> SapiV1ConvertAcceptQuotePost200Response { + SapiV1ConvertAcceptQuotePost200Response { + order_id, + create_time, + order_status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_convert_asset_info_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_convert_asset_info_get_200_response_inner.rs new file mode 100644 index 0000000..7cee844 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_convert_asset_info_get_200_response_inner.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ConvertAssetInfoGet200ResponseInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "fraction")] + pub fraction: i32, +} + +impl SapiV1ConvertAssetInfoGet200ResponseInner { + pub fn new(asset: String, fraction: i32) -> SapiV1ConvertAssetInfoGet200ResponseInner { + SapiV1ConvertAssetInfoGet200ResponseInner { + asset, + fraction, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_convert_exchange_info_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_convert_exchange_info_get_200_response_inner.rs new file mode 100644 index 0000000..9e0c24f --- /dev/null +++ b/test_rust/src/models/_sapi_v1_convert_exchange_info_get_200_response_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ConvertExchangeInfoGet200ResponseInner { + #[serde(rename = "fromAsset")] + pub from_asset: String, + #[serde(rename = "toAsset")] + pub to_asset: String, + #[serde(rename = "fromAssetMinAmount")] + pub from_asset_min_amount: String, + #[serde(rename = "fromAssetMaxAmount")] + pub from_asset_max_amount: String, + #[serde(rename = "toAssetMinAmount")] + pub to_asset_min_amount: String, + #[serde(rename = "toAssetMaxAmount")] + pub to_asset_max_amount: String, +} + +impl SapiV1ConvertExchangeInfoGet200ResponseInner { + pub fn new(from_asset: String, to_asset: String, from_asset_min_amount: String, from_asset_max_amount: String, to_asset_min_amount: String, to_asset_max_amount: String) -> SapiV1ConvertExchangeInfoGet200ResponseInner { + SapiV1ConvertExchangeInfoGet200ResponseInner { + from_asset, + to_asset, + from_asset_min_amount, + from_asset_max_amount, + to_asset_min_amount, + to_asset_max_amount, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_convert_get_quote_post_200_response.rs b/test_rust/src/models/_sapi_v1_convert_get_quote_post_200_response.rs new file mode 100644 index 0000000..8512949 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_convert_get_quote_post_200_response.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ConvertGetQuotePost200Response { + #[serde(rename = "quoteId")] + pub quote_id: String, + #[serde(rename = "ratio")] + pub ratio: String, + #[serde(rename = "inverseRatio")] + pub inverse_ratio: String, + #[serde(rename = "validTimestamp")] + pub valid_timestamp: i64, + #[serde(rename = "toAmount")] + pub to_amount: String, + #[serde(rename = "fromAmount")] + pub from_amount: String, +} + +impl SapiV1ConvertGetQuotePost200Response { + pub fn new(quote_id: String, ratio: String, inverse_ratio: String, valid_timestamp: i64, to_amount: String, from_amount: String) -> SapiV1ConvertGetQuotePost200Response { + SapiV1ConvertGetQuotePost200Response { + quote_id, + ratio, + inverse_ratio, + valid_timestamp, + to_amount, + from_amount, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_convert_limit_cancel_order_post_200_response.rs b/test_rust/src/models/_sapi_v1_convert_limit_cancel_order_post_200_response.rs new file mode 100644 index 0000000..0399aef --- /dev/null +++ b/test_rust/src/models/_sapi_v1_convert_limit_cancel_order_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ConvertLimitCancelOrderPost200Response { + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1ConvertLimitCancelOrderPost200Response { + pub fn new(order_id: i64, status: String) -> SapiV1ConvertLimitCancelOrderPost200Response { + SapiV1ConvertLimitCancelOrderPost200Response { + order_id, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_convert_limit_place_order_post_200_response.rs b/test_rust/src/models/_sapi_v1_convert_limit_place_order_post_200_response.rs new file mode 100644 index 0000000..25f5c49 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_convert_limit_place_order_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ConvertLimitPlaceOrderPost200Response { + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1ConvertLimitPlaceOrderPost200Response { + pub fn new(order_id: i64, status: String) -> SapiV1ConvertLimitPlaceOrderPost200Response { + SapiV1ConvertLimitPlaceOrderPost200Response { + order_id, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_convert_limit_query_open_orders_get_200_response.rs b/test_rust/src/models/_sapi_v1_convert_limit_query_open_orders_get_200_response.rs new file mode 100644 index 0000000..23d5257 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_convert_limit_query_open_orders_get_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ConvertLimitQueryOpenOrdersGet200Response { + #[serde(rename = "list")] + pub list: Vec, +} + +impl SapiV1ConvertLimitQueryOpenOrdersGet200Response { + pub fn new(list: Vec) -> SapiV1ConvertLimitQueryOpenOrdersGet200Response { + SapiV1ConvertLimitQueryOpenOrdersGet200Response { + list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_convert_limit_query_open_orders_get_200_response_list_inner.rs b/test_rust/src/models/_sapi_v1_convert_limit_query_open_orders_get_200_response_list_inner.rs new file mode 100644 index 0000000..30d44e5 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_convert_limit_query_open_orders_get_200_response_list_inner.rs @@ -0,0 +1,57 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner { + #[serde(rename = "quoteId")] + pub quote_id: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderStatus")] + pub order_status: String, + #[serde(rename = "fromAsset")] + pub from_asset: String, + #[serde(rename = "fromAmount")] + pub from_amount: String, + #[serde(rename = "toAsset")] + pub to_asset: String, + #[serde(rename = "toAmount")] + pub to_amount: String, + #[serde(rename = "ratio")] + pub ratio: String, + #[serde(rename = "inverseRatio")] + pub inverse_ratio: String, + #[serde(rename = "createTime")] + pub create_time: i64, + #[serde(rename = "expiredTimestamp")] + pub expired_timestamp: i64, +} + +impl SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner { + pub fn new(quote_id: String, order_id: i64, order_status: String, from_asset: String, from_amount: String, to_asset: String, to_amount: String, ratio: String, inverse_ratio: String, create_time: i64, expired_timestamp: i64) -> SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner { + SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner { + quote_id, + order_id, + order_status, + from_asset, + from_amount, + to_asset, + to_amount, + ratio, + inverse_ratio, + create_time, + expired_timestamp, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_convert_order_status_get_200_response.rs b/test_rust/src/models/_sapi_v1_convert_order_status_get_200_response.rs new file mode 100644 index 0000000..f12dab1 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_convert_order_status_get_200_response.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ConvertOrderStatusGet200Response { + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderStatus")] + pub order_status: String, + #[serde(rename = "fromAsset")] + pub from_asset: String, + #[serde(rename = "fromAmount")] + pub from_amount: String, + #[serde(rename = "toAsset")] + pub to_asset: String, + #[serde(rename = "toAmount")] + pub to_amount: String, + #[serde(rename = "ratio")] + pub ratio: String, + #[serde(rename = "inverseRatio")] + pub inverse_ratio: String, + #[serde(rename = "createTime")] + pub create_time: i64, +} + +impl SapiV1ConvertOrderStatusGet200Response { + pub fn new(order_id: i64, order_status: String, from_asset: String, from_amount: String, to_asset: String, to_amount: String, ratio: String, inverse_ratio: String, create_time: i64) -> SapiV1ConvertOrderStatusGet200Response { + SapiV1ConvertOrderStatusGet200Response { + order_id, + order_status, + from_asset, + from_amount, + to_asset, + to_amount, + ratio, + inverse_ratio, + create_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_convert_trade_flow_get_200_response.rs b/test_rust/src/models/_sapi_v1_convert_trade_flow_get_200_response.rs new file mode 100644 index 0000000..dc4864e --- /dev/null +++ b/test_rust/src/models/_sapi_v1_convert_trade_flow_get_200_response.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ConvertTradeFlowGet200Response { + #[serde(rename = "list")] + pub list: Vec, + #[serde(rename = "startTime")] + pub start_time: i64, + #[serde(rename = "endTime")] + pub end_time: i64, + #[serde(rename = "limit")] + pub limit: i32, + #[serde(rename = "moreData")] + pub more_data: bool, +} + +impl SapiV1ConvertTradeFlowGet200Response { + pub fn new(list: Vec, start_time: i64, end_time: i64, limit: i32, more_data: bool) -> SapiV1ConvertTradeFlowGet200Response { + SapiV1ConvertTradeFlowGet200Response { + list, + start_time, + end_time, + limit, + more_data, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_convert_trade_flow_get_200_response_list_inner.rs b/test_rust/src/models/_sapi_v1_convert_trade_flow_get_200_response_list_inner.rs new file mode 100644 index 0000000..4e6e1f9 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_convert_trade_flow_get_200_response_list_inner.rs @@ -0,0 +1,56 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ConvertTradeFlowGet200ResponseListInner { + #[serde(rename = "quoteId")] + pub quote_id: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderStatus")] + pub order_status: String, + #[serde(rename = "fromAsset")] + pub from_asset: String, + #[serde(rename = "fromAmount")] + pub from_amount: String, + #[serde(rename = "toAsset")] + pub to_asset: String, + #[serde(rename = "toAmount")] + pub to_amount: String, + /// price ratio + #[serde(rename = "ratio")] + pub ratio: String, + /// inverse price + #[serde(rename = "inverseRatio")] + pub inverse_ratio: String, + #[serde(rename = "createTime")] + pub create_time: i64, +} + +impl SapiV1ConvertTradeFlowGet200ResponseListInner { + pub fn new(quote_id: String, order_id: i64, order_status: String, from_asset: String, from_amount: String, to_asset: String, to_amount: String, ratio: String, inverse_ratio: String, create_time: i64) -> SapiV1ConvertTradeFlowGet200ResponseListInner { + SapiV1ConvertTradeFlowGet200ResponseListInner { + quote_id, + order_id, + order_status, + from_asset, + from_amount, + to_asset, + to_amount, + ratio, + inverse_ratio, + create_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_dci_product_accounts_get_200_response.rs b/test_rust/src/models/_sapi_v1_dci_product_accounts_get_200_response.rs new file mode 100644 index 0000000..e0c3f82 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_dci_product_accounts_get_200_response.rs @@ -0,0 +1,32 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1DciProductAccountsGet200Response { + /// Total BTC amounts in Dual Investment + #[serde(rename = "totalAmountInBTC")] + pub total_amount_in_btc: String, + /// Total USDT equivalents in BTC in Dual Investment + #[serde(rename = "totalAmountInUSDT")] + pub total_amount_in_usdt: String, +} + +impl SapiV1DciProductAccountsGet200Response { + pub fn new(total_amount_in_btc: String, total_amount_in_usdt: String) -> SapiV1DciProductAccountsGet200Response { + SapiV1DciProductAccountsGet200Response { + total_amount_in_btc, + total_amount_in_usdt, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_dci_product_auto_compound_edit_status_post_200_response.rs b/test_rust/src/models/_sapi_v1_dci_product_auto_compound_edit_status_post_200_response.rs new file mode 100644 index 0000000..31aa77e --- /dev/null +++ b/test_rust/src/models/_sapi_v1_dci_product_auto_compound_edit_status_post_200_response.rs @@ -0,0 +1,31 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1DciProductAutoCompoundEditStatusPost200Response { + #[serde(rename = "positionId")] + pub position_id: String, + /// NONE, STANDARD, ADVANCED + #[serde(rename = "autoCompoundPlan")] + pub auto_compound_plan: String, +} + +impl SapiV1DciProductAutoCompoundEditStatusPost200Response { + pub fn new(position_id: String, auto_compound_plan: String) -> SapiV1DciProductAutoCompoundEditStatusPost200Response { + SapiV1DciProductAutoCompoundEditStatusPost200Response { + position_id, + auto_compound_plan, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_dci_product_list_get_200_response.rs b/test_rust/src/models/_sapi_v1_dci_product_list_get_200_response.rs new file mode 100644 index 0000000..69cf878 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_dci_product_list_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1DciProductListGet200Response { + #[serde(rename = "total")] + pub total: i64, + #[serde(rename = "list")] + pub list: Vec, +} + +impl SapiV1DciProductListGet200Response { + pub fn new(total: i64, list: Vec) -> SapiV1DciProductListGet200Response { + SapiV1DciProductListGet200Response { + total, + list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_dci_product_list_get_200_response_list_inner.rs b/test_rust/src/models/_sapi_v1_dci_product_list_get_200_response_list_inner.rs new file mode 100644 index 0000000..91c79d8 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_dci_product_list_get_200_response_list_inner.rs @@ -0,0 +1,75 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1DciProductListGet200ResponseListInner { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "investCoin")] + pub invest_coin: String, + #[serde(rename = "exercisedCoin")] + pub exercised_coin: String, + #[serde(rename = "strikePrice")] + pub strike_price: String, + #[serde(rename = "duration")] + pub duration: i32, + #[serde(rename = "settleDate")] + pub settle_date: i64, + #[serde(rename = "purchaseDecimal")] + pub purchase_decimal: i32, + #[serde(rename = "purchaseEndTime")] + pub purchase_end_time: i64, + #[serde(rename = "canPurchase")] + pub can_purchase: bool, + #[serde(rename = "apr")] + pub apr: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "minAmount")] + pub min_amount: String, + #[serde(rename = "maxAmount")] + pub max_amount: String, + #[serde(rename = "createTimestamp")] + pub create_timestamp: i64, + #[serde(rename = "optionType")] + pub option_type: String, + #[serde(rename = "isAutoCompoundEnable")] + pub is_auto_compound_enable: bool, + #[serde(rename = "autoCompoundPlanList")] + pub auto_compound_plan_list: Vec, +} + +impl SapiV1DciProductListGet200ResponseListInner { + pub fn new(id: String, invest_coin: String, exercised_coin: String, strike_price: String, duration: i32, settle_date: i64, purchase_decimal: i32, purchase_end_time: i64, can_purchase: bool, apr: String, order_id: i64, min_amount: String, max_amount: String, create_timestamp: i64, option_type: String, is_auto_compound_enable: bool, auto_compound_plan_list: Vec) -> SapiV1DciProductListGet200ResponseListInner { + SapiV1DciProductListGet200ResponseListInner { + id, + invest_coin, + exercised_coin, + strike_price, + duration, + settle_date, + purchase_decimal, + purchase_end_time, + can_purchase, + apr, + order_id, + min_amount, + max_amount, + create_timestamp, + option_type, + is_auto_compound_enable, + auto_compound_plan_list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_dci_product_positions_get_200_response.rs b/test_rust/src/models/_sapi_v1_dci_product_positions_get_200_response.rs new file mode 100644 index 0000000..40ac363 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_dci_product_positions_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1DciProductPositionsGet200Response { + #[serde(rename = "total")] + pub total: i64, + #[serde(rename = "list")] + pub list: Vec, +} + +impl SapiV1DciProductPositionsGet200Response { + pub fn new(total: i64, list: Vec) -> SapiV1DciProductPositionsGet200Response { + SapiV1DciProductPositionsGet200Response { + total, + list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_dci_product_positions_get_200_response_list_inner.rs b/test_rust/src/models/_sapi_v1_dci_product_positions_get_200_response_list_inner.rs new file mode 100644 index 0000000..060b0d0 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_dci_product_positions_get_200_response_list_inner.rs @@ -0,0 +1,63 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1DciProductPositionsGet200ResponseListInner { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "investCoin")] + pub invest_coin: String, + #[serde(rename = "exercisedCoin")] + pub exercised_coin: String, + #[serde(rename = "subscriptionAmount")] + pub subscription_amount: String, + #[serde(rename = "strikePrice")] + pub strike_price: String, + #[serde(rename = "duration")] + pub duration: i32, + #[serde(rename = "settleDate")] + pub settle_date: i64, + #[serde(rename = "purchaseStatus")] + pub purchase_status: String, + #[serde(rename = "apr")] + pub apr: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "purchaseEndTime")] + pub purchase_end_time: i64, + #[serde(rename = "optionType")] + pub option_type: String, + #[serde(rename = "autoCompoundPlan")] + pub auto_compound_plan: String, +} + +impl SapiV1DciProductPositionsGet200ResponseListInner { + pub fn new(id: String, invest_coin: String, exercised_coin: String, subscription_amount: String, strike_price: String, duration: i32, settle_date: i64, purchase_status: String, apr: String, order_id: i64, purchase_end_time: i64, option_type: String, auto_compound_plan: String) -> SapiV1DciProductPositionsGet200ResponseListInner { + SapiV1DciProductPositionsGet200ResponseListInner { + id, + invest_coin, + exercised_coin, + subscription_amount, + strike_price, + duration, + settle_date, + purchase_status, + apr, + order_id, + purchase_end_time, + option_type, + auto_compound_plan, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_dci_product_subscribe_post_200_response.rs b/test_rust/src/models/_sapi_v1_dci_product_subscribe_post_200_response.rs new file mode 100644 index 0000000..1eec7e6 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_dci_product_subscribe_post_200_response.rs @@ -0,0 +1,64 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1DciProductSubscribePost200Response { + #[serde(rename = "positionId")] + pub position_id: i64, + #[serde(rename = "investCoin")] + pub invest_coin: String, + #[serde(rename = "exercisedCoin")] + pub exercised_coin: String, + #[serde(rename = "subscriptionAmount")] + pub subscription_amount: String, + #[serde(rename = "duration")] + pub duration: i32, + /// STANDARD, ADVANCED, this field won't display when autocompound is set to None + #[serde(rename = "autoCompoundPlan")] + pub auto_compound_plan: String, + #[serde(rename = "strikePrice")] + pub strike_price: String, + #[serde(rename = "settleDate")] + pub settle_date: i64, + #[serde(rename = "purchaseStatus")] + pub purchase_status: String, + #[serde(rename = "apr")] + pub apr: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "purchaseTime")] + pub purchase_time: i64, + #[serde(rename = "optionType"", skip_serializing_if = "Option::is_none")] + pub option_type_double_quote: Option, +} + +impl SapiV1DciProductSubscribePost200Response { + pub fn new(position_id: i64, invest_coin: String, exercised_coin: String, subscription_amount: String, duration: i32, auto_compound_plan: String, strike_price: String, settle_date: i64, purchase_status: String, apr: String, order_id: i64, purchase_time: i64) -> SapiV1DciProductSubscribePost200Response { + SapiV1DciProductSubscribePost200Response { + position_id, + invest_coin, + exercised_coin, + subscription_amount, + duration, + auto_compound_plan, + strike_price, + settle_date, + purchase_status, + apr, + order_id, + purchase_time, + option_type_double_quote: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_eth_history_rate_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_rate_history_get_200_response.rs new file mode 100644 index 0000000..42f6d97 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_rate_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingEthHistoryRateHistoryGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1EthStakingEthHistoryRateHistoryGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1EthStakingEthHistoryRateHistoryGet200Response { + SapiV1EthStakingEthHistoryRateHistoryGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_eth_history_rate_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_rate_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..8e4bb74 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_rate_history_get_200_response_rows_inner.rs @@ -0,0 +1,35 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner { + /// BETH APR + #[serde(rename = "annualPercentageRate")] + pub annual_percentage_rate: String, + /// BETH value per 1 WBETH + #[serde(rename = "exchangeRate")] + pub exchange_rate: String, + #[serde(rename = "time")] + pub time: i64, +} + +impl SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner { + pub fn new(annual_percentage_rate: String, exchange_rate: String, time: i64) -> SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner { + SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner { + annual_percentage_rate, + exchange_rate, + time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_eth_history_redemption_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_redemption_history_get_200_response.rs new file mode 100644 index 0000000..9e4aed2 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_redemption_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response { + SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_eth_history_redemption_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_redemption_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..6f7d2a2 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_redemption_history_get_200_response_rows_inner.rs @@ -0,0 +1,49 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner { + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "arrivalTime")] + pub arrival_time: i64, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "amount")] + pub amount: String, + /// PENDING, SUCCESS, FAILED + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "distributeAsset")] + pub distribute_asset: String, + #[serde(rename = "distributeAmount")] + pub distribute_amount: String, + #[serde(rename = "conversionRatio")] + pub conversion_ratio: String, +} + +impl SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner { + pub fn new(time: i64, arrival_time: i64, asset: String, amount: String, status: String, distribute_asset: String, distribute_amount: String, conversion_ratio: String) -> SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner { + SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner { + time, + arrival_time, + asset, + amount, + status, + distribute_asset, + distribute_amount, + conversion_ratio, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_eth_history_rewards_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_rewards_history_get_200_response.rs new file mode 100644 index 0000000..50e181c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_rewards_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingEthHistoryRewardsHistoryGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1EthStakingEthHistoryRewardsHistoryGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1EthStakingEthHistoryRewardsHistoryGet200Response { + SapiV1EthStakingEthHistoryRewardsHistoryGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_eth_history_rewards_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_rewards_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..dc48412 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_rewards_history_get_200_response_rows_inner.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner { + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "asset")] + pub asset: String, + /// BETH holding balance + #[serde(rename = "holding")] + pub holding: String, + /// Distributed rewards + #[serde(rename = "amount")] + pub amount: String, + /// 0.5 means 50% here + #[serde(rename = "annualPercentageRate")] + pub annual_percentage_rate: String, + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner { + pub fn new(time: i64, asset: String, holding: String, amount: String, annual_percentage_rate: String, status: String) -> SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner { + SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner { + time, + asset, + holding, + amount, + annual_percentage_rate, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_eth_history_staking_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_staking_history_get_200_response.rs new file mode 100644 index 0000000..4a6ad6d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_staking_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingEthHistoryStakingHistoryGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1EthStakingEthHistoryStakingHistoryGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1EthStakingEthHistoryStakingHistoryGet200Response { + SapiV1EthStakingEthHistoryStakingHistoryGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_eth_history_staking_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_staking_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..b86acf2 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_staking_history_get_200_response_rows_inner.rs @@ -0,0 +1,43 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner { + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "amount")] + pub amount: String, + /// PENDING, SUCCESS, FAILED + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "distributeAmount")] + pub distribute_amount: String, + #[serde(rename = "conversionRatio")] + pub conversion_ratio: String, +} + +impl SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner { + pub fn new(time: i64, asset: String, amount: String, status: String, distribute_amount: String, conversion_ratio: String) -> SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner { + SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner { + time, + asset, + amount, + status, + distribute_amount, + conversion_ratio, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response.rs new file mode 100644 index 0000000..028f94d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response { + #[serde(rename = "estRewardsInETH")] + pub est_rewards_in_eth: String, + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response { + pub fn new(est_rewards_in_eth: String, rows: Vec, total: i64) -> SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response { + SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response { + est_rewards_in_eth, + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..892b5d7 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response_rows_inner.rs @@ -0,0 +1,41 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner { + #[serde(rename = "time")] + pub time: i64, + /// Estimated rewards accrued within WBETH + #[serde(rename = "amountInETH")] + pub amount_in_eth: String, + /// WBETH holding balance + #[serde(rename = "holding")] + pub holding: String, + #[serde(rename = "holdingInETH")] + pub holding_in_eth: String, + #[serde(rename = "annualPercentageRate")] + pub annual_percentage_rate: String, +} + +impl SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner { + pub fn new(time: i64, amount_in_eth: String, holding: String, holding_in_eth: String, annual_percentage_rate: String) -> SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner { + SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner { + time, + amount_in_eth, + holding, + holding_in_eth, + annual_percentage_rate, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_eth_quota_get_200_response.rs b/test_rust/src/models/_sapi_v1_eth_staking_eth_quota_get_200_response.rs new file mode 100644 index 0000000..5b13268 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_eth_quota_get_200_response.rs @@ -0,0 +1,32 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingEthQuotaGet200Response { + /// Show min(Daily available limit, total personal staking quota) + #[serde(rename = "leftStakingPersonalQuota")] + pub left_staking_personal_quota: String, + /// Show min(Daily personal redeem quota, total redemption limit) + #[serde(rename = "leftRedemptionPersonalQuota")] + pub left_redemption_personal_quota: String, +} + +impl SapiV1EthStakingEthQuotaGet200Response { + pub fn new(left_staking_personal_quota: String, left_redemption_personal_quota: String) -> SapiV1EthStakingEthQuotaGet200Response { + SapiV1EthStakingEthQuotaGet200Response { + left_staking_personal_quota, + left_redemption_personal_quota, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_eth_redeem_post_200_response.rs b/test_rust/src/models/_sapi_v1_eth_staking_eth_redeem_post_200_response.rs new file mode 100644 index 0000000..206e431 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_eth_redeem_post_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingEthRedeemPost200Response { + #[serde(rename = "success")] + pub success: bool, + #[serde(rename = "arrivalTime")] + pub arrival_time: i64, + #[serde(rename = "ethAmount")] + pub eth_amount: String, + #[serde(rename = "conversionRatio")] + pub conversion_ratio: String, +} + +impl SapiV1EthStakingEthRedeemPost200Response { + pub fn new(success: bool, arrival_time: i64, eth_amount: String, conversion_ratio: String) -> SapiV1EthStakingEthRedeemPost200Response { + SapiV1EthStakingEthRedeemPost200Response { + success, + arrival_time, + eth_amount, + conversion_ratio, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response.rs new file mode 100644 index 0000000..57e087f --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response { + SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..96677cf --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response_rows_inner.rs @@ -0,0 +1,47 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner { + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "fromAsset")] + pub from_asset: String, + #[serde(rename = "fromAmount")] + pub from_amount: String, + #[serde(rename = "toAsset")] + pub to_asset: String, + #[serde(rename = "toAmount")] + pub to_amount: String, + /// BETH amount per 1 WBETH + #[serde(rename = "exchangeRate")] + pub exchange_rate: String, + /// PENDING, SUCCESS, FAILED + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner { + pub fn new(time: i64, from_asset: String, from_amount: String, to_asset: String, to_amount: String, exchange_rate: String, status: String) -> SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner { + SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner { + time, + from_asset, + from_amount, + to_asset, + to_amount, + exchange_rate, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response.rs new file mode 100644 index 0000000..62b740b --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingWbethHistoryWrapHistoryGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1EthStakingWbethHistoryWrapHistoryGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1EthStakingWbethHistoryWrapHistoryGet200Response { + SapiV1EthStakingWbethHistoryWrapHistoryGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..90f13b3 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response_rows_inner.rs @@ -0,0 +1,47 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner { + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "fromAsset")] + pub from_asset: String, + #[serde(rename = "fromAmount")] + pub from_amount: String, + #[serde(rename = "toAsset")] + pub to_asset: String, + #[serde(rename = "toAmount")] + pub to_amount: String, + /// BETH amount per 1 WBETH + #[serde(rename = "exchangeRate")] + pub exchange_rate: String, + /// PENDING, SUCCESS, FAILED + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner { + pub fn new(time: i64, from_asset: String, from_amount: String, to_asset: String, to_amount: String, exchange_rate: String, status: String) -> SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner { + SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner { + time, + from_asset, + from_amount, + to_asset, + to_amount, + exchange_rate, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_eth_staking_wbeth_wrap_post_200_response.rs b/test_rust/src/models/_sapi_v1_eth_staking_wbeth_wrap_post_200_response.rs new file mode 100644 index 0000000..08c311b --- /dev/null +++ b/test_rust/src/models/_sapi_v1_eth_staking_wbeth_wrap_post_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1EthStakingWbethWrapPost200Response { + #[serde(rename = "success")] + pub success: bool, + #[serde(rename = "wbethAmount")] + pub wbeth_amount: String, + #[serde(rename = "exchangeRate")] + pub exchange_rate: String, +} + +impl SapiV1EthStakingWbethWrapPost200Response { + pub fn new(success: bool, wbeth_amount: String, exchange_rate: String) -> SapiV1EthStakingWbethWrapPost200Response { + SapiV1EthStakingWbethWrapPost200Response { + success, + wbeth_amount, + exchange_rate, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_fiat_orders_get_200_response.rs b/test_rust/src/models/_sapi_v1_fiat_orders_get_200_response.rs new file mode 100644 index 0000000..68c0946 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_fiat_orders_get_200_response.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1FiatOrdersGet200Response { + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "data")] + pub data: Vec, + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "success")] + pub success: bool, +} + +impl SapiV1FiatOrdersGet200Response { + pub fn new(code: String, message: String, data: Vec, total: i32, success: bool) -> SapiV1FiatOrdersGet200Response { + SapiV1FiatOrdersGet200Response { + code, + message, + data, + total, + success, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_fiat_orders_get_200_response_data_inner.rs b/test_rust/src/models/_sapi_v1_fiat_orders_get_200_response_data_inner.rs new file mode 100644 index 0000000..6518bb2 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_fiat_orders_get_200_response_data_inner.rs @@ -0,0 +1,52 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1FiatOrdersGet200ResponseDataInner { + #[serde(rename = "orderNo")] + pub order_no: String, + #[serde(rename = "fiatCurrency")] + pub fiat_currency: String, + #[serde(rename = "indicatedAmount")] + pub indicated_amount: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "totalFee")] + pub total_fee: String, + #[serde(rename = "method")] + pub method: String, + /// Processing, Failed, Successful, Finished, Refunding, Refunded, Refund Failed, Order Partial credit Stopped + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "createTime")] + pub create_time: i64, + #[serde(rename = "updateTime")] + pub update_time: i64, +} + +impl SapiV1FiatOrdersGet200ResponseDataInner { + pub fn new(order_no: String, fiat_currency: String, indicated_amount: String, amount: String, total_fee: String, method: String, status: String, create_time: i64, update_time: i64) -> SapiV1FiatOrdersGet200ResponseDataInner { + SapiV1FiatOrdersGet200ResponseDataInner { + order_no, + fiat_currency, + indicated_amount, + amount, + total_fee, + method, + status, + create_time, + update_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_fiat_payments_get_200_response.rs b/test_rust/src/models/_sapi_v1_fiat_payments_get_200_response.rs new file mode 100644 index 0000000..a7b10de --- /dev/null +++ b/test_rust/src/models/_sapi_v1_fiat_payments_get_200_response.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1FiatPaymentsGet200Response { + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "data")] + pub data: Vec, + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "success")] + pub success: bool, +} + +impl SapiV1FiatPaymentsGet200Response { + pub fn new(code: String, message: String, data: Vec, total: i32, success: bool) -> SapiV1FiatPaymentsGet200Response { + SapiV1FiatPaymentsGet200Response { + code, + message, + data, + total, + success, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_fiat_payments_get_200_response_data_inner.rs b/test_rust/src/models/_sapi_v1_fiat_payments_get_200_response_data_inner.rs new file mode 100644 index 0000000..633d966 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_fiat_payments_get_200_response_data_inner.rs @@ -0,0 +1,60 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1FiatPaymentsGet200ResponseDataInner { + #[serde(rename = "orderNo")] + pub order_no: String, + /// Fiat trade amount + #[serde(rename = "sourceAmount")] + pub source_amount: String, + /// Fiat token + #[serde(rename = "fiatCurrency")] + pub fiat_currency: String, + /// Crypto trade amount + #[serde(rename = "obtainAmount")] + pub obtain_amount: String, + /// Crypto token + #[serde(rename = "cryptoCurrency")] + pub crypto_currency: String, + /// Trade fee + #[serde(rename = "totalFee")] + pub total_fee: String, + #[serde(rename = "price")] + pub price: String, + /// Processing, Completed, Failed, Refunded + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "createTime")] + pub create_time: i64, + #[serde(rename = "updateTime")] + pub update_time: i64, +} + +impl SapiV1FiatPaymentsGet200ResponseDataInner { + pub fn new(order_no: String, source_amount: String, fiat_currency: String, obtain_amount: String, crypto_currency: String, total_fee: String, price: String, status: String, create_time: i64, update_time: i64) -> SapiV1FiatPaymentsGet200ResponseDataInner { + SapiV1FiatPaymentsGet200ResponseDataInner { + order_no, + source_amount, + fiat_currency, + obtain_amount, + crypto_currency, + total_fee, + price, + status, + create_time, + update_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_futures_hist_data_link_get_200_response.rs b/test_rust/src/models/_sapi_v1_futures_hist_data_link_get_200_response.rs new file mode 100644 index 0000000..20b3571 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_futures_hist_data_link_get_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1FuturesHistDataLinkGet200Response { + #[serde(rename = "data")] + pub data: Vec, +} + +impl SapiV1FuturesHistDataLinkGet200Response { + pub fn new(data: Vec) -> SapiV1FuturesHistDataLinkGet200Response { + SapiV1FuturesHistDataLinkGet200Response { + data, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_futures_hist_data_link_get_200_response_data_inner.rs b/test_rust/src/models/_sapi_v1_futures_hist_data_link_get_200_response_data_inner.rs new file mode 100644 index 0000000..ba9c579 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_futures_hist_data_link_get_200_response_data_inner.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1FuturesHistDataLinkGet200ResponseDataInner { + #[serde(rename = "day")] + pub day: String, + #[serde(rename = "url")] + pub url: String, +} + +impl SapiV1FuturesHistDataLinkGet200ResponseDataInner { + pub fn new(day: String, url: String) -> SapiV1FuturesHistDataLinkGet200ResponseDataInner { + SapiV1FuturesHistDataLinkGet200ResponseDataInner { + day, + url, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_futures_transfer_get_200_response.rs b/test_rust/src/models/_sapi_v1_futures_transfer_get_200_response.rs new file mode 100644 index 0000000..7022bdc --- /dev/null +++ b/test_rust/src/models/_sapi_v1_futures_transfer_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1FuturesTransferGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1FuturesTransferGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1FuturesTransferGet200Response { + SapiV1FuturesTransferGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_futures_transfer_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_futures_transfer_get_200_response_rows_inner.rs new file mode 100644 index 0000000..ffca04f --- /dev/null +++ b/test_rust/src/models/_sapi_v1_futures_transfer_get_200_response_rows_inner.rs @@ -0,0 +1,43 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1FuturesTransferGet200ResponseRowsInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "tranId")] + pub tran_id: i64, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "timestamp")] + pub timestamp: i64, + /// one of PENDING (pending to execution), CONFIRMED (successfully transfered), FAILED (execution failed, nothing happened to your account); + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1FuturesTransferGet200ResponseRowsInner { + pub fn new(asset: String, tran_id: i64, amount: String, r#type: String, timestamp: i64, status: String) -> SapiV1FuturesTransferGet200ResponseRowsInner { + SapiV1FuturesTransferGet200ResponseRowsInner { + asset, + tran_id, + amount, + r#type, + timestamp, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_giftcard_buy_code_token_limit_get_200_response.rs b/test_rust/src/models/_sapi_v1_giftcard_buy_code_token_limit_get_200_response.rs new file mode 100644 index 0000000..23f6dd7 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_giftcard_buy_code_token_limit_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1GiftcardBuyCodeTokenLimitGet200Response { + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "data")] + pub data: Box, + #[serde(rename = "success")] + pub success: bool, +} + +impl SapiV1GiftcardBuyCodeTokenLimitGet200Response { + pub fn new(code: String, message: String, data: models::SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData, success: bool) -> SapiV1GiftcardBuyCodeTokenLimitGet200Response { + SapiV1GiftcardBuyCodeTokenLimitGet200Response { + code, + message, + data: Box::new(data), + success, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_giftcard_buy_code_token_limit_get_200_response_data.rs b/test_rust/src/models/_sapi_v1_giftcard_buy_code_token_limit_get_200_response_data.rs new file mode 100644 index 0000000..0cd05ec --- /dev/null +++ b/test_rust/src/models/_sapi_v1_giftcard_buy_code_token_limit_get_200_response_data.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData { + #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] + pub coin: Option, + #[serde(rename = "fromMin", skip_serializing_if = "Option::is_none")] + pub from_min: Option, + #[serde(rename = "fromMax", skip_serializing_if = "Option::is_none")] + pub from_max: Option, +} + +impl SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData { + pub fn new() -> SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData { + SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData { + coin: None, + from_min: None, + from_max: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_giftcard_create_code_post_200_response.rs b/test_rust/src/models/_sapi_v1_giftcard_create_code_post_200_response.rs new file mode 100644 index 0000000..0b0dc8d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_giftcard_create_code_post_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1GiftcardCreateCodePost200Response { + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "data")] + pub data: Box, + #[serde(rename = "success")] + pub success: bool, +} + +impl SapiV1GiftcardCreateCodePost200Response { + pub fn new(code: String, message: String, data: models::SapiV1GiftcardCreateCodePost200ResponseData, success: bool) -> SapiV1GiftcardCreateCodePost200Response { + SapiV1GiftcardCreateCodePost200Response { + code, + message, + data: Box::new(data), + success, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_giftcard_create_code_post_200_response_data.rs b/test_rust/src/models/_sapi_v1_giftcard_create_code_post_200_response_data.rs new file mode 100644 index 0000000..0c19856 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_giftcard_create_code_post_200_response_data.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1GiftcardCreateCodePost200ResponseData { + #[serde(rename = "referenceNo")] + pub reference_no: String, + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "expiredTime")] + pub expired_time: i64, +} + +impl SapiV1GiftcardCreateCodePost200ResponseData { + pub fn new(reference_no: String, code: String, expired_time: i64) -> SapiV1GiftcardCreateCodePost200ResponseData { + SapiV1GiftcardCreateCodePost200ResponseData { + reference_no, + code, + expired_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_giftcard_cryptography_rsa_public_key_get_200_response.rs b/test_rust/src/models/_sapi_v1_giftcard_cryptography_rsa_public_key_get_200_response.rs new file mode 100644 index 0000000..f50b9e2 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_giftcard_cryptography_rsa_public_key_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1GiftcardCryptographyRsaPublicKeyGet200Response { + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "data")] + pub data: String, + #[serde(rename = "success")] + pub success: bool, +} + +impl SapiV1GiftcardCryptographyRsaPublicKeyGet200Response { + pub fn new(code: String, message: String, data: String, success: bool) -> SapiV1GiftcardCryptographyRsaPublicKeyGet200Response { + SapiV1GiftcardCryptographyRsaPublicKeyGet200Response { + code, + message, + data, + success, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_giftcard_redeem_code_post_200_response.rs b/test_rust/src/models/_sapi_v1_giftcard_redeem_code_post_200_response.rs new file mode 100644 index 0000000..106b993 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_giftcard_redeem_code_post_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1GiftcardRedeemCodePost200Response { + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "data")] + pub data: Box, + #[serde(rename = "success")] + pub success: bool, +} + +impl SapiV1GiftcardRedeemCodePost200Response { + pub fn new(code: String, message: String, data: models::SapiV1GiftcardRedeemCodePost200ResponseData, success: bool) -> SapiV1GiftcardRedeemCodePost200Response { + SapiV1GiftcardRedeemCodePost200Response { + code, + message, + data: Box::new(data), + success, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_giftcard_redeem_code_post_200_response_data.rs b/test_rust/src/models/_sapi_v1_giftcard_redeem_code_post_200_response_data.rs new file mode 100644 index 0000000..a95be41 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_giftcard_redeem_code_post_200_response_data.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1GiftcardRedeemCodePost200ResponseData { + #[serde(rename = "token")] + pub token: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "referenceNo")] + pub reference_no: String, + #[serde(rename = "identityNo")] + pub identity_no: String, +} + +impl SapiV1GiftcardRedeemCodePost200ResponseData { + pub fn new(token: String, amount: String, reference_no: String, identity_no: String) -> SapiV1GiftcardRedeemCodePost200ResponseData { + SapiV1GiftcardRedeemCodePost200ResponseData { + token, + amount, + reference_no, + identity_no, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_giftcard_verify_get_200_response.rs b/test_rust/src/models/_sapi_v1_giftcard_verify_get_200_response.rs new file mode 100644 index 0000000..74da19e --- /dev/null +++ b/test_rust/src/models/_sapi_v1_giftcard_verify_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1GiftcardVerifyGet200Response { + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "data")] + pub data: Box, + #[serde(rename = "success")] + pub success: bool, +} + +impl SapiV1GiftcardVerifyGet200Response { + pub fn new(code: String, message: String, data: models::SapiV1GiftcardVerifyGet200ResponseData, success: bool) -> SapiV1GiftcardVerifyGet200Response { + SapiV1GiftcardVerifyGet200Response { + code, + message, + data: Box::new(data), + success, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_giftcard_verify_get_200_response_data.rs b/test_rust/src/models/_sapi_v1_giftcard_verify_get_200_response_data.rs new file mode 100644 index 0000000..0b79bb5 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_giftcard_verify_get_200_response_data.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1GiftcardVerifyGet200ResponseData { + #[serde(rename = "valid")] + pub valid: bool, + #[serde(rename = "token")] + pub token: String, + #[serde(rename = "amount")] + pub amount: String, +} + +impl SapiV1GiftcardVerifyGet200ResponseData { + pub fn new(valid: bool, token: String, amount: String) -> SapiV1GiftcardVerifyGet200ResponseData { + SapiV1GiftcardVerifyGet200ResponseData { + valid, + token, + amount, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_all_asset_get_200_response.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_all_asset_get_200_response.rs new file mode 100644 index 0000000..50cd61d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_all_asset_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestAllAssetGet200Response { + #[serde(rename = "targetAssets")] + pub target_assets: Vec, + #[serde(rename = "sourceAssets")] + pub source_assets: Vec, +} + +impl SapiV1LendingAutoInvestAllAssetGet200Response { + pub fn new(target_assets: Vec, source_assets: Vec) -> SapiV1LendingAutoInvestAllAssetGet200Response { + SapiV1LendingAutoInvestAllAssetGet200Response { + target_assets, + source_assets, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_history_list_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_history_list_get_200_response_inner.rs new file mode 100644 index 0000000..ed9661e --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_history_list_get_200_response_inner.rs @@ -0,0 +1,78 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestHistoryListGet200ResponseInner { + #[serde(rename = "id")] + pub id: i64, + #[serde(rename = "targetAsset")] + pub target_asset: String, + #[serde(rename = "planType")] + pub plan_type: String, + #[serde(rename = "planName")] + pub plan_name: String, + #[serde(rename = "planId")] + pub plan_id: i64, + #[serde(rename = "transactionDateTime")] + pub transaction_date_time: i64, + #[serde(rename = "transactionStatus")] + pub transaction_status: String, + #[serde(rename = "failedType")] + pub failed_type: String, + #[serde(rename = "sourceAsset")] + pub source_asset: String, + #[serde(rename = "sourceAssetAmount")] + pub source_asset_amount: String, + #[serde(rename = "targetAssetAmount")] + pub target_asset_amount: String, + #[serde(rename = "sourceWallet")] + pub source_wallet: String, + #[serde(rename = "flexibleUsed")] + pub flexible_used: String, + #[serde(rename = "transactionFee")] + pub transaction_fee: String, + #[serde(rename = "transactionFeeUnit")] + pub transaction_fee_unit: String, + #[serde(rename = "executionPrice")] + pub execution_price: String, + #[serde(rename = "executionType")] + pub execution_type: String, + #[serde(rename = "subscriptionCycle")] + pub subscription_cycle: String, +} + +impl SapiV1LendingAutoInvestHistoryListGet200ResponseInner { + pub fn new(id: i64, target_asset: String, plan_type: String, plan_name: String, plan_id: i64, transaction_date_time: i64, transaction_status: String, failed_type: String, source_asset: String, source_asset_amount: String, target_asset_amount: String, source_wallet: String, flexible_used: String, transaction_fee: String, transaction_fee_unit: String, execution_price: String, execution_type: String, subscription_cycle: String) -> SapiV1LendingAutoInvestHistoryListGet200ResponseInner { + SapiV1LendingAutoInvestHistoryListGet200ResponseInner { + id, + target_asset, + plan_type, + plan_name, + plan_id, + transaction_date_time, + transaction_status, + failed_type, + source_asset, + source_asset_amount, + target_asset_amount, + source_wallet, + flexible_used, + transaction_fee, + transaction_fee_unit, + execution_price, + execution_type, + subscription_cycle, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_index_info_get_200_response.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_index_info_get_200_response.rs new file mode 100644 index 0000000..0f87f6d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_index_info_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestIndexInfoGet200Response { + #[serde(rename = "indexId")] + pub index_id: i64, + #[serde(rename = "indexName")] + pub index_name: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "assetAllocation")] + pub asset_allocation: Vec, +} + +impl SapiV1LendingAutoInvestIndexInfoGet200Response { + pub fn new(index_id: i64, index_name: String, status: String, asset_allocation: Vec) -> SapiV1LendingAutoInvestIndexInfoGet200Response { + SapiV1LendingAutoInvestIndexInfoGet200Response { + index_id, + index_name, + status, + asset_allocation, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_index_info_get_200_response_asset_allocation_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_index_info_get_200_response_asset_allocation_inner.rs new file mode 100644 index 0000000..cb11a62 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_index_info_get_200_response_asset_allocation_inner.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner { + #[serde(rename = "targetAsset")] + pub target_asset: String, + #[serde(rename = "allocation")] + pub allocation: String, +} + +impl SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner { + pub fn new(target_asset: String, allocation: String) -> SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner { + SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner { + target_asset, + allocation, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response.rs new file mode 100644 index 0000000..3a21f3f --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response.rs @@ -0,0 +1,48 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestIndexUserSummaryGet200Response { + #[serde(rename = "indexId")] + pub index_id: i64, + #[serde(rename = "totalInvestedInUSD")] + pub total_invested_in_usd: String, + /// current invest + #[serde(rename = "currentInvestedInUSD")] + pub current_invested_in_usd: String, + /// PNL of the plan in USD based on current amount + #[serde(rename = "pnlInUSD")] + pub pnl_in_usd: String, + /// ROI of the plan based on current amount + #[serde(rename = "roi")] + pub roi: String, + #[serde(rename = "assetAllocation")] + pub asset_allocation: Vec, + #[serde(rename = "details")] + pub details: Vec, +} + +impl SapiV1LendingAutoInvestIndexUserSummaryGet200Response { + pub fn new(index_id: i64, total_invested_in_usd: String, current_invested_in_usd: String, pnl_in_usd: String, roi: String, asset_allocation: Vec, details: Vec) -> SapiV1LendingAutoInvestIndexUserSummaryGet200Response { + SapiV1LendingAutoInvestIndexUserSummaryGet200Response { + index_id, + total_invested_in_usd, + current_invested_in_usd, + pnl_in_usd, + roi, + asset_allocation, + details, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response_asset_allocation_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response_asset_allocation_inner.rs new file mode 100644 index 0000000..1e658ee --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response_asset_allocation_inner.rs @@ -0,0 +1,31 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner { + /// for pie chart + #[serde(rename = "targetAsset")] + pub target_asset: String, + #[serde(rename = "allocation")] + pub allocation: String, +} + +impl SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner { + pub fn new(target_asset: String, allocation: String) -> SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner { + SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner { + target_asset, + allocation, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response_details_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response_details_inner.rs new file mode 100644 index 0000000..deed996 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_index_user_summary_get_200_response_details_inner.rs @@ -0,0 +1,64 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner { + #[serde(rename = "targetAsset")] + pub target_asset: String, + /// average price of the asset in USD + #[serde(rename = "averagePriceInUSD")] + pub average_price_in_usd: String, + /// total source asset invested for this target asset in equivilent of USD + #[serde(rename = "totalInvestedInUSD")] + pub total_invested_in_usd: String, + /// current invest + #[serde(rename = "currentInvestedInUSD")] + pub current_invested_in_usd: String, + /// purchased amount of target asset + #[serde(rename = "purchasedAmount")] + pub purchased_amount: String, + /// PNL denominated in USD + #[serde(rename = "pnlInUSD")] + pub pnl_in_usd: String, + /// ROI calculated in decimal + #[serde(rename = "roi")] + pub roi: String, + /// asset allocation in the plan. If it's single plan, then it's 100 + #[serde(rename = "percentage")] + pub percentage: String, + #[serde(rename = "availableAmount")] + pub available_amount: String, + #[serde(rename = "redeemedAmount")] + pub redeemed_amount: String, + #[serde(rename = "assetValueInUSD")] + pub asset_value_in_usd: String, +} + +impl SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner { + pub fn new(target_asset: String, average_price_in_usd: String, total_invested_in_usd: String, current_invested_in_usd: String, purchased_amount: String, pnl_in_usd: String, roi: String, percentage: String, available_amount: String, redeemed_amount: String, asset_value_in_usd: String) -> SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner { + SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner { + target_asset, + average_price_in_usd, + total_invested_in_usd, + current_invested_in_usd, + purchased_amount, + pnl_in_usd, + roi, + percentage, + available_amount, + redeemed_amount, + asset_value_in_usd, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_one_off_post_200_response.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_one_off_post_200_response.rs new file mode 100644 index 0000000..9a3d8fc --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_one_off_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestOneOffPost200Response { + #[serde(rename = "transactionId")] + pub transaction_id: i64, + #[serde(rename = "waitSecond")] + pub wait_second: i32, +} + +impl SapiV1LendingAutoInvestOneOffPost200Response { + pub fn new(transaction_id: i64, wait_second: i32) -> SapiV1LendingAutoInvestOneOffPost200Response { + SapiV1LendingAutoInvestOneOffPost200Response { + transaction_id, + wait_second, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner.rs new file mode 100644 index 0000000..c05b0a5 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestOneOffPostDetailsParameterInner { + #[serde(rename = "targetAsset", skip_serializing_if = "Option::is_none")] + pub target_asset: Option, + #[serde(rename = "percentage", skip_serializing_if = "Option::is_none")] + pub percentage: Option, +} + +impl SapiV1LendingAutoInvestOneOffPostDetailsParameterInner { + pub fn new() -> SapiV1LendingAutoInvestOneOffPostDetailsParameterInner { + SapiV1LendingAutoInvestOneOffPostDetailsParameterInner { + target_asset: None, + percentage: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_one_off_status_get_200_response.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_one_off_status_get_200_response.rs new file mode 100644 index 0000000..2764d4d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_one_off_status_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestOneOffStatusGet200Response { + #[serde(rename = "transactionId")] + pub transaction_id: i64, + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1LendingAutoInvestOneOffStatusGet200Response { + pub fn new(transaction_id: i64, status: String) -> SapiV1LendingAutoInvestOneOffStatusGet200Response { + SapiV1LendingAutoInvestOneOffStatusGet200Response { + transaction_id, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_add_post_200_response.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_add_post_200_response.rs new file mode 100644 index 0000000..fdb9be2 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_add_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestPlanAddPost200Response { + #[serde(rename = "planId")] + pub plan_id: i32, + #[serde(rename = "nextExecutionDateTime")] + pub next_execution_date_time: i64, +} + +impl SapiV1LendingAutoInvestPlanAddPost200Response { + pub fn new(plan_id: i32, next_execution_date_time: i64) -> SapiV1LendingAutoInvestPlanAddPost200Response { + SapiV1LendingAutoInvestPlanAddPost200Response { + plan_id, + next_execution_date_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner.rs new file mode 100644 index 0000000..a1b417c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner { + #[serde(rename = "targetAsset", skip_serializing_if = "Option::is_none")] + pub target_asset: Option, + #[serde(rename = "percentage", skip_serializing_if = "Option::is_none")] + pub percentage: Option, +} + +impl SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner { + pub fn new() -> SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner { + SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner { + target_asset: None, + percentage: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_edit_status_post_200_response.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_edit_status_post_200_response.rs new file mode 100644 index 0000000..80c75a1 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_edit_status_post_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestPlanEditStatusPost200Response { + #[serde(rename = "planId")] + pub plan_id: i32, + #[serde(rename = "nextExecutionDateTime")] + pub next_execution_date_time: i64, + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1LendingAutoInvestPlanEditStatusPost200Response { + pub fn new(plan_id: i32, next_execution_date_time: i64, status: String) -> SapiV1LendingAutoInvestPlanEditStatusPost200Response { + SapiV1LendingAutoInvestPlanEditStatusPost200Response { + plan_id, + next_execution_date_time, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response.rs new file mode 100644 index 0000000..e335f0d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestPlanIdGet200Response { + #[serde(rename = "planValueInUSD", skip_serializing_if = "Option::is_none")] + pub plan_value_in_usd: Option, + #[serde(rename = "planValueInBTC", skip_serializing_if = "Option::is_none")] + pub plan_value_in_btc: Option, + #[serde(rename = "pnlInUSD", skip_serializing_if = "Option::is_none")] + pub pnl_in_usd: Option, + #[serde(rename = "roi", skip_serializing_if = "Option::is_none")] + pub roi: Option, + #[serde(rename = "plan", skip_serializing_if = "Option::is_none")] + pub plan: Option>, +} + +impl SapiV1LendingAutoInvestPlanIdGet200Response { + pub fn new() -> SapiV1LendingAutoInvestPlanIdGet200Response { + SapiV1LendingAutoInvestPlanIdGet200Response { + plan_value_in_usd: None, + plan_value_in_btc: None, + pnl_in_usd: None, + roi: None, + plan: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner.rs new file mode 100644 index 0000000..0ce7429 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner.rs @@ -0,0 +1,69 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner { + #[serde(rename = "planId")] + pub plan_id: i32, + #[serde(rename = "planType")] + pub plan_type: String, + #[serde(rename = "editAllowed")] + pub edit_allowed: String, + #[serde(rename = "flexibleAllowedToUse")] + pub flexible_allowed_to_use: String, + #[serde(rename = "creationDateTime")] + pub creation_date_time: i64, + #[serde(rename = "firstExecutionDateTime")] + pub first_execution_date_time: i64, + #[serde(rename = "nextExecutionDateTime")] + pub next_execution_date_time: i64, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "targetAsset")] + pub target_asset: String, + #[serde(rename = "sourceAsset")] + pub source_asset: String, + #[serde(rename = "totalInvestedInUSD")] + pub total_invested_in_usd: String, + #[serde(rename = "planValueInUSD")] + pub plan_value_in_usd: String, + #[serde(rename = "pnlInUSD")] + pub pnl_in_usd: String, + #[serde(rename = "roi")] + pub roi: String, + #[serde(rename = "details")] + pub details: Vec, +} + +impl SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner { + pub fn new(plan_id: i32, plan_type: String, edit_allowed: String, flexible_allowed_to_use: String, creation_date_time: i64, first_execution_date_time: i64, next_execution_date_time: i64, status: String, target_asset: String, source_asset: String, total_invested_in_usd: String, plan_value_in_usd: String, pnl_in_usd: String, roi: String, details: Vec) -> SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner { + SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner { + plan_id, + plan_type, + edit_allowed, + flexible_allowed_to_use, + creation_date_time, + first_execution_date_time, + next_execution_date_time, + status, + target_asset, + source_asset, + total_invested_in_usd, + plan_value_in_usd, + pnl_in_usd, + roi, + details, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner_details_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner_details_inner.rs new file mode 100644 index 0000000..74817a9 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner_details_inner.rs @@ -0,0 +1,66 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner { + #[serde(rename = "targetAsset")] + pub target_asset: String, + #[serde(rename = "averagePriceInUSD")] + pub average_price_in_usd: String, + #[serde(rename = "totalInvestedInUSD")] + pub total_invested_in_usd: String, + #[serde(rename = "purchasedAmount")] + pub purchased_amount: String, + #[serde(rename = "purchasedAmountUnit")] + pub purchased_amount_unit: String, + #[serde(rename = "pnlInUSD")] + pub pnl_in_usd: String, + #[serde(rename = "roi")] + pub roi: String, + #[serde(rename = "percentage")] + pub percentage: String, + #[serde(rename = "assetStatus")] + pub asset_status: String, + #[serde(rename = "availableAmount")] + pub available_amount: String, + #[serde(rename = "availableAmountUnit")] + pub available_amount_unit: String, + #[serde(rename = "redeemedAmout")] + pub redeemed_amout: String, + #[serde(rename = "redeemedAmoutUnit")] + pub redeemed_amout_unit: String, + #[serde(rename = "assetValueInUSD")] + pub asset_value_in_usd: String, +} + +impl SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner { + pub fn new(target_asset: String, average_price_in_usd: String, total_invested_in_usd: String, purchased_amount: String, purchased_amount_unit: String, pnl_in_usd: String, roi: String, percentage: String, asset_status: String, available_amount: String, available_amount_unit: String, redeemed_amout: String, redeemed_amout_unit: String, asset_value_in_usd: String) -> SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner { + SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner { + target_asset, + average_price_in_usd, + total_invested_in_usd, + purchased_amount, + purchased_amount_unit, + pnl_in_usd, + roi, + percentage, + asset_status, + available_amount, + available_amount_unit, + redeemed_amout, + redeemed_amout_unit, + asset_value_in_usd, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_list_get_200_response.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_list_get_200_response.rs new file mode 100644 index 0000000..ee4c8a9 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_list_get_200_response.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestPlanListGet200Response { + #[serde(rename = "planValueInUSD")] + pub plan_value_in_usd: String, + #[serde(rename = "planValueInBTC")] + pub plan_value_in_btc: String, + #[serde(rename = "pnlInUSD")] + pub pnl_in_usd: String, + #[serde(rename = "roi")] + pub roi: String, + #[serde(rename = "plan")] + pub plan: Vec, +} + +impl SapiV1LendingAutoInvestPlanListGet200Response { + pub fn new(plan_value_in_usd: String, plan_value_in_btc: String, pnl_in_usd: String, roi: String, plan: Vec) -> SapiV1LendingAutoInvestPlanListGet200Response { + SapiV1LendingAutoInvestPlanListGet200Response { + plan_value_in_usd, + plan_value_in_btc, + pnl_in_usd, + roi, + plan, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_list_get_200_response_plan_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_list_get_200_response_plan_inner.rs new file mode 100644 index 0000000..8407cd0 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_plan_list_get_200_response_plan_inner.rs @@ -0,0 +1,90 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner { + #[serde(rename = "planId")] + pub plan_id: i32, + #[serde(rename = "planType")] + pub plan_type: String, + #[serde(rename = "editAllowed")] + pub edit_allowed: String, + #[serde(rename = "creationDateTime")] + pub creation_date_time: i64, + #[serde(rename = "firstExecutionDateTime")] + pub first_execution_date_time: i64, + #[serde(rename = "nextExecutionDateTime")] + pub next_execution_date_time: i64, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "lastUpdatedDateTime")] + pub last_updated_date_time: i64, + #[serde(rename = "targetAsset")] + pub target_asset: String, + #[serde(rename = "totalTargetAmount")] + pub total_target_amount: String, + #[serde(rename = "sourceAsset")] + pub source_asset: String, + #[serde(rename = "totalInvestedInUSD")] + pub total_invested_in_usd: String, + #[serde(rename = "subscriptionAmount")] + pub subscription_amount: String, + #[serde(rename = "subscriptionCycle")] + pub subscription_cycle: String, + #[serde(rename = "subscriptionStartDay")] + pub subscription_start_day: String, + #[serde(rename = "subscriptionStartWeekday")] + pub subscription_start_weekday: String, + #[serde(rename = "subscriptionStartTime")] + pub subscription_start_time: String, + #[serde(rename = "sourceWallet")] + pub source_wallet: String, + #[serde(rename = "flexibleAllowedToUse")] + pub flexible_allowed_to_use: String, + #[serde(rename = "planValueInUSD")] + pub plan_value_in_usd: String, + #[serde(rename = "pnlInUSD")] + pub pnl_in_usd: String, + #[serde(rename = "roi")] + pub roi: String, +} + +impl SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner { + pub fn new(plan_id: i32, plan_type: String, edit_allowed: String, creation_date_time: i64, first_execution_date_time: i64, next_execution_date_time: i64, status: String, last_updated_date_time: i64, target_asset: String, total_target_amount: String, source_asset: String, total_invested_in_usd: String, subscription_amount: String, subscription_cycle: String, subscription_start_day: String, subscription_start_weekday: String, subscription_start_time: String, source_wallet: String, flexible_allowed_to_use: String, plan_value_in_usd: String, pnl_in_usd: String, roi: String) -> SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner { + SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner { + plan_id, + plan_type, + edit_allowed, + creation_date_time, + first_execution_date_time, + next_execution_date_time, + status, + last_updated_date_time, + target_asset, + total_target_amount, + source_asset, + total_invested_in_usd, + subscription_amount, + subscription_cycle, + subscription_start_day, + subscription_start_weekday, + subscription_start_time, + source_wallet, + flexible_allowed_to_use, + plan_value_in_usd, + pnl_in_usd, + roi, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner.rs new file mode 100644 index 0000000..5f232a7 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner { + #[serde(rename = "indexId")] + pub index_id: i64, + #[serde(rename = "indexName")] + pub index_name: String, + #[serde(rename = "rebalanceId")] + pub rebalance_id: i64, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "rebalanceFee")] + pub rebalance_fee: String, + #[serde(rename = "rebalanceFeeUnit")] + pub rebalance_fee_unit: String, + #[serde(rename = "transactionDetails")] + pub transaction_details: Vec, +} + +impl SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner { + pub fn new(index_id: i64, index_name: String, rebalance_id: i64, status: String, rebalance_fee: String, rebalance_fee_unit: String, transaction_details: Vec) -> SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner { + SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner { + index_id, + index_name, + rebalance_id, + status, + rebalance_fee, + rebalance_fee_unit, + transaction_details, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner_transaction_details_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner_transaction_details_inner.rs new file mode 100644 index 0000000..ad0df86 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner_transaction_details_inner.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "transactionDateTime")] + pub transaction_date_time: i64, + #[serde(rename = "rebalanceDirection")] + pub rebalance_direction: String, + #[serde(rename = "rebalanceAmount")] + pub rebalance_amount: String, +} + +impl SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner { + pub fn new(asset: String, transaction_date_time: i64, rebalance_direction: String, rebalance_amount: String) -> SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner { + SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner { + asset, + transaction_date_time, + rebalance_direction, + rebalance_amount, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_redeem_history_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_redeem_history_get_200_response_inner.rs new file mode 100644 index 0000000..dd1d489 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_redeem_history_get_200_response_inner.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner { + #[serde(rename = "indexId")] + pub index_id: i64, + #[serde(rename = "indexName")] + pub index_name: String, + #[serde(rename = "redemptionId")] + pub redemption_id: i64, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "redemptionDateTime")] + pub redemption_date_time: i64, + #[serde(rename = "transactionFee")] + pub transaction_fee: String, + #[serde(rename = "transactionFeeUnit")] + pub transaction_fee_unit: String, +} + +impl SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner { + pub fn new(index_id: i64, index_name: String, redemption_id: i64, status: String, asset: String, amount: String, redemption_date_time: i64, transaction_fee: String, transaction_fee_unit: String) -> SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner { + SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner { + index_id, + index_name, + redemption_id, + status, + asset, + amount, + redemption_date_time, + transaction_fee, + transaction_fee_unit, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_redeem_post_200_response.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_redeem_post_200_response.rs new file mode 100644 index 0000000..b512c59 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_redeem_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestRedeemPost200Response { + #[serde(rename = "redemptionId")] + pub redemption_id: i64, +} + +impl SapiV1LendingAutoInvestRedeemPost200Response { + pub fn new(redemption_id: i64) -> SapiV1LendingAutoInvestRedeemPost200Response { + SapiV1LendingAutoInvestRedeemPost200Response { + redemption_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_source_asset_list_get_200_response.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_source_asset_list_get_200_response.rs new file mode 100644 index 0000000..046aebc --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_source_asset_list_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestSourceAssetListGet200Response { + #[serde(rename = "feeRate")] + pub fee_rate: String, + #[serde(rename = "sourceAssets")] + pub source_assets: Vec, +} + +impl SapiV1LendingAutoInvestSourceAssetListGet200Response { + pub fn new(fee_rate: String, source_assets: Vec) -> SapiV1LendingAutoInvestSourceAssetListGet200Response { + SapiV1LendingAutoInvestSourceAssetListGet200Response { + fee_rate, + source_assets, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_source_asset_list_get_200_response_source_assets_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_source_asset_list_get_200_response_source_assets_inner.rs new file mode 100644 index 0000000..4252964 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_source_asset_list_get_200_response_source_assets_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner { + #[serde(rename = "sourceAsset")] + pub source_asset: String, + #[serde(rename = "assetMinAmount")] + pub asset_min_amount: String, + #[serde(rename = "assetMaxAmount")] + pub asset_max_amount: String, + #[serde(rename = "scale")] + pub scale: String, + #[serde(rename = "flexibleAmount")] + pub flexible_amount: String, +} + +impl SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner { + pub fn new(source_asset: String, asset_min_amount: String, asset_max_amount: String, scale: String, flexible_amount: String) -> SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner { + SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner { + source_asset, + asset_min_amount, + asset_max_amount, + scale, + flexible_amount, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response.rs new file mode 100644 index 0000000..1c54f3a --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestTargetAssetListGet200Response { + #[serde(rename = "targetAssets", skip_serializing_if = "Option::is_none")] + pub target_assets: Option, + #[serde(rename = "autoInvestAssetList", skip_serializing_if = "Option::is_none")] + pub auto_invest_asset_list: Option>, +} + +impl SapiV1LendingAutoInvestTargetAssetListGet200Response { + pub fn new() -> SapiV1LendingAutoInvestTargetAssetListGet200Response { + SapiV1LendingAutoInvestTargetAssetListGet200Response { + target_assets: None, + auto_invest_asset_list: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner.rs new file mode 100644 index 0000000..6377478 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner { + #[serde(rename = "targetAsset")] + pub target_asset: String, + #[serde(rename = "roiAndDimensionTypeList")] + pub roi_and_dimension_type_list: Vec, +} + +impl SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner { + pub fn new(target_asset: String, roi_and_dimension_type_list: Vec) -> SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner { + SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner { + target_asset, + roi_and_dimension_type_list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner.rs new file mode 100644 index 0000000..e244e2c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner { + #[serde(rename = "simulateRoi")] + pub simulate_roi: String, + #[serde(rename = "dimensionValue")] + pub dimension_value: String, + #[serde(rename = "dimensionUnit")] + pub dimension_unit: String, +} + +impl SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner { + pub fn new(simulate_roi: String, dimension_value: String, dimension_unit: String) -> SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner { + SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner { + simulate_roi, + dimension_value, + dimension_unit, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_roi_list_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_roi_list_get_200_response_inner.rs new file mode 100644 index 0000000..482bc38 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_auto_invest_target_asset_roi_list_get_200_response_inner.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner { + #[serde(rename = "date")] + pub date: String, + #[serde(rename = "simulateRoi")] + pub simulate_roi: String, +} + +impl SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner { + pub fn new(date: String, simulate_roi: String) -> SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner { + SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner { + date, + simulate_roi, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_customized_fixed_purchase_post_200_response.rs b/test_rust/src/models/_sapi_v1_lending_customized_fixed_purchase_post_200_response.rs new file mode 100644 index 0000000..126c4aa --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_customized_fixed_purchase_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingCustomizedFixedPurchasePost200Response { + #[serde(rename = "purchaseId")] + pub purchase_id: String, +} + +impl SapiV1LendingCustomizedFixedPurchasePost200Response { + pub fn new(purchase_id: String) -> SapiV1LendingCustomizedFixedPurchasePost200Response { + SapiV1LendingCustomizedFixedPurchasePost200Response { + purchase_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_position_changed_post_200_response.rs b/test_rust/src/models/_sapi_v1_lending_position_changed_post_200_response.rs new file mode 100644 index 0000000..413d5a0 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_position_changed_post_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingPositionChangedPost200Response { + #[serde(rename = "dailyPurchaseId")] + pub daily_purchase_id: i64, + #[serde(rename = "success")] + pub success: bool, + #[serde(rename = "time")] + pub time: i64, +} + +impl SapiV1LendingPositionChangedPost200Response { + pub fn new(daily_purchase_id: i64, success: bool, time: i64) -> SapiV1LendingPositionChangedPost200Response { + SapiV1LendingPositionChangedPost200Response { + daily_purchase_id, + success, + time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_project_list_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_lending_project_list_get_200_response_inner.rs new file mode 100644 index 0000000..8315f37 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_project_list_get_200_response_inner.rs @@ -0,0 +1,72 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingProjectListGet200ResponseInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "displayPriority")] + pub display_priority: i64, + #[serde(rename = "duration")] + pub duration: i64, + #[serde(rename = "interestPerLot")] + pub interest_per_lot: String, + #[serde(rename = "interestRate")] + pub interest_rate: String, + #[serde(rename = "lotSize")] + pub lot_size: String, + #[serde(rename = "lotsLowLimit")] + pub lots_low_limit: i64, + #[serde(rename = "lotsPurchased")] + pub lots_purchased: i64, + #[serde(rename = "lotsUpLimit")] + pub lots_up_limit: i64, + #[serde(rename = "maxLotsPerUser")] + pub max_lots_per_user: i64, + #[serde(rename = "needKyc")] + pub need_kyc: bool, + #[serde(rename = "projectId")] + pub project_id: String, + #[serde(rename = "projectName")] + pub project_name: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "withAreaLimitation")] + pub with_area_limitation: bool, +} + +impl SapiV1LendingProjectListGet200ResponseInner { + pub fn new(asset: String, display_priority: i64, duration: i64, interest_per_lot: String, interest_rate: String, lot_size: String, lots_low_limit: i64, lots_purchased: i64, lots_up_limit: i64, max_lots_per_user: i64, need_kyc: bool, project_id: String, project_name: String, status: String, r#type: String, with_area_limitation: bool) -> SapiV1LendingProjectListGet200ResponseInner { + SapiV1LendingProjectListGet200ResponseInner { + asset, + display_priority, + duration, + interest_per_lot, + interest_rate, + lot_size, + lots_low_limit, + lots_purchased, + lots_up_limit, + max_lots_per_user, + need_kyc, + project_id, + project_name, + status, + r#type, + with_area_limitation, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_lending_project_position_list_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_lending_project_position_list_get_200_response_inner.rs new file mode 100644 index 0000000..171d807 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_lending_project_position_list_get_200_response_inner.rs @@ -0,0 +1,75 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LendingProjectPositionListGet200ResponseInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "canTransfer")] + pub can_transfer: bool, + #[serde(rename = "createTimestamp")] + pub create_timestamp: i64, + #[serde(rename = "duration")] + pub duration: i64, + #[serde(rename = "endTime")] + pub end_time: i64, + #[serde(rename = "interest")] + pub interest: String, + #[serde(rename = "interestRate")] + pub interest_rate: String, + #[serde(rename = "lot")] + pub lot: i64, + #[serde(rename = "positionId")] + pub position_id: i64, + #[serde(rename = "principal")] + pub principal: String, + #[serde(rename = "projectId")] + pub project_id: String, + #[serde(rename = "projectName")] + pub project_name: String, + #[serde(rename = "purchaseTime")] + pub purchase_time: i64, + #[serde(rename = "redeemDate")] + pub redeem_date: String, + #[serde(rename = "startTime")] + pub start_time: i64, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "type")] + pub r#type: String, +} + +impl SapiV1LendingProjectPositionListGet200ResponseInner { + pub fn new(asset: String, can_transfer: bool, create_timestamp: i64, duration: i64, end_time: i64, interest: String, interest_rate: String, lot: i64, position_id: i64, principal: String, project_id: String, project_name: String, purchase_time: i64, redeem_date: String, start_time: i64, status: String, r#type: String) -> SapiV1LendingProjectPositionListGet200ResponseInner { + SapiV1LendingProjectPositionListGet200ResponseInner { + asset, + can_transfer, + create_timestamp, + duration, + end_time, + interest, + interest_rate, + lot, + position_id, + principal, + project_id, + project_name, + purchase_time, + redeem_date, + start_time, + status, + r#type, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_adjust_ltv_post_200_response.rs b/test_rust/src/models/_sapi_v1_loan_adjust_ltv_post_200_response.rs new file mode 100644 index 0000000..ba10152 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_adjust_ltv_post_200_response.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanAdjustLtvPost200Response { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "direction")] + pub direction: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "currentLTV")] + pub current_ltv: String, +} + +impl SapiV1LoanAdjustLtvPost200Response { + pub fn new(loan_coin: String, collateral_coin: String, direction: String, amount: String, current_ltv: String) -> SapiV1LoanAdjustLtvPost200Response { + SapiV1LoanAdjustLtvPost200Response { + loan_coin, + collateral_coin, + direction, + amount, + current_ltv, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_borrow_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_loan_borrow_history_get_200_response.rs new file mode 100644 index 0000000..7d88cad --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_borrow_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanBorrowHistoryGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1LoanBorrowHistoryGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1LoanBorrowHistoryGet200Response { + SapiV1LoanBorrowHistoryGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_borrow_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_loan_borrow_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..590ebc3 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_borrow_history_get_200_response_rows_inner.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanBorrowHistoryGet200ResponseRowsInner { + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "initialLoanAmount")] + pub initial_loan_amount: String, + #[serde(rename = "hourlyInterestRate")] + pub hourly_interest_rate: String, + #[serde(rename = "loanTerm")] + pub loan_term: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "initialCollateralAmount")] + pub initial_collateral_amount: String, + #[serde(rename = "borrowTime")] + pub borrow_time: i64, + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1LoanBorrowHistoryGet200ResponseRowsInner { + pub fn new(order_id: i64, loan_coin: String, initial_loan_amount: String, hourly_interest_rate: String, loan_term: String, collateral_coin: String, initial_collateral_amount: String, borrow_time: i64, status: String) -> SapiV1LoanBorrowHistoryGet200ResponseRowsInner { + SapiV1LoanBorrowHistoryGet200ResponseRowsInner { + order_id, + loan_coin, + initial_loan_amount, + hourly_interest_rate, + loan_term, + collateral_coin, + initial_collateral_amount, + borrow_time, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_borrow_post_200_response.rs b/test_rust/src/models/_sapi_v1_loan_borrow_post_200_response.rs new file mode 100644 index 0000000..32b7f73 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_borrow_post_200_response.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanBorrowPost200Response { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "loanAmount")] + pub loan_amount: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "collateralAmount")] + pub collateral_amount: String, + #[serde(rename = "hourlyInterestRate")] + pub hourly_interest_rate: String, + #[serde(rename = "orderId")] + pub order_id: String, +} + +impl SapiV1LoanBorrowPost200Response { + pub fn new(loan_coin: String, loan_amount: String, collateral_coin: String, collateral_amount: String, hourly_interest_rate: String, order_id: String) -> SapiV1LoanBorrowPost200Response { + SapiV1LoanBorrowPost200Response { + loan_coin, + loan_amount, + collateral_coin, + collateral_amount, + hourly_interest_rate, + order_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_collateral_data_get_200_response.rs b/test_rust/src/models/_sapi_v1_loan_collateral_data_get_200_response.rs new file mode 100644 index 0000000..e4204cc --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_collateral_data_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanCollateralDataGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1LoanCollateralDataGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1LoanCollateralDataGet200Response { + SapiV1LoanCollateralDataGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_collateral_data_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_loan_collateral_data_get_200_response_rows_inner.rs new file mode 100644 index 0000000..c2c85f5 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_collateral_data_get_200_response_rows_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanCollateralDataGet200ResponseRowsInner { + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "initialLTV")] + pub initial_ltv: String, + #[serde(rename = "marginCallLTV")] + pub margin_call_ltv: String, + #[serde(rename = "liquidationLTV")] + pub liquidation_ltv: String, + #[serde(rename = "maxLimit")] + pub max_limit: String, + #[serde(rename = "vipLevel")] + pub vip_level: i32, +} + +impl SapiV1LoanCollateralDataGet200ResponseRowsInner { + pub fn new(collateral_coin: String, initial_ltv: String, margin_call_ltv: String, liquidation_ltv: String, max_limit: String, vip_level: i32) -> SapiV1LoanCollateralDataGet200ResponseRowsInner { + SapiV1LoanCollateralDataGet200ResponseRowsInner { + collateral_coin, + initial_ltv, + margin_call_ltv, + liquidation_ltv, + max_limit, + vip_level, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_customize_margin_call_post_200_response.rs b/test_rust/src/models/_sapi_v1_loan_customize_margin_call_post_200_response.rs new file mode 100644 index 0000000..6803270 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_customize_margin_call_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanCustomizeMarginCallPost200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1LoanCustomizeMarginCallPost200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1LoanCustomizeMarginCallPost200Response { + SapiV1LoanCustomizeMarginCallPost200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_customize_margin_call_post_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_loan_customize_margin_call_post_200_response_rows_inner.rs new file mode 100644 index 0000000..4dec0dc --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_customize_margin_call_post_200_response_rows_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner { + #[serde(rename = "orderId")] + pub order_id: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "preMarginCall")] + pub pre_margin_call: String, + #[serde(rename = "afterMarginCall")] + pub after_margin_call: String, + #[serde(rename = "customizeTime")] + pub customize_time: i64, +} + +impl SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner { + pub fn new(order_id: String, collateral_coin: String, pre_margin_call: String, after_margin_call: String, customize_time: i64) -> SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner { + SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner { + order_id, + collateral_coin, + pre_margin_call, + after_margin_call, + customize_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_income_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_loan_income_get_200_response_inner.rs new file mode 100644 index 0000000..ccecd2d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_income_get_200_response_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanIncomeGet200ResponseInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "timestamp")] + pub timestamp: i64, + #[serde(rename = "tranId")] + pub tran_id: String, +} + +impl SapiV1LoanIncomeGet200ResponseInner { + pub fn new(asset: String, r#type: String, amount: String, timestamp: i64, tran_id: String) -> SapiV1LoanIncomeGet200ResponseInner { + SapiV1LoanIncomeGet200ResponseInner { + asset, + r#type, + amount, + timestamp, + tran_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_loanable_data_get_200_response.rs b/test_rust/src/models/_sapi_v1_loan_loanable_data_get_200_response.rs new file mode 100644 index 0000000..d8dbf82 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_loanable_data_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanLoanableDataGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1LoanLoanableDataGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1LoanLoanableDataGet200Response { + SapiV1LoanLoanableDataGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_loanable_data_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_loan_loanable_data_get_200_response_rows_inner.rs new file mode 100644 index 0000000..a34fd20 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_loanable_data_get_200_response_rows_inner.rs @@ -0,0 +1,66 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanLoanableDataGet200ResponseRowsInner { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "_7dHourlyInterestRate")] + pub _7d_hourly_interest_rate: String, + #[serde(rename = "_7dDailyInterestRate")] + pub _7d_daily_interest_rate: String, + #[serde(rename = "_14dHourlyInterestRate")] + pub _14d_hourly_interest_rate: String, + #[serde(rename = "_14dDailyInterestRate")] + pub _14d_daily_interest_rate: String, + #[serde(rename = "_30dHourlyInterestRate")] + pub _30d_hourly_interest_rate: String, + #[serde(rename = "_30dDailyInterestRate")] + pub _30d_daily_interest_rate: String, + #[serde(rename = "_90dHourlyInterestRate")] + pub _90d_hourly_interest_rate: String, + #[serde(rename = "_90dDailyInterestRate")] + pub _90d_daily_interest_rate: String, + #[serde(rename = "_180dHourlyInterestRate")] + pub _180d_hourly_interest_rate: String, + #[serde(rename = "_180dDailyInterestRate")] + pub _180d_daily_interest_rate: String, + #[serde(rename = "minLimit")] + pub min_limit: String, + #[serde(rename = "maxLimit")] + pub max_limit: String, + #[serde(rename = "vipLevel")] + pub vip_level: i32, +} + +impl SapiV1LoanLoanableDataGet200ResponseRowsInner { + pub fn new(loan_coin: String, _7d_hourly_interest_rate: String, _7d_daily_interest_rate: String, _14d_hourly_interest_rate: String, _14d_daily_interest_rate: String, _30d_hourly_interest_rate: String, _30d_daily_interest_rate: String, _90d_hourly_interest_rate: String, _90d_daily_interest_rate: String, _180d_hourly_interest_rate: String, _180d_daily_interest_rate: String, min_limit: String, max_limit: String, vip_level: i32) -> SapiV1LoanLoanableDataGet200ResponseRowsInner { + SapiV1LoanLoanableDataGet200ResponseRowsInner { + loan_coin, + _7d_hourly_interest_rate, + _7d_daily_interest_rate, + _14d_hourly_interest_rate, + _14d_daily_interest_rate, + _30d_hourly_interest_rate, + _30d_daily_interest_rate, + _90d_hourly_interest_rate, + _90d_daily_interest_rate, + _180d_hourly_interest_rate, + _180d_daily_interest_rate, + min_limit, + max_limit, + vip_level, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_ltv_adjustment_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_loan_ltv_adjustment_history_get_200_response.rs new file mode 100644 index 0000000..2d67577 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_ltv_adjustment_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanLtvAdjustmentHistoryGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1LoanLtvAdjustmentHistoryGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1LoanLtvAdjustmentHistoryGet200Response { + SapiV1LoanLtvAdjustmentHistoryGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_ltv_adjustment_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_loan_ltv_adjustment_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..65a94d3 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_ltv_adjustment_history_get_200_response_rows_inner.rs @@ -0,0 +1,48 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "direction")] + pub direction: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "preLTV")] + pub pre_ltv: String, + #[serde(rename = "afterLTV")] + pub after_ltv: String, + #[serde(rename = "adjustTime")] + pub adjust_time: i64, + #[serde(rename = "orderId")] + pub order_id: i64, +} + +impl SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner { + pub fn new(loan_coin: String, collateral_coin: String, direction: String, amount: String, pre_ltv: String, after_ltv: String, adjust_time: i64, order_id: i64) -> SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner { + SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner { + loan_coin, + collateral_coin, + direction, + amount, + pre_ltv, + after_ltv, + adjust_time, + order_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_ongoing_orders_get_200_response.rs b/test_rust/src/models/_sapi_v1_loan_ongoing_orders_get_200_response.rs new file mode 100644 index 0000000..34009e2 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_ongoing_orders_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanOngoingOrdersGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1LoanOngoingOrdersGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1LoanOngoingOrdersGet200Response { + SapiV1LoanOngoingOrdersGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_ongoing_orders_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_loan_ongoing_orders_get_200_response_rows_inner.rs new file mode 100644 index 0000000..cd26cfe --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_ongoing_orders_get_200_response_rows_inner.rs @@ -0,0 +1,48 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanOngoingOrdersGet200ResponseRowsInner { + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "totalDebt")] + pub total_debt: String, + #[serde(rename = "residualInterest")] + pub residual_interest: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "collateralAmount")] + pub collateral_amount: String, + #[serde(rename = "currentLTV")] + pub current_ltv: String, + #[serde(rename = "expirationTime")] + pub expiration_time: i64, +} + +impl SapiV1LoanOngoingOrdersGet200ResponseRowsInner { + pub fn new(order_id: i64, loan_coin: String, total_debt: String, residual_interest: String, collateral_coin: String, collateral_amount: String, current_ltv: String, expiration_time: i64) -> SapiV1LoanOngoingOrdersGet200ResponseRowsInner { + SapiV1LoanOngoingOrdersGet200ResponseRowsInner { + order_id, + loan_coin, + total_debt, + residual_interest, + collateral_coin, + collateral_amount, + current_ltv, + expiration_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_repay_collateral_rate_get_200_response.rs b/test_rust/src/models/_sapi_v1_loan_repay_collateral_rate_get_200_response.rs new file mode 100644 index 0000000..d426f05 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_repay_collateral_rate_get_200_response.rs @@ -0,0 +1,37 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanRepayCollateralRateGet200Response { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "repayAmount")] + pub repay_amount: String, + /// rate of collateral coin/loan coin + #[serde(rename = "rate")] + pub rate: String, +} + +impl SapiV1LoanRepayCollateralRateGet200Response { + pub fn new(loan_coin: String, collateral_coin: String, repay_amount: String, rate: String) -> SapiV1LoanRepayCollateralRateGet200Response { + SapiV1LoanRepayCollateralRateGet200Response { + loan_coin, + collateral_coin, + repay_amount, + rate, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_repay_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_loan_repay_history_get_200_response.rs new file mode 100644 index 0000000..5c15060 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_repay_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanRepayHistoryGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1LoanRepayHistoryGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1LoanRepayHistoryGet200Response { + SapiV1LoanRepayHistoryGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_repay_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_loan_repay_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..b65465d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_repay_history_get_200_response_rows_inner.rs @@ -0,0 +1,52 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanRepayHistoryGet200ResponseRowsInner { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "repayAmount")] + pub repay_amount: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "collateralUsed")] + pub collateral_used: String, + #[serde(rename = "collateralReturn")] + pub collateral_return: String, + #[serde(rename = "repayType")] + pub repay_type: String, + /// 'repayType': '1' // 1 for 'repay with borrowed coin', 2 for 'repay with collateral' 'repayStatus': 'Repaid' // Repaid, Repaying, Failed + #[serde(rename = "repayStatus")] + pub repay_status: String, + #[serde(rename = "repayTime")] + pub repay_time: i64, + #[serde(rename = "orderId")] + pub order_id: i64, +} + +impl SapiV1LoanRepayHistoryGet200ResponseRowsInner { + pub fn new(loan_coin: String, repay_amount: String, collateral_coin: String, collateral_used: String, collateral_return: String, repay_type: String, repay_status: String, repay_time: i64, order_id: i64) -> SapiV1LoanRepayHistoryGet200ResponseRowsInner { + SapiV1LoanRepayHistoryGet200ResponseRowsInner { + loan_coin, + repay_amount, + collateral_coin, + collateral_used, + collateral_return, + repay_type, + repay_status, + repay_time, + order_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_repay_post_200_response.rs b/test_rust/src/models/_sapi_v1_loan_repay_post_200_response.rs new file mode 100644 index 0000000..3300a06 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_repay_post_200_response.rs @@ -0,0 +1,26 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1LoanRepayPost200Response { + RepaymentInfo(Box), + RepaymentInfo2(Box), +} + +impl Default for SapiV1LoanRepayPost200Response { + fn default() -> Self { + Self::RepaymentInfo(Default::default()) + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_borrow_post_200_response.rs b/test_rust/src/models/_sapi_v1_loan_vip_borrow_post_200_response.rs new file mode 100644 index 0000000..aca8b4f --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_borrow_post_200_response.rs @@ -0,0 +1,48 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipBorrowPost200Response { + #[serde(rename = "loanAccountId")] + pub loan_account_id: String, + #[serde(rename = "requestId")] + pub request_id: String, + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "isFlexibleRate")] + pub is_flexible_rate: String, + #[serde(rename = "loanAmount")] + pub loan_amount: String, + #[serde(rename = "collateralAccountId")] + pub collateral_account_id: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "loanTerm", skip_serializing_if = "Option::is_none")] + pub loan_term: Option, +} + +impl SapiV1LoanVipBorrowPost200Response { + pub fn new(loan_account_id: String, request_id: String, loan_coin: String, is_flexible_rate: String, loan_amount: String, collateral_account_id: String, collateral_coin: String) -> SapiV1LoanVipBorrowPost200Response { + SapiV1LoanVipBorrowPost200Response { + loan_account_id, + request_id, + loan_coin, + is_flexible_rate, + loan_amount, + collateral_account_id, + collateral_coin, + loan_term: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_collateral_account_get_200_response.rs b/test_rust/src/models/_sapi_v1_loan_vip_collateral_account_get_200_response.rs new file mode 100644 index 0000000..6d79082 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_collateral_account_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipCollateralAccountGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1LoanVipCollateralAccountGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1LoanVipCollateralAccountGet200Response { + SapiV1LoanVipCollateralAccountGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_collateral_account_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_loan_vip_collateral_account_get_200_response_rows_inner.rs new file mode 100644 index 0000000..602e287 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_collateral_account_get_200_response_rows_inner.rs @@ -0,0 +1,34 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipCollateralAccountGet200ResponseRowsInner { + #[serde(rename = "collateralAccountId")] + pub collateral_account_id: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + /// locked collateral value shown in USD value + #[serde(rename = "collateralValue")] + pub collateral_value: String, +} + +impl SapiV1LoanVipCollateralAccountGet200ResponseRowsInner { + pub fn new(collateral_account_id: String, collateral_coin: String, collateral_value: String) -> SapiV1LoanVipCollateralAccountGet200ResponseRowsInner { + SapiV1LoanVipCollateralAccountGet200ResponseRowsInner { + collateral_account_id, + collateral_coin, + collateral_value, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_collateral_data_get_200_response.rs b/test_rust/src/models/_sapi_v1_loan_vip_collateral_data_get_200_response.rs new file mode 100644 index 0000000..8e671cd --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_collateral_data_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipCollateralDataGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1LoanVipCollateralDataGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1LoanVipCollateralDataGet200Response { + SapiV1LoanVipCollateralDataGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_collateral_data_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_loan_vip_collateral_data_get_200_response_rows_inner.rs new file mode 100644 index 0000000..160ea40 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_collateral_data_get_200_response_rows_inner.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipCollateralDataGet200ResponseRowsInner { + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "_1stCollateralRatio")] + pub _1st_collateral_ratio: String, + #[serde(rename = "_1stCollateralRange")] + pub _1st_collateral_range: String, + #[serde(rename = "_2ndCollateralRatio")] + pub _2nd_collateral_ratio: String, + #[serde(rename = "_2ndCollateralRange")] + pub _2nd_collateral_range: String, + #[serde(rename = "_3rdCollateralRatio")] + pub _3rd_collateral_ratio: String, + #[serde(rename = "_3rdCollateralRange")] + pub _3rd_collateral_range: String, + #[serde(rename = "_4thCollateralRatio")] + pub _4th_collateral_ratio: String, + #[serde(rename = "_4thCollateralRange")] + pub _4th_collateral_range: String, +} + +impl SapiV1LoanVipCollateralDataGet200ResponseRowsInner { + pub fn new(collateral_coin: String, _1st_collateral_ratio: String, _1st_collateral_range: String, _2nd_collateral_ratio: String, _2nd_collateral_range: String, _3rd_collateral_ratio: String, _3rd_collateral_range: String, _4th_collateral_ratio: String, _4th_collateral_range: String) -> SapiV1LoanVipCollateralDataGet200ResponseRowsInner { + SapiV1LoanVipCollateralDataGet200ResponseRowsInner { + collateral_coin, + _1st_collateral_ratio, + _1st_collateral_range, + _2nd_collateral_ratio, + _2nd_collateral_range, + _3rd_collateral_ratio, + _3rd_collateral_range, + _4th_collateral_ratio, + _4th_collateral_range, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_loanable_data_get_200_response.rs b/test_rust/src/models/_sapi_v1_loan_vip_loanable_data_get_200_response.rs new file mode 100644 index 0000000..70788ee --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_loanable_data_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipLoanableDataGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "rows")] + pub rows: Vec, +} + +impl SapiV1LoanVipLoanableDataGet200Response { + pub fn new(total: i32, rows: Vec) -> SapiV1LoanVipLoanableDataGet200Response { + SapiV1LoanVipLoanableDataGet200Response { + total, + rows, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_loanable_data_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_loan_vip_loanable_data_get_200_response_rows_inner.rs new file mode 100644 index 0000000..63e776a --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_loanable_data_get_200_response_rows_inner.rs @@ -0,0 +1,54 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipLoanableDataGet200ResponseRowsInner { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "_flexibleDailyInterestRate")] + pub _flexible_daily_interest_rate: String, + #[serde(rename = "_flexibleYearlyInterestRate")] + pub _flexible_yearly_interest_rate: String, + #[serde(rename = "_30dDailyInterestRate")] + pub _30d_daily_interest_rate: String, + #[serde(rename = "_30dYearlyInterestRate")] + pub _30d_yearly_interest_rate: String, + #[serde(rename = "_60dDailyInterestRate")] + pub _60d_daily_interest_rate: String, + #[serde(rename = "_60dYearlyInterestRate")] + pub _60d_yearly_interest_rate: String, + #[serde(rename = "minLimit")] + pub min_limit: String, + #[serde(rename = "maxLimit")] + pub max_limit: String, + #[serde(rename = "vipLevel")] + pub vip_level: i32, +} + +impl SapiV1LoanVipLoanableDataGet200ResponseRowsInner { + pub fn new(loan_coin: String, _flexible_daily_interest_rate: String, _flexible_yearly_interest_rate: String, _30d_daily_interest_rate: String, _30d_yearly_interest_rate: String, _60d_daily_interest_rate: String, _60d_yearly_interest_rate: String, min_limit: String, max_limit: String, vip_level: i32) -> SapiV1LoanVipLoanableDataGet200ResponseRowsInner { + SapiV1LoanVipLoanableDataGet200ResponseRowsInner { + loan_coin, + _flexible_daily_interest_rate, + _flexible_yearly_interest_rate, + _30d_daily_interest_rate, + _30d_yearly_interest_rate, + _60d_daily_interest_rate, + _60d_yearly_interest_rate, + min_limit, + max_limit, + vip_level, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_ongoing_orders_get_200_response.rs b/test_rust/src/models/_sapi_v1_loan_vip_ongoing_orders_get_200_response.rs new file mode 100644 index 0000000..96b2d22 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_ongoing_orders_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipOngoingOrdersGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1LoanVipOngoingOrdersGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1LoanVipOngoingOrdersGet200Response { + SapiV1LoanVipOngoingOrdersGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_ongoing_orders_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_loan_vip_ongoing_orders_get_200_response_rows_inner.rs new file mode 100644 index 0000000..75d2a54 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_ongoing_orders_get_200_response_rows_inner.rs @@ -0,0 +1,67 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner { + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "totalDebt")] + pub total_debt: String, + #[serde(rename = "residualInterest")] + pub residual_interest: String, + #[serde(rename = "collateralAccountId")] + pub collateral_account_id: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + /// locked collateral value shown in USD value + #[serde(rename = "collateralValue")] + pub collateral_value: String, + #[serde(rename = "totalCollateralValueAfterHaircut", skip_serializing_if = "Option::is_none")] + pub total_collateral_value_after_haircut: Option, + #[serde(rename = "lockedCollateralValue", skip_serializing_if = "Option::is_none")] + pub locked_collateral_value: Option, + #[serde(rename = "currentLTV")] + pub current_ltv: String, + #[serde(rename = "expirationTime")] + pub expiration_time: i64, + #[serde(rename = "loanDate")] + pub loan_date: String, + #[serde(rename = "loanRate")] + pub loan_rate: String, + #[serde(rename = "loanTerm")] + pub loan_term: String, +} + +impl SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner { + pub fn new(order_id: i64, loan_coin: String, total_debt: String, residual_interest: String, collateral_account_id: String, collateral_coin: String, collateral_value: String, current_ltv: String, expiration_time: i64, loan_date: String, loan_rate: String, loan_term: String) -> SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner { + SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner { + order_id, + loan_coin, + total_debt, + residual_interest, + collateral_account_id, + collateral_coin, + collateral_value, + total_collateral_value_after_haircut: None, + locked_collateral_value: None, + current_ltv, + expiration_time, + loan_date, + loan_rate, + loan_term, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_renew_post_200_response.rs b/test_rust/src/models/_sapi_v1_loan_vip_renew_post_200_response.rs new file mode 100644 index 0000000..542f5e8 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_renew_post_200_response.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipRenewPost200Response { + #[serde(rename = "loanAccountId")] + pub loan_account_id: String, + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "loanAmount")] + pub loan_amount: String, + #[serde(rename = "collateralAccountId")] + pub collateral_account_id: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "loanTerm")] + pub loan_term: String, +} + +impl SapiV1LoanVipRenewPost200Response { + pub fn new(loan_account_id: String, loan_coin: String, loan_amount: String, collateral_account_id: String, collateral_coin: String, loan_term: String) -> SapiV1LoanVipRenewPost200Response { + SapiV1LoanVipRenewPost200Response { + loan_account_id, + loan_coin, + loan_amount, + collateral_account_id, + collateral_coin, + loan_term, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_repay_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_loan_vip_repay_history_get_200_response.rs new file mode 100644 index 0000000..066a93f --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_repay_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipRepayHistoryGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1LoanVipRepayHistoryGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1LoanVipRepayHistoryGet200Response { + SapiV1LoanVipRepayHistoryGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_repay_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_loan_vip_repay_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..0245de3 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_repay_history_get_200_response_rows_inner.rs @@ -0,0 +1,43 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipRepayHistoryGet200ResponseRowsInner { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "repayAmount")] + pub repay_amount: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + /// Repaid, Repaying, Failed + #[serde(rename = "repayStatus")] + pub repay_status: String, + #[serde(rename = "repayTime")] + pub repay_time: String, + #[serde(rename = "orderId")] + pub order_id: String, +} + +impl SapiV1LoanVipRepayHistoryGet200ResponseRowsInner { + pub fn new(loan_coin: String, repay_amount: String, collateral_coin: String, repay_status: String, repay_time: String, order_id: String) -> SapiV1LoanVipRepayHistoryGet200ResponseRowsInner { + SapiV1LoanVipRepayHistoryGet200ResponseRowsInner { + loan_coin, + repay_amount, + collateral_coin, + repay_status, + repay_time, + order_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_repay_post_200_response.rs b/test_rust/src/models/_sapi_v1_loan_vip_repay_post_200_response.rs new file mode 100644 index 0000000..08e0262 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_repay_post_200_response.rs @@ -0,0 +1,46 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipRepayPost200Response { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "repayAmount")] + pub repay_amount: String, + #[serde(rename = "remainingPrincipal")] + pub remaining_principal: String, + #[serde(rename = "remainingInterest")] + pub remaining_interest: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "currentLTV")] + pub current_ltv: String, + /// Repaid, Repaying, Failed + #[serde(rename = "repayStatus")] + pub repay_status: String, +} + +impl SapiV1LoanVipRepayPost200Response { + pub fn new(loan_coin: String, repay_amount: String, remaining_principal: String, remaining_interest: String, collateral_coin: String, current_ltv: String, repay_status: String) -> SapiV1LoanVipRepayPost200Response { + SapiV1LoanVipRepayPost200Response { + loan_coin, + repay_amount, + remaining_principal, + remaining_interest, + collateral_coin, + current_ltv, + repay_status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_request_data_get_200_response.rs b/test_rust/src/models/_sapi_v1_loan_vip_request_data_get_200_response.rs new file mode 100644 index 0000000..fe5658a --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_request_data_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipRequestDataGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "rows")] + pub rows: Vec, +} + +impl SapiV1LoanVipRequestDataGet200Response { + pub fn new(total: i32, rows: Vec) -> SapiV1LoanVipRequestDataGet200Response { + SapiV1LoanVipRequestDataGet200Response { + total, + rows, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_request_data_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_loan_vip_request_data_get_200_response_rows_inner.rs new file mode 100644 index 0000000..fd21773 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_request_data_get_200_response_rows_inner.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipRequestDataGet200ResponseRowsInner { + #[serde(rename = "loanAccountId")] + pub loan_account_id: String, + #[serde(rename = "orderId")] + pub order_id: String, + #[serde(rename = "requestId")] + pub request_id: String, + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "loanAmount")] + pub loan_amount: String, + #[serde(rename = "collateralAccountId")] + pub collateral_account_id: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "loanTerm")] + pub loan_term: i32, + #[serde(rename = "status")] + pub status: i32, +} + +impl SapiV1LoanVipRequestDataGet200ResponseRowsInner { + pub fn new(loan_account_id: String, order_id: String, request_id: String, loan_coin: String, loan_amount: String, collateral_account_id: String, collateral_coin: String, loan_term: i32, status: i32) -> SapiV1LoanVipRequestDataGet200ResponseRowsInner { + SapiV1LoanVipRequestDataGet200ResponseRowsInner { + loan_account_id, + order_id, + request_id, + loan_coin, + loan_amount, + collateral_account_id, + collateral_coin, + loan_term, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_loan_vip_request_interest_rate_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_loan_vip_request_interest_rate_get_200_response_inner.rs new file mode 100644 index 0000000..6875bc1 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_loan_vip_request_interest_rate_get_200_response_inner.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1LoanVipRequestInterestRateGet200ResponseInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "flexibleDailyInterestRate")] + pub flexible_daily_interest_rate: String, + #[serde(rename = "flexibleYearlyInterestRate")] + pub flexible_yearly_interest_rate: String, + #[serde(rename = "time")] + pub time: i64, +} + +impl SapiV1LoanVipRequestInterestRateGet200ResponseInner { + pub fn new(asset: String, flexible_daily_interest_rate: String, flexible_yearly_interest_rate: String, time: i64) -> SapiV1LoanVipRequestInterestRateGet200ResponseInner { + SapiV1LoanVipRequestInterestRateGet200ResponseInner { + asset, + flexible_daily_interest_rate, + flexible_yearly_interest_rate, + time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response.rs new file mode 100644 index 0000000..30e9229 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountAccountSnapshotGet200Response { + #[serde(rename = "code")] + pub code: i32, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "snapshotVos")] + pub snapshot_vos: Vec, +} + +impl SapiV1ManagedSubaccountAccountSnapshotGet200Response { + pub fn new(code: i32, msg: String, snapshot_vos: Vec) -> SapiV1ManagedSubaccountAccountSnapshotGet200Response { + SapiV1ManagedSubaccountAccountSnapshotGet200Response { + code, + msg, + snapshot_vos, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner.rs new file mode 100644 index 0000000..f65452c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner { + #[serde(rename = "data")] + pub data: Box, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "updateTime")] + pub update_time: i64, +} + +impl SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner { + pub fn new(data: models::SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData, r#type: String, update_time: i64) -> SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner { + SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner { + data: Box::new(data), + r#type, + update_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data.rs new file mode 100644 index 0000000..330eb1d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData { + #[serde(rename = "balances")] + pub balances: Vec, + #[serde(rename = "totalAssetOfBtc")] + pub total_asset_of_btc: String, +} + +impl SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData { + pub fn new(balances: Vec, total_asset_of_btc: String) -> SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData { + SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData { + balances, + total_asset_of_btc, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data_balances_inner.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data_balances_inner.rs new file mode 100644 index 0000000..eca05b6 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data_balances_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "free")] + pub free: String, + #[serde(rename = "locked")] + pub locked: String, +} + +impl SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner { + pub fn new(asset: String, free: String, locked: String) -> SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner { + SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner { + asset, + free, + locked, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_asset_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_asset_get_200_response_inner.rs new file mode 100644 index 0000000..b78274b --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_asset_get_200_response_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountAssetGet200ResponseInner { + #[serde(rename = "coin")] + pub coin: String, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "totalBalance")] + pub total_balance: String, + #[serde(rename = "availableBalance")] + pub available_balance: String, + #[serde(rename = "inOrder")] + pub in_order: String, + #[serde(rename = "btcValue")] + pub btc_value: String, +} + +impl SapiV1ManagedSubaccountAssetGet200ResponseInner { + pub fn new(coin: String, name: String, total_balance: String, available_balance: String, in_order: String, btc_value: String) -> SapiV1ManagedSubaccountAssetGet200ResponseInner { + SapiV1ManagedSubaccountAssetGet200ResponseInner { + coin, + name, + total_balance, + available_balance, + in_order, + btc_value, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_deposit_address_get_200_response.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_deposit_address_get_200_response.rs new file mode 100644 index 0000000..fd08624 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_deposit_address_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountDepositAddressGet200Response { + #[serde(rename = "coin")] + pub coin: String, + #[serde(rename = "address")] + pub address: String, + #[serde(rename = "tag")] + pub tag: String, + #[serde(rename = "url")] + pub url: String, +} + +impl SapiV1ManagedSubaccountDepositAddressGet200Response { + pub fn new(coin: String, address: String, tag: String, url: String) -> SapiV1ManagedSubaccountDepositAddressGet200Response { + SapiV1ManagedSubaccountDepositAddressGet200Response { + coin, + address, + tag, + url, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_deposit_post_200_response.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_deposit_post_200_response.rs new file mode 100644 index 0000000..02aa6d9 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_deposit_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountDepositPost200Response { + #[serde(rename = "tranId")] + pub tran_id: i64, +} + +impl SapiV1ManagedSubaccountDepositPost200Response { + pub fn new(tran_id: i64) -> SapiV1ManagedSubaccountDepositPost200Response { + SapiV1ManagedSubaccountDepositPost200Response { + tran_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response.rs new file mode 100644 index 0000000..9bcb20c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountFetchFutureAssetGet200Response { + #[serde(rename = "code")] + pub code: i32, + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "snapshotVos")] + pub snapshot_vos: Vec, +} + +impl SapiV1ManagedSubaccountFetchFutureAssetGet200Response { + pub fn new(code: i32, message: String, snapshot_vos: Vec) -> SapiV1ManagedSubaccountFetchFutureAssetGet200Response { + SapiV1ManagedSubaccountFetchFutureAssetGet200Response { + code, + message, + snapshot_vos, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner.rs new file mode 100644 index 0000000..951ba0a --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner { + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "updateTime")] + pub update_time: i64, + #[serde(rename = "data")] + pub data: Box, +} + +impl SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner { + pub fn new(r#type: String, update_time: i64, data: models::SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData) -> SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner { + SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner { + r#type, + update_time, + data: Box::new(data), + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data.rs new file mode 100644 index 0000000..67c5e5e --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData { + #[serde(rename = "assets")] + pub assets: Vec, + #[serde(rename = "position")] + pub position: Vec, +} + +impl SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData { + pub fn new(assets: Vec, position: Vec) -> SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData { + SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData { + assets, + position, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_assets_inner.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_assets_inner.rs new file mode 100644 index 0000000..54e7792 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_assets_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "marginBalance")] + pub margin_balance: f32, + #[serde(rename = "walletBalance")] + pub wallet_balance: f32, +} + +impl SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner { + pub fn new(asset: String, margin_balance: f32, wallet_balance: f32) -> SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner { + SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner { + asset, + margin_balance, + wallet_balance, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_position_inner.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_position_inner.rs new file mode 100644 index 0000000..11a5e9d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_position_inner.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "entryPrice")] + pub entry_price: f32, + #[serde(rename = "markPrice")] + pub mark_price: f32, + #[serde(rename = "positionAmt")] + pub position_amt: f32, +} + +impl SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner { + pub fn new(symbol: String, entry_price: f32, mark_price: f32, position_amt: f32) -> SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner { + SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner { + symbol, + entry_price, + mark_price, + position_amt, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_info_get_200_response.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_info_get_200_response.rs new file mode 100644 index 0000000..3012123 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_info_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountInfoGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "managerSubUserInfoVoList")] + pub manager_sub_user_info_vo_list: Vec, +} + +impl SapiV1ManagedSubaccountInfoGet200Response { + pub fn new(total: i32, manager_sub_user_info_vo_list: Vec) -> SapiV1ManagedSubaccountInfoGet200Response { + SapiV1ManagedSubaccountInfoGet200Response { + total, + manager_sub_user_info_vo_list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_info_get_200_response_manager_sub_user_info_vo_list_inner.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_info_get_200_response_manager_sub_user_info_vo_list_inner.rs new file mode 100644 index 0000000..40fccf2 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_info_get_200_response_manager_sub_user_info_vo_list_inner.rs @@ -0,0 +1,57 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner { + #[serde(rename = "rootUserId")] + pub root_user_id: i64, + #[serde(rename = "managersubUserId")] + pub managersub_user_id: i64, + #[serde(rename = "bindParentUserId")] + pub bind_parent_user_id: i64, + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "insertTimeStamp")] + pub insert_time_stamp: i64, + #[serde(rename = "bindParentEmail")] + pub bind_parent_email: String, + #[serde(rename = "isSubUserEnabled")] + pub is_sub_user_enabled: bool, + #[serde(rename = "isUserActive")] + pub is_user_active: bool, + #[serde(rename = "isMarginEnabled")] + pub is_margin_enabled: bool, + #[serde(rename = "isFutureEnabled")] + pub is_future_enabled: bool, + #[serde(rename = "isSignedLVTRiskAgreement")] + pub is_signed_lvt_risk_agreement: bool, +} + +impl SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner { + pub fn new(root_user_id: i64, managersub_user_id: i64, bind_parent_user_id: i64, insert_time_stamp: i64, bind_parent_email: String, is_sub_user_enabled: bool, is_user_active: bool, is_margin_enabled: bool, is_future_enabled: bool, is_signed_lvt_risk_agreement: bool) -> SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner { + SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner { + root_user_id, + managersub_user_id, + bind_parent_user_id, + email: None, + insert_time_stamp, + bind_parent_email, + is_sub_user_enabled, + is_user_active, + is_margin_enabled, + is_future_enabled, + is_signed_lvt_risk_agreement, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_margin_asset_get_200_response.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_margin_asset_get_200_response.rs new file mode 100644 index 0000000..d9634ea --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_margin_asset_get_200_response.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountMarginAssetGet200Response { + #[serde(rename = "marginLevel")] + pub margin_level: String, + #[serde(rename = "totalAssetOfBtc")] + pub total_asset_of_btc: String, + #[serde(rename = "totalLiabilityOfBtc")] + pub total_liability_of_btc: String, + #[serde(rename = "totalNetAssetOfBtc")] + pub total_net_asset_of_btc: String, + #[serde(rename = "userAssets")] + pub user_assets: Vec, +} + +impl SapiV1ManagedSubaccountMarginAssetGet200Response { + pub fn new(margin_level: String, total_asset_of_btc: String, total_liability_of_btc: String, total_net_asset_of_btc: String, user_assets: Vec) -> SapiV1ManagedSubaccountMarginAssetGet200Response { + SapiV1ManagedSubaccountMarginAssetGet200Response { + margin_level, + total_asset_of_btc, + total_liability_of_btc, + total_net_asset_of_btc, + user_assets, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_margin_asset_get_200_response_user_assets_inner.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_margin_asset_get_200_response_user_assets_inner.rs new file mode 100644 index 0000000..5e833a3 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_margin_asset_get_200_response_user_assets_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "borrowed")] + pub borrowed: String, + #[serde(rename = "free")] + pub free: String, + #[serde(rename = "interest")] + pub interest: String, + #[serde(rename = "locked")] + pub locked: String, + #[serde(rename = "netAsset")] + pub net_asset: String, +} + +impl SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner { + pub fn new(asset: String, borrowed: String, free: String, interest: String, locked: String, net_asset: String) -> SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner { + SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner { + asset, + borrowed, + free, + interest, + locked, + net_asset, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response.rs new file mode 100644 index 0000000..cf42b05 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response { + #[serde(rename = "count")] + pub count: i32, + #[serde(rename = "managerSubTransferHistoryVos")] + pub manager_sub_transfer_history_vos: Vec, +} + +impl SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response { + pub fn new(count: i32, manager_sub_transfer_history_vos: Vec) -> SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response { + SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response { + count, + manager_sub_transfer_history_vos, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response_manager_sub_transfer_history_vos_inner.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response_manager_sub_transfer_history_vos_inner.rs new file mode 100644 index 0000000..f618f11 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response_manager_sub_transfer_history_vos_inner.rs @@ -0,0 +1,54 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner { + #[serde(rename = "fromEmail")] + pub from_email: String, + #[serde(rename = "fromAccountType")] + pub from_account_type: String, + #[serde(rename = "toEmail")] + pub to_email: String, + #[serde(rename = "toAccountType")] + pub to_account_type: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "scheduledData")] + pub scheduled_data: i64, + #[serde(rename = "createTime")] + pub create_time: i64, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "tranId")] + pub tran_id: i32, +} + +impl SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner { + pub fn new(from_email: String, from_account_type: String, to_email: String, to_account_type: String, asset: String, amount: String, scheduled_data: i64, create_time: i64, status: String, tran_id: i32) -> SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner { + SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner { + from_email, + from_account_type, + to_email, + to_account_type, + asset, + amount, + scheduled_data, + create_time, + status, + tran_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_get_200_response.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_get_200_response.rs new file mode 100644 index 0000000..7a28cd0 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountQueryTransLogGet200Response { + #[serde(rename = "count")] + pub count: i32, + #[serde(rename = "managerSubTransferHistoryVos")] + pub manager_sub_transfer_history_vos: Vec, +} + +impl SapiV1ManagedSubaccountQueryTransLogGet200Response { + pub fn new(count: i32, manager_sub_transfer_history_vos: Vec) -> SapiV1ManagedSubaccountQueryTransLogGet200Response { + SapiV1ManagedSubaccountQueryTransLogGet200Response { + count, + manager_sub_transfer_history_vos, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_get_200_response_manager_sub_transfer_history_vos_inner.rs b/test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_get_200_response_manager_sub_transfer_history_vos_inner.rs new file mode 100644 index 0000000..6c26660 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_managed_subaccount_query_trans_log_get_200_response_manager_sub_transfer_history_vos_inner.rs @@ -0,0 +1,54 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner { + #[serde(rename = "fromEmail")] + pub from_email: String, + #[serde(rename = "fromAccountType")] + pub from_account_type: String, + #[serde(rename = "toEmail")] + pub to_email: String, + #[serde(rename = "toAccountType")] + pub to_account_type: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "scheduledData")] + pub scheduled_data: i64, + #[serde(rename = "createTime")] + pub create_time: i64, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "tranId")] + pub tran_id: i64, +} + +impl SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner { + pub fn new(from_email: String, from_account_type: String, to_email: String, to_account_type: String, asset: String, amount: String, scheduled_data: i64, create_time: i64, status: String, tran_id: i64) -> SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner { + SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner { + from_email, + from_account_type, + to_email, + to_account_type, + asset, + amount, + scheduled_data, + create_time, + status, + tran_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_account_get_200_response.rs b/test_rust/src/models/_sapi_v1_margin_account_get_200_response.rs new file mode 100644 index 0000000..992abcb --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_account_get_200_response.rs @@ -0,0 +1,48 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginAccountGet200Response { + #[serde(rename = "borrowEnabled")] + pub borrow_enabled: bool, + #[serde(rename = "marginLevel")] + pub margin_level: String, + #[serde(rename = "totalAssetOfBtc")] + pub total_asset_of_btc: String, + #[serde(rename = "totalLiabilityOfBtc")] + pub total_liability_of_btc: String, + #[serde(rename = "totalNetAssetOfBtc")] + pub total_net_asset_of_btc: String, + #[serde(rename = "tradeEnabled")] + pub trade_enabled: bool, + #[serde(rename = "transferEnabled")] + pub transfer_enabled: bool, + #[serde(rename = "userAssets")] + pub user_assets: Vec, +} + +impl SapiV1MarginAccountGet200Response { + pub fn new(borrow_enabled: bool, margin_level: String, total_asset_of_btc: String, total_liability_of_btc: String, total_net_asset_of_btc: String, trade_enabled: bool, transfer_enabled: bool, user_assets: Vec) -> SapiV1MarginAccountGet200Response { + SapiV1MarginAccountGet200Response { + borrow_enabled, + margin_level, + total_asset_of_btc, + total_liability_of_btc, + total_net_asset_of_btc, + trade_enabled, + transfer_enabled, + user_assets, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_account_get_200_response_user_assets_inner.rs b/test_rust/src/models/_sapi_v1_margin_account_get_200_response_user_assets_inner.rs new file mode 100644 index 0000000..713dc04 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_account_get_200_response_user_assets_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginAccountGet200ResponseUserAssetsInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "borrowed")] + pub borrowed: String, + #[serde(rename = "free")] + pub free: String, + #[serde(rename = "interest")] + pub interest: String, + #[serde(rename = "locked")] + pub locked: String, + #[serde(rename = "netAsset")] + pub net_asset: String, +} + +impl SapiV1MarginAccountGet200ResponseUserAssetsInner { + pub fn new(asset: String, borrowed: String, free: String, interest: String, locked: String, net_asset: String) -> SapiV1MarginAccountGet200ResponseUserAssetsInner { + SapiV1MarginAccountGet200ResponseUserAssetsInner { + asset, + borrowed, + free, + interest, + locked, + net_asset, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_all_assets_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_all_assets_get_200_response_inner.rs new file mode 100644 index 0000000..fc2c76b --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_all_assets_get_200_response_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginAllAssetsGet200ResponseInner { + #[serde(rename = "assetFullName")] + pub asset_full_name: String, + #[serde(rename = "assetName")] + pub asset_name: String, + #[serde(rename = "isBorrowable")] + pub is_borrowable: bool, + #[serde(rename = "isMortgageable")] + pub is_mortgageable: bool, + #[serde(rename = "userMinBorrow")] + pub user_min_borrow: String, + #[serde(rename = "userMinRepay")] + pub user_min_repay: String, +} + +impl SapiV1MarginAllAssetsGet200ResponseInner { + pub fn new(asset_full_name: String, asset_name: String, is_borrowable: bool, is_mortgageable: bool, user_min_borrow: String, user_min_repay: String) -> SapiV1MarginAllAssetsGet200ResponseInner { + SapiV1MarginAllAssetsGet200ResponseInner { + asset_full_name, + asset_name, + is_borrowable, + is_mortgageable, + user_min_borrow, + user_min_repay, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_all_pairs_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_all_pairs_get_200_response_inner.rs new file mode 100644 index 0000000..986e999 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_all_pairs_get_200_response_inner.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginAllPairsGet200ResponseInner { + #[serde(rename = "base")] + pub base: String, + #[serde(rename = "id")] + pub id: i64, + #[serde(rename = "isBuyAllowed")] + pub is_buy_allowed: bool, + #[serde(rename = "isMarginTrade")] + pub is_margin_trade: bool, + #[serde(rename = "isSellAllowed")] + pub is_sell_allowed: bool, + #[serde(rename = "quote")] + pub quote: String, + #[serde(rename = "symbol")] + pub symbol: String, +} + +impl SapiV1MarginAllPairsGet200ResponseInner { + pub fn new(base: String, id: i64, is_buy_allowed: bool, is_margin_trade: bool, is_sell_allowed: bool, quote: String, symbol: String) -> SapiV1MarginAllPairsGet200ResponseInner { + SapiV1MarginAllPairsGet200ResponseInner { + base, + id, + is_buy_allowed, + is_margin_trade, + is_sell_allowed, + quote, + symbol, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_available_inventory_get_200_response.rs b/test_rust/src/models/_sapi_v1_margin_available_inventory_get_200_response.rs new file mode 100644 index 0000000..0b1de3e --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_available_inventory_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginAvailableInventoryGet200Response { + #[serde(rename = "assets")] + pub assets: Box, + #[serde(rename = "updateTime")] + pub update_time: i64, +} + +impl SapiV1MarginAvailableInventoryGet200Response { + pub fn new(assets: models::SapiV1MarginAvailableInventoryGet200ResponseAssets, update_time: i64) -> SapiV1MarginAvailableInventoryGet200Response { + SapiV1MarginAvailableInventoryGet200Response { + assets: Box::new(assets), + update_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_available_inventory_get_200_response_assets.rs b/test_rust/src/models/_sapi_v1_margin_available_inventory_get_200_response_assets.rs new file mode 100644 index 0000000..1a19013 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_available_inventory_get_200_response_assets.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginAvailableInventoryGet200ResponseAssets { + #[serde(rename = "MATIC")] + pub matic: String, + #[serde(rename = "STPT")] + pub stpt: String, + #[serde(rename = "TVK")] + pub tvk: String, + #[serde(rename = "SHIB")] + pub shib: String, +} + +impl SapiV1MarginAvailableInventoryGet200ResponseAssets { + pub fn new(matic: String, stpt: String, tvk: String, shib: String) -> SapiV1MarginAvailableInventoryGet200ResponseAssets { + SapiV1MarginAvailableInventoryGet200ResponseAssets { + matic, + stpt, + tvk, + shib, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_borrow_repay_get_200_response.rs b/test_rust/src/models/_sapi_v1_margin_borrow_repay_get_200_response.rs new file mode 100644 index 0000000..3c50655 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_borrow_repay_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginBorrowRepayGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1MarginBorrowRepayGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1MarginBorrowRepayGet200Response { + SapiV1MarginBorrowRepayGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_borrow_repay_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_margin_borrow_repay_get_200_response_rows_inner.rs new file mode 100644 index 0000000..5c9ed6c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_borrow_repay_get_200_response_rows_inner.rs @@ -0,0 +1,53 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginBorrowRepayGet200ResponseRowsInner { + /// Isolated symbol, will not be returned for crossed margin + #[serde(rename = "isolatedSymbol", skip_serializing_if = "Option::is_none")] + pub isolated_symbol: Option, + /// Total amount borrowed/repaid + #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] + pub amount: Option, + #[serde(rename = "asset")] + pub asset: String, + /// Interest repaid + #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] + pub interest: Option, + /// Principal repaid + #[serde(rename = "principal")] + pub principal: String, + /// one of PENDING (pending execution), CONFIRMED (successfully execution), FAILED (execution failed, nothing happened to your account) + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timestamp")] + pub timestamp: i64, + #[serde(rename = "txId")] + pub tx_id: i64, +} + +impl SapiV1MarginBorrowRepayGet200ResponseRowsInner { + pub fn new(asset: String, principal: String, status: String, timestamp: i64, tx_id: i64) -> SapiV1MarginBorrowRepayGet200ResponseRowsInner { + SapiV1MarginBorrowRepayGet200ResponseRowsInner { + isolated_symbol: None, + amount: None, + asset, + interest: None, + principal, + status, + timestamp, + tx_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_borrow_repay_post_200_response.rs b/test_rust/src/models/_sapi_v1_margin_borrow_repay_post_200_response.rs new file mode 100644 index 0000000..a0d545e --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_borrow_repay_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginBorrowRepayPost200Response { + #[serde(rename = "tranId")] + pub tran_id: i64, +} + +impl SapiV1MarginBorrowRepayPost200Response { + pub fn new(tran_id: i64) -> SapiV1MarginBorrowRepayPost200Response { + SapiV1MarginBorrowRepayPost200Response { + tran_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_capital_flow_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_capital_flow_get_200_response_inner.rs new file mode 100644 index 0000000..15f1387 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_capital_flow_get_200_response_inner.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginCapitalFlowGet200ResponseInner { + #[serde(rename = "id")] + pub id: i64, + #[serde(rename = "tranId")] + pub tran_id: i64, + #[serde(rename = "timestamp")] + pub timestamp: i64, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "amount")] + pub amount: String, +} + +impl SapiV1MarginCapitalFlowGet200ResponseInner { + pub fn new(id: i64, tran_id: i64, timestamp: i64, asset: String, symbol: String, r#type: String, amount: String) -> SapiV1MarginCapitalFlowGet200ResponseInner { + SapiV1MarginCapitalFlowGet200ResponseInner { + id, + tran_id, + timestamp, + asset, + symbol, + r#type, + amount, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner.rs new file mode 100644 index 0000000..3aff61a --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner { + #[serde(rename = "collaterals")] + pub collaterals: Vec, + #[serde(rename = "assetNames")] + pub asset_names: Vec, +} + +impl SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner { + pub fn new(collaterals: Vec, asset_names: Vec) -> SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner { + SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner { + collaterals, + asset_names, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner_collaterals_inner.rs b/test_rust/src/models/_sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner_collaterals_inner.rs new file mode 100644 index 0000000..63b9cae --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner_collaterals_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner { + #[serde(rename = "minUsdValue")] + pub min_usd_value: String, + #[serde(rename = "maxUsdValue")] + pub max_usd_value: String, + #[serde(rename = "discountRate")] + pub discount_rate: String, +} + +impl SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner { + pub fn new(min_usd_value: String, max_usd_value: String, discount_rate: String) -> SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner { + SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner { + min_usd_value, + max_usd_value, + discount_rate, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_cross_margin_data_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_cross_margin_data_get_200_response_inner.rs new file mode 100644 index 0000000..e04fcb9 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_cross_margin_data_get_200_response_inner.rs @@ -0,0 +1,48 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginCrossMarginDataGet200ResponseInner { + #[serde(rename = "vipLevel")] + pub vip_level: i32, + #[serde(rename = "coin")] + pub coin: String, + #[serde(rename = "transferIn")] + pub transfer_in: bool, + #[serde(rename = "borrowable")] + pub borrowable: bool, + #[serde(rename = "dailyInterest")] + pub daily_interest: String, + #[serde(rename = "yearlyInterest")] + pub yearly_interest: String, + #[serde(rename = "borrowLimit")] + pub borrow_limit: String, + #[serde(rename = "marginablePairs")] + pub marginable_pairs: Vec, +} + +impl SapiV1MarginCrossMarginDataGet200ResponseInner { + pub fn new(vip_level: i32, coin: String, transfer_in: bool, borrowable: bool, daily_interest: String, yearly_interest: String, borrow_limit: String, marginable_pairs: Vec) -> SapiV1MarginCrossMarginDataGet200ResponseInner { + SapiV1MarginCrossMarginDataGet200ResponseInner { + vip_level, + coin, + transfer_in, + borrowable, + daily_interest, + yearly_interest, + borrow_limit, + marginable_pairs, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_delist_schedule_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_delist_schedule_get_200_response_inner.rs new file mode 100644 index 0000000..0780125 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_delist_schedule_get_200_response_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginDelistScheduleGet200ResponseInner { + #[serde(rename = "delistTime", skip_serializing_if = "Option::is_none")] + pub delist_time: Option, + #[serde(rename = "crossMarginAssets", skip_serializing_if = "Option::is_none")] + pub cross_margin_assets: Option>, + #[serde(rename = "isolatedMarginSymbols", skip_serializing_if = "Option::is_none")] + pub isolated_margin_symbols: Option>, +} + +impl SapiV1MarginDelistScheduleGet200ResponseInner { + pub fn new() -> SapiV1MarginDelistScheduleGet200ResponseInner { + SapiV1MarginDelistScheduleGet200ResponseInner { + delist_time: None, + cross_margin_assets: None, + isolated_margin_symbols: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_exchange_small_liability_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_exchange_small_liability_get_200_response_inner.rs new file mode 100644 index 0000000..570d97c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_exchange_small_liability_get_200_response_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginExchangeSmallLiabilityGet200ResponseInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "interest")] + pub interest: String, + #[serde(rename = "principal")] + pub principal: String, + #[serde(rename = "liabilityAsset")] + pub liability_asset: String, + #[serde(rename = "liabilityQty")] + pub liability_qty: f32, +} + +impl SapiV1MarginExchangeSmallLiabilityGet200ResponseInner { + pub fn new(asset: String, interest: String, principal: String, liability_asset: String, liability_qty: f32) -> SapiV1MarginExchangeSmallLiabilityGet200ResponseInner { + SapiV1MarginExchangeSmallLiabilityGet200ResponseInner { + asset, + interest, + principal, + liability_asset, + liability_qty, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_exchange_small_liability_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_margin_exchange_small_liability_history_get_200_response.rs new file mode 100644 index 0000000..2360e5b --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_exchange_small_liability_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginExchangeSmallLiabilityHistoryGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "rows")] + pub rows: Vec, +} + +impl SapiV1MarginExchangeSmallLiabilityHistoryGet200Response { + pub fn new(total: i32, rows: Vec) -> SapiV1MarginExchangeSmallLiabilityHistoryGet200Response { + SapiV1MarginExchangeSmallLiabilityHistoryGet200Response { + total, + rows, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_exchange_small_liability_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_margin_exchange_small_liability_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..1e5c674 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_exchange_small_liability_history_get_200_response_rows_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "targetAsset")] + pub target_asset: String, + #[serde(rename = "targetAmount")] + pub target_amount: String, + #[serde(rename = "bizType")] + pub biz_type: String, + #[serde(rename = "timestamp")] + pub timestamp: i64, +} + +impl SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner { + pub fn new(asset: String, amount: String, target_asset: String, target_amount: String, biz_type: String, timestamp: i64) -> SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner { + SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner { + asset, + amount, + target_asset, + target_amount, + biz_type, + timestamp, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_force_liquidation_rec_get_200_response.rs b/test_rust/src/models/_sapi_v1_margin_force_liquidation_rec_get_200_response.rs new file mode 100644 index 0000000..37d8386 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_force_liquidation_rec_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginForceLiquidationRecGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1MarginForceLiquidationRecGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1MarginForceLiquidationRecGet200Response { + SapiV1MarginForceLiquidationRecGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_force_liquidation_rec_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_margin_force_liquidation_rec_get_200_response_rows_inner.rs new file mode 100644 index 0000000..782e62f --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_force_liquidation_rec_get_200_response_rows_inner.rs @@ -0,0 +1,54 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginForceLiquidationRecGet200ResponseRowsInner { + #[serde(rename = "avgPrice")] + pub avg_price: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "qty")] + pub qty: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "isIsolated")] + pub is_isolated: bool, + #[serde(rename = "updatedTime")] + pub updated_time: i64, +} + +impl SapiV1MarginForceLiquidationRecGet200ResponseRowsInner { + pub fn new(avg_price: String, executed_qty: String, order_id: i64, price: String, qty: String, side: String, symbol: String, time_in_force: String, is_isolated: bool, updated_time: i64) -> SapiV1MarginForceLiquidationRecGet200ResponseRowsInner { + SapiV1MarginForceLiquidationRecGet200ResponseRowsInner { + avg_price, + executed_qty, + order_id, + price, + qty, + side, + symbol, + time_in_force, + is_isolated, + updated_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_interest_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_margin_interest_history_get_200_response.rs new file mode 100644 index 0000000..3992267 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_interest_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginInterestHistoryGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1MarginInterestHistoryGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1MarginInterestHistoryGet200Response { + SapiV1MarginInterestHistoryGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_interest_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_margin_interest_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..58fe672 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_interest_history_get_200_response_rows_inner.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginInterestHistoryGet200ResponseRowsInner { + #[serde(rename = "isolatedSymbol")] + pub isolated_symbol: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "interest")] + pub interest: String, + #[serde(rename = "interestAccuredTime")] + pub interest_accured_time: i64, + #[serde(rename = "interestRate")] + pub interest_rate: String, + #[serde(rename = "principal")] + pub principal: String, + #[serde(rename = "type")] + pub r#type: String, +} + +impl SapiV1MarginInterestHistoryGet200ResponseRowsInner { + pub fn new(isolated_symbol: String, asset: String, interest: String, interest_accured_time: i64, interest_rate: String, principal: String, r#type: String) -> SapiV1MarginInterestHistoryGet200ResponseRowsInner { + SapiV1MarginInterestHistoryGet200ResponseRowsInner { + isolated_symbol, + asset, + interest, + interest_accured_time, + interest_rate, + principal, + r#type, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_interest_rate_history_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_interest_rate_history_get_200_response_inner.rs new file mode 100644 index 0000000..aa39905 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_interest_rate_history_get_200_response_inner.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginInterestRateHistoryGet200ResponseInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "dailyInterestRate")] + pub daily_interest_rate: String, + #[serde(rename = "timestamp")] + pub timestamp: i64, + #[serde(rename = "vipLevel")] + pub vip_level: i32, +} + +impl SapiV1MarginInterestRateHistoryGet200ResponseInner { + pub fn new(asset: String, daily_interest_rate: String, timestamp: i64, vip_level: i32) -> SapiV1MarginInterestRateHistoryGet200ResponseInner { + SapiV1MarginInterestRateHistoryGet200ResponseInner { + asset, + daily_interest_rate, + timestamp, + vip_level, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_isolated_account_limit_get_200_response.rs b/test_rust/src/models/_sapi_v1_margin_isolated_account_limit_get_200_response.rs new file mode 100644 index 0000000..92b0af3 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_isolated_account_limit_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginIsolatedAccountLimitGet200Response { + #[serde(rename = "enabledAccount")] + pub enabled_account: i64, + #[serde(rename = "maxAccount")] + pub max_account: i64, +} + +impl SapiV1MarginIsolatedAccountLimitGet200Response { + pub fn new(enabled_account: i64, max_account: i64) -> SapiV1MarginIsolatedAccountLimitGet200Response { + SapiV1MarginIsolatedAccountLimitGet200Response { + enabled_account, + max_account, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_isolated_account_post_200_response.rs b/test_rust/src/models/_sapi_v1_margin_isolated_account_post_200_response.rs new file mode 100644 index 0000000..f738531 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_isolated_account_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginIsolatedAccountPost200Response { + #[serde(rename = "success")] + pub success: bool, + #[serde(rename = "symbol")] + pub symbol: String, +} + +impl SapiV1MarginIsolatedAccountPost200Response { + pub fn new(success: bool, symbol: String) -> SapiV1MarginIsolatedAccountPost200Response { + SapiV1MarginIsolatedAccountPost200Response { + success, + symbol, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_isolated_all_pairs_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_isolated_all_pairs_get_200_response_inner.rs new file mode 100644 index 0000000..a5cd763 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_isolated_all_pairs_get_200_response_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginIsolatedAllPairsGet200ResponseInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "base")] + pub base: String, + #[serde(rename = "quote")] + pub quote: String, + #[serde(rename = "isMarginTrade")] + pub is_margin_trade: bool, + #[serde(rename = "isBuyAllowed")] + pub is_buy_allowed: bool, + #[serde(rename = "isSellAllowed")] + pub is_sell_allowed: bool, +} + +impl SapiV1MarginIsolatedAllPairsGet200ResponseInner { + pub fn new(symbol: String, base: String, quote: String, is_margin_trade: bool, is_buy_allowed: bool, is_sell_allowed: bool) -> SapiV1MarginIsolatedAllPairsGet200ResponseInner { + SapiV1MarginIsolatedAllPairsGet200ResponseInner { + symbol, + base, + quote, + is_margin_trade, + is_buy_allowed, + is_sell_allowed, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_isolated_margin_data_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_isolated_margin_data_get_200_response_inner.rs new file mode 100644 index 0000000..730843c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_isolated_margin_data_get_200_response_inner.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginIsolatedMarginDataGet200ResponseInner { + #[serde(rename = "vipLevel", skip_serializing_if = "Option::is_none")] + pub vip_level: Option, + #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] + pub symbol: Option, + #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] + pub leverage: Option, + #[serde(rename = "data", skip_serializing_if = "Option::is_none")] + pub data: Option>, +} + +impl SapiV1MarginIsolatedMarginDataGet200ResponseInner { + pub fn new() -> SapiV1MarginIsolatedMarginDataGet200ResponseInner { + SapiV1MarginIsolatedMarginDataGet200ResponseInner { + vip_level: None, + symbol: None, + leverage: None, + data: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_isolated_margin_data_get_200_response_inner_data_inner.rs b/test_rust/src/models/_sapi_v1_margin_isolated_margin_data_get_200_response_inner_data_inner.rs new file mode 100644 index 0000000..e27ec04 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_isolated_margin_data_get_200_response_inner_data_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner { + #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] + pub coin: Option, + #[serde(rename = "dailyInterest", skip_serializing_if = "Option::is_none")] + pub daily_interest: Option, + #[serde(rename = "borrowLimit", skip_serializing_if = "Option::is_none")] + pub borrow_limit: Option, +} + +impl SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner { + pub fn new() -> SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner { + SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner { + coin: None, + daily_interest: None, + borrow_limit: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_isolated_margin_tier_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_isolated_margin_tier_get_200_response_inner.rs new file mode 100644 index 0000000..847641b --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_isolated_margin_tier_get_200_response_inner.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginIsolatedMarginTierGet200ResponseInner { + #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] + pub symbol: Option, + #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] + pub tier: Option, + #[serde(rename = "effectiveMultiple", skip_serializing_if = "Option::is_none")] + pub effective_multiple: Option, + #[serde(rename = "initialRiskRatio", skip_serializing_if = "Option::is_none")] + pub initial_risk_ratio: Option, + #[serde(rename = "liquidationRiskRatio", skip_serializing_if = "Option::is_none")] + pub liquidation_risk_ratio: Option, + #[serde(rename = "baseAssetMaxBorrowable", skip_serializing_if = "Option::is_none")] + pub base_asset_max_borrowable: Option, + #[serde(rename = "quoteAssetMaxBorrowable", skip_serializing_if = "Option::is_none")] + pub quote_asset_max_borrowable: Option, +} + +impl SapiV1MarginIsolatedMarginTierGet200ResponseInner { + pub fn new() -> SapiV1MarginIsolatedMarginTierGet200ResponseInner { + SapiV1MarginIsolatedMarginTierGet200ResponseInner { + symbol: None, + tier: None, + effective_multiple: None, + initial_risk_ratio: None, + liquidation_risk_ratio: None, + base_asset_max_borrowable: None, + quote_asset_max_borrowable: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_leverage_bracket_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_leverage_bracket_get_200_response_inner.rs new file mode 100644 index 0000000..c12e79e --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_leverage_bracket_get_200_response_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginLeverageBracketGet200ResponseInner { + #[serde(rename = "assetNames")] + pub asset_names: Vec, + #[serde(rename = "rank")] + pub rank: i32, + #[serde(rename = "brackets")] + pub brackets: Vec, +} + +impl SapiV1MarginLeverageBracketGet200ResponseInner { + pub fn new(asset_names: Vec, rank: i32, brackets: Vec) -> SapiV1MarginLeverageBracketGet200ResponseInner { + SapiV1MarginLeverageBracketGet200ResponseInner { + asset_names, + rank, + brackets, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_leverage_bracket_get_200_response_inner_brackets_inner.rs b/test_rust/src/models/_sapi_v1_margin_leverage_bracket_get_200_response_inner_brackets_inner.rs new file mode 100644 index 0000000..9744078 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_leverage_bracket_get_200_response_inner_brackets_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner { + #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] + pub leverage: Option, + #[serde(rename = "maxDebt", skip_serializing_if = "Option::is_none")] + pub max_debt: Option, + #[serde(rename = "maintenanceMarginRate", skip_serializing_if = "Option::is_none")] + pub maintenance_margin_rate: Option, + #[serde(rename = "initialMarginRate", skip_serializing_if = "Option::is_none")] + pub initial_margin_rate: Option, + #[serde(rename = "fastNum", skip_serializing_if = "Option::is_none")] + pub fast_num: Option, +} + +impl SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner { + pub fn new() -> SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner { + SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner { + leverage: None, + max_debt: None, + maintenance_margin_rate: None, + initial_margin_rate: None, + fast_num: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_max_borrowable_get_200_response.rs b/test_rust/src/models/_sapi_v1_margin_max_borrowable_get_200_response.rs new file mode 100644 index 0000000..0c66c23 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_max_borrowable_get_200_response.rs @@ -0,0 +1,32 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginMaxBorrowableGet200Response { + /// account's currently max borrowable amount with sufficient system availability + #[serde(rename = "amount")] + pub amount: String, + /// max borrowable amount limited by the account level + #[serde(rename = "borrowLimit")] + pub borrow_limit: String, +} + +impl SapiV1MarginMaxBorrowableGet200Response { + pub fn new(amount: String, borrow_limit: String) -> SapiV1MarginMaxBorrowableGet200Response { + SapiV1MarginMaxBorrowableGet200Response { + amount, + borrow_limit, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_max_leverage_post_200_response.rs b/test_rust/src/models/_sapi_v1_margin_max_leverage_post_200_response.rs new file mode 100644 index 0000000..8b23e2f --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_max_leverage_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginMaxLeveragePost200Response { + #[serde(rename = "success")] + pub success: bool, +} + +impl SapiV1MarginMaxLeveragePost200Response { + pub fn new(success: bool) -> SapiV1MarginMaxLeveragePost200Response { + SapiV1MarginMaxLeveragePost200Response { + success, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_max_transferable_get_200_response.rs b/test_rust/src/models/_sapi_v1_margin_max_transferable_get_200_response.rs new file mode 100644 index 0000000..0aa5b78 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_max_transferable_get_200_response.rs @@ -0,0 +1,32 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginMaxTransferableGet200Response { + /// Account's currently max borrowable amount with sufficient system availability + #[serde(rename = "amount")] + pub amount: String, + /// Max borrowable amount limited by the account level + #[serde(rename = "borrowLimit")] + pub borrow_limit: String, +} + +impl SapiV1MarginMaxTransferableGet200Response { + pub fn new(amount: String, borrow_limit: String) -> SapiV1MarginMaxTransferableGet200Response { + SapiV1MarginMaxTransferableGet200Response { + amount, + borrow_limit, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_next_hourly_interest_rate_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_next_hourly_interest_rate_get_200_response_inner.rs new file mode 100644 index 0000000..89e3f34 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_next_hourly_interest_rate_get_200_response_inner.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginNextHourlyInterestRateGet200ResponseInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "nextHourlyInterestRate")] + pub next_hourly_interest_rate: String, +} + +impl SapiV1MarginNextHourlyInterestRateGet200ResponseInner { + pub fn new(asset: String, next_hourly_interest_rate: String) -> SapiV1MarginNextHourlyInterestRateGet200ResponseInner { + SapiV1MarginNextHourlyInterestRateGet200ResponseInner { + asset, + next_hourly_interest_rate, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_open_order_list_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_open_order_list_get_200_response_inner.rs new file mode 100644 index 0000000..eaa8437 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_open_order_list_get_200_response_inner.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginOpenOrderListGet200ResponseInner { + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "contingencyType")] + pub contingency_type: String, + #[serde(rename = "listStatusType")] + pub list_status_type: String, + #[serde(rename = "listOrderStatus")] + pub list_order_status: String, + #[serde(rename = "listClientOrderId")] + pub list_client_order_id: String, + #[serde(rename = "transactionTime")] + pub transaction_time: i64, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "isIsolated")] + pub is_isolated: bool, + #[serde(rename = "orders")] + pub orders: Vec, +} + +impl SapiV1MarginOpenOrderListGet200ResponseInner { + pub fn new(order_list_id: i64, contingency_type: String, list_status_type: String, list_order_status: String, list_client_order_id: String, transaction_time: i64, symbol: String, is_isolated: bool, orders: Vec) -> SapiV1MarginOpenOrderListGet200ResponseInner { + SapiV1MarginOpenOrderListGet200ResponseInner { + order_list_id, + contingency_type, + list_status_type, + list_order_status, + list_client_order_id, + transaction_time, + symbol, + is_isolated, + orders, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_open_orders_delete_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_open_orders_delete_200_response_inner.rs new file mode 100644 index 0000000..b1f40d7 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_open_orders_delete_200_response_inner.rs @@ -0,0 +1,87 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginOpenOrdersDelete200ResponseInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "isIsolated")] + pub is_isolated: bool, + #[serde(rename = "origClientOrderId")] + pub orig_client_order_id: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "contingencyType")] + pub contingency_type: String, + #[serde(rename = "listStatusType")] + pub list_status_type: String, + #[serde(rename = "listOrderStatus")] + pub list_order_status: String, + #[serde(rename = "listClientOrderId")] + pub list_client_order_id: String, + #[serde(rename = "transactionTime")] + pub transaction_time: i64, + #[serde(rename = "orders")] + pub orders: Vec, + #[serde(rename = "orderReports")] + pub order_reports: Vec, +} + +impl SapiV1MarginOpenOrdersDelete200ResponseInner { + pub fn new(symbol: String, is_isolated: bool, orig_client_order_id: String, order_id: i64, order_list_id: i64, client_order_id: String, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String, contingency_type: String, list_status_type: String, list_order_status: String, list_client_order_id: String, transaction_time: i64, orders: Vec, order_reports: Vec) -> SapiV1MarginOpenOrdersDelete200ResponseInner { + SapiV1MarginOpenOrdersDelete200ResponseInner { + symbol, + is_isolated, + orig_client_order_id, + order_id, + order_list_id, + client_order_id, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + contingency_type, + list_status_type, + list_order_status, + list_client_order_id, + transaction_time, + orders, + order_reports, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_order_list_get_200_response.rs b/test_rust/src/models/_sapi_v1_margin_order_list_get_200_response.rs new file mode 100644 index 0000000..e9284ec --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_order_list_get_200_response.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginOrderListGet200Response { + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "contingencyType")] + pub contingency_type: String, + #[serde(rename = "listStatusType")] + pub list_status_type: String, + #[serde(rename = "listOrderStatus")] + pub list_order_status: String, + #[serde(rename = "listClientOrderId")] + pub list_client_order_id: String, + #[serde(rename = "transactionTime")] + pub transaction_time: i64, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "isIsolated")] + pub is_isolated: bool, + #[serde(rename = "orders")] + pub orders: Vec, +} + +impl SapiV1MarginOrderListGet200Response { + pub fn new(order_list_id: i64, contingency_type: String, list_status_type: String, list_order_status: String, list_client_order_id: String, transaction_time: i64, symbol: String, is_isolated: bool, orders: Vec) -> SapiV1MarginOrderListGet200Response { + SapiV1MarginOrderListGet200Response { + order_list_id, + contingency_type, + list_status_type, + list_order_status, + list_client_order_id, + transaction_time, + symbol, + is_isolated, + orders, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_order_oco_post_200_response.rs b/test_rust/src/models/_sapi_v1_margin_order_oco_post_200_response.rs new file mode 100644 index 0000000..989fe85 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_order_oco_post_200_response.rs @@ -0,0 +1,62 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginOrderOcoPost200Response { + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "contingencyType")] + pub contingency_type: String, + #[serde(rename = "listStatusType")] + pub list_status_type: String, + #[serde(rename = "listOrderStatus")] + pub list_order_status: String, + #[serde(rename = "listClientOrderId")] + pub list_client_order_id: String, + #[serde(rename = "transactionTime")] + pub transaction_time: i64, + #[serde(rename = "symbol")] + pub symbol: String, + /// will not return if no margin trade happens + #[serde(rename = "marginBuyBorrowAmount")] + pub margin_buy_borrow_amount: String, + /// will not return if no margin trade happens + #[serde(rename = "marginBuyBorrowAsset")] + pub margin_buy_borrow_asset: String, + #[serde(rename = "isIsolated")] + pub is_isolated: bool, + #[serde(rename = "orders")] + pub orders: Vec, + #[serde(rename = "orderReports")] + pub order_reports: Vec, +} + +impl SapiV1MarginOrderOcoPost200Response { + pub fn new(order_list_id: i64, contingency_type: String, list_status_type: String, list_order_status: String, list_client_order_id: String, transaction_time: i64, symbol: String, margin_buy_borrow_amount: String, margin_buy_borrow_asset: String, is_isolated: bool, orders: Vec, order_reports: Vec) -> SapiV1MarginOrderOcoPost200Response { + SapiV1MarginOrderOcoPost200Response { + order_list_id, + contingency_type, + list_status_type, + list_order_status, + list_client_order_id, + transaction_time, + symbol, + margin_buy_borrow_amount, + margin_buy_borrow_asset, + is_isolated, + orders, + order_reports, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_order_oco_post_200_response_order_reports_inner.rs b/test_rust/src/models/_sapi_v1_margin_order_oco_post_200_response_order_reports_inner.rs new file mode 100644 index 0000000..93ddd6e --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_order_oco_post_200_response_order_reports_inner.rs @@ -0,0 +1,66 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginOrderOcoPost200ResponseOrderReportsInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "transactTime")] + pub transact_time: i64, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "stopPrice")] + pub stop_price: String, +} + +impl SapiV1MarginOrderOcoPost200ResponseOrderReportsInner { + pub fn new(symbol: String, order_id: i64, order_list_id: i64, client_order_id: String, transact_time: i64, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String, stop_price: String) -> SapiV1MarginOrderOcoPost200ResponseOrderReportsInner { + SapiV1MarginOrderOcoPost200ResponseOrderReportsInner { + symbol, + order_id, + order_list_id, + client_order_id, + transact_time, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + stop_price, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_order_oco_post_200_response_orders_inner.rs b/test_rust/src/models/_sapi_v1_margin_order_oco_post_200_response_orders_inner.rs new file mode 100644 index 0000000..9a45548 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_order_oco_post_200_response_orders_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginOrderOcoPost200ResponseOrdersInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, +} + +impl SapiV1MarginOrderOcoPost200ResponseOrdersInner { + pub fn new(symbol: String, order_id: i64, client_order_id: String) -> SapiV1MarginOrderOcoPost200ResponseOrdersInner { + SapiV1MarginOrderOcoPost200ResponseOrdersInner { + symbol, + order_id, + client_order_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_order_post_200_response.rs b/test_rust/src/models/_sapi_v1_margin_order_post_200_response.rs new file mode 100644 index 0000000..cbb2fff --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_order_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV1MarginOrderPost200Response { + MarginOrderResponseAck(Box), + MarginOrderResponseResult(Box), + MarginOrderResponseFull(Box), +} + +impl Default for SapiV1MarginOrderPost200Response { + fn default() -> Self { + Self::MarginOrderResponseAck(Default::default()) + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_price_index_get_200_response.rs b/test_rust/src/models/_sapi_v1_margin_price_index_get_200_response.rs new file mode 100644 index 0000000..8c01a93 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_price_index_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginPriceIndexGet200Response { + #[serde(rename = "calcTime")] + pub calc_time: i64, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "symbol")] + pub symbol: String, +} + +impl SapiV1MarginPriceIndexGet200Response { + pub fn new(calc_time: i64, price: String, symbol: String) -> SapiV1MarginPriceIndexGet200Response { + SapiV1MarginPriceIndexGet200Response { + calc_time, + price, + symbol, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_rate_limit_order_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_margin_rate_limit_order_get_200_response_inner.rs new file mode 100644 index 0000000..72b3f92 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_rate_limit_order_get_200_response_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginRateLimitOrderGet200ResponseInner { + #[serde(rename = "rateLimitType")] + pub rate_limit_type: String, + #[serde(rename = "interval")] + pub interval: String, + #[serde(rename = "intervalNum")] + pub interval_num: i64, + #[serde(rename = "limit")] + pub limit: i64, + #[serde(rename = "count")] + pub count: i64, +} + +impl SapiV1MarginRateLimitOrderGet200ResponseInner { + pub fn new(rate_limit_type: String, interval: String, interval_num: i64, limit: i64, count: i64) -> SapiV1MarginRateLimitOrderGet200ResponseInner { + SapiV1MarginRateLimitOrderGet200ResponseInner { + rate_limit_type, + interval, + interval_num, + limit, + count, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_trade_coeff_get_200_response.rs b/test_rust/src/models/_sapi_v1_margin_trade_coeff_get_200_response.rs new file mode 100644 index 0000000..cc45d9e --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_trade_coeff_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginTradeCoeffGet200Response { + /// Account's currently max borrowable amount with sufficient system availability + #[serde(rename = "normalBar", skip_serializing_if = "Option::is_none")] + pub normal_bar: Option, + /// Max borrowable amount limited by the account level + #[serde(rename = "marginCallBar", skip_serializing_if = "Option::is_none")] + pub margin_call_bar: Option, + /// Liquidation Margin Ratio + #[serde(rename = "forceLiquidationBar", skip_serializing_if = "Option::is_none")] + pub force_liquidation_bar: Option, +} + +impl SapiV1MarginTradeCoeffGet200Response { + pub fn new() -> SapiV1MarginTradeCoeffGet200Response { + SapiV1MarginTradeCoeffGet200Response { + normal_bar: None, + margin_call_bar: None, + force_liquidation_bar: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_transfer_get_200_response.rs b/test_rust/src/models/_sapi_v1_margin_transfer_get_200_response.rs new file mode 100644 index 0000000..c01be86 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_transfer_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginTransferGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV1MarginTransferGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV1MarginTransferGet200Response { + SapiV1MarginTransferGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_margin_transfer_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_margin_transfer_get_200_response_rows_inner.rs new file mode 100644 index 0000000..289da6a --- /dev/null +++ b/test_rust/src/models/_sapi_v1_margin_transfer_get_200_response_rows_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MarginTransferGet200ResponseRowsInner { + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timestamp")] + pub timestamp: i64, + #[serde(rename = "txId")] + pub tx_id: i64, + #[serde(rename = "type")] + pub r#type: String, +} + +impl SapiV1MarginTransferGet200ResponseRowsInner { + pub fn new(amount: String, asset: String, status: String, timestamp: i64, tx_id: i64, r#type: String) -> SapiV1MarginTransferGet200ResponseRowsInner { + SapiV1MarginTransferGet200ResponseRowsInner { + amount, + asset, + status, + timestamp, + tx_id, + r#type, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_cancel_post_200_response.rs b/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_cancel_post_200_response.rs new file mode 100644 index 0000000..b1d8c8d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_cancel_post_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningHashTransferConfigCancelPost200Response { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "data")] + pub data: bool, +} + +impl SapiV1MiningHashTransferConfigCancelPost200Response { + pub fn new(code: i64, msg: String, data: bool) -> SapiV1MiningHashTransferConfigCancelPost200Response { + SapiV1MiningHashTransferConfigCancelPost200Response { + code, + msg, + data, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response.rs b/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response.rs new file mode 100644 index 0000000..68afb45 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningHashTransferConfigDetailsListGet200Response { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "data")] + pub data: Box, +} + +impl SapiV1MiningHashTransferConfigDetailsListGet200Response { + pub fn new(code: i64, msg: String, data: models::SapiV1MiningHashTransferConfigDetailsListGet200ResponseData) -> SapiV1MiningHashTransferConfigDetailsListGet200Response { + SapiV1MiningHashTransferConfigDetailsListGet200Response { + code, + msg, + data: Box::new(data), + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data.rs b/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data.rs new file mode 100644 index 0000000..c36694c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningHashTransferConfigDetailsListGet200ResponseData { + #[serde(rename = "configDetails")] + pub config_details: Vec, + #[serde(rename = "totalNum")] + pub total_num: i64, + #[serde(rename = "pageSize")] + pub page_size: i64, +} + +impl SapiV1MiningHashTransferConfigDetailsListGet200ResponseData { + pub fn new(config_details: Vec, total_num: i64, page_size: i64) -> SapiV1MiningHashTransferConfigDetailsListGet200ResponseData { + SapiV1MiningHashTransferConfigDetailsListGet200ResponseData { + config_details, + total_num, + page_size, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_config_details_inner.rs b/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_config_details_inner.rs new file mode 100644 index 0000000..5cc13c8 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_config_details_inner.rs @@ -0,0 +1,56 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner { + /// Mining ID + #[serde(rename = "configId")] + pub config_id: i64, + /// Transfer out of subaccount + #[serde(rename = "poolUsername")] + pub pool_username: String, + /// Transfer into subaccount + #[serde(rename = "toPoolUsername")] + pub to_pool_username: String, + /// Transfer algorithm + #[serde(rename = "algoName")] + pub algo_name: String, + /// Transferred Hashrate quantity + #[serde(rename = "hashRate")] + pub hash_rate: i64, + /// Start date + #[serde(rename = "startDay")] + pub start_day: i64, + /// End date + #[serde(rename = "endDay")] + pub end_day: i64, + /// 0 Processing, 1:Cancelled, 2:Terminated + #[serde(rename = "status")] + pub status: i32, +} + +impl SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner { + pub fn new(config_id: i64, pool_username: String, to_pool_username: String, algo_name: String, hash_rate: i64, start_day: i64, end_day: i64, status: i32) -> SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner { + SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner { + config_id, + pool_username, + to_pool_username, + algo_name, + hash_rate, + start_day, + end_day, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_post_200_response.rs b/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_post_200_response.rs new file mode 100644 index 0000000..dc9bb6d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_hash_transfer_config_post_200_response.rs @@ -0,0 +1,34 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningHashTransferConfigPost200Response { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + /// Mining Account + #[serde(rename = "data")] + pub data: i64, +} + +impl SapiV1MiningHashTransferConfigPost200Response { + pub fn new(code: i64, msg: String, data: i64) -> SapiV1MiningHashTransferConfigPost200Response { + SapiV1MiningHashTransferConfigPost200Response { + code, + msg, + data, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response.rs b/test_rust/src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response.rs new file mode 100644 index 0000000..4fd52b6 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningHashTransferProfitDetailsGet200Response { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "data")] + pub data: Box, +} + +impl SapiV1MiningHashTransferProfitDetailsGet200Response { + pub fn new(code: i64, msg: String, data: models::SapiV1MiningHashTransferProfitDetailsGet200ResponseData) -> SapiV1MiningHashTransferProfitDetailsGet200Response { + SapiV1MiningHashTransferProfitDetailsGet200Response { + code, + msg, + data: Box::new(data), + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response_data.rs b/test_rust/src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response_data.rs new file mode 100644 index 0000000..202f8be --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response_data.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningHashTransferProfitDetailsGet200ResponseData { + #[serde(rename = "profitTransferDetails")] + pub profit_transfer_details: Vec, + #[serde(rename = "totalNum")] + pub total_num: i64, + #[serde(rename = "pageSize")] + pub page_size: i64, +} + +impl SapiV1MiningHashTransferProfitDetailsGet200ResponseData { + pub fn new(profit_transfer_details: Vec, total_num: i64, page_size: i64) -> SapiV1MiningHashTransferProfitDetailsGet200ResponseData { + SapiV1MiningHashTransferProfitDetailsGet200ResponseData { + profit_transfer_details, + total_num, + page_size, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profit_transfer_details_inner.rs b/test_rust/src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profit_transfer_details_inner.rs new file mode 100644 index 0000000..be017bc --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profit_transfer_details_inner.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner { + /// Transfer out of sub-account + #[serde(rename = "poolUsername")] + pub pool_username: String, + /// Transfer into subaccount + #[serde(rename = "toPoolUsername")] + pub to_pool_username: String, + /// Transfer algorithm + #[serde(rename = "algoName")] + pub algo_name: String, + /// Transferred Hashrate quantity + #[serde(rename = "hashRate")] + pub hash_rate: i64, + /// Transfer date + #[serde(rename = "day")] + pub day: i64, + /// Transfer income + #[serde(rename = "amount")] + pub amount: f64, + #[serde(rename = "coinName")] + pub coin_name: String, +} + +impl SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner { + pub fn new(pool_username: String, to_pool_username: String, algo_name: String, hash_rate: i64, day: i64, amount: f64, coin_name: String) -> SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner { + SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner { + pool_username, + to_pool_username, + algo_name, + hash_rate, + day, + amount, + coin_name, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_payment_list_get_200_response.rs b/test_rust/src/models/_sapi_v1_mining_payment_list_get_200_response.rs new file mode 100644 index 0000000..d686f85 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_payment_list_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningPaymentListGet200Response { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "data")] + pub data: Box, +} + +impl SapiV1MiningPaymentListGet200Response { + pub fn new(code: i64, msg: String, data: models::SapiV1MiningPaymentListGet200ResponseData) -> SapiV1MiningPaymentListGet200Response { + SapiV1MiningPaymentListGet200Response { + code, + msg, + data: Box::new(data), + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_payment_list_get_200_response_data.rs b/test_rust/src/models/_sapi_v1_mining_payment_list_get_200_response_data.rs new file mode 100644 index 0000000..1329064 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_payment_list_get_200_response_data.rs @@ -0,0 +1,35 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningPaymentListGet200ResponseData { + #[serde(rename = "accountProfits")] + pub account_profits: Vec, + /// Total Rows + #[serde(rename = "totalNum")] + pub total_num: i64, + /// Rows per page + #[serde(rename = "pageSize")] + pub page_size: i64, +} + +impl SapiV1MiningPaymentListGet200ResponseData { + pub fn new(account_profits: Vec, total_num: i64, page_size: i64) -> SapiV1MiningPaymentListGet200ResponseData { + SapiV1MiningPaymentListGet200ResponseData { + account_profits, + total_num, + page_size, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_payment_list_get_200_response_data_account_profits_inner.rs b/test_rust/src/models/_sapi_v1_mining_payment_list_get_200_response_data_account_profits_inner.rs new file mode 100644 index 0000000..447e1ac --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_payment_list_get_200_response_data_account_profits_inner.rs @@ -0,0 +1,56 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner { + /// Mining date + #[serde(rename = "time")] + pub time: i64, + /// 0:Mining Wallet,5:Mining Address,7:Pool Savings,8:Transferred,31:Income Transfer ,32:Hashrate Resale-Mining Wallet 33:Hashrate Resale-Pool Savings + #[serde(rename = "type")] + pub r#type: i64, + /// Transferred Hashrate + #[serde(rename = "hashTransfer")] + pub hash_transfer: i32, + /// Transferred Income + #[serde(rename = "transferAmount")] + pub transfer_amount: f64, + /// Daily Hashrate + #[serde(rename = "dayHashRate")] + pub day_hash_rate: i64, + /// Earnings Amount + #[serde(rename = "profitAmount")] + pub profit_amount: f64, + /// Coin Type + #[serde(rename = "coinName")] + pub coin_name: String, + /// Status:0:Unpaid, 1:Paying 2:Paid + #[serde(rename = "status")] + pub status: i32, +} + +impl SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner { + pub fn new(time: i64, r#type: i64, hash_transfer: i32, transfer_amount: f64, day_hash_rate: i64, profit_amount: f64, coin_name: String, status: i32) -> SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner { + SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner { + time, + r#type, + hash_transfer, + transfer_amount, + day_hash_rate, + profit_amount, + coin_name, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_payment_other_get_200_response.rs b/test_rust/src/models/_sapi_v1_mining_payment_other_get_200_response.rs new file mode 100644 index 0000000..6e96693 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_payment_other_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningPaymentOtherGet200Response { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "data")] + pub data: Box, +} + +impl SapiV1MiningPaymentOtherGet200Response { + pub fn new(code: i64, msg: String, data: models::SapiV1MiningPaymentOtherGet200ResponseData) -> SapiV1MiningPaymentOtherGet200Response { + SapiV1MiningPaymentOtherGet200Response { + code, + msg, + data: Box::new(data), + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_payment_other_get_200_response_data.rs b/test_rust/src/models/_sapi_v1_mining_payment_other_get_200_response_data.rs new file mode 100644 index 0000000..0f14ad5 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_payment_other_get_200_response_data.rs @@ -0,0 +1,35 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningPaymentOtherGet200ResponseData { + #[serde(rename = "otherProfits")] + pub other_profits: Vec, + /// Total Rows + #[serde(rename = "totalNum")] + pub total_num: i64, + /// Rows per page + #[serde(rename = "pageSize")] + pub page_size: i64, +} + +impl SapiV1MiningPaymentOtherGet200ResponseData { + pub fn new(other_profits: Vec, total_num: i64, page_size: i64) -> SapiV1MiningPaymentOtherGet200ResponseData { + SapiV1MiningPaymentOtherGet200ResponseData { + other_profits, + total_num, + page_size, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_payment_other_get_200_response_data_other_profits_inner.rs b/test_rust/src/models/_sapi_v1_mining_payment_other_get_200_response_data_other_profits_inner.rs new file mode 100644 index 0000000..8109c8c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_payment_other_get_200_response_data_other_profits_inner.rs @@ -0,0 +1,43 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner { + /// Mining date + #[serde(rename = "time")] + pub time: i64, + /// Coin Name + #[serde(rename = "coinName")] + pub coin_name: String, + /// 1: Merged Mining, 2: Activity Bonus, 3:Rebate 4:Smart Pool 6:Income Transfer 7:Pool Savings + #[serde(rename = "type")] + pub r#type: i32, + #[serde(rename = "profitAmount")] + pub profit_amount: f64, + /// 0:Unpaid, 1:Paying 2:Paid + #[serde(rename = "status")] + pub status: i32, +} + +impl SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner { + pub fn new(time: i64, coin_name: String, r#type: i32, profit_amount: f64, status: i32) -> SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner { + SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner { + time, + coin_name, + r#type, + profit_amount, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_payment_uid_get_200_response.rs b/test_rust/src/models/_sapi_v1_mining_payment_uid_get_200_response.rs new file mode 100644 index 0000000..faeb04f --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_payment_uid_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningPaymentUidGet200Response { + #[serde(rename = "code")] + pub code: i32, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "data")] + pub data: Box, +} + +impl SapiV1MiningPaymentUidGet200Response { + pub fn new(code: i32, msg: String, data: models::SapiV1MiningPaymentUidGet200ResponseData) -> SapiV1MiningPaymentUidGet200Response { + SapiV1MiningPaymentUidGet200Response { + code, + msg, + data: Box::new(data), + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_payment_uid_get_200_response_data.rs b/test_rust/src/models/_sapi_v1_mining_payment_uid_get_200_response_data.rs new file mode 100644 index 0000000..9994965 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_payment_uid_get_200_response_data.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningPaymentUidGet200ResponseData { + #[serde(rename = "accountProfits")] + pub account_profits: Vec, + #[serde(rename = "totalNum")] + pub total_num: i32, + #[serde(rename = "pageSize")] + pub page_size: i32, +} + +impl SapiV1MiningPaymentUidGet200ResponseData { + pub fn new(account_profits: Vec, total_num: i32, page_size: i32) -> SapiV1MiningPaymentUidGet200ResponseData { + SapiV1MiningPaymentUidGet200ResponseData { + account_profits, + total_num, + page_size, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_payment_uid_get_200_response_data_account_profits_inner.rs b/test_rust/src/models/_sapi_v1_mining_payment_uid_get_200_response_data_account_profits_inner.rs new file mode 100644 index 0000000..0f57a04 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_payment_uid_get_200_response_data_account_profits_inner.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner { + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "coinName")] + pub coin_name: String, + /// 0:Referral 1:Refund 2:Rebate + #[serde(rename = "type")] + pub r#type: i32, + /// puid + #[serde(rename = "puid")] + pub puid: i32, + /// Mining account + #[serde(rename = "subName")] + pub sub_name: String, + #[serde(rename = "amount")] + pub amount: f64, +} + +impl SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner { + pub fn new(time: i64, coin_name: String, r#type: i32, puid: i32, sub_name: String, amount: f64) -> SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner { + SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner { + time, + coin_name, + r#type, + puid, + sub_name, + amount, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_pub_algo_list_get_200_response.rs b/test_rust/src/models/_sapi_v1_mining_pub_algo_list_get_200_response.rs new file mode 100644 index 0000000..c50ae68 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_pub_algo_list_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningPubAlgoListGet200Response { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "data")] + pub data: Vec, +} + +impl SapiV1MiningPubAlgoListGet200Response { + pub fn new(code: i64, msg: String, data: Vec) -> SapiV1MiningPubAlgoListGet200Response { + SapiV1MiningPubAlgoListGet200Response { + code, + msg, + data, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_pub_algo_list_get_200_response_data_inner.rs b/test_rust/src/models/_sapi_v1_mining_pub_algo_list_get_200_response_data_inner.rs new file mode 100644 index 0000000..4b9ee07 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_pub_algo_list_get_200_response_data_inner.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningPubAlgoListGet200ResponseDataInner { + #[serde(rename = "algoName")] + pub algo_name: String, + #[serde(rename = "algoId")] + pub algo_id: i64, + #[serde(rename = "poolIndex")] + pub pool_index: i64, + #[serde(rename = "unit")] + pub unit: String, +} + +impl SapiV1MiningPubAlgoListGet200ResponseDataInner { + pub fn new(algo_name: String, algo_id: i64, pool_index: i64, unit: String) -> SapiV1MiningPubAlgoListGet200ResponseDataInner { + SapiV1MiningPubAlgoListGet200ResponseDataInner { + algo_name, + algo_id, + pool_index, + unit, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_pub_coin_list_get_200_response.rs b/test_rust/src/models/_sapi_v1_mining_pub_coin_list_get_200_response.rs new file mode 100644 index 0000000..f57ac7a --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_pub_coin_list_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningPubCoinListGet200Response { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "data")] + pub data: Vec, +} + +impl SapiV1MiningPubCoinListGet200Response { + pub fn new(code: i64, msg: String, data: Vec) -> SapiV1MiningPubCoinListGet200Response { + SapiV1MiningPubCoinListGet200Response { + code, + msg, + data, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_pub_coin_list_get_200_response_data_inner.rs b/test_rust/src/models/_sapi_v1_mining_pub_coin_list_get_200_response_data_inner.rs new file mode 100644 index 0000000..a3053cd --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_pub_coin_list_get_200_response_data_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningPubCoinListGet200ResponseDataInner { + #[serde(rename = "coinName")] + pub coin_name: String, + #[serde(rename = "coinId")] + pub coin_id: i64, + #[serde(rename = "poolIndex")] + pub pool_index: i64, + #[serde(rename = "algoId")] + pub algo_id: i64, + #[serde(rename = "algoName")] + pub algo_name: String, +} + +impl SapiV1MiningPubCoinListGet200ResponseDataInner { + pub fn new(coin_name: String, coin_id: i64, pool_index: i64, algo_id: i64, algo_name: String) -> SapiV1MiningPubCoinListGet200ResponseDataInner { + SapiV1MiningPubCoinListGet200ResponseDataInner { + coin_name, + coin_id, + pool_index, + algo_id, + algo_name, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_statistics_user_list_get_200_response.rs b/test_rust/src/models/_sapi_v1_mining_statistics_user_list_get_200_response.rs new file mode 100644 index 0000000..4fc4b26 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_statistics_user_list_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningStatisticsUserListGet200Response { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "data")] + pub data: Vec, +} + +impl SapiV1MiningStatisticsUserListGet200Response { + pub fn new(code: i64, msg: String, data: Vec) -> SapiV1MiningStatisticsUserListGet200Response { + SapiV1MiningStatisticsUserListGet200Response { + code, + msg, + data, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_statistics_user_list_get_200_response_data_inner.rs b/test_rust/src/models/_sapi_v1_mining_statistics_user_list_get_200_response_data_inner.rs new file mode 100644 index 0000000..6ccf855 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_statistics_user_list_get_200_response_data_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningStatisticsUserListGet200ResponseDataInner { + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "userName")] + pub user_name: String, + #[serde(rename = "list")] + pub list: Vec, +} + +impl SapiV1MiningStatisticsUserListGet200ResponseDataInner { + pub fn new(r#type: String, user_name: String, list: Vec) -> SapiV1MiningStatisticsUserListGet200ResponseDataInner { + SapiV1MiningStatisticsUserListGet200ResponseDataInner { + r#type, + user_name, + list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner.rs b/test_rust/src/models/_sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner.rs new file mode 100644 index 0000000..3d363d1 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner { + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "hashrate")] + pub hashrate: String, + #[serde(rename = "reject")] + pub reject: String, +} + +impl SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner { + pub fn new(time: i64, hashrate: String, reject: String) -> SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner { + SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner { + time, + hashrate, + reject, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_statistics_user_status_get_200_response.rs b/test_rust/src/models/_sapi_v1_mining_statistics_user_status_get_200_response.rs new file mode 100644 index 0000000..313a273 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_statistics_user_status_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningStatisticsUserStatusGet200Response { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "data")] + pub data: Box, +} + +impl SapiV1MiningStatisticsUserStatusGet200Response { + pub fn new(code: i64, msg: String, data: models::SapiV1MiningStatisticsUserStatusGet200ResponseData) -> SapiV1MiningStatisticsUserStatusGet200Response { + SapiV1MiningStatisticsUserStatusGet200Response { + code, + msg, + data: Box::new(data), + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_statistics_user_status_get_200_response_data.rs b/test_rust/src/models/_sapi_v1_mining_statistics_user_status_get_200_response_data.rs new file mode 100644 index 0000000..bf171ad --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_statistics_user_status_get_200_response_data.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningStatisticsUserStatusGet200ResponseData { + #[serde(rename = "fifteenMinHashRate")] + pub fifteen_min_hash_rate: String, + #[serde(rename = "dayHashRate")] + pub day_hash_rate: String, + #[serde(rename = "validNum")] + pub valid_num: i64, + #[serde(rename = "invalidNum")] + pub invalid_num: i64, + #[serde(rename = "profitToday")] + pub profit_today: Box, + #[serde(rename = "profitYesterday")] + pub profit_yesterday: Box, + #[serde(rename = "userName")] + pub user_name: String, + #[serde(rename = "unit")] + pub unit: String, + #[serde(rename = "algo")] + pub algo: String, +} + +impl SapiV1MiningStatisticsUserStatusGet200ResponseData { + pub fn new(fifteen_min_hash_rate: String, day_hash_rate: String, valid_num: i64, invalid_num: i64, profit_today: models::SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday, profit_yesterday: models::SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday, user_name: String, unit: String, algo: String) -> SapiV1MiningStatisticsUserStatusGet200ResponseData { + SapiV1MiningStatisticsUserStatusGet200ResponseData { + fifteen_min_hash_rate, + day_hash_rate, + valid_num, + invalid_num, + profit_today: Box::new(profit_today), + profit_yesterday: Box::new(profit_yesterday), + user_name, + unit, + algo, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today.rs b/test_rust/src/models/_sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today.rs new file mode 100644 index 0000000..fcbadfd --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday { + #[serde(rename = "BTC")] + pub btc: String, + #[serde(rename = "BSV")] + pub bsv: String, + #[serde(rename = "BCH")] + pub bch: String, +} + +impl SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday { + pub fn new(btc: String, bsv: String, bch: String) -> SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday { + SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday { + btc, + bsv, + bch, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_worker_detail_get_200_response.rs b/test_rust/src/models/_sapi_v1_mining_worker_detail_get_200_response.rs new file mode 100644 index 0000000..5e8f8b2 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_worker_detail_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningWorkerDetailGet200Response { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "data")] + pub data: Vec, +} + +impl SapiV1MiningWorkerDetailGet200Response { + pub fn new(code: i64, msg: String, data: Vec) -> SapiV1MiningWorkerDetailGet200Response { + SapiV1MiningWorkerDetailGet200Response { + code, + msg, + data, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_worker_detail_get_200_response_data_inner.rs b/test_rust/src/models/_sapi_v1_mining_worker_detail_get_200_response_data_inner.rs new file mode 100644 index 0000000..25a1c61 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_worker_detail_get_200_response_data_inner.rs @@ -0,0 +1,35 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningWorkerDetailGet200ResponseDataInner { + /// Mining Account name + #[serde(rename = "workerName")] + pub worker_name: String, + /// Type of hourly hashrate + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "hashrateDatas")] + pub hashrate_datas: Vec, +} + +impl SapiV1MiningWorkerDetailGet200ResponseDataInner { + pub fn new(worker_name: String, r#type: String, hashrate_datas: Vec) -> SapiV1MiningWorkerDetailGet200ResponseDataInner { + SapiV1MiningWorkerDetailGet200ResponseDataInner { + worker_name, + r#type, + hashrate_datas, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrate_datas_inner.rs b/test_rust/src/models/_sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrate_datas_inner.rs new file mode 100644 index 0000000..578294e --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrate_datas_inner.rs @@ -0,0 +1,34 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner { + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "hashrate")] + pub hashrate: String, + /// Rejection Rate + #[serde(rename = "reject")] + pub reject: i64, +} + +impl SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner { + pub fn new(time: i64, hashrate: String, reject: i64) -> SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner { + SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner { + time, + hashrate, + reject, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_worker_list_get_200_response.rs b/test_rust/src/models/_sapi_v1_mining_worker_list_get_200_response.rs new file mode 100644 index 0000000..75a79a6 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_worker_list_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningWorkerListGet200Response { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "data")] + pub data: Box, +} + +impl SapiV1MiningWorkerListGet200Response { + pub fn new(code: i64, msg: String, data: models::SapiV1MiningWorkerListGet200ResponseData) -> SapiV1MiningWorkerListGet200Response { + SapiV1MiningWorkerListGet200Response { + code, + msg, + data: Box::new(data), + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_worker_list_get_200_response_data.rs b/test_rust/src/models/_sapi_v1_mining_worker_list_get_200_response_data.rs new file mode 100644 index 0000000..2def7c9 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_worker_list_get_200_response_data.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningWorkerListGet200ResponseData { + #[serde(rename = "workerDatas")] + pub worker_datas: Vec, + #[serde(rename = "totalNum")] + pub total_num: i64, + #[serde(rename = "pageSize")] + pub page_size: i64, +} + +impl SapiV1MiningWorkerListGet200ResponseData { + pub fn new(worker_datas: Vec, total_num: i64, page_size: i64) -> SapiV1MiningWorkerListGet200ResponseData { + SapiV1MiningWorkerListGet200ResponseData { + worker_datas, + total_num, + page_size, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_mining_worker_list_get_200_response_data_worker_datas_inner.rs b/test_rust/src/models/_sapi_v1_mining_worker_list_get_200_response_data_worker_datas_inner.rs new file mode 100644 index 0000000..29f949c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_mining_worker_list_get_200_response_data_worker_datas_inner.rs @@ -0,0 +1,50 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner { + #[serde(rename = "workerId")] + pub worker_id: String, + #[serde(rename = "workerName")] + pub worker_name: String, + /// Status:1 valid, 2 invalid, 3 no longer valid + #[serde(rename = "status")] + pub status: i64, + /// Real-time rate + #[serde(rename = "hashRate")] + pub hash_rate: i64, + /// 24H Hashrate + #[serde(rename = "dayHashRate")] + pub day_hash_rate: i64, + /// Real-time Rejection Rate + #[serde(rename = "rejectRate")] + pub reject_rate: i64, + /// Last submission time + #[serde(rename = "lastShareTime")] + pub last_share_time: i64, +} + +impl SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner { + pub fn new(worker_id: String, worker_name: String, status: i64, hash_rate: i64, day_hash_rate: i64, reject_rate: i64, last_share_time: i64) -> SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner { + SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner { + worker_id, + worker_name, + status, + hash_rate, + day_hash_rate, + reject_rate, + last_share_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_nft_history_deposit_get_200_response.rs b/test_rust/src/models/_sapi_v1_nft_history_deposit_get_200_response.rs new file mode 100644 index 0000000..437f0e1 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_nft_history_deposit_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1NftHistoryDepositGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "list")] + pub list: Vec, +} + +impl SapiV1NftHistoryDepositGet200Response { + pub fn new(total: i32, list: Vec) -> SapiV1NftHistoryDepositGet200Response { + SapiV1NftHistoryDepositGet200Response { + total, + list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_nft_history_deposit_get_200_response_list_inner.rs b/test_rust/src/models/_sapi_v1_nft_history_deposit_get_200_response_list_inner.rs new file mode 100644 index 0000000..9d8e7a3 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_nft_history_deposit_get_200_response_list_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1NftHistoryDepositGet200ResponseListInner { + #[serde(rename = "network")] + pub network: String, + #[serde(rename = "txID", deserialize_with = "Option::deserialize")] + pub tx_id: Option, + #[serde(rename = "contractAdrress")] + pub contract_adrress: String, + #[serde(rename = "tokenId")] + pub token_id: String, + #[serde(rename = "timestamp")] + pub timestamp: i64, +} + +impl SapiV1NftHistoryDepositGet200ResponseListInner { + pub fn new(network: String, tx_id: Option, contract_adrress: String, token_id: String, timestamp: i64) -> SapiV1NftHistoryDepositGet200ResponseListInner { + SapiV1NftHistoryDepositGet200ResponseListInner { + network, + tx_id, + contract_adrress, + token_id, + timestamp, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_nft_history_transactions_get_200_response.rs b/test_rust/src/models/_sapi_v1_nft_history_transactions_get_200_response.rs new file mode 100644 index 0000000..c31b4ff --- /dev/null +++ b/test_rust/src/models/_sapi_v1_nft_history_transactions_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1NftHistoryTransactionsGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "list")] + pub list: Vec, +} + +impl SapiV1NftHistoryTransactionsGet200Response { + pub fn new(total: i32, list: Vec) -> SapiV1NftHistoryTransactionsGet200Response { + SapiV1NftHistoryTransactionsGet200Response { + total, + list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_nft_history_transactions_get_200_response_list_inner.rs b/test_rust/src/models/_sapi_v1_nft_history_transactions_get_200_response_list_inner.rs new file mode 100644 index 0000000..c3d66ac --- /dev/null +++ b/test_rust/src/models/_sapi_v1_nft_history_transactions_get_200_response_list_inner.rs @@ -0,0 +1,40 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1NftHistoryTransactionsGet200ResponseListInner { + /// 0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee + #[serde(rename = "orderNo")] + pub order_no: String, + #[serde(rename = "tokens")] + pub tokens: Vec, + #[serde(rename = "tradeTime")] + pub trade_time: i64, + #[serde(rename = "tradeAmount")] + pub trade_amount: String, + #[serde(rename = "tradeCurrency")] + pub trade_currency: String, +} + +impl SapiV1NftHistoryTransactionsGet200ResponseListInner { + pub fn new(order_no: String, tokens: Vec, trade_time: i64, trade_amount: String, trade_currency: String) -> SapiV1NftHistoryTransactionsGet200ResponseListInner { + SapiV1NftHistoryTransactionsGet200ResponseListInner { + order_no, + tokens, + trade_time, + trade_amount, + trade_currency, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner.rs b/test_rust/src/models/_sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner.rs new file mode 100644 index 0000000..394c72d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner { + #[serde(rename = "network")] + pub network: String, + #[serde(rename = "tokenId")] + pub token_id: String, + #[serde(rename = "contractAddress")] + pub contract_address: String, +} + +impl SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner { + pub fn new(network: String, token_id: String, contract_address: String) -> SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner { + SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner { + network, + token_id, + contract_address, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_nft_history_withdraw_get_200_response.rs b/test_rust/src/models/_sapi_v1_nft_history_withdraw_get_200_response.rs new file mode 100644 index 0000000..cdd121b --- /dev/null +++ b/test_rust/src/models/_sapi_v1_nft_history_withdraw_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1NftHistoryWithdrawGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "list")] + pub list: Vec, +} + +impl SapiV1NftHistoryWithdrawGet200Response { + pub fn new(total: i32, list: Vec) -> SapiV1NftHistoryWithdrawGet200Response { + SapiV1NftHistoryWithdrawGet200Response { + total, + list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_nft_history_withdraw_get_200_response_list_inner.rs b/test_rust/src/models/_sapi_v1_nft_history_withdraw_get_200_response_list_inner.rs new file mode 100644 index 0000000..e9a5ee3 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_nft_history_withdraw_get_200_response_list_inner.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1NftHistoryWithdrawGet200ResponseListInner { + #[serde(rename = "network")] + pub network: String, + #[serde(rename = "txID")] + pub tx_id: String, + #[serde(rename = "contractAdrress")] + pub contract_adrress: String, + #[serde(rename = "tokenId")] + pub token_id: String, + #[serde(rename = "timestamp")] + pub timestamp: i64, + #[serde(rename = "fee")] + pub fee: f64, + #[serde(rename = "feeAsset")] + pub fee_asset: String, +} + +impl SapiV1NftHistoryWithdrawGet200ResponseListInner { + pub fn new(network: String, tx_id: String, contract_adrress: String, token_id: String, timestamp: i64, fee: f64, fee_asset: String) -> SapiV1NftHistoryWithdrawGet200ResponseListInner { + SapiV1NftHistoryWithdrawGet200ResponseListInner { + network, + tx_id, + contract_adrress, + token_id, + timestamp, + fee, + fee_asset, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_nft_user_get_asset_get_200_response.rs b/test_rust/src/models/_sapi_v1_nft_user_get_asset_get_200_response.rs new file mode 100644 index 0000000..cdeb65d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_nft_user_get_asset_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1NftUserGetAssetGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "list")] + pub list: Vec, +} + +impl SapiV1NftUserGetAssetGet200Response { + pub fn new(total: i32, list: Vec) -> SapiV1NftUserGetAssetGet200Response { + SapiV1NftUserGetAssetGet200Response { + total, + list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_nft_user_get_asset_get_200_response_list_inner.rs b/test_rust/src/models/_sapi_v1_nft_user_get_asset_get_200_response_list_inner.rs new file mode 100644 index 0000000..925f918 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_nft_user_get_asset_get_200_response_list_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1NftUserGetAssetGet200ResponseListInner { + #[serde(rename = "network")] + pub network: String, + #[serde(rename = "contractAddress")] + pub contract_address: String, + #[serde(rename = "tokenId")] + pub token_id: String, +} + +impl SapiV1NftUserGetAssetGet200ResponseListInner { + pub fn new(network: String, contract_address: String, token_id: String) -> SapiV1NftUserGetAssetGet200ResponseListInner { + SapiV1NftUserGetAssetGet200ResponseListInner { + network, + contract_address, + token_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response.rs b/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response.rs new file mode 100644 index 0000000..47c7060 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PayTransactionsGet200Response { + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "data")] + pub data: Vec, + #[serde(rename = "success")] + pub success: bool, +} + +impl SapiV1PayTransactionsGet200Response { + pub fn new(code: String, message: String, data: Vec, success: bool) -> SapiV1PayTransactionsGet200Response { + SapiV1PayTransactionsGet200Response { + code, + message, + data, + success, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner.rs b/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner.rs new file mode 100644 index 0000000..50df878 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner.rs @@ -0,0 +1,56 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PayTransactionsGet200ResponseDataInner { + /// Enum:PAY(C2B Merchant Acquiring Payment), PAY_REFUND(C2B Merchant Acquiring Payment,refund), C2C(C2C Transfer Payment),CRYPTO_BOX(Crypto box), CRYPTO_BOX_RF(Crypto Box, refund), C2C_HOLDING(Transfer to new Binance user), C2C_HOLDING_RF(Transfer to new Binance user,refund), PAYOUT(B2C Disbursement Payment) + #[serde(rename = "orderType")] + pub order_type: String, + #[serde(rename = "transactionId")] + pub transaction_id: String, + #[serde(rename = "transactionTime")] + pub transaction_time: i64, + /// order amount(up to 8 decimal places), positive is income, negative is expenditure + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "currency")] + pub currency: String, + #[serde(rename = "walletType")] + pub wallet_type: i32, + #[serde(rename = "walletTypes")] + pub wallet_types: Vec, + #[serde(rename = "fundsDetail")] + pub funds_detail: Vec, + #[serde(rename = "payerInfo")] + pub payer_info: Box, + #[serde(rename = "receiverInfo")] + pub receiver_info: Box, +} + +impl SapiV1PayTransactionsGet200ResponseDataInner { + pub fn new(order_type: String, transaction_id: String, transaction_time: i64, amount: String, currency: String, wallet_type: i32, wallet_types: Vec, funds_detail: Vec, payer_info: models::SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo, receiver_info: models::SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo) -> SapiV1PayTransactionsGet200ResponseDataInner { + SapiV1PayTransactionsGet200ResponseDataInner { + order_type, + transaction_id, + transaction_time, + amount, + currency, + wallet_type, + wallet_types, + funds_detail, + payer_info: Box::new(payer_info), + receiver_info: Box::new(receiver_info), + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_funds_detail_inner.rs b/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_funds_detail_inner.rs new file mode 100644 index 0000000..7bb2626 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_funds_detail_inner.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner { + #[serde(rename = "currency")] + pub currency: String, + #[serde(rename = "amount")] + pub amount: String, +} + +impl SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner { + pub fn new(currency: String, amount: String) -> SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner { + SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner { + currency, + amount, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_payer_info.rs b/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_payer_info.rs new file mode 100644 index 0000000..d104458 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_payer_info.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo { + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "binanceId")] + pub binance_id: String, + #[serde(rename = "accountId")] + pub account_id: String, +} + +impl SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo { + pub fn new(name: String, r#type: String, binance_id: String, account_id: String) -> SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo { + SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo { + name, + r#type, + binance_id, + account_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info.rs b/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info.rs new file mode 100644 index 0000000..238aaf9 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo { + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "binanceId")] + pub binance_id: String, + #[serde(rename = "accountId")] + pub account_id: String, + #[serde(rename = "countryCode")] + pub country_code: String, + #[serde(rename = "phoneNumber")] + pub phone_number: String, + #[serde(rename = "mobileCode")] + pub mobile_code: String, + #[serde(rename = "extend", skip_serializing_if = "Option::is_none")] + pub extend: Option>, +} + +impl SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo { + pub fn new(name: String, r#type: String, email: String, binance_id: String, account_id: String, country_code: String, phone_number: String, mobile_code: String) -> SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo { + SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo { + name, + r#type, + email, + binance_id, + account_id, + country_code, + phone_number, + mobile_code, + extend: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info_extend_inner.rs b/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info_extend_inner.rs new file mode 100644 index 0000000..40863cd --- /dev/null +++ b/test_rust/src/models/_sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info_extend_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner { + #[serde(rename = "institutionName")] + pub institution_name: String, + #[serde(rename = "cardNumber")] + pub card_number: String, + #[serde(rename = "digitalWalletId")] + pub digital_wallet_id: String, +} + +impl SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner { + pub fn new(institution_name: String, card_number: String, digital_wallet_id: String) -> SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner { + SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner { + institution_name, + card_number, + digital_wallet_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_portfolio_account_get_200_response.rs b/test_rust/src/models/_sapi_v1_portfolio_account_get_200_response.rs new file mode 100644 index 0000000..0c40cd9 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_portfolio_account_get_200_response.rs @@ -0,0 +1,48 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PortfolioAccountGet200Response { + /// Classic Portfolio margin account maintenance margin rate + #[serde(rename = "uniMMR")] + pub uni_mmr: String, + /// Account equity, unit is USD + #[serde(rename = "accountEquity")] + pub account_equity: String, + /// Actual equity, unit is USD + #[serde(rename = "actualEquity")] + pub actual_equity: String, + /// Classic Portfolio margin account maintenance margin, unit is USD + #[serde(rename = "accountMaintMargin")] + pub account_maint_margin: String, + /// Classic Portfolio margin account status:\"NORMAL\", \"MARGIN_CALL\", \"SUPPLY_MARGIN\", \"REDUCE_ONLY\", \"ACTIVE_LIQUIDATION\", \"FORCE_LIQUIDATION\", \"BANKRUPTED\" + #[serde(rename = "accountStatus")] + pub account_status: String, + /// PM_1 for classic PM, PM_2 for PM + #[serde(rename = "accountType")] + pub account_type: String, +} + +impl SapiV1PortfolioAccountGet200Response { + pub fn new(uni_mmr: String, account_equity: String, actual_equity: String, account_maint_margin: String, account_status: String, account_type: String) -> SapiV1PortfolioAccountGet200Response { + SapiV1PortfolioAccountGet200Response { + uni_mmr, + account_equity, + actual_equity, + account_maint_margin, + account_status, + account_type, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_portfolio_asset_index_price_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_portfolio_asset_index_price_get_200_response_inner.rs new file mode 100644 index 0000000..73d1412 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_portfolio_asset_index_price_get_200_response_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PortfolioAssetIndexPriceGet200ResponseInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "assetIndexPrice")] + pub asset_index_price: String, + #[serde(rename = "time")] + pub time: i64, +} + +impl SapiV1PortfolioAssetIndexPriceGet200ResponseInner { + pub fn new(asset: String, asset_index_price: String, time: i64) -> SapiV1PortfolioAssetIndexPriceGet200ResponseInner { + SapiV1PortfolioAssetIndexPriceGet200ResponseInner { + asset, + asset_index_price, + time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_portfolio_auto_collection_post_200_response.rs b/test_rust/src/models/_sapi_v1_portfolio_auto_collection_post_200_response.rs new file mode 100644 index 0000000..66ad28e --- /dev/null +++ b/test_rust/src/models/_sapi_v1_portfolio_auto_collection_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PortfolioAutoCollectionPost200Response { + #[serde(rename = "msg")] + pub msg: String, +} + +impl SapiV1PortfolioAutoCollectionPost200Response { + pub fn new(msg: String) -> SapiV1PortfolioAutoCollectionPost200Response { + SapiV1PortfolioAutoCollectionPost200Response { + msg, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_portfolio_collateral_rate_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_portfolio_collateral_rate_get_200_response_inner.rs new file mode 100644 index 0000000..76dbc89 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_portfolio_collateral_rate_get_200_response_inner.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PortfolioCollateralRateGet200ResponseInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "collateralRate")] + pub collateral_rate: String, +} + +impl SapiV1PortfolioCollateralRateGet200ResponseInner { + pub fn new(asset: String, collateral_rate: String) -> SapiV1PortfolioCollateralRateGet200ResponseInner { + SapiV1PortfolioCollateralRateGet200ResponseInner { + asset, + collateral_rate, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_portfolio_interest_history_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_portfolio_interest_history_get_200_response_inner.rs new file mode 100644 index 0000000..37402fe --- /dev/null +++ b/test_rust/src/models/_sapi_v1_portfolio_interest_history_get_200_response_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PortfolioInterestHistoryGet200ResponseInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "interest")] + pub interest: String, + #[serde(rename = "interestAccruedTime")] + pub interest_accrued_time: i64, + #[serde(rename = "interestRate")] + pub interest_rate: String, + #[serde(rename = "principal")] + pub principal: String, +} + +impl SapiV1PortfolioInterestHistoryGet200ResponseInner { + pub fn new(asset: String, interest: String, interest_accrued_time: i64, interest_rate: String, principal: String) -> SapiV1PortfolioInterestHistoryGet200ResponseInner { + SapiV1PortfolioInterestHistoryGet200ResponseInner { + asset, + interest, + interest_accrued_time, + interest_rate, + principal, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_portfolio_margin_asset_leverage_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_portfolio_margin_asset_leverage_get_200_response_inner.rs new file mode 100644 index 0000000..583d3cb --- /dev/null +++ b/test_rust/src/models/_sapi_v1_portfolio_margin_asset_leverage_get_200_response_inner.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PortfolioMarginAssetLeverageGet200ResponseInner { + #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] + pub asset: Option, + #[serde(rename = "collateralRate", skip_serializing_if = "Option::is_none")] + pub collateral_rate: Option, +} + +impl SapiV1PortfolioMarginAssetLeverageGet200ResponseInner { + pub fn new() -> SapiV1PortfolioMarginAssetLeverageGet200ResponseInner { + SapiV1PortfolioMarginAssetLeverageGet200ResponseInner { + asset: None, + collateral_rate: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_portfolio_pm_loan_get_200_response.rs b/test_rust/src/models/_sapi_v1_portfolio_pm_loan_get_200_response.rs new file mode 100644 index 0000000..ae50fda --- /dev/null +++ b/test_rust/src/models/_sapi_v1_portfolio_pm_loan_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PortfolioPmLoanGet200Response { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "amount")] + pub amount: String, +} + +impl SapiV1PortfolioPmLoanGet200Response { + pub fn new(asset: String, amount: String) -> SapiV1PortfolioPmLoanGet200Response { + SapiV1PortfolioPmLoanGet200Response { + asset, + amount, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_portfolio_repay_futures_switch_get_200_response.rs b/test_rust/src/models/_sapi_v1_portfolio_repay_futures_switch_get_200_response.rs new file mode 100644 index 0000000..89e67b0 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_portfolio_repay_futures_switch_get_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PortfolioRepayFuturesSwitchGet200Response { + #[serde(rename = "autoRepay")] + pub auto_repay: bool, +} + +impl SapiV1PortfolioRepayFuturesSwitchGet200Response { + pub fn new(auto_repay: bool) -> SapiV1PortfolioRepayFuturesSwitchGet200Response { + SapiV1PortfolioRepayFuturesSwitchGet200Response { + auto_repay, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_portfolio_repay_post_200_response.rs b/test_rust/src/models/_sapi_v1_portfolio_repay_post_200_response.rs new file mode 100644 index 0000000..6f8617c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_portfolio_repay_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1PortfolioRepayPost200Response { + #[serde(rename = "tranId")] + pub tran_id: i64, +} + +impl SapiV1PortfolioRepayPost200Response { + pub fn new(tran_id: i64) -> SapiV1PortfolioRepayPost200Response { + SapiV1PortfolioRepayPost200Response { + tran_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_rebate_tax_query_get_200_response.rs b/test_rust/src/models/_sapi_v1_rebate_tax_query_get_200_response.rs new file mode 100644 index 0000000..f6586cd --- /dev/null +++ b/test_rust/src/models/_sapi_v1_rebate_tax_query_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1RebateTaxQueryGet200Response { + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "data")] + pub data: Box, +} + +impl SapiV1RebateTaxQueryGet200Response { + pub fn new(status: String, r#type: String, code: String, data: models::SapiV1RebateTaxQueryGet200ResponseData) -> SapiV1RebateTaxQueryGet200Response { + SapiV1RebateTaxQueryGet200Response { + status, + r#type, + code, + data: Box::new(data), + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_rebate_tax_query_get_200_response_data.rs b/test_rust/src/models/_sapi_v1_rebate_tax_query_get_200_response_data.rs new file mode 100644 index 0000000..9bb60ec --- /dev/null +++ b/test_rust/src/models/_sapi_v1_rebate_tax_query_get_200_response_data.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1RebateTaxQueryGet200ResponseData { + #[serde(rename = "page")] + pub page: i32, + #[serde(rename = "totalRecords")] + pub total_records: i32, + #[serde(rename = "totalPageNum")] + pub total_page_num: i32, + #[serde(rename = "data")] + pub data: Vec, +} + +impl SapiV1RebateTaxQueryGet200ResponseData { + pub fn new(page: i32, total_records: i32, total_page_num: i32, data: Vec) -> SapiV1RebateTaxQueryGet200ResponseData { + SapiV1RebateTaxQueryGet200ResponseData { + page, + total_records, + total_page_num, + data, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_rebate_tax_query_get_200_response_data_data_inner.rs b/test_rust/src/models/_sapi_v1_rebate_tax_query_get_200_response_data_data_inner.rs new file mode 100644 index 0000000..a63fccf --- /dev/null +++ b/test_rust/src/models/_sapi_v1_rebate_tax_query_get_200_response_data_data_inner.rs @@ -0,0 +1,37 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1RebateTaxQueryGet200ResponseDataDataInner { + #[serde(rename = "asset")] + pub asset: String, + /// rebate type:1 is commission rebate,2 is referral kickback + #[serde(rename = "type")] + pub r#type: i32, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "updateTime")] + pub update_time: i64, +} + +impl SapiV1RebateTaxQueryGet200ResponseDataDataInner { + pub fn new(asset: String, r#type: i32, amount: String, update_time: i64) -> SapiV1RebateTaxQueryGet200ResponseDataDataInner { + SapiV1RebateTaxQueryGet200ResponseDataDataInner { + asset, + r#type, + amount, + update_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_account_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_account_get_200_response.rs new file mode 100644 index 0000000..68ca353 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_account_get_200_response.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnAccountGet200Response { + #[serde(rename = "totalAmountInBTC")] + pub total_amount_in_btc: String, + #[serde(rename = "totalAmountInUSDT")] + pub total_amount_in_usdt: String, + #[serde(rename = "totalFlexibleAmountInBTC")] + pub total_flexible_amount_in_btc: String, + #[serde(rename = "totalFlexibleAmountInUSDT")] + pub total_flexible_amount_in_usdt: String, + #[serde(rename = "totalLockedInBTC")] + pub total_locked_in_btc: String, + #[serde(rename = "totalLockedInUSDT")] + pub total_locked_in_usdt: String, +} + +impl SapiV1SimpleEarnAccountGet200Response { + pub fn new(total_amount_in_btc: String, total_amount_in_usdt: String, total_flexible_amount_in_btc: String, total_flexible_amount_in_usdt: String, total_locked_in_btc: String, total_locked_in_usdt: String) -> SapiV1SimpleEarnAccountGet200Response { + SapiV1SimpleEarnAccountGet200Response { + total_amount_in_btc, + total_amount_in_usdt, + total_flexible_amount_in_btc, + total_flexible_amount_in_usdt, + total_locked_in_btc, + total_locked_in_usdt, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response.rs new file mode 100644 index 0000000..c0916c1 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response { + SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response_rows_inner.rs new file mode 100644 index 0000000..264c182 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response_rows_inner.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner { + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "productId")] + pub product_id: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "createTime")] + pub create_time: i64, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "productName")] + pub product_name: String, + #[serde(rename = "orderId")] + pub order_id: i64, +} + +impl SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner { + pub fn new(amount: String, product_id: String, asset: String, create_time: i64, r#type: String, product_name: String, order_id: i64) -> SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner { + SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner { + amount, + product_id, + asset, + create_time, + r#type, + product_name, + order_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rate_history_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rate_history_get_200_response.rs new file mode 100644 index 0000000..a4d445d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rate_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response { + SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rate_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rate_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..73b6751 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rate_history_get_200_response_rows_inner.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner { + #[serde(rename = "productId")] + pub product_id: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "annualPercentageRate")] + pub annual_percentage_rate: String, + #[serde(rename = "time")] + pub time: i64, +} + +impl SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner { + pub fn new(product_id: String, asset: String, annual_percentage_rate: String, time: i64) -> SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner { + SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner { + product_id, + asset, + annual_percentage_rate, + time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response.rs new file mode 100644 index 0000000..bb9ae62 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response { + SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response_rows_inner.rs new file mode 100644 index 0000000..68d28ba --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response_rows_inner.rs @@ -0,0 +1,46 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner { + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "projectId")] + pub project_id: String, + #[serde(rename = "redeemId")] + pub redeem_id: i64, + /// SPOT, FUNDING + #[serde(rename = "destAccount")] + pub dest_account: String, + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner { + pub fn new(amount: String, asset: String, time: i64, project_id: String, redeem_id: i64, dest_account: String, status: String) -> SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner { + SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner { + amount, + asset, + time, + project_id, + redeem_id, + dest_account, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response.rs new file mode 100644 index 0000000..77b901c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response { + SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response_rows_inner.rs new file mode 100644 index 0000000..1962d58 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response_rows_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "rewards")] + pub rewards: String, + #[serde(rename = "projectId")] + pub project_id: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "time")] + pub time: i64, +} + +impl SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner { + pub fn new(asset: String, rewards: String, project_id: String, r#type: String, time: i64) -> SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner { + SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner { + asset, + rewards, + project_id, + r#type, + time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response.rs new file mode 100644 index 0000000..849e381 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response { + SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response_rows_inner.rs new file mode 100644 index 0000000..1e9e493 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response_rows_inner.rs @@ -0,0 +1,56 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner { + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "purchaseId")] + pub purchase_id: i64, + /// 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 + #[serde(rename = "type")] + pub r#type: String, + /// SPOT, FUNDING, SPOTANDFUNDING + #[serde(rename = "sourceAccount")] + pub source_account: String, + /// Display if sourceAccount is SPOTANDFUNDING + #[serde(rename = "amtFromSpot")] + pub amt_from_spot: String, + /// Display if sourceAccount is SPOTANDFUNDING + #[serde(rename = "amtFromFunding")] + pub amt_from_funding: String, + /// PURCHASING/SUCCESS/FAILED + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner { + pub fn new(amount: String, asset: String, time: i64, purchase_id: i64, r#type: String, source_account: String, amt_from_spot: String, amt_from_funding: String, status: String) -> SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner { + SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner { + amount, + asset, + time, + purchase_id, + r#type, + source_account, + amt_from_spot, + amt_from_funding, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_list_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_list_get_200_response.rs new file mode 100644 index 0000000..47c3078 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_list_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleListGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1SimpleEarnFlexibleListGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1SimpleEarnFlexibleListGet200Response { + SapiV1SimpleEarnFlexibleListGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner.rs new file mode 100644 index 0000000..6a49466 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner.rs @@ -0,0 +1,60 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "latestAnnualPercentageRate")] + pub latest_annual_percentage_rate: String, + #[serde(rename = "tierAnnualPercentageRate")] + pub tier_annual_percentage_rate: Box, + #[serde(rename = "airDropPercentageRate")] + pub air_drop_percentage_rate: String, + #[serde(rename = "canPurchase")] + pub can_purchase: bool, + #[serde(rename = "canRedeem")] + pub can_redeem: bool, + #[serde(rename = "isSoldOut")] + pub is_sold_out: bool, + #[serde(rename = "hot")] + pub hot: bool, + #[serde(rename = "minPurchaseAmount")] + pub min_purchase_amount: String, + #[serde(rename = "productId")] + pub product_id: String, + #[serde(rename = "subscriptionStartTime")] + pub subscription_start_time: String, + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner { + pub fn new(asset: String, latest_annual_percentage_rate: String, tier_annual_percentage_rate: models::SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate, air_drop_percentage_rate: String, can_purchase: bool, can_redeem: bool, is_sold_out: bool, hot: bool, min_purchase_amount: String, product_id: String, subscription_start_time: String, status: String) -> SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner { + SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner { + asset, + latest_annual_percentage_rate, + tier_annual_percentage_rate: Box::new(tier_annual_percentage_rate), + air_drop_percentage_rate, + can_purchase, + can_redeem, + is_sold_out, + hot, + min_purchase_amount, + product_id, + subscription_start_time, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate.rs new file mode 100644 index 0000000..a4572ef --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate { + #[serde(rename = "0-5BTC")] + pub param_0_5_btc: f64, + #[serde(rename = "5-10BTC")] + pub param_5_10_btc: f64, +} + +impl SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate { + pub fn new(param_0_5_btc: f64, param_5_10_btc: f64) -> SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate { + SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate { + param_0_5_btc, + param_5_10_btc, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_personal_left_quota_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_personal_left_quota_get_200_response.rs new file mode 100644 index 0000000..7a31748 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_personal_left_quota_get_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response { + #[serde(rename = "leftPersonalQuota")] + pub left_personal_quota: String, +} + +impl SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response { + pub fn new(left_personal_quota: String) -> SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response { + SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response { + left_personal_quota, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_position_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_position_get_200_response.rs new file mode 100644 index 0000000..d02bbde --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_position_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexiblePositionGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1SimpleEarnFlexiblePositionGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1SimpleEarnFlexiblePositionGet200Response { + SapiV1SimpleEarnFlexiblePositionGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_position_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_position_get_200_response_rows_inner.rs new file mode 100644 index 0000000..6276207 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_position_get_200_response_rows_inner.rs @@ -0,0 +1,66 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner { + #[serde(rename = "totalAmount")] + pub total_amount: String, + #[serde(rename = "tierAnnualPercentageRate")] + pub tier_annual_percentage_rate: Box, + #[serde(rename = "latestAnnualPercentageRate")] + pub latest_annual_percentage_rate: String, + #[serde(rename = "yesterdayAirdropPercentageRate")] + pub yesterday_airdrop_percentage_rate: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "airDropAsset")] + pub air_drop_asset: String, + #[serde(rename = "canRedeem")] + pub can_redeem: bool, + #[serde(rename = "collateralAmount")] + pub collateral_amount: String, + #[serde(rename = "productId")] + pub product_id: String, + #[serde(rename = "yesterdayRealTimeRewards")] + pub yesterday_real_time_rewards: String, + #[serde(rename = "cumulativeBonusRewards")] + pub cumulative_bonus_rewards: String, + #[serde(rename = "cumulativeRealTimeRewards")] + pub cumulative_real_time_rewards: String, + #[serde(rename = "cumulativeTotalRewards")] + pub cumulative_total_rewards: String, + #[serde(rename = "autoSubscribe")] + pub auto_subscribe: bool, +} + +impl SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner { + pub fn new(total_amount: String, tier_annual_percentage_rate: models::SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate, latest_annual_percentage_rate: String, yesterday_airdrop_percentage_rate: String, asset: String, air_drop_asset: String, can_redeem: bool, collateral_amount: String, product_id: String, yesterday_real_time_rewards: String, cumulative_bonus_rewards: String, cumulative_real_time_rewards: String, cumulative_total_rewards: String, auto_subscribe: bool) -> SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner { + SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner { + total_amount, + tier_annual_percentage_rate: Box::new(tier_annual_percentage_rate), + latest_annual_percentage_rate, + yesterday_airdrop_percentage_rate, + asset, + air_drop_asset, + can_redeem, + collateral_amount, + product_id, + yesterday_real_time_rewards, + cumulative_bonus_rewards, + cumulative_real_time_rewards, + cumulative_total_rewards, + auto_subscribe, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_redeem_post_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_redeem_post_200_response.rs new file mode 100644 index 0000000..ff9d298 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_redeem_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleRedeemPost200Response { + #[serde(rename = "redeemId")] + pub redeem_id: i64, + #[serde(rename = "success")] + pub success: bool, +} + +impl SapiV1SimpleEarnFlexibleRedeemPost200Response { + pub fn new(redeem_id: i64, success: bool) -> SapiV1SimpleEarnFlexibleRedeemPost200Response { + SapiV1SimpleEarnFlexibleRedeemPost200Response { + redeem_id, + success, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_subscribe_post_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_subscribe_post_200_response.rs new file mode 100644 index 0000000..6db113f --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_subscribe_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleSubscribePost200Response { + #[serde(rename = "purchaseId")] + pub purchase_id: i64, + #[serde(rename = "success")] + pub success: bool, +} + +impl SapiV1SimpleEarnFlexibleSubscribePost200Response { + pub fn new(purchase_id: i64, success: bool) -> SapiV1SimpleEarnFlexibleSubscribePost200Response { + SapiV1SimpleEarnFlexibleSubscribePost200Response { + purchase_id, + success, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_flexible_subscription_preview_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_flexible_subscription_preview_get_200_response.rs new file mode 100644 index 0000000..fab32a5 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_flexible_subscription_preview_get_200_response.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response { + #[serde(rename = "totalAmount")] + pub total_amount: String, + #[serde(rename = "rewardAsset")] + pub reward_asset: String, + #[serde(rename = "airDropAsset")] + pub air_drop_asset: String, + #[serde(rename = "estDailyBonusRewards")] + pub est_daily_bonus_rewards: String, + #[serde(rename = "estDailyRealTimeRewards")] + pub est_daily_real_time_rewards: String, + #[serde(rename = "estDailyAirdropRewards")] + pub est_daily_airdrop_rewards: String, +} + +impl SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response { + pub fn new(total_amount: String, reward_asset: String, air_drop_asset: String, est_daily_bonus_rewards: String, est_daily_real_time_rewards: String, est_daily_airdrop_rewards: String) -> SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response { + SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response { + total_amount, + reward_asset, + air_drop_asset, + est_daily_bonus_rewards, + est_daily_real_time_rewards, + est_daily_airdrop_rewards, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_locked_history_redemption_record_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_locked_history_redemption_record_get_200_response.rs new file mode 100644 index 0000000..2391d04 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_locked_history_redemption_record_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response { + SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_locked_history_redemption_record_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_simple_earn_locked_history_redemption_record_get_200_response_rows_inner.rs new file mode 100644 index 0000000..80b389f --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_locked_history_redemption_record_get_200_response_rows_inner.rs @@ -0,0 +1,52 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner { + #[serde(rename = "positionId")] + pub position_id: String, + #[serde(rename = "redeemId")] + pub redeem_id: i64, + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "lockPeriod")] + pub lock_period: String, + #[serde(rename = "amount")] + pub amount: String, + /// MATURE for redeem to Spot Wallet, NEW_TRANSFERRED for redeem to Flexible product, AHEAD for early redemption + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "deliverDate")] + pub deliver_date: String, + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner { + pub fn new(position_id: String, redeem_id: i64, time: i64, asset: String, lock_period: String, amount: String, r#type: String, deliver_date: String, status: String) -> SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner { + SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner { + position_id, + redeem_id, + time, + asset, + lock_period, + amount, + r#type, + deliver_date, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_locked_history_rewards_record_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_locked_history_rewards_record_get_200_response.rs new file mode 100644 index 0000000..6f3fc34 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_locked_history_rewards_record_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response { + SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_locked_history_rewards_record_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_simple_earn_locked_history_rewards_record_get_200_response_rows_inner.rs new file mode 100644 index 0000000..58a7e38 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_locked_history_rewards_record_get_200_response_rows_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner { + #[serde(rename = "positionId")] + pub position_id: String, + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "lockPeriod")] + pub lock_period: String, + #[serde(rename = "amount")] + pub amount: String, +} + +impl SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner { + pub fn new(position_id: String, time: i64, asset: String, lock_period: String, amount: String) -> SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner { + SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner { + position_id, + time, + asset, + lock_period, + amount, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_locked_history_subscription_record_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_locked_history_subscription_record_get_200_response.rs new file mode 100644 index 0000000..b3da554 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_locked_history_subscription_record_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response { + SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_locked_history_subscription_record_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_simple_earn_locked_history_subscription_record_get_200_response_rows_inner.rs new file mode 100644 index 0000000..5fbb8ca --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_locked_history_subscription_record_get_200_response_rows_inner.rs @@ -0,0 +1,62 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner { + #[serde(rename = "positionId")] + pub position_id: String, + #[serde(rename = "purchaseId")] + pub purchase_id: i64, + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "lockPeriod")] + pub lock_period: String, + /// NORMAL for normal subscription, AUTO for auto-subscription order, ACTIVITY for activity order, TRIAL for trial fund order, RESTAKE for restake order + #[serde(rename = "type")] + pub r#type: String, + /// SPOT, FUNDING, SPOTANDFUNDING + #[serde(rename = "sourceAccount")] + pub source_account: String, + /// Display if sourceAccount is SPOTANDFUNDING + #[serde(rename = "amtFromSpot")] + pub amt_from_spot: String, + /// Display if sourceAccount is SPOTANDFUNDING + #[serde(rename = "amtFromFunding")] + pub amt_from_funding: String, + /// PURCHASING/SUCCESS/FAILED + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner { + pub fn new(position_id: String, purchase_id: i64, time: i64, asset: String, amount: String, lock_period: String, r#type: String, source_account: String, amt_from_spot: String, amt_from_funding: String, status: String) -> SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner { + SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner { + position_id, + purchase_id, + time, + asset, + amount, + lock_period, + r#type, + source_account, + amt_from_spot, + amt_from_funding, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response.rs new file mode 100644 index 0000000..d875bb0 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnLockedListGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1SimpleEarnLockedListGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1SimpleEarnLockedListGet200Response { + SapiV1SimpleEarnLockedListGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner.rs new file mode 100644 index 0000000..16a47de --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnLockedListGet200ResponseRowsInner { + #[serde(rename = "projectId")] + pub project_id: String, + #[serde(rename = "detail")] + pub detail: Box, + #[serde(rename = "quota")] + pub quota: Box, +} + +impl SapiV1SimpleEarnLockedListGet200ResponseRowsInner { + pub fn new(project_id: String, detail: models::SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail, quota: models::SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota) -> SapiV1SimpleEarnLockedListGet200ResponseRowsInner { + SapiV1SimpleEarnLockedListGet200ResponseRowsInner { + project_id, + detail: Box::new(detail), + quota: Box::new(quota), + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail.rs b/test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail.rs new file mode 100644 index 0000000..d6f76bb --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail.rs @@ -0,0 +1,54 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "rewardAsset")] + pub reward_asset: String, + #[serde(rename = "duration")] + pub duration: i64, + #[serde(rename = "renewable")] + pub renewable: bool, + #[serde(rename = "isSoldOut")] + pub is_sold_out: bool, + #[serde(rename = "apr")] + pub apr: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "subscriptionStartTime")] + pub subscription_start_time: String, + #[serde(rename = "extraRewardAsset")] + pub extra_reward_asset: String, + #[serde(rename = "extraRewardAPR")] + pub extra_reward_apr: String, +} + +impl SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail { + pub fn new(asset: String, reward_asset: String, duration: i64, renewable: bool, is_sold_out: bool, apr: String, status: String, subscription_start_time: String, extra_reward_asset: String, extra_reward_apr: String) -> SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail { + SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail { + asset, + reward_asset, + duration, + renewable, + is_sold_out, + apr, + status, + subscription_start_time, + extra_reward_asset, + extra_reward_apr, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota.rs b/test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota.rs new file mode 100644 index 0000000..40985cc --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota { + #[serde(rename = "totalPersonalQuota")] + pub total_personal_quota: String, + #[serde(rename = "minimum")] + pub minimum: String, +} + +impl SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota { + pub fn new(total_personal_quota: String, minimum: String) -> SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota { + SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota { + total_personal_quota, + minimum, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_locked_position_get_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_locked_position_get_200_response.rs new file mode 100644 index 0000000..2e160a1 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_locked_position_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnLockedPositionGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i64, +} + +impl SapiV1SimpleEarnLockedPositionGet200Response { + pub fn new(rows: Vec, total: i64) -> SapiV1SimpleEarnLockedPositionGet200Response { + SapiV1SimpleEarnLockedPositionGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_locked_position_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v1_simple_earn_locked_position_get_200_response_rows_inner.rs new file mode 100644 index 0000000..f31fe9d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_locked_position_get_200_response_rows_inner.rs @@ -0,0 +1,60 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner { + #[serde(rename = "positionId")] + pub position_id: String, + #[serde(rename = "projectId")] + pub project_id: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "purchaseTime")] + pub purchase_time: String, + #[serde(rename = "duration")] + pub duration: String, + #[serde(rename = "accrualDays")] + pub accrual_days: String, + #[serde(rename = "rewardAsset")] + pub reward_asset: String, + #[serde(rename = "APY")] + pub apy: String, + #[serde(rename = "isRenewable")] + pub is_renewable: bool, + #[serde(rename = "isAutoRenew")] + pub is_auto_renew: bool, + #[serde(rename = "redeemDate")] + pub redeem_date: String, +} + +impl SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner { + pub fn new(position_id: String, project_id: String, asset: String, amount: String, purchase_time: String, duration: String, accrual_days: String, reward_asset: String, apy: String, is_renewable: bool, is_auto_renew: bool, redeem_date: String) -> SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner { + SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner { + position_id, + project_id, + asset, + amount, + purchase_time, + duration, + accrual_days, + reward_asset, + apy, + is_renewable, + is_auto_renew, + redeem_date, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_locked_subscribe_post_200_response.rs b/test_rust/src/models/_sapi_v1_simple_earn_locked_subscribe_post_200_response.rs new file mode 100644 index 0000000..f12747b --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_locked_subscribe_post_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnLockedSubscribePost200Response { + #[serde(rename = "purchaseId")] + pub purchase_id: i64, + #[serde(rename = "positionId")] + pub position_id: String, + #[serde(rename = "success")] + pub success: bool, +} + +impl SapiV1SimpleEarnLockedSubscribePost200Response { + pub fn new(purchase_id: i64, position_id: String, success: bool) -> SapiV1SimpleEarnLockedSubscribePost200Response { + SapiV1SimpleEarnLockedSubscribePost200Response { + purchase_id, + position_id, + success, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_simple_earn_locked_subscription_preview_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_simple_earn_locked_subscription_preview_get_200_response_inner.rs new file mode 100644 index 0000000..a48f78d --- /dev/null +++ b/test_rust/src/models/_sapi_v1_simple_earn_locked_subscription_preview_get_200_response_inner.rs @@ -0,0 +1,54 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner { + #[serde(rename = "rewardAsset")] + pub reward_asset: String, + #[serde(rename = "totalRewardAmt")] + pub total_reward_amt: String, + #[serde(rename = "extraRewardAsset")] + pub extra_reward_asset: String, + #[serde(rename = "estTotalExtraRewardAmt")] + pub est_total_extra_reward_amt: String, + #[serde(rename = "nextPay")] + pub next_pay: String, + #[serde(rename = "nextPayDate")] + pub next_pay_date: String, + #[serde(rename = "valueDate")] + pub value_date: String, + #[serde(rename = "rewardsEndDate")] + pub rewards_end_date: String, + #[serde(rename = "deliverDate")] + pub deliver_date: String, + #[serde(rename = "nextSubscriptionDate")] + pub next_subscription_date: String, +} + +impl SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner { + pub fn new(reward_asset: String, total_reward_amt: String, extra_reward_asset: String, est_total_extra_reward_amt: String, next_pay: String, next_pay_date: String, value_date: String, rewards_end_date: String, deliver_date: String, next_subscription_date: String) -> SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner { + SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner { + reward_asset, + total_reward_amt, + extra_reward_asset, + est_total_extra_reward_amt, + next_pay, + next_pay_date, + value_date, + rewards_end_date, + deliver_date, + next_subscription_date, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_spot_delist_schedule_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_spot_delist_schedule_get_200_response_inner.rs new file mode 100644 index 0000000..8d0e29b --- /dev/null +++ b/test_rust/src/models/_sapi_v1_spot_delist_schedule_get_200_response_inner.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SpotDelistScheduleGet200ResponseInner { + #[serde(rename = "delistTime")] + pub delist_time: i64, + #[serde(rename = "symbol")] + pub symbol: Vec, +} + +impl SapiV1SpotDelistScheduleGet200ResponseInner { + pub fn new(delist_time: i64, symbol: Vec) -> SapiV1SpotDelistScheduleGet200ResponseInner { + SapiV1SpotDelistScheduleGet200ResponseInner { + delist_time, + symbol, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_blvt_enable_post_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_blvt_enable_post_200_response.rs new file mode 100644 index 0000000..df97c2b --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_blvt_enable_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountBlvtEnablePost200Response { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "enableBlvt")] + pub enable_blvt: bool, +} + +impl SapiV1SubAccountBlvtEnablePost200Response { + pub fn new(email: String, enable_blvt: bool) -> SapiV1SubAccountBlvtEnablePost200Response { + SapiV1SubAccountBlvtEnablePost200Response { + email, + enable_blvt, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_eoptions_enable_post_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_eoptions_enable_post_200_response.rs new file mode 100644 index 0000000..e89c58c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_eoptions_enable_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountEoptionsEnablePost200Response { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "isEOptionsEnabled")] + pub is_e_options_enabled: bool, +} + +impl SapiV1SubAccountEoptionsEnablePost200Response { + pub fn new(email: String, is_e_options_enabled: bool) -> SapiV1SubAccountEoptionsEnablePost200Response { + SapiV1SubAccountEoptionsEnablePost200Response { + email, + is_e_options_enabled, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_futures_account_get_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_futures_account_get_200_response.rs new file mode 100644 index 0000000..8f14ea2 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_futures_account_get_200_response.rs @@ -0,0 +1,72 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountFuturesAccountGet200Response { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "assets")] + pub assets: Vec, + #[serde(rename = "canDeposit")] + pub can_deposit: bool, + #[serde(rename = "canTrade")] + pub can_trade: bool, + #[serde(rename = "canWithdraw")] + pub can_withdraw: bool, + #[serde(rename = "feeTier")] + pub fee_tier: i64, + #[serde(rename = "maxWithdrawAmount")] + pub max_withdraw_amount: String, + #[serde(rename = "totalInitialMargin")] + pub total_initial_margin: String, + #[serde(rename = "totalMaintenanceMargin")] + pub total_maintenance_margin: String, + #[serde(rename = "totalMarginBalance")] + pub total_margin_balance: String, + #[serde(rename = "totalOpenOrderInitialMargin")] + pub total_open_order_initial_margin: String, + #[serde(rename = "totalPositionInitialMargin")] + pub total_position_initial_margin: String, + #[serde(rename = "totalUnrealizedProfit")] + pub total_unrealized_profit: String, + #[serde(rename = "totalWalletBalance")] + pub total_wallet_balance: String, + #[serde(rename = "updateTime")] + pub update_time: i64, +} + +impl SapiV1SubAccountFuturesAccountGet200Response { + pub fn new(email: String, asset: String, assets: Vec, can_deposit: bool, can_trade: bool, can_withdraw: bool, fee_tier: i64, max_withdraw_amount: String, total_initial_margin: String, total_maintenance_margin: String, total_margin_balance: String, total_open_order_initial_margin: String, total_position_initial_margin: String, total_unrealized_profit: String, total_wallet_balance: String, update_time: i64) -> SapiV1SubAccountFuturesAccountGet200Response { + SapiV1SubAccountFuturesAccountGet200Response { + email, + asset, + assets, + can_deposit, + can_trade, + can_withdraw, + fee_tier, + max_withdraw_amount, + total_initial_margin, + total_maintenance_margin, + total_margin_balance, + total_open_order_initial_margin, + total_position_initial_margin, + total_unrealized_profit, + total_wallet_balance, + update_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_futures_account_get_200_response_assets_inner.rs b/test_rust/src/models/_sapi_v1_sub_account_futures_account_get_200_response_assets_inner.rs new file mode 100644 index 0000000..98ecf55 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_futures_account_get_200_response_assets_inner.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "initialMargin")] + pub initial_margin: String, + #[serde(rename = "maintenanceMargin")] + pub maintenance_margin: String, + #[serde(rename = "marginBalance")] + pub margin_balance: String, + #[serde(rename = "maxWithdrawAmount")] + pub max_withdraw_amount: String, + #[serde(rename = "openOrderInitialMargin")] + pub open_order_initial_margin: String, + #[serde(rename = "positionInitialMargin")] + pub position_initial_margin: String, + #[serde(rename = "unrealizedProfit")] + pub unrealized_profit: String, + #[serde(rename = "walletBalance")] + pub wallet_balance: String, +} + +impl SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner { + pub fn new(asset: String, initial_margin: String, maintenance_margin: String, margin_balance: String, max_withdraw_amount: String, open_order_initial_margin: String, position_initial_margin: String, unrealized_profit: String, wallet_balance: String) -> SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner { + SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner { + asset, + initial_margin, + maintenance_margin, + margin_balance, + max_withdraw_amount, + open_order_initial_margin, + position_initial_margin, + unrealized_profit, + wallet_balance, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_futures_account_summary_get_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_futures_account_summary_get_200_response.rs new file mode 100644 index 0000000..f980f75 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_futures_account_summary_get_200_response.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountFuturesAccountSummaryGet200Response { + #[serde(rename = "totalInitialMargin")] + pub total_initial_margin: String, + #[serde(rename = "totalMaintenanceMargin")] + pub total_maintenance_margin: String, + #[serde(rename = "totalMarginBalance")] + pub total_margin_balance: String, + #[serde(rename = "totalOpenOrderInitialMargin")] + pub total_open_order_initial_margin: String, + #[serde(rename = "totalPositionInitialMargin")] + pub total_position_initial_margin: String, + #[serde(rename = "totalUnrealizedProfit")] + pub total_unrealized_profit: String, + #[serde(rename = "totalWalletBalance")] + pub total_wallet_balance: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "subAccountList")] + pub sub_account_list: Vec, +} + +impl SapiV1SubAccountFuturesAccountSummaryGet200Response { + pub fn new(total_initial_margin: String, total_maintenance_margin: String, total_margin_balance: String, total_open_order_initial_margin: String, total_position_initial_margin: String, total_unrealized_profit: String, total_wallet_balance: String, asset: String, sub_account_list: Vec) -> SapiV1SubAccountFuturesAccountSummaryGet200Response { + SapiV1SubAccountFuturesAccountSummaryGet200Response { + total_initial_margin, + total_maintenance_margin, + total_margin_balance, + total_open_order_initial_margin, + total_position_initial_margin, + total_unrealized_profit, + total_wallet_balance, + asset, + sub_account_list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_futures_account_summary_get_200_response_sub_account_list_inner.rs b/test_rust/src/models/_sapi_v1_sub_account_futures_account_summary_get_200_response_sub_account_list_inner.rs new file mode 100644 index 0000000..af3416a --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_futures_account_summary_get_200_response_sub_account_list_inner.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "totalInitialMargin")] + pub total_initial_margin: String, + #[serde(rename = "totalMaintenanceMargin")] + pub total_maintenance_margin: String, + #[serde(rename = "totalMarginBalance")] + pub total_margin_balance: String, + #[serde(rename = "totalOpenOrderInitialMargin")] + pub total_open_order_initial_margin: String, + #[serde(rename = "totalPositionInitialMargin")] + pub total_position_initial_margin: String, + #[serde(rename = "totalUnrealizedProfit")] + pub total_unrealized_profit: String, + #[serde(rename = "totalWalletBalance")] + pub total_wallet_balance: String, + #[serde(rename = "asset")] + pub asset: String, +} + +impl SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner { + pub fn new(email: String, total_initial_margin: String, total_maintenance_margin: String, total_margin_balance: String, total_open_order_initial_margin: String, total_position_initial_margin: String, total_unrealized_profit: String, total_wallet_balance: String, asset: String) -> SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner { + SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner { + email, + total_initial_margin, + total_maintenance_margin, + total_margin_balance, + total_open_order_initial_margin, + total_position_initial_margin, + total_unrealized_profit, + total_wallet_balance, + asset, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_futures_enable_post_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_futures_enable_post_200_response.rs new file mode 100644 index 0000000..6f99233 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_futures_enable_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountFuturesEnablePost200Response { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "isFuturesEnabled")] + pub is_futures_enabled: bool, +} + +impl SapiV1SubAccountFuturesEnablePost200Response { + pub fn new(email: String, is_futures_enabled: bool) -> SapiV1SubAccountFuturesEnablePost200Response { + SapiV1SubAccountFuturesEnablePost200Response { + email, + is_futures_enabled, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_futures_internal_transfer_get_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_futures_internal_transfer_get_200_response.rs new file mode 100644 index 0000000..a1b9e2a --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_futures_internal_transfer_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountFuturesInternalTransferGet200Response { + #[serde(rename = "success")] + pub success: bool, + #[serde(rename = "futuresType")] + pub futures_type: i32, + #[serde(rename = "transfers")] + pub transfers: Vec, +} + +impl SapiV1SubAccountFuturesInternalTransferGet200Response { + pub fn new(success: bool, futures_type: i32, transfers: Vec) -> SapiV1SubAccountFuturesInternalTransferGet200Response { + SapiV1SubAccountFuturesInternalTransferGet200Response { + success, + futures_type, + transfers, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_futures_internal_transfer_get_200_response_transfers_inner.rs b/test_rust/src/models/_sapi_v1_sub_account_futures_internal_transfer_get_200_response_transfers_inner.rs new file mode 100644 index 0000000..824b399 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_futures_internal_transfer_get_200_response_transfers_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner { + #[serde(rename = "from")] + pub from: String, + #[serde(rename = "to")] + pub to: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "qty")] + pub qty: String, + #[serde(rename = "tranId")] + pub tran_id: i64, + #[serde(rename = "time")] + pub time: i64, +} + +impl SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner { + pub fn new(from: String, to: String, asset: String, qty: String, tran_id: i64, time: i64) -> SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner { + SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner { + from, + to, + asset, + qty, + tran_id, + time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_futures_internal_transfer_post_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_futures_internal_transfer_post_200_response.rs new file mode 100644 index 0000000..2e5e2e0 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_futures_internal_transfer_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountFuturesInternalTransferPost200Response { + #[serde(rename = "success")] + pub success: bool, + #[serde(rename = "txnId")] + pub txn_id: String, +} + +impl SapiV1SubAccountFuturesInternalTransferPost200Response { + pub fn new(success: bool, txn_id: String) -> SapiV1SubAccountFuturesInternalTransferPost200Response { + SapiV1SubAccountFuturesInternalTransferPost200Response { + success, + txn_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_futures_position_risk_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_sub_account_futures_position_risk_get_200_response_inner.rs new file mode 100644 index 0000000..35f3b1b --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_futures_position_risk_get_200_response_inner.rs @@ -0,0 +1,50 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountFuturesPositionRiskGet200ResponseInner { + #[serde(rename = "entryPrice")] + pub entry_price: String, + /// current initial leverage + #[serde(rename = "leverage")] + pub leverage: String, + /// notional value limit of current initial leverage + #[serde(rename = "maxNotional")] + pub max_notional: String, + #[serde(rename = "liquidationPrice")] + pub liquidation_price: String, + #[serde(rename = "markPrice")] + pub mark_price: String, + #[serde(rename = "positionAmount")] + pub position_amount: String, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "unrealizedProfit")] + pub unrealized_profit: String, +} + +impl SapiV1SubAccountFuturesPositionRiskGet200ResponseInner { + pub fn new(entry_price: String, leverage: String, max_notional: String, liquidation_price: String, mark_price: String, position_amount: String, symbol: String, unrealized_profit: String) -> SapiV1SubAccountFuturesPositionRiskGet200ResponseInner { + SapiV1SubAccountFuturesPositionRiskGet200ResponseInner { + entry_price, + leverage, + max_notional, + liquidation_price, + mark_price, + position_amount, + symbol, + unrealized_profit, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_futures_transfer_post_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_futures_transfer_post_200_response.rs new file mode 100644 index 0000000..7e87341 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_futures_transfer_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountFuturesTransferPost200Response { + #[serde(rename = "txnId")] + pub txn_id: String, +} + +impl SapiV1SubAccountFuturesTransferPost200Response { + pub fn new(txn_id: String) -> SapiV1SubAccountFuturesTransferPost200Response { + SapiV1SubAccountFuturesTransferPost200Response { + txn_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_list_get_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_list_get_200_response.rs new file mode 100644 index 0000000..9908a1c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_list_get_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountListGet200Response { + #[serde(rename = "subAccounts")] + pub sub_accounts: Vec, +} + +impl SapiV1SubAccountListGet200Response { + pub fn new(sub_accounts: Vec) -> SapiV1SubAccountListGet200Response { + SapiV1SubAccountListGet200Response { + sub_accounts, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_list_get_200_response_sub_accounts_inner.rs b/test_rust/src/models/_sapi_v1_sub_account_list_get_200_response_sub_accounts_inner.rs new file mode 100644 index 0000000..3f4350b --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_list_get_200_response_sub_accounts_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountListGet200ResponseSubAccountsInner { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "isFreeze")] + pub is_freeze: bool, + #[serde(rename = "createTime")] + pub create_time: i64, + #[serde(rename = "isManagedSubAccount")] + pub is_managed_sub_account: bool, + #[serde(rename = "isAssetManagementSubAccount")] + pub is_asset_management_sub_account: bool, +} + +impl SapiV1SubAccountListGet200ResponseSubAccountsInner { + pub fn new(email: String, is_freeze: bool, create_time: i64, is_managed_sub_account: bool, is_asset_management_sub_account: bool) -> SapiV1SubAccountListGet200ResponseSubAccountsInner { + SapiV1SubAccountListGet200ResponseSubAccountsInner { + email, + is_freeze, + create_time, + is_managed_sub_account, + is_asset_management_sub_account, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_margin_account_get_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_margin_account_get_200_response.rs new file mode 100644 index 0000000..2625697 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_margin_account_get_200_response.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountMarginAccountGet200Response { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "marginLevel")] + pub margin_level: String, + #[serde(rename = "totalAssetOfBtc")] + pub total_asset_of_btc: String, + #[serde(rename = "totalLiabilityOfBtc")] + pub total_liability_of_btc: String, + #[serde(rename = "totalNetAssetOfBtc")] + pub total_net_asset_of_btc: String, + #[serde(rename = "marginTradeCoeffVo")] + pub margin_trade_coeff_vo: Box, + #[serde(rename = "marginUserAssetVoList")] + pub margin_user_asset_vo_list: Vec, +} + +impl SapiV1SubAccountMarginAccountGet200Response { + pub fn new(email: String, margin_level: String, total_asset_of_btc: String, total_liability_of_btc: String, total_net_asset_of_btc: String, margin_trade_coeff_vo: models::SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo, margin_user_asset_vo_list: Vec) -> SapiV1SubAccountMarginAccountGet200Response { + SapiV1SubAccountMarginAccountGet200Response { + email, + margin_level, + total_asset_of_btc, + total_liability_of_btc, + total_net_asset_of_btc, + margin_trade_coeff_vo: Box::new(margin_trade_coeff_vo), + margin_user_asset_vo_list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_margin_account_get_200_response_margin_trade_coeff_vo.rs b/test_rust/src/models/_sapi_v1_sub_account_margin_account_get_200_response_margin_trade_coeff_vo.rs new file mode 100644 index 0000000..1079613 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_margin_account_get_200_response_margin_trade_coeff_vo.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo { + /// Liquidation margin ratio + #[serde(rename = "forceLiquidationBar")] + pub force_liquidation_bar: String, + /// Margin call margin ratio + #[serde(rename = "marginCallBar")] + pub margin_call_bar: String, + /// Initial margin ratio + #[serde(rename = "normalBar")] + pub normal_bar: String, +} + +impl SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo { + pub fn new(force_liquidation_bar: String, margin_call_bar: String, normal_bar: String) -> SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo { + SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo { + force_liquidation_bar, + margin_call_bar, + normal_bar, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_margin_account_summary_get_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_margin_account_summary_get_200_response.rs new file mode 100644 index 0000000..e643a26 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_margin_account_summary_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountMarginAccountSummaryGet200Response { + #[serde(rename = "totalAssetOfBtc")] + pub total_asset_of_btc: String, + #[serde(rename = "totalLiabilityOfBtc")] + pub total_liability_of_btc: String, + #[serde(rename = "totalNetAssetOfBtc")] + pub total_net_asset_of_btc: String, + #[serde(rename = "subAccountList")] + pub sub_account_list: Vec, +} + +impl SapiV1SubAccountMarginAccountSummaryGet200Response { + pub fn new(total_asset_of_btc: String, total_liability_of_btc: String, total_net_asset_of_btc: String, sub_account_list: Vec) -> SapiV1SubAccountMarginAccountSummaryGet200Response { + SapiV1SubAccountMarginAccountSummaryGet200Response { + total_asset_of_btc, + total_liability_of_btc, + total_net_asset_of_btc, + sub_account_list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_margin_account_summary_get_200_response_sub_account_list_inner.rs b/test_rust/src/models/_sapi_v1_sub_account_margin_account_summary_get_200_response_sub_account_list_inner.rs new file mode 100644 index 0000000..f6ff5ac --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_margin_account_summary_get_200_response_sub_account_list_inner.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "totalAssetOfBtc")] + pub total_asset_of_btc: String, + #[serde(rename = "totalLiabilityOfBtc")] + pub total_liability_of_btc: String, + #[serde(rename = "totalNetAssetOfBtc")] + pub total_net_asset_of_btc: String, +} + +impl SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner { + pub fn new(email: String, total_asset_of_btc: String, total_liability_of_btc: String, total_net_asset_of_btc: String) -> SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner { + SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner { + email, + total_asset_of_btc, + total_liability_of_btc, + total_net_asset_of_btc, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_margin_enable_post_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_margin_enable_post_200_response.rs new file mode 100644 index 0000000..e207db1 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_margin_enable_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountMarginEnablePost200Response { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "isMarginEnabled")] + pub is_margin_enabled: bool, +} + +impl SapiV1SubAccountMarginEnablePost200Response { + pub fn new(email: String, is_margin_enabled: bool) -> SapiV1SubAccountMarginEnablePost200Response { + SapiV1SubAccountMarginEnablePost200Response { + email, + is_margin_enabled, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_spot_summary_get_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_spot_summary_get_200_response.rs new file mode 100644 index 0000000..76fc02c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_spot_summary_get_200_response.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountSpotSummaryGet200Response { + #[serde(rename = "totalCount")] + pub total_count: i64, + #[serde(rename = "masterAccountTotalAsset")] + pub master_account_total_asset: String, + #[serde(rename = "spotSubUserAssetBtcVoList")] + pub spot_sub_user_asset_btc_vo_list: Vec, +} + +impl SapiV1SubAccountSpotSummaryGet200Response { + pub fn new(total_count: i64, master_account_total_asset: String, spot_sub_user_asset_btc_vo_list: Vec) -> SapiV1SubAccountSpotSummaryGet200Response { + SapiV1SubAccountSpotSummaryGet200Response { + total_count, + master_account_total_asset, + spot_sub_user_asset_btc_vo_list, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_spot_summary_get_200_response_spot_sub_user_asset_btc_vo_list_inner.rs b/test_rust/src/models/_sapi_v1_sub_account_spot_summary_get_200_response_spot_sub_user_asset_btc_vo_list_inner.rs new file mode 100644 index 0000000..4749560 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_spot_summary_get_200_response_spot_sub_user_asset_btc_vo_list_inner.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "totalAsset")] + pub total_asset: String, +} + +impl SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner { + pub fn new(email: String, total_asset: String) -> SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner { + SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner { + email, + total_asset, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_status_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_sub_account_status_get_200_response_inner.rs new file mode 100644 index 0000000..ce9a907 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_status_get_200_response_inner.rs @@ -0,0 +1,47 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountStatusGet200ResponseInner { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "isSubUserEnabled")] + pub is_sub_user_enabled: bool, + #[serde(rename = "isUserActive")] + pub is_user_active: bool, + /// sub account create time + #[serde(rename = "insertTime")] + pub insert_time: i64, + #[serde(rename = "isMarginEnabled")] + pub is_margin_enabled: bool, + #[serde(rename = "isFutureEnabled")] + pub is_future_enabled: bool, + /// user mobile number + #[serde(rename = "mobile")] + pub mobile: i64, +} + +impl SapiV1SubAccountStatusGet200ResponseInner { + pub fn new(email: String, is_sub_user_enabled: bool, is_user_active: bool, insert_time: i64, is_margin_enabled: bool, is_future_enabled: bool, mobile: i64) -> SapiV1SubAccountStatusGet200ResponseInner { + SapiV1SubAccountStatusGet200ResponseInner { + email, + is_sub_user_enabled, + is_user_active, + insert_time, + is_margin_enabled, + is_future_enabled, + mobile, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_sub_account_api_ip_restriction_get_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_sub_account_api_ip_restriction_get_200_response.rs new file mode 100644 index 0000000..cafdd61 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_sub_account_api_ip_restriction_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountSubAccountApiIpRestrictionGet200Response { + #[serde(rename = "ipRestrict")] + pub ip_restrict: String, + #[serde(rename = "ipList")] + pub ip_list: Vec, + #[serde(rename = "updateTime")] + pub update_time: i64, + #[serde(rename = "apiKey")] + pub api_key: String, +} + +impl SapiV1SubAccountSubAccountApiIpRestrictionGet200Response { + pub fn new(ip_restrict: String, ip_list: Vec, update_time: i64, api_key: String) -> SapiV1SubAccountSubAccountApiIpRestrictionGet200Response { + SapiV1SubAccountSubAccountApiIpRestrictionGet200Response { + ip_restrict, + ip_list, + update_time, + api_key, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete_200_response.rs new file mode 100644 index 0000000..7d685ab --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response { + #[serde(rename = "ipRestrict")] + pub ip_restrict: String, + #[serde(rename = "ipList")] + pub ip_list: Vec, + #[serde(rename = "updateTime")] + pub update_time: i64, + #[serde(rename = "apiKey")] + pub api_key: String, +} + +impl SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response { + pub fn new(ip_restrict: String, ip_list: Vec, update_time: i64, api_key: String) -> SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response { + SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response { + ip_restrict, + ip_list, + update_time, + api_key, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_sub_transfer_history_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_sub_account_sub_transfer_history_get_200_response_inner.rs new file mode 100644 index 0000000..73138da --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_sub_transfer_history_get_200_response_inner.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountSubTransferHistoryGet200ResponseInner { + #[serde(rename = "from")] + pub from: String, + #[serde(rename = "to")] + pub to: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "qty")] + pub qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "tranId")] + pub tran_id: i64, + #[serde(rename = "time")] + pub time: i64, +} + +impl SapiV1SubAccountSubTransferHistoryGet200ResponseInner { + pub fn new(from: String, to: String, asset: String, qty: String, status: String, tran_id: i64, time: i64) -> SapiV1SubAccountSubTransferHistoryGet200ResponseInner { + SapiV1SubAccountSubTransferHistoryGet200ResponseInner { + from, + to, + asset, + qty, + status, + tran_id, + time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_transaction_statistics_get_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_transaction_statistics_get_200_response.rs new file mode 100644 index 0000000..317363c --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_transaction_statistics_get_200_response.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountTransactionStatisticsGet200Response { + #[serde(rename = "recent30BtcTotal")] + pub recent30_btc_total: String, + #[serde(rename = "recent30BtcFuturesTotal")] + pub recent30_btc_futures_total: String, + #[serde(rename = "recent30BtcMarginTotal")] + pub recent30_btc_margin_total: String, + #[serde(rename = "recent30BusdTotal")] + pub recent30_busd_total: String, + #[serde(rename = "recent30BusdFuturesTotal")] + pub recent30_busd_futures_total: String, + #[serde(rename = "recent30BusdMarginTotal")] + pub recent30_busd_margin_total: String, + #[serde(rename = "tradeInfoVos")] + pub trade_info_vos: Vec, +} + +impl SapiV1SubAccountTransactionStatisticsGet200Response { + pub fn new(recent30_btc_total: String, recent30_btc_futures_total: String, recent30_btc_margin_total: String, recent30_busd_total: String, recent30_busd_futures_total: String, recent30_busd_margin_total: String, trade_info_vos: Vec) -> SapiV1SubAccountTransactionStatisticsGet200Response { + SapiV1SubAccountTransactionStatisticsGet200Response { + recent30_btc_total, + recent30_btc_futures_total, + recent30_btc_margin_total, + recent30_busd_total, + recent30_busd_futures_total, + recent30_busd_margin_total, + trade_info_vos, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_transaction_statistics_get_200_response_trade_info_vos_inner.rs b/test_rust/src/models/_sapi_v1_sub_account_transaction_statistics_get_200_response_trade_info_vos_inner.rs new file mode 100644 index 0000000..b909b56 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_transaction_statistics_get_200_response_trade_info_vos_inner.rs @@ -0,0 +1,48 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner { + #[serde(rename = "userId", skip_serializing_if = "Option::is_none")] + pub user_id: Option, + #[serde(rename = "btc", skip_serializing_if = "Option::is_none")] + pub btc: Option, + #[serde(rename = "btcFutures", skip_serializing_if = "Option::is_none")] + pub btc_futures: Option, + #[serde(rename = "btcMargin", skip_serializing_if = "Option::is_none")] + pub btc_margin: Option, + #[serde(rename = "busd", skip_serializing_if = "Option::is_none")] + pub busd: Option, + #[serde(rename = "busdFutures", skip_serializing_if = "Option::is_none")] + pub busd_futures: Option, + #[serde(rename = "busdMargin", skip_serializing_if = "Option::is_none")] + pub busd_margin: Option, + #[serde(rename = "date", skip_serializing_if = "Option::is_none")] + pub date: Option, +} + +impl SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner { + pub fn new() -> SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner { + SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner { + user_id: None, + btc: None, + btc_futures: None, + btc_margin: None, + busd: None, + busd_futures: None, + busd_margin: None, + date: None, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_transfer_sub_user_history_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_sub_account_transfer_sub_user_history_get_200_response_inner.rs new file mode 100644 index 0000000..554e5d0 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_transfer_sub_user_history_get_200_response_inner.rs @@ -0,0 +1,55 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner { + #[serde(rename = "counterParty")] + pub counter_party: String, + #[serde(rename = "email")] + pub email: String, + /// 1 for transfer in, 2 for transfer out + #[serde(rename = "type")] + pub r#type: i32, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "qty")] + pub qty: String, + #[serde(rename = "fromAccountType")] + pub from_account_type: String, + #[serde(rename = "toAccountType")] + pub to_account_type: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "tranId")] + pub tran_id: i64, + #[serde(rename = "time")] + pub time: i64, +} + +impl SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner { + pub fn new(counter_party: String, email: String, r#type: i32, asset: String, qty: String, from_account_type: String, to_account_type: String, status: String, tran_id: i64, time: i64) -> SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner { + SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner { + counter_party, + email, + r#type, + asset, + qty, + from_account_type, + to_account_type, + status, + tran_id, + time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_universal_transfer_get_200_response_inner.rs b/test_rust/src/models/_sapi_v1_sub_account_universal_transfer_get_200_response_inner.rs new file mode 100644 index 0000000..56a0b4b --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_universal_transfer_get_200_response_inner.rs @@ -0,0 +1,54 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountUniversalTransferGet200ResponseInner { + #[serde(rename = "tranId")] + pub tran_id: i64, + #[serde(rename = "fromEmail")] + pub from_email: String, + #[serde(rename = "toEmail")] + pub to_email: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "fromAccountType")] + pub from_account_type: String, + #[serde(rename = "toAccountType")] + pub to_account_type: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "createTimeStamp")] + pub create_time_stamp: i64, + #[serde(rename = "clientTranId")] + pub client_tran_id: String, +} + +impl SapiV1SubAccountUniversalTransferGet200ResponseInner { + pub fn new(tran_id: i64, from_email: String, to_email: String, asset: String, amount: String, from_account_type: String, to_account_type: String, status: String, create_time_stamp: i64, client_tran_id: String) -> SapiV1SubAccountUniversalTransferGet200ResponseInner { + SapiV1SubAccountUniversalTransferGet200ResponseInner { + tran_id, + from_email, + to_email, + asset, + amount, + from_account_type, + to_account_type, + status, + create_time_stamp, + client_tran_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_universal_transfer_post_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_universal_transfer_post_200_response.rs new file mode 100644 index 0000000..6eae13b --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_universal_transfer_post_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountUniversalTransferPost200Response { + #[serde(rename = "tranId")] + pub tran_id: i64, + #[serde(rename = "clientTranId")] + pub client_tran_id: String, +} + +impl SapiV1SubAccountUniversalTransferPost200Response { + pub fn new(tran_id: i64, client_tran_id: String) -> SapiV1SubAccountUniversalTransferPost200Response { + SapiV1SubAccountUniversalTransferPost200Response { + tran_id, + client_tran_id, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_sub_account_virtual_sub_account_post_200_response.rs b/test_rust/src/models/_sapi_v1_sub_account_virtual_sub_account_post_200_response.rs new file mode 100644 index 0000000..e4dc876 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_sub_account_virtual_sub_account_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SubAccountVirtualSubAccountPost200Response { + #[serde(rename = "email")] + pub email: String, +} + +impl SapiV1SubAccountVirtualSubAccountPost200Response { + pub fn new(email: String) -> SapiV1SubAccountVirtualSubAccountPost200Response { + SapiV1SubAccountVirtualSubAccountPost200Response { + email, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_system_status_get_200_response.rs b/test_rust/src/models/_sapi_v1_system_status_get_200_response.rs new file mode 100644 index 0000000..210e090 --- /dev/null +++ b/test_rust/src/models/_sapi_v1_system_status_get_200_response.rs @@ -0,0 +1,32 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1SystemStatusGet200Response { + /// 0: normal, 1:system maintenance + #[serde(rename = "status")] + pub status: i32, + /// \"normal\", \"system_maintenance\" + #[serde(rename = "msg")] + pub msg: String, +} + +impl SapiV1SystemStatusGet200Response { + pub fn new(status: i32, msg: String) -> SapiV1SystemStatusGet200Response { + SapiV1SystemStatusGet200Response { + status, + msg, + } + } +} + diff --git a/test_rust/src/models/_sapi_v1_user_data_stream_isolated_post_200_response.rs b/test_rust/src/models/_sapi_v1_user_data_stream_isolated_post_200_response.rs new file mode 100644 index 0000000..5979c6a --- /dev/null +++ b/test_rust/src/models/_sapi_v1_user_data_stream_isolated_post_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV1UserDataStreamIsolatedPost200Response { + #[serde(rename = "listenKey")] + pub listen_key: String, +} + +impl SapiV1UserDataStreamIsolatedPost200Response { + pub fn new(listen_key: String) -> SapiV1UserDataStreamIsolatedPost200Response { + SapiV1UserDataStreamIsolatedPost200Response { + listen_key, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_eth_staking_account_get_200_response.rs b/test_rust/src/models/_sapi_v2_eth_staking_account_get_200_response.rs new file mode 100644 index 0000000..6080c8b --- /dev/null +++ b/test_rust/src/models/_sapi_v2_eth_staking_account_get_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2EthStakingAccountGet200Response { + #[serde(rename = "holdingInETH")] + pub holding_in_eth: String, + #[serde(rename = "holdings")] + pub holdings: Box, + #[serde(rename = "thirtyDaysProfitInETH")] + pub thirty_days_profit_in_eth: String, + #[serde(rename = "profit")] + pub profit: Box, +} + +impl SapiV2EthStakingAccountGet200Response { + pub fn new(holding_in_eth: String, holdings: models::SapiV2EthStakingAccountGet200ResponseHoldings, thirty_days_profit_in_eth: String, profit: models::SapiV2EthStakingAccountGet200ResponseProfit) -> SapiV2EthStakingAccountGet200Response { + SapiV2EthStakingAccountGet200Response { + holding_in_eth, + holdings: Box::new(holdings), + thirty_days_profit_in_eth, + profit: Box::new(profit), + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_eth_staking_account_get_200_response_holdings.rs b/test_rust/src/models/_sapi_v2_eth_staking_account_get_200_response_holdings.rs new file mode 100644 index 0000000..ba93372 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_eth_staking_account_get_200_response_holdings.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2EthStakingAccountGet200ResponseHoldings { + #[serde(rename = "wbethAmount")] + pub wbeth_amount: String, + #[serde(rename = "bethAmount")] + pub beth_amount: String, +} + +impl SapiV2EthStakingAccountGet200ResponseHoldings { + pub fn new(wbeth_amount: String, beth_amount: String) -> SapiV2EthStakingAccountGet200ResponseHoldings { + SapiV2EthStakingAccountGet200ResponseHoldings { + wbeth_amount, + beth_amount, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_eth_staking_account_get_200_response_profit.rs b/test_rust/src/models/_sapi_v2_eth_staking_account_get_200_response_profit.rs new file mode 100644 index 0000000..9a3b553 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_eth_staking_account_get_200_response_profit.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2EthStakingAccountGet200ResponseProfit { + #[serde(rename = "amountFromWBETH")] + pub amount_from_wbeth: String, + #[serde(rename = "amountFromBETH")] + pub amount_from_beth: String, +} + +impl SapiV2EthStakingAccountGet200ResponseProfit { + pub fn new(amount_from_wbeth: String, amount_from_beth: String) -> SapiV2EthStakingAccountGet200ResponseProfit { + SapiV2EthStakingAccountGet200ResponseProfit { + amount_from_wbeth, + amount_from_beth, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_eth_staking_eth_stake_post_200_response.rs b/test_rust/src/models/_sapi_v2_eth_staking_eth_stake_post_200_response.rs new file mode 100644 index 0000000..e403849 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_eth_staking_eth_stake_post_200_response.rs @@ -0,0 +1,34 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2EthStakingEthStakePost200Response { + #[serde(rename = "success")] + pub success: bool, + #[serde(rename = "wbethAmount")] + pub wbeth_amount: String, + /// ETH amount per 1 WBETH + #[serde(rename = "conversionRatio")] + pub conversion_ratio: String, +} + +impl SapiV2EthStakingEthStakePost200Response { + pub fn new(success: bool, wbeth_amount: String, conversion_ratio: String) -> SapiV2EthStakingEthStakePost200Response { + SapiV2EthStakingEthStakePost200Response { + success, + wbeth_amount, + conversion_ratio, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_adjust_ltv_post_200_response.rs b/test_rust/src/models/_sapi_v2_loan_flexible_adjust_ltv_post_200_response.rs new file mode 100644 index 0000000..39be81d --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_adjust_ltv_post_200_response.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleAdjustLtvPost200Response { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "direction")] + pub direction: String, + #[serde(rename = "adjustmentAmount")] + pub adjustment_amount: String, + #[serde(rename = "currentLTV")] + pub current_ltv: String, +} + +impl SapiV2LoanFlexibleAdjustLtvPost200Response { + pub fn new(loan_coin: String, collateral_coin: String, direction: String, adjustment_amount: String, current_ltv: String) -> SapiV2LoanFlexibleAdjustLtvPost200Response { + SapiV2LoanFlexibleAdjustLtvPost200Response { + loan_coin, + collateral_coin, + direction, + adjustment_amount, + current_ltv, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_borrow_history_get_200_response.rs b/test_rust/src/models/_sapi_v2_loan_flexible_borrow_history_get_200_response.rs new file mode 100644 index 0000000..0e0d85d --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_borrow_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleBorrowHistoryGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "rows")] + pub rows: Vec, +} + +impl SapiV2LoanFlexibleBorrowHistoryGet200Response { + pub fn new(total: i32, rows: Vec) -> SapiV2LoanFlexibleBorrowHistoryGet200Response { + SapiV2LoanFlexibleBorrowHistoryGet200Response { + total, + rows, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_borrow_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v2_loan_flexible_borrow_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..f059372 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_borrow_history_get_200_response_rows_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "initialLoanAmount")] + pub initial_loan_amount: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "initialCollateralAmount")] + pub initial_collateral_amount: String, + #[serde(rename = "borrowTime")] + pub borrow_time: i64, + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner { + pub fn new(loan_coin: String, initial_loan_amount: String, collateral_coin: String, initial_collateral_amount: String, borrow_time: i64, status: String) -> SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner { + SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner { + loan_coin, + initial_loan_amount, + collateral_coin, + initial_collateral_amount, + borrow_time, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_borrow_post_200_response.rs b/test_rust/src/models/_sapi_v2_loan_flexible_borrow_post_200_response.rs new file mode 100644 index 0000000..82de092 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_borrow_post_200_response.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleBorrowPost200Response { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "loanAmount")] + pub loan_amount: String, + #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] + pub collateral_coin: Option, + #[serde(rename = "collateralAmount")] + pub collateral_amount: String, + #[serde(rename = "status")] + pub status: String, +} + +impl SapiV2LoanFlexibleBorrowPost200Response { + pub fn new(loan_coin: String, loan_amount: String, collateral_amount: String, status: String) -> SapiV2LoanFlexibleBorrowPost200Response { + SapiV2LoanFlexibleBorrowPost200Response { + loan_coin, + loan_amount, + collateral_coin: None, + collateral_amount, + status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_collateral_data_get_200_response.rs b/test_rust/src/models/_sapi_v2_loan_flexible_collateral_data_get_200_response.rs new file mode 100644 index 0000000..a72bc87 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_collateral_data_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleCollateralDataGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV2LoanFlexibleCollateralDataGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV2LoanFlexibleCollateralDataGet200Response { + SapiV2LoanFlexibleCollateralDataGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_collateral_data_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v2_loan_flexible_collateral_data_get_200_response_rows_inner.rs new file mode 100644 index 0000000..53ae0ab --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_collateral_data_get_200_response_rows_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner { + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "initialLTV")] + pub initial_ltv: String, + #[serde(rename = "marginCallLTV")] + pub margin_call_ltv: String, + #[serde(rename = "liquidationLTV")] + pub liquidation_ltv: String, + #[serde(rename = "maxLimit")] + pub max_limit: String, +} + +impl SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner { + pub fn new(collateral_coin: String, initial_ltv: String, margin_call_ltv: String, liquidation_ltv: String, max_limit: String) -> SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner { + SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner { + collateral_coin, + initial_ltv, + margin_call_ltv, + liquidation_ltv, + max_limit, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_loanable_data_get_200_response.rs b/test_rust/src/models/_sapi_v2_loan_flexible_loanable_data_get_200_response.rs new file mode 100644 index 0000000..3543b04 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_loanable_data_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleLoanableDataGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV2LoanFlexibleLoanableDataGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV2LoanFlexibleLoanableDataGet200Response { + SapiV2LoanFlexibleLoanableDataGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_loanable_data_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v2_loan_flexible_loanable_data_get_200_response_rows_inner.rs new file mode 100644 index 0000000..a7b6acc --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_loanable_data_get_200_response_rows_inner.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "flexibleInterestRate")] + pub flexible_interest_rate: String, + #[serde(rename = "flexibleMinLimit")] + pub flexible_min_limit: String, + #[serde(rename = "flexibleMaxLimit")] + pub flexible_max_limit: String, +} + +impl SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner { + pub fn new(loan_coin: String, flexible_interest_rate: String, flexible_min_limit: String, flexible_max_limit: String) -> SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner { + SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner { + loan_coin, + flexible_interest_rate, + flexible_min_limit, + flexible_max_limit, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response.rs b/test_rust/src/models/_sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response.rs new file mode 100644 index 0000000..4010fc5 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response { + SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..4a63209 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response_rows_inner.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "direction")] + pub direction: String, + #[serde(rename = "collateralAmount")] + pub collateral_amount: String, + #[serde(rename = "preLTV")] + pub pre_ltv: String, + #[serde(rename = "afterLTV")] + pub after_ltv: String, + #[serde(rename = "adjustTime")] + pub adjust_time: i64, +} + +impl SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner { + pub fn new(loan_coin: String, collateral_coin: String, direction: String, collateral_amount: String, pre_ltv: String, after_ltv: String, adjust_time: i64) -> SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner { + SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner { + loan_coin, + collateral_coin, + direction, + collateral_amount, + pre_ltv, + after_ltv, + adjust_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_ongoing_orders_get_200_response.rs b/test_rust/src/models/_sapi_v2_loan_flexible_ongoing_orders_get_200_response.rs new file mode 100644 index 0000000..b5c680e --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_ongoing_orders_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleOngoingOrdersGet200Response { + #[serde(rename = "total")] + pub total: i32, + #[serde(rename = "rows")] + pub rows: Vec, +} + +impl SapiV2LoanFlexibleOngoingOrdersGet200Response { + pub fn new(total: i32, rows: Vec) -> SapiV2LoanFlexibleOngoingOrdersGet200Response { + SapiV2LoanFlexibleOngoingOrdersGet200Response { + total, + rows, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_ongoing_orders_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v2_loan_flexible_ongoing_orders_get_200_response_rows_inner.rs new file mode 100644 index 0000000..cfa24e2 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_ongoing_orders_get_200_response_rows_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "totalDebt")] + pub total_debt: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "collateralAmount")] + pub collateral_amount: String, + #[serde(rename = "currentLTV")] + pub current_ltv: String, +} + +impl SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner { + pub fn new(loan_coin: String, total_debt: String, collateral_coin: String, collateral_amount: String, current_ltv: String) -> SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner { + SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner { + loan_coin, + total_debt, + collateral_coin, + collateral_amount, + current_ltv, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_repay_history_get_200_response.rs b/test_rust/src/models/_sapi_v2_loan_flexible_repay_history_get_200_response.rs new file mode 100644 index 0000000..075da08 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_repay_history_get_200_response.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleRepayHistoryGet200Response { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl SapiV2LoanFlexibleRepayHistoryGet200Response { + pub fn new(rows: Vec, total: i32) -> SapiV2LoanFlexibleRepayHistoryGet200Response { + SapiV2LoanFlexibleRepayHistoryGet200Response { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_repay_history_get_200_response_rows_inner.rs b/test_rust/src/models/_sapi_v2_loan_flexible_repay_history_get_200_response_rows_inner.rs new file mode 100644 index 0000000..ad97c66 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_repay_history_get_200_response_rows_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "repayAmount")] + pub repay_amount: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "collateralReturn")] + pub collateral_return: String, + #[serde(rename = "repayStatus")] + pub repay_status: String, + #[serde(rename = "repayTime")] + pub repay_time: i64, +} + +impl SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner { + pub fn new(loan_coin: String, repay_amount: String, collateral_coin: String, collateral_return: String, repay_status: String, repay_time: i64) -> SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner { + SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner { + loan_coin, + repay_amount, + collateral_coin, + collateral_return, + repay_status, + repay_time, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_loan_flexible_repay_post_200_response.rs b/test_rust/src/models/_sapi_v2_loan_flexible_repay_post_200_response.rs new file mode 100644 index 0000000..e0fca2a --- /dev/null +++ b/test_rust/src/models/_sapi_v2_loan_flexible_repay_post_200_response.rs @@ -0,0 +1,46 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2LoanFlexibleRepayPost200Response { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "remainingDebt")] + pub remaining_debt: String, + #[serde(rename = "remainingCollateral")] + pub remaining_collateral: String, + #[serde(rename = "fullRepayment")] + pub full_repayment: bool, + #[serde(rename = "currentLTV")] + pub current_ltv: String, + /// Repaid, Repaying, Failed + #[serde(rename = "repayStatus")] + pub repay_status: String, +} + +impl SapiV2LoanFlexibleRepayPost200Response { + pub fn new(loan_coin: String, collateral_coin: String, remaining_debt: String, remaining_collateral: String, full_repayment: bool, current_ltv: String, repay_status: String) -> SapiV2LoanFlexibleRepayPost200Response { + SapiV2LoanFlexibleRepayPost200Response { + loan_coin, + collateral_coin, + remaining_debt, + remaining_collateral, + full_repayment, + current_ltv, + repay_status, + } + } +} + diff --git a/test_rust/src/models/_sapi_v2_sub_account_futures_account_get_200_response.rs b/test_rust/src/models/_sapi_v2_sub_account_futures_account_get_200_response.rs new file mode 100644 index 0000000..7a604b5 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_sub_account_futures_account_get_200_response.rs @@ -0,0 +1,26 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2SubAccountFuturesAccountGet200Response { + SubAccountUsdtFuturesDetails(Box), + SubAccountCoinFuturesDetails(Box), +} + +impl Default for SapiV2SubAccountFuturesAccountGet200Response { + fn default() -> Self { + Self::SubAccountUsdtFuturesDetails(Default::default()) + } +} + diff --git a/test_rust/src/models/_sapi_v2_sub_account_futures_account_summary_get_200_response.rs b/test_rust/src/models/_sapi_v2_sub_account_futures_account_summary_get_200_response.rs new file mode 100644 index 0000000..756aed7 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_sub_account_futures_account_summary_get_200_response.rs @@ -0,0 +1,26 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2SubAccountFuturesAccountSummaryGet200Response { + SubAccountUsdtFuturesSummary(Box), + SubAccountCoinFuturesSummary(Box), +} + +impl Default for SapiV2SubAccountFuturesAccountSummaryGet200Response { + fn default() -> Self { + Self::SubAccountUsdtFuturesSummary(Default::default()) + } +} + diff --git a/test_rust/src/models/_sapi_v2_sub_account_futures_position_risk_get_200_response.rs b/test_rust/src/models/_sapi_v2_sub_account_futures_position_risk_get_200_response.rs new file mode 100644 index 0000000..b1ff9c9 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_sub_account_futures_position_risk_get_200_response.rs @@ -0,0 +1,26 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SapiV2SubAccountFuturesPositionRiskGet200Response { + SubAccountUsdtFuturesPositionRisk(Box), + SubAccountCoinFuturesPositionRisk(Box), +} + +impl Default for SapiV2SubAccountFuturesPositionRiskGet200Response { + fn default() -> Self { + Self::SubAccountUsdtFuturesPositionRisk(Default::default()) + } +} + diff --git a/test_rust/src/models/_sapi_v2_sub_account_sub_account_api_ip_restriction_post_200_response.rs b/test_rust/src/models/_sapi_v2_sub_account_sub_account_api_ip_restriction_post_200_response.rs new file mode 100644 index 0000000..785e1d9 --- /dev/null +++ b/test_rust/src/models/_sapi_v2_sub_account_sub_account_api_ip_restriction_post_200_response.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV2SubAccountSubAccountApiIpRestrictionPost200Response { + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "ipList")] + pub ip_list: Vec, + #[serde(rename = "updateTime")] + pub update_time: i64, + #[serde(rename = "apiKey")] + pub api_key: String, +} + +impl SapiV2SubAccountSubAccountApiIpRestrictionPost200Response { + pub fn new(status: String, ip_list: Vec, update_time: i64, api_key: String) -> SapiV2SubAccountSubAccountApiIpRestrictionPost200Response { + SapiV2SubAccountSubAccountApiIpRestrictionPost200Response { + status, + ip_list, + update_time, + api_key, + } + } +} + diff --git a/test_rust/src/models/_sapi_v3_asset_get_user_asset_post_200_response_inner.rs b/test_rust/src/models/_sapi_v3_asset_get_user_asset_post_200_response_inner.rs new file mode 100644 index 0000000..3ab6ecc --- /dev/null +++ b/test_rust/src/models/_sapi_v3_asset_get_user_asset_post_200_response_inner.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV3AssetGetUserAssetPost200ResponseInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "free")] + pub free: String, + #[serde(rename = "locked")] + pub locked: String, + #[serde(rename = "freeze")] + pub freeze: String, + #[serde(rename = "withdrawing")] + pub withdrawing: String, + #[serde(rename = "ipoable")] + pub ipoable: String, + #[serde(rename = "btcValuation")] + pub btc_valuation: String, +} + +impl SapiV3AssetGetUserAssetPost200ResponseInner { + pub fn new(asset: String, free: String, locked: String, freeze: String, withdrawing: String, ipoable: String, btc_valuation: String) -> SapiV3AssetGetUserAssetPost200ResponseInner { + SapiV3AssetGetUserAssetPost200ResponseInner { + asset, + free, + locked, + freeze, + withdrawing, + ipoable, + btc_valuation, + } + } +} + diff --git a/test_rust/src/models/_sapi_v3_sub_account_assets_get_200_response.rs b/test_rust/src/models/_sapi_v3_sub_account_assets_get_200_response.rs new file mode 100644 index 0000000..ba81774 --- /dev/null +++ b/test_rust/src/models/_sapi_v3_sub_account_assets_get_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV3SubAccountAssetsGet200Response { + #[serde(rename = "balances")] + pub balances: Vec, +} + +impl SapiV3SubAccountAssetsGet200Response { + pub fn new(balances: Vec) -> SapiV3SubAccountAssetsGet200Response { + SapiV3SubAccountAssetsGet200Response { + balances, + } + } +} + diff --git a/test_rust/src/models/_sapi_v3_sub_account_assets_get_200_response_balances_inner.rs b/test_rust/src/models/_sapi_v3_sub_account_assets_get_200_response_balances_inner.rs new file mode 100644 index 0000000..1418552 --- /dev/null +++ b/test_rust/src/models/_sapi_v3_sub_account_assets_get_200_response_balances_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV3SubAccountAssetsGet200ResponseBalancesInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "free")] + pub free: i64, + #[serde(rename = "locked")] + pub locked: i64, +} + +impl SapiV3SubAccountAssetsGet200ResponseBalancesInner { + pub fn new(asset: String, free: i64, locked: i64) -> SapiV3SubAccountAssetsGet200ResponseBalancesInner { + SapiV3SubAccountAssetsGet200ResponseBalancesInner { + asset, + free, + locked, + } + } +} + diff --git a/test_rust/src/models/_sapi_v4_sub_account_assets_get_200_response.rs b/test_rust/src/models/_sapi_v4_sub_account_assets_get_200_response.rs new file mode 100644 index 0000000..12ac9f3 --- /dev/null +++ b/test_rust/src/models/_sapi_v4_sub_account_assets_get_200_response.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV4SubAccountAssetsGet200Response { + #[serde(rename = "balances")] + pub balances: Vec, +} + +impl SapiV4SubAccountAssetsGet200Response { + pub fn new(balances: Vec) -> SapiV4SubAccountAssetsGet200Response { + SapiV4SubAccountAssetsGet200Response { + balances, + } + } +} + diff --git a/test_rust/src/models/_sapi_v4_sub_account_assets_get_200_response_balances_inner.rs b/test_rust/src/models/_sapi_v4_sub_account_assets_get_200_response_balances_inner.rs new file mode 100644 index 0000000..551f285 --- /dev/null +++ b/test_rust/src/models/_sapi_v4_sub_account_assets_get_200_response_balances_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SapiV4SubAccountAssetsGet200ResponseBalancesInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "free")] + pub free: String, + #[serde(rename = "locked")] + pub locked: String, +} + +impl SapiV4SubAccountAssetsGet200ResponseBalancesInner { + pub fn new(asset: String, free: String, locked: String) -> SapiV4SubAccountAssetsGet200ResponseBalancesInner { + SapiV4SubAccountAssetsGet200ResponseBalancesInner { + asset, + free, + locked, + } + } +} + diff --git a/test_rust/src/models/account.rs b/test_rust/src/models/account.rs new file mode 100644 index 0000000..2065084 --- /dev/null +++ b/test_rust/src/models/account.rs @@ -0,0 +1,72 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Account { + #[serde(rename = "makerCommission")] + pub maker_commission: i64, + #[serde(rename = "takerCommission")] + pub taker_commission: i64, + #[serde(rename = "buyerCommission")] + pub buyer_commission: i64, + #[serde(rename = "sellerCommission")] + pub seller_commission: i64, + #[serde(rename = "commissionRates")] + pub commission_rates: Box, + #[serde(rename = "canTrade")] + pub can_trade: bool, + #[serde(rename = "canWithdraw")] + pub can_withdraw: bool, + #[serde(rename = "canDeposit")] + pub can_deposit: bool, + #[serde(rename = "brokered")] + pub brokered: bool, + #[serde(rename = "requireSelfTradePrevention")] + pub require_self_trade_prevention: bool, + #[serde(rename = "preventSor")] + pub prevent_sor: bool, + #[serde(rename = "updateTime")] + pub update_time: i64, + #[serde(rename = "accountType")] + pub account_type: String, + #[serde(rename = "balances")] + pub balances: Vec, + #[serde(rename = "permissions")] + pub permissions: Vec, + #[serde(rename = "uid")] + pub uid: i64, +} + +impl Account { + pub fn new(maker_commission: i64, taker_commission: i64, buyer_commission: i64, seller_commission: i64, commission_rates: models::AccountCommissionRates, can_trade: bool, can_withdraw: bool, can_deposit: bool, brokered: bool, require_self_trade_prevention: bool, prevent_sor: bool, update_time: i64, account_type: String, balances: Vec, permissions: Vec, uid: i64) -> Account { + Account { + maker_commission, + taker_commission, + buyer_commission, + seller_commission, + commission_rates: Box::new(commission_rates), + can_trade, + can_withdraw, + can_deposit, + brokered, + require_self_trade_prevention, + prevent_sor, + update_time, + account_type, + balances, + permissions, + uid, + } + } +} + diff --git a/test_rust/src/models/account_balances_inner.rs b/test_rust/src/models/account_balances_inner.rs new file mode 100644 index 0000000..bc22843 --- /dev/null +++ b/test_rust/src/models/account_balances_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AccountBalancesInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "free")] + pub free: String, + #[serde(rename = "locked")] + pub locked: String, +} + +impl AccountBalancesInner { + pub fn new(asset: String, free: String, locked: String) -> AccountBalancesInner { + AccountBalancesInner { + asset, + free, + locked, + } + } +} + diff --git a/test_rust/src/models/account_commission_rates.rs b/test_rust/src/models/account_commission_rates.rs new file mode 100644 index 0000000..10f3318 --- /dev/null +++ b/test_rust/src/models/account_commission_rates.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AccountCommissionRates { + #[serde(rename = "maker")] + pub maker: String, + #[serde(rename = "taker")] + pub taker: String, + #[serde(rename = "buyer")] + pub buyer: String, + #[serde(rename = "seller")] + pub seller: String, +} + +impl AccountCommissionRates { + pub fn new(maker: String, taker: String, buyer: String, seller: String) -> AccountCommissionRates { + AccountCommissionRates { + maker, + taker, + buyer, + seller, + } + } +} + diff --git a/test_rust/src/models/agg_trade.rs b/test_rust/src/models/agg_trade.rs new file mode 100644 index 0000000..62e631d --- /dev/null +++ b/test_rust/src/models/agg_trade.rs @@ -0,0 +1,56 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AggTrade { + /// Aggregate tradeId + #[serde(rename = "a")] + pub a: i64, + /// Price + #[serde(rename = "p")] + pub p: String, + /// Quantity + #[serde(rename = "q")] + pub q: String, + /// First tradeId + #[serde(rename = "f")] + pub f: i64, + /// Last tradeId + #[serde(rename = "l")] + pub l: i64, + /// Timestamp + #[serde(rename = "T")] + pub t: bool, + /// Was the buyer the maker? + #[serde(rename = "m")] + pub m: bool, + /// Was the trade the best price match? + #[serde(rename = "M")] + pub m: bool, +} + +impl AggTrade { + pub fn new(a: i64, p: String, q: String, f: i64, l: i64, t: bool, m: bool, m: bool) -> AggTrade { + AggTrade { + a, + p, + q, + f, + l, + t, + m, + m, + } + } +} + diff --git a/test_rust/src/models/bnb_burn_status.rs b/test_rust/src/models/bnb_burn_status.rs new file mode 100644 index 0000000..bf20dac --- /dev/null +++ b/test_rust/src/models/bnb_burn_status.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BnbBurnStatus { + #[serde(rename = "spotBNBBurn")] + pub spot_bnb_burn: bool, + #[serde(rename = "interestBNBBurn")] + pub interest_bnb_burn: bool, +} + +impl BnbBurnStatus { + pub fn new(spot_bnb_burn: bool, interest_bnb_burn: bool) -> BnbBurnStatus { + BnbBurnStatus { + spot_bnb_burn, + interest_bnb_burn, + } + } +} + diff --git a/test_rust/src/models/book_ticker.rs b/test_rust/src/models/book_ticker.rs new file mode 100644 index 0000000..b4b9351 --- /dev/null +++ b/test_rust/src/models/book_ticker.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BookTicker { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "bidPrice")] + pub bid_price: String, + #[serde(rename = "bidQty")] + pub bid_qty: String, + #[serde(rename = "askPrice")] + pub ask_price: String, + #[serde(rename = "askQty")] + pub ask_qty: String, +} + +impl BookTicker { + pub fn new(symbol: String, bid_price: String, bid_qty: String, ask_price: String, ask_qty: String) -> BookTicker { + BookTicker { + symbol, + bid_price, + bid_qty, + ask_price, + ask_qty, + } + } +} + diff --git a/test_rust/src/models/canceled_margin_order_detail.rs b/test_rust/src/models/canceled_margin_order_detail.rs new file mode 100644 index 0000000..cc0c043 --- /dev/null +++ b/test_rust/src/models/canceled_margin_order_detail.rs @@ -0,0 +1,66 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CanceledMarginOrderDetail { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "isIsolated")] + pub is_isolated: bool, + #[serde(rename = "origClientOrderId")] + pub orig_client_order_id: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, +} + +impl CanceledMarginOrderDetail { + pub fn new(symbol: String, is_isolated: bool, orig_client_order_id: String, order_id: i64, order_list_id: i64, client_order_id: String, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String) -> CanceledMarginOrderDetail { + CanceledMarginOrderDetail { + symbol, + is_isolated, + orig_client_order_id, + order_id, + order_list_id, + client_order_id, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + } + } +} + diff --git a/test_rust/src/models/day_ticker.rs b/test_rust/src/models/day_ticker.rs new file mode 100644 index 0000000..a30b8ea --- /dev/null +++ b/test_rust/src/models/day_ticker.rs @@ -0,0 +1,77 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DayTicker { + #[serde(rename = "symbol")] + pub symbol: String, + /// Absolute price change + #[serde(rename = "priceChange")] + pub price_change: String, + /// Relative price change in percent + #[serde(rename = "priceChangePercent")] + pub price_change_percent: String, + /// quoteVolume / volume + #[serde(rename = "weightedAvgPrice")] + pub weighted_avg_price: String, + #[serde(rename = "openPrice")] + pub open_price: String, + #[serde(rename = "highPrice")] + pub high_price: String, + #[serde(rename = "lowPrice")] + pub low_price: String, + #[serde(rename = "lastPrice")] + pub last_price: String, + /// Volume in base asset + #[serde(rename = "volume")] + pub volume: String, + /// Volume in quote asset + #[serde(rename = "quoteVolume")] + pub quote_volume: String, + #[serde(rename = "openTime")] + pub open_time: i64, + #[serde(rename = "closeTime")] + pub close_time: i64, + /// Trade ID of the first trade in the interval + #[serde(rename = "firstId")] + pub first_id: i64, + /// Trade ID of the last trade in the interval + #[serde(rename = "lastId")] + pub last_id: i64, + /// Number of trades in the interval + #[serde(rename = "count")] + pub count: i64, +} + +impl DayTicker { + pub fn new(symbol: String, price_change: String, price_change_percent: String, weighted_avg_price: String, open_price: String, high_price: String, low_price: String, last_price: String, volume: String, quote_volume: String, open_time: i64, close_time: i64, first_id: i64, last_id: i64, count: i64) -> DayTicker { + DayTicker { + symbol, + price_change, + price_change_percent, + weighted_avg_price, + open_price, + high_price, + low_price, + last_price, + volume, + quote_volume, + open_time, + close_time, + first_id, + last_id, + count, + } + } +} + diff --git a/test_rust/src/models/error.rs b/test_rust/src/models/error.rs new file mode 100644 index 0000000..c936404 --- /dev/null +++ b/test_rust/src/models/error.rs @@ -0,0 +1,32 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Error { + /// Error code + #[serde(rename = "code")] + pub code: i64, + /// Error message + #[serde(rename = "msg")] + pub msg: String, +} + +impl Error { + pub fn new(code: i64, msg: String) -> Error { + Error { + code, + msg, + } + } +} + diff --git a/test_rust/src/models/isolated_margin_account_info.rs b/test_rust/src/models/isolated_margin_account_info.rs new file mode 100644 index 0000000..f205c44 --- /dev/null +++ b/test_rust/src/models/isolated_margin_account_info.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IsolatedMarginAccountInfo { + #[serde(rename = "assets")] + pub assets: Vec, + #[serde(rename = "totalAssetOfBtc")] + pub total_asset_of_btc: String, + #[serde(rename = "totalLiabilityOfBtc")] + pub total_liability_of_btc: String, + #[serde(rename = "totalNetAssetOfBtc")] + pub total_net_asset_of_btc: String, +} + +impl IsolatedMarginAccountInfo { + pub fn new(assets: Vec, total_asset_of_btc: String, total_liability_of_btc: String, total_net_asset_of_btc: String) -> IsolatedMarginAccountInfo { + IsolatedMarginAccountInfo { + assets, + total_asset_of_btc, + total_liability_of_btc, + total_net_asset_of_btc, + } + } +} + diff --git a/test_rust/src/models/isolated_margin_account_info_assets_inner.rs b/test_rust/src/models/isolated_margin_account_info_assets_inner.rs new file mode 100644 index 0000000..fa1f98f --- /dev/null +++ b/test_rust/src/models/isolated_margin_account_info_assets_inner.rs @@ -0,0 +1,62 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IsolatedMarginAccountInfoAssetsInner { + #[serde(rename = "baseAsset")] + pub base_asset: Box, + #[serde(rename = "quoteAsset")] + pub quote_asset: Box, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "isolatedCreated")] + pub isolated_created: bool, + /// true-enabled, false-disabled + #[serde(rename = "enabled")] + pub enabled: bool, + #[serde(rename = "marginLevel")] + pub margin_level: String, + /// \"EXCESSIVE\", \"NORMAL\", \"MARGIN_CALL\", \"PRE_LIQUIDATION\", \"FORCE_LIQUIDATION\" + #[serde(rename = "marginLevelStatus")] + pub margin_level_status: String, + #[serde(rename = "marginRatio")] + pub margin_ratio: String, + #[serde(rename = "indexPrice")] + pub index_price: String, + #[serde(rename = "liquidatePrice")] + pub liquidate_price: String, + #[serde(rename = "liquidateRate")] + pub liquidate_rate: String, + #[serde(rename = "tradeEnabled")] + pub trade_enabled: bool, +} + +impl IsolatedMarginAccountInfoAssetsInner { + pub fn new(base_asset: models::IsolatedMarginAccountInfoAssetsInnerBaseAsset, quote_asset: models::IsolatedMarginAccountInfoAssetsInnerQuoteAsset, symbol: String, isolated_created: bool, enabled: bool, margin_level: String, margin_level_status: String, margin_ratio: String, index_price: String, liquidate_price: String, liquidate_rate: String, trade_enabled: bool) -> IsolatedMarginAccountInfoAssetsInner { + IsolatedMarginAccountInfoAssetsInner { + base_asset: Box::new(base_asset), + quote_asset: Box::new(quote_asset), + symbol, + isolated_created, + enabled, + margin_level, + margin_level_status, + margin_ratio, + index_price, + liquidate_price, + liquidate_rate, + trade_enabled, + } + } +} + diff --git a/test_rust/src/models/isolated_margin_account_info_assets_inner_base_asset.rs b/test_rust/src/models/isolated_margin_account_info_assets_inner_base_asset.rs new file mode 100644 index 0000000..2e56133 --- /dev/null +++ b/test_rust/src/models/isolated_margin_account_info_assets_inner_base_asset.rs @@ -0,0 +1,54 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IsolatedMarginAccountInfoAssetsInnerBaseAsset { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "borrowEnabled")] + pub borrow_enabled: bool, + #[serde(rename = "borrowed")] + pub borrowed: String, + #[serde(rename = "free")] + pub free: String, + #[serde(rename = "interest")] + pub interest: String, + #[serde(rename = "locked")] + pub locked: String, + #[serde(rename = "netAsset")] + pub net_asset: String, + #[serde(rename = "netAssetOfBtc")] + pub net_asset_of_btc: String, + #[serde(rename = "repayEnabled")] + pub repay_enabled: bool, + #[serde(rename = "totalAsset")] + pub total_asset: String, +} + +impl IsolatedMarginAccountInfoAssetsInnerBaseAsset { + pub fn new(asset: String, borrow_enabled: bool, borrowed: String, free: String, interest: String, locked: String, net_asset: String, net_asset_of_btc: String, repay_enabled: bool, total_asset: String) -> IsolatedMarginAccountInfoAssetsInnerBaseAsset { + IsolatedMarginAccountInfoAssetsInnerBaseAsset { + asset, + borrow_enabled, + borrowed, + free, + interest, + locked, + net_asset, + net_asset_of_btc, + repay_enabled, + total_asset, + } + } +} + diff --git a/test_rust/src/models/isolated_margin_account_info_assets_inner_quote_asset.rs b/test_rust/src/models/isolated_margin_account_info_assets_inner_quote_asset.rs new file mode 100644 index 0000000..909aad8 --- /dev/null +++ b/test_rust/src/models/isolated_margin_account_info_assets_inner_quote_asset.rs @@ -0,0 +1,54 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IsolatedMarginAccountInfoAssetsInnerQuoteAsset { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "borrowEnabled")] + pub borrow_enabled: bool, + #[serde(rename = "borrowed")] + pub borrowed: String, + #[serde(rename = "free")] + pub free: String, + #[serde(rename = "interest")] + pub interest: String, + #[serde(rename = "locked")] + pub locked: String, + #[serde(rename = "netAsset")] + pub net_asset: String, + #[serde(rename = "netAssetOfBtc")] + pub net_asset_of_btc: String, + #[serde(rename = "repayEnabled")] + pub repay_enabled: bool, + #[serde(rename = "totalAsset")] + pub total_asset: String, +} + +impl IsolatedMarginAccountInfoAssetsInnerQuoteAsset { + pub fn new(asset: String, borrow_enabled: bool, borrowed: String, free: String, interest: String, locked: String, net_asset: String, net_asset_of_btc: String, repay_enabled: bool, total_asset: String) -> IsolatedMarginAccountInfoAssetsInnerQuoteAsset { + IsolatedMarginAccountInfoAssetsInnerQuoteAsset { + asset, + borrow_enabled, + borrowed, + free, + interest, + locked, + net_asset, + net_asset_of_btc, + repay_enabled, + total_asset, + } + } +} + diff --git a/test_rust/src/models/margin_oco_order.rs b/test_rust/src/models/margin_oco_order.rs new file mode 100644 index 0000000..f943bbb --- /dev/null +++ b/test_rust/src/models/margin_oco_order.rs @@ -0,0 +1,54 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MarginOcoOrder { + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "contingencyType")] + pub contingency_type: String, + #[serde(rename = "listStatusType")] + pub list_status_type: String, + #[serde(rename = "listOrderStatus")] + pub list_order_status: String, + #[serde(rename = "listClientOrderId")] + pub list_client_order_id: String, + #[serde(rename = "transactionTime")] + pub transaction_time: i64, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "isIsolated")] + pub is_isolated: bool, + #[serde(rename = "orders")] + pub orders: Vec, + #[serde(rename = "orderReports")] + pub order_reports: Vec, +} + +impl MarginOcoOrder { + pub fn new(order_list_id: i64, contingency_type: String, list_status_type: String, list_order_status: String, list_client_order_id: String, transaction_time: i64, symbol: String, is_isolated: bool, orders: Vec, order_reports: Vec) -> MarginOcoOrder { + MarginOcoOrder { + order_list_id, + contingency_type, + list_status_type, + list_order_status, + list_client_order_id, + transaction_time, + symbol, + is_isolated, + orders, + order_reports, + } + } +} + diff --git a/test_rust/src/models/margin_oco_order_order_reports_inner.rs b/test_rust/src/models/margin_oco_order_order_reports_inner.rs new file mode 100644 index 0000000..4673207 --- /dev/null +++ b/test_rust/src/models/margin_oco_order_order_reports_inner.rs @@ -0,0 +1,66 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MarginOcoOrderOrderReportsInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "origClientOrderId")] + pub orig_client_order_id: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "stopPrice")] + pub stop_price: String, +} + +impl MarginOcoOrderOrderReportsInner { + pub fn new(symbol: String, orig_client_order_id: String, order_id: i64, order_list_id: i64, client_order_id: String, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String, stop_price: String) -> MarginOcoOrderOrderReportsInner { + MarginOcoOrderOrderReportsInner { + symbol, + orig_client_order_id, + order_id, + order_list_id, + client_order_id, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + stop_price, + } + } +} + diff --git a/test_rust/src/models/margin_oco_order_orders_inner.rs b/test_rust/src/models/margin_oco_order_orders_inner.rs new file mode 100644 index 0000000..8770ed9 --- /dev/null +++ b/test_rust/src/models/margin_oco_order_orders_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MarginOcoOrderOrdersInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, +} + +impl MarginOcoOrderOrdersInner { + pub fn new(symbol: String, order_id: i64, client_order_id: String) -> MarginOcoOrderOrdersInner { + MarginOcoOrderOrdersInner { + symbol, + order_id, + client_order_id, + } + } +} + diff --git a/test_rust/src/models/margin_order.rs b/test_rust/src/models/margin_order.rs new file mode 100644 index 0000000..28ab9a7 --- /dev/null +++ b/test_rust/src/models/margin_order.rs @@ -0,0 +1,60 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MarginOrder { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "origClientOrderId")] + pub orig_client_order_id: String, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, +} + +impl MarginOrder { + pub fn new(symbol: String, order_id: i64, orig_client_order_id: String, client_order_id: String, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String) -> MarginOrder { + MarginOrder { + symbol, + order_id, + orig_client_order_id, + client_order_id, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + } + } +} + diff --git a/test_rust/src/models/margin_order_detail.rs b/test_rust/src/models/margin_order_detail.rs new file mode 100644 index 0000000..b04ea40 --- /dev/null +++ b/test_rust/src/models/margin_order_detail.rs @@ -0,0 +1,78 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MarginOrderDetail { + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "icebergQty")] + pub iceberg_qty: String, + #[serde(rename = "isWorking")] + pub is_working: bool, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "stopPrice")] + pub stop_price: String, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "isIsolated")] + pub is_isolated: bool, + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "updateTime")] + pub update_time: i64, + #[serde(rename = "selfTradePreventionMode")] + pub self_trade_prevention_mode: String, +} + +impl MarginOrderDetail { + pub fn new(client_order_id: String, cummulative_quote_qty: String, executed_qty: String, iceberg_qty: String, is_working: bool, order_id: i64, orig_qty: String, price: String, side: String, status: String, stop_price: String, symbol: String, is_isolated: bool, time: i64, time_in_force: String, r#type: String, update_time: i64, self_trade_prevention_mode: String) -> MarginOrderDetail { + MarginOrderDetail { + client_order_id, + cummulative_quote_qty, + executed_qty, + iceberg_qty, + is_working, + order_id, + orig_qty, + price, + side, + status, + stop_price, + symbol, + is_isolated, + time, + time_in_force, + r#type, + update_time, + self_trade_prevention_mode, + } + } +} + diff --git a/test_rust/src/models/margin_order_response_ack.rs b/test_rust/src/models/margin_order_response_ack.rs new file mode 100644 index 0000000..fa0f314 --- /dev/null +++ b/test_rust/src/models/margin_order_response_ack.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MarginOrderResponseAck { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "isIsolated")] + pub is_isolated: bool, + #[serde(rename = "transactTime")] + pub transact_time: i64, +} + +impl MarginOrderResponseAck { + pub fn new(symbol: String, order_id: i64, client_order_id: String, is_isolated: bool, transact_time: i64) -> MarginOrderResponseAck { + MarginOrderResponseAck { + symbol, + order_id, + client_order_id, + is_isolated, + transact_time, + } + } +} + diff --git a/test_rust/src/models/margin_order_response_full.rs b/test_rust/src/models/margin_order_response_full.rs new file mode 100644 index 0000000..99386f2 --- /dev/null +++ b/test_rust/src/models/margin_order_response_full.rs @@ -0,0 +1,74 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MarginOrderResponseFull { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "transactTime")] + pub transact_time: i64, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, + /// will not return if no margin trade happens + #[serde(rename = "marginBuyBorrowAmount")] + pub margin_buy_borrow_amount: f64, + /// will not return if no margin trade happens + #[serde(rename = "marginBuyBorrowAsset")] + pub margin_buy_borrow_asset: String, + #[serde(rename = "isIsolated")] + pub is_isolated: bool, + #[serde(rename = "fills")] + pub fills: Vec, +} + +impl MarginOrderResponseFull { + pub fn new(symbol: String, order_id: i64, client_order_id: String, transact_time: i64, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String, margin_buy_borrow_amount: f64, margin_buy_borrow_asset: String, is_isolated: bool, fills: Vec) -> MarginOrderResponseFull { + MarginOrderResponseFull { + symbol, + order_id, + client_order_id, + transact_time, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + margin_buy_borrow_amount, + margin_buy_borrow_asset, + is_isolated, + fills, + } + } +} + diff --git a/test_rust/src/models/margin_order_response_result.rs b/test_rust/src/models/margin_order_response_result.rs new file mode 100644 index 0000000..d5df861 --- /dev/null +++ b/test_rust/src/models/margin_order_response_result.rs @@ -0,0 +1,63 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MarginOrderResponseResult { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "transactTime")] + pub transact_time: i64, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "isIsolated")] + pub is_isolated: bool, + #[serde(rename = "side")] + pub side: String, +} + +impl MarginOrderResponseResult { + pub fn new(symbol: String, order_id: i64, client_order_id: String, transact_time: i64, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, is_isolated: bool, side: String) -> MarginOrderResponseResult { + MarginOrderResponseResult { + symbol, + order_id, + client_order_id, + transact_time, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + is_isolated, + side, + } + } +} + diff --git a/test_rust/src/models/margin_trade.rs b/test_rust/src/models/margin_trade.rs new file mode 100644 index 0000000..e07115e --- /dev/null +++ b/test_rust/src/models/margin_trade.rs @@ -0,0 +1,60 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MarginTrade { + #[serde(rename = "commission")] + pub commission: String, + #[serde(rename = "commissionAsset")] + pub commission_asset: String, + #[serde(rename = "id")] + pub id: i64, + #[serde(rename = "isBestMatch")] + pub is_best_match: bool, + #[serde(rename = "isBuyer")] + pub is_buyer: bool, + #[serde(rename = "isMaker")] + pub is_maker: bool, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "qty")] + pub qty: String, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "isIsolated")] + pub is_isolated: bool, + #[serde(rename = "time")] + pub time: i64, +} + +impl MarginTrade { + pub fn new(commission: String, commission_asset: String, id: i64, is_best_match: bool, is_buyer: bool, is_maker: bool, order_id: i64, price: String, qty: String, symbol: String, is_isolated: bool, time: i64) -> MarginTrade { + MarginTrade { + commission, + commission_asset, + id, + is_best_match, + is_buyer, + is_maker, + order_id, + price, + qty, + symbol, + is_isolated, + time, + } + } +} + diff --git a/test_rust/src/models/margin_transfer_details.rs b/test_rust/src/models/margin_transfer_details.rs new file mode 100644 index 0000000..fc38ec5 --- /dev/null +++ b/test_rust/src/models/margin_transfer_details.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MarginTransferDetails { + #[serde(rename = "rows")] + pub rows: Vec, + #[serde(rename = "total")] + pub total: i32, +} + +impl MarginTransferDetails { + pub fn new(rows: Vec, total: i32) -> MarginTransferDetails { + MarginTransferDetails { + rows, + total, + } + } +} + diff --git a/test_rust/src/models/margin_transfer_details_rows_inner.rs b/test_rust/src/models/margin_transfer_details_rows_inner.rs new file mode 100644 index 0000000..c312bcf --- /dev/null +++ b/test_rust/src/models/margin_transfer_details_rows_inner.rs @@ -0,0 +1,48 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MarginTransferDetailsRowsInner { + #[serde(rename = "amount")] + pub amount: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timestamp")] + pub timestamp: i64, + #[serde(rename = "txId")] + pub tx_id: i64, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "transFrom")] + pub trans_from: String, + #[serde(rename = "transTo")] + pub trans_to: String, +} + +impl MarginTransferDetailsRowsInner { + pub fn new(amount: String, asset: String, status: String, timestamp: i64, tx_id: i64, trans_from: String, trans_to: String) -> MarginTransferDetailsRowsInner { + MarginTransferDetailsRowsInner { + amount, + asset, + status, + timestamp, + tx_id, + r#type: None, + trans_from, + trans_to, + } + } +} + diff --git a/test_rust/src/models/mod.rs b/test_rust/src/models/mod.rs new file mode 100644 index 0000000..f5a98db --- /dev/null +++ b/test_rust/src/models/mod.rs @@ -0,0 +1,1028 @@ +pub mod account; +pub use self::account::Account; +pub mod account_balances_inner; +pub use self::account_balances_inner::AccountBalancesInner; +pub mod account_commission_rates; +pub use self::account_commission_rates::AccountCommissionRates; +pub mod agg_trade; +pub use self::agg_trade::AggTrade; +pub mod _api_v3_account_commission_get_200_response; +pub use self::_api_v3_account_commission_get_200_response::ApiV3AccountCommissionGet200Response; +pub mod _api_v3_account_commission_get_200_response_discount; +pub use self::_api_v3_account_commission_get_200_response_discount::ApiV3AccountCommissionGet200ResponseDiscount; +pub mod _api_v3_account_commission_get_200_response_standard_commission; +pub use self::_api_v3_account_commission_get_200_response_standard_commission::ApiV3AccountCommissionGet200ResponseStandardCommission; +pub mod _api_v3_account_commission_get_200_response_tax_commission; +pub use self::_api_v3_account_commission_get_200_response_tax_commission::ApiV3AccountCommissionGet200ResponseTaxCommission; +pub mod _api_v3_all_order_list_get_200_response_inner; +pub use self::_api_v3_all_order_list_get_200_response_inner::ApiV3AllOrderListGet200ResponseInner; +pub mod _api_v3_all_order_list_get_200_response_inner_orders_inner; +pub use self::_api_v3_all_order_list_get_200_response_inner_orders_inner::ApiV3AllOrderListGet200ResponseInnerOrdersInner; +pub mod _api_v3_avg_price_get_200_response; +pub use self::_api_v3_avg_price_get_200_response::ApiV3AvgPriceGet200Response; +pub mod _api_v3_depth_get_200_response; +pub use self::_api_v3_depth_get_200_response::ApiV3DepthGet200Response; +pub mod _api_v3_exchange_info_get_200_response; +pub use self::_api_v3_exchange_info_get_200_response::ApiV3ExchangeInfoGet200Response; +pub mod _api_v3_exchange_info_get_200_response_rate_limits_inner; +pub use self::_api_v3_exchange_info_get_200_response_rate_limits_inner::ApiV3ExchangeInfoGet200ResponseRateLimitsInner; +pub mod _api_v3_exchange_info_get_200_response_symbols_inner; +pub use self::_api_v3_exchange_info_get_200_response_symbols_inner::ApiV3ExchangeInfoGet200ResponseSymbolsInner; +pub mod _api_v3_exchange_info_get_200_response_symbols_inner_filters_inner; +pub use self::_api_v3_exchange_info_get_200_response_symbols_inner_filters_inner::ApiV3ExchangeInfoGet200ResponseSymbolsInnerFiltersInner; +pub mod _api_v3_klines_get_200_response_inner_inner; +pub use self::_api_v3_klines_get_200_response_inner_inner::ApiV3KlinesGet200ResponseInnerInner; +pub mod _api_v3_my_allocations_get_200_response_inner; +pub use self::_api_v3_my_allocations_get_200_response_inner::ApiV3MyAllocationsGet200ResponseInner; +pub mod _api_v3_my_prevented_matches_get_200_response_inner; +pub use self::_api_v3_my_prevented_matches_get_200_response_inner::ApiV3MyPreventedMatchesGet200ResponseInner; +pub mod _api_v3_open_order_list_get_200_response_inner; +pub use self::_api_v3_open_order_list_get_200_response_inner::ApiV3OpenOrderListGet200ResponseInner; +pub mod _api_v3_open_order_list_get_200_response_inner_orders_inner; +pub use self::_api_v3_open_order_list_get_200_response_inner_orders_inner::ApiV3OpenOrderListGet200ResponseInnerOrdersInner; +pub mod _api_v3_open_orders_delete_200_response_inner; +pub use self::_api_v3_open_orders_delete_200_response_inner::ApiV3OpenOrdersDelete200ResponseInner; +pub mod _api_v3_order_cancel_replace_post_200_response; +pub use self::_api_v3_order_cancel_replace_post_200_response::ApiV3OrderCancelReplacePost200Response; +pub mod _api_v3_order_cancel_replace_post_200_response_cancel_response; +pub use self::_api_v3_order_cancel_replace_post_200_response_cancel_response::ApiV3OrderCancelReplacePost200ResponseCancelResponse; +pub mod _api_v3_order_cancel_replace_post_200_response_new_order_response; +pub use self::_api_v3_order_cancel_replace_post_200_response_new_order_response::ApiV3OrderCancelReplacePost200ResponseNewOrderResponse; +pub mod _api_v3_order_list_get_200_response; +pub use self::_api_v3_order_list_get_200_response::ApiV3OrderListGet200Response; +pub mod _api_v3_order_list_get_200_response_orders_inner; +pub use self::_api_v3_order_list_get_200_response_orders_inner::ApiV3OrderListGet200ResponseOrdersInner; +pub mod _api_v3_order_oco_post_200_response; +pub use self::_api_v3_order_oco_post_200_response::ApiV3OrderOcoPost200Response; +pub mod _api_v3_order_oco_post_200_response_order_reports_inner; +pub use self::_api_v3_order_oco_post_200_response_order_reports_inner::ApiV3OrderOcoPost200ResponseOrderReportsInner; +pub mod _api_v3_order_oco_post_200_response_orders_inner; +pub use self::_api_v3_order_oco_post_200_response_orders_inner::ApiV3OrderOcoPost200ResponseOrdersInner; +pub mod _api_v3_order_post_200_response; +pub use self::_api_v3_order_post_200_response::ApiV3OrderPost200Response; +pub mod _api_v3_rate_limit_order_get_200_response_inner; +pub use self::_api_v3_rate_limit_order_get_200_response_inner::ApiV3RateLimitOrderGet200ResponseInner; +pub mod _api_v3_sor_order_post_200_response; +pub use self::_api_v3_sor_order_post_200_response::ApiV3SorOrderPost200Response; +pub mod _api_v3_sor_order_post_200_response_fills_inner; +pub use self::_api_v3_sor_order_post_200_response_fills_inner::ApiV3SorOrderPost200ResponseFillsInner; +pub mod _api_v3_ticker_24hr_get_200_response; +pub use self::_api_v3_ticker_24hr_get_200_response::ApiV3Ticker24hrGet200Response; +pub mod _api_v3_ticker_book_ticker_get_200_response; +pub use self::_api_v3_ticker_book_ticker_get_200_response::ApiV3TickerBookTickerGet200Response; +pub mod _api_v3_ticker_get_200_response; +pub use self::_api_v3_ticker_get_200_response::ApiV3TickerGet200Response; +pub mod _api_v3_ticker_price_get_200_response; +pub use self::_api_v3_ticker_price_get_200_response::ApiV3TickerPriceGet200Response; +pub mod _api_v3_ticker_trading_day_get_200_response; +pub use self::_api_v3_ticker_trading_day_get_200_response::ApiV3TickerTradingDayGet200Response; +pub mod _api_v3_time_get_200_response; +pub use self::_api_v3_time_get_200_response::ApiV3TimeGet200Response; +pub mod _api_v3_user_data_stream_post_200_response; +pub use self::_api_v3_user_data_stream_post_200_response::ApiV3UserDataStreamPost200Response; +pub mod bnb_burn_status; +pub use self::bnb_burn_status::BnbBurnStatus; +pub mod book_ticker; +pub use self::book_ticker::BookTicker; +pub mod canceled_margin_order_detail; +pub use self::canceled_margin_order_detail::CanceledMarginOrderDetail; +pub mod day_ticker; +pub use self::day_ticker::DayTicker; +pub mod error; +pub use self::error::Error; +pub mod isolated_margin_account_info; +pub use self::isolated_margin_account_info::IsolatedMarginAccountInfo; +pub mod isolated_margin_account_info_assets_inner; +pub use self::isolated_margin_account_info_assets_inner::IsolatedMarginAccountInfoAssetsInner; +pub mod isolated_margin_account_info_assets_inner_base_asset; +pub use self::isolated_margin_account_info_assets_inner_base_asset::IsolatedMarginAccountInfoAssetsInnerBaseAsset; +pub mod isolated_margin_account_info_assets_inner_quote_asset; +pub use self::isolated_margin_account_info_assets_inner_quote_asset::IsolatedMarginAccountInfoAssetsInnerQuoteAsset; +pub mod margin_oco_order; +pub use self::margin_oco_order::MarginOcoOrder; +pub mod margin_oco_order_order_reports_inner; +pub use self::margin_oco_order_order_reports_inner::MarginOcoOrderOrderReportsInner; +pub mod margin_oco_order_orders_inner; +pub use self::margin_oco_order_orders_inner::MarginOcoOrderOrdersInner; +pub mod margin_order; +pub use self::margin_order::MarginOrder; +pub mod margin_order_detail; +pub use self::margin_order_detail::MarginOrderDetail; +pub mod margin_order_response_ack; +pub use self::margin_order_response_ack::MarginOrderResponseAck; +pub mod margin_order_response_full; +pub use self::margin_order_response_full::MarginOrderResponseFull; +pub mod margin_order_response_result; +pub use self::margin_order_response_result::MarginOrderResponseResult; +pub mod margin_trade; +pub use self::margin_trade::MarginTrade; +pub mod margin_transfer_details; +pub use self::margin_transfer_details::MarginTransferDetails; +pub mod margin_transfer_details_rows_inner; +pub use self::margin_transfer_details_rows_inner::MarginTransferDetailsRowsInner; +pub mod my_trade; +pub use self::my_trade::MyTrade; +pub mod oco_order; +pub use self::oco_order::OcoOrder; +pub mod oco_order_order_reports_inner; +pub use self::oco_order_order_reports_inner::OcoOrderOrderReportsInner; +pub mod order; +pub use self::order::Order; +pub mod order_details; +pub use self::order_details::OrderDetails; +pub mod order_response_ack; +pub use self::order_response_ack::OrderResponseAck; +pub mod order_response_full; +pub use self::order_response_full::OrderResponseFull; +pub mod order_response_full_fills_inner; +pub use self::order_response_full_fills_inner::OrderResponseFullFillsInner; +pub mod order_response_result; +pub use self::order_response_result::OrderResponseResult; +pub mod price_ticker; +pub use self::price_ticker::PriceTicker; +pub mod repayment_info; +pub use self::repayment_info::RepaymentInfo; +pub mod repayment_info2; +pub use self::repayment_info2::RepaymentInfo2; +pub mod _sapi_v1_account_api_restrictions_get_200_response; +pub use self::_sapi_v1_account_api_restrictions_get_200_response::SapiV1AccountApiRestrictionsGet200Response; +pub mod _sapi_v1_account_api_trading_status_get_200_response; +pub use self::_sapi_v1_account_api_trading_status_get_200_response::SapiV1AccountApiTradingStatusGet200Response; +pub mod _sapi_v1_account_api_trading_status_get_200_response_data; +pub use self::_sapi_v1_account_api_trading_status_get_200_response_data::SapiV1AccountApiTradingStatusGet200ResponseData; +pub mod _sapi_v1_account_api_trading_status_get_200_response_data_indicators; +pub use self::_sapi_v1_account_api_trading_status_get_200_response_data_indicators::SapiV1AccountApiTradingStatusGet200ResponseDataIndicators; +pub mod _sapi_v1_account_api_trading_status_get_200_response_data_indicators_btcusdt_inner; +pub use self::_sapi_v1_account_api_trading_status_get_200_response_data_indicators_btcusdt_inner::SapiV1AccountApiTradingStatusGet200ResponseDataIndicatorsBtcusdtInner; +pub mod _sapi_v1_account_api_trading_status_get_200_response_data_trigger_condition; +pub use self::_sapi_v1_account_api_trading_status_get_200_response_data_trigger_condition::SapiV1AccountApiTradingStatusGet200ResponseDataTriggerCondition; +pub mod _sapi_v1_account_info_get_200_response; +pub use self::_sapi_v1_account_info_get_200_response::SapiV1AccountInfoGet200Response; +pub mod _sapi_v1_account_snapshot_get_200_response; +pub use self::_sapi_v1_account_snapshot_get_200_response::SapiV1AccountSnapshotGet200Response; +pub mod _sapi_v1_account_status_get_200_response; +pub use self::_sapi_v1_account_status_get_200_response::SapiV1AccountStatusGet200Response; +pub mod _sapi_v1_algo_futures_historical_orders_get_200_response; +pub use self::_sapi_v1_algo_futures_historical_orders_get_200_response::SapiV1AlgoFuturesHistoricalOrdersGet200Response; +pub mod _sapi_v1_algo_futures_historical_orders_get_200_response_orders_inner; +pub use self::_sapi_v1_algo_futures_historical_orders_get_200_response_orders_inner::SapiV1AlgoFuturesHistoricalOrdersGet200ResponseOrdersInner; +pub mod _sapi_v1_algo_futures_new_order_vp_post_200_response; +pub use self::_sapi_v1_algo_futures_new_order_vp_post_200_response::SapiV1AlgoFuturesNewOrderVpPost200Response; +pub mod _sapi_v1_algo_futures_open_orders_get_200_response; +pub use self::_sapi_v1_algo_futures_open_orders_get_200_response::SapiV1AlgoFuturesOpenOrdersGet200Response; +pub mod _sapi_v1_algo_futures_open_orders_get_200_response_orders_inner; +pub use self::_sapi_v1_algo_futures_open_orders_get_200_response_orders_inner::SapiV1AlgoFuturesOpenOrdersGet200ResponseOrdersInner; +pub mod _sapi_v1_algo_futures_order_delete_200_response; +pub use self::_sapi_v1_algo_futures_order_delete_200_response::SapiV1AlgoFuturesOrderDelete200Response; +pub mod _sapi_v1_algo_futures_sub_orders_get_200_response; +pub use self::_sapi_v1_algo_futures_sub_orders_get_200_response::SapiV1AlgoFuturesSubOrdersGet200Response; +pub mod _sapi_v1_algo_futures_sub_orders_get_200_response_sub_orders_inner; +pub use self::_sapi_v1_algo_futures_sub_orders_get_200_response_sub_orders_inner::SapiV1AlgoFuturesSubOrdersGet200ResponseSubOrdersInner; +pub mod _sapi_v1_algo_spot_historical_orders_get_200_response; +pub use self::_sapi_v1_algo_spot_historical_orders_get_200_response::SapiV1AlgoSpotHistoricalOrdersGet200Response; +pub mod _sapi_v1_algo_spot_historical_orders_get_200_response_orders_inner; +pub use self::_sapi_v1_algo_spot_historical_orders_get_200_response_orders_inner::SapiV1AlgoSpotHistoricalOrdersGet200ResponseOrdersInner; +pub mod _sapi_v1_algo_spot_new_order_twap_post_200_response; +pub use self::_sapi_v1_algo_spot_new_order_twap_post_200_response::SapiV1AlgoSpotNewOrderTwapPost200Response; +pub mod _sapi_v1_algo_spot_open_orders_get_200_response; +pub use self::_sapi_v1_algo_spot_open_orders_get_200_response::SapiV1AlgoSpotOpenOrdersGet200Response; +pub mod _sapi_v1_algo_spot_open_orders_get_200_response_orders_inner; +pub use self::_sapi_v1_algo_spot_open_orders_get_200_response_orders_inner::SapiV1AlgoSpotOpenOrdersGet200ResponseOrdersInner; +pub mod _sapi_v1_algo_spot_order_delete_200_response; +pub use self::_sapi_v1_algo_spot_order_delete_200_response::SapiV1AlgoSpotOrderDelete200Response; +pub mod _sapi_v1_algo_spot_sub_orders_get_200_response; +pub use self::_sapi_v1_algo_spot_sub_orders_get_200_response::SapiV1AlgoSpotSubOrdersGet200Response; +pub mod _sapi_v1_algo_spot_sub_orders_get_200_response_sub_orders_inner; +pub use self::_sapi_v1_algo_spot_sub_orders_get_200_response_sub_orders_inner::SapiV1AlgoSpotSubOrdersGet200ResponseSubOrdersInner; +pub mod _sapi_v1_asset_asset_detail_get_200_response; +pub use self::_sapi_v1_asset_asset_detail_get_200_response::SapiV1AssetAssetDetailGet200Response; +pub mod _sapi_v1_asset_asset_detail_get_200_response_ctr; +pub use self::_sapi_v1_asset_asset_detail_get_200_response_ctr::SapiV1AssetAssetDetailGet200ResponseCtr; +pub mod _sapi_v1_asset_asset_dividend_get_200_response; +pub use self::_sapi_v1_asset_asset_dividend_get_200_response::SapiV1AssetAssetDividendGet200Response; +pub mod _sapi_v1_asset_asset_dividend_get_200_response_rows_inner; +pub use self::_sapi_v1_asset_asset_dividend_get_200_response_rows_inner::SapiV1AssetAssetDividendGet200ResponseRowsInner; +pub mod _sapi_v1_asset_convert_transfer_post_200_response; +pub use self::_sapi_v1_asset_convert_transfer_post_200_response::SapiV1AssetConvertTransferPost200Response; +pub mod _sapi_v1_asset_convert_transfer_query_by_page_get_200_response; +pub use self::_sapi_v1_asset_convert_transfer_query_by_page_get_200_response::SapiV1AssetConvertTransferQueryByPageGet200Response; +pub mod _sapi_v1_asset_convert_transfer_query_by_page_get_200_response_rows_inner; +pub use self::_sapi_v1_asset_convert_transfer_query_by_page_get_200_response_rows_inner::SapiV1AssetConvertTransferQueryByPageGet200ResponseRowsInner; +pub mod _sapi_v1_asset_custody_transfer_history_get_200_response; +pub use self::_sapi_v1_asset_custody_transfer_history_get_200_response::SapiV1AssetCustodyTransferHistoryGet200Response; +pub mod _sapi_v1_asset_custody_transfer_history_get_200_response_rows_inner; +pub use self::_sapi_v1_asset_custody_transfer_history_get_200_response_rows_inner::SapiV1AssetCustodyTransferHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_asset_dribblet_get_200_response; +pub use self::_sapi_v1_asset_dribblet_get_200_response::SapiV1AssetDribbletGet200Response; +pub mod _sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner; +pub use self::_sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner::SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInner; +pub mod _sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner; +pub use self::_sapi_v1_asset_dribblet_get_200_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner::SapiV1AssetDribbletGet200ResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner; +pub mod _sapi_v1_asset_dust_btc_post_200_response; +pub use self::_sapi_v1_asset_dust_btc_post_200_response::SapiV1AssetDustBtcPost200Response; +pub mod _sapi_v1_asset_dust_btc_post_200_response_details_inner; +pub use self::_sapi_v1_asset_dust_btc_post_200_response_details_inner::SapiV1AssetDustBtcPost200ResponseDetailsInner; +pub mod _sapi_v1_asset_dust_post_200_response; +pub use self::_sapi_v1_asset_dust_post_200_response::SapiV1AssetDustPost200Response; +pub mod _sapi_v1_asset_dust_post_200_response_transfer_result_inner; +pub use self::_sapi_v1_asset_dust_post_200_response_transfer_result_inner::SapiV1AssetDustPost200ResponseTransferResultInner; +pub mod _sapi_v1_asset_get_funding_asset_post_200_response_inner; +pub use self::_sapi_v1_asset_get_funding_asset_post_200_response_inner::SapiV1AssetGetFundingAssetPost200ResponseInner; +pub mod _sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response; +pub use self::_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response::SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200Response; +pub mod _sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response_rows_inner; +pub use self::_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page_get_200_response_rows_inner::SapiV1AssetLedgerTransferCloudMiningQueryByPageGet200ResponseRowsInner; +pub mod _sapi_v1_asset_trade_fee_get_200_response_inner; +pub use self::_sapi_v1_asset_trade_fee_get_200_response_inner::SapiV1AssetTradeFeeGet200ResponseInner; +pub mod _sapi_v1_asset_transfer_get_200_response; +pub use self::_sapi_v1_asset_transfer_get_200_response::SapiV1AssetTransferGet200Response; +pub mod _sapi_v1_asset_transfer_get_200_response_rows_inner; +pub use self::_sapi_v1_asset_transfer_get_200_response_rows_inner::SapiV1AssetTransferGet200ResponseRowsInner; +pub mod _sapi_v1_asset_transfer_post_200_response; +pub use self::_sapi_v1_asset_transfer_post_200_response::SapiV1AssetTransferPost200Response; +pub mod _sapi_v1_asset_wallet_balance_get_200_response_inner; +pub use self::_sapi_v1_asset_wallet_balance_get_200_response_inner::SapiV1AssetWalletBalanceGet200ResponseInner; +pub mod _sapi_v1_blvt_redeem_post_200_response; +pub use self::_sapi_v1_blvt_redeem_post_200_response::SapiV1BlvtRedeemPost200Response; +pub mod _sapi_v1_blvt_redeem_record_get_200_response_inner; +pub use self::_sapi_v1_blvt_redeem_record_get_200_response_inner::SapiV1BlvtRedeemRecordGet200ResponseInner; +pub mod _sapi_v1_blvt_subscribe_post_200_response; +pub use self::_sapi_v1_blvt_subscribe_post_200_response::SapiV1BlvtSubscribePost200Response; +pub mod _sapi_v1_blvt_subscribe_record_get_200_response; +pub use self::_sapi_v1_blvt_subscribe_record_get_200_response::SapiV1BlvtSubscribeRecordGet200Response; +pub mod _sapi_v1_blvt_token_info_get_200_response_inner; +pub use self::_sapi_v1_blvt_token_info_get_200_response_inner::SapiV1BlvtTokenInfoGet200ResponseInner; +pub mod _sapi_v1_blvt_token_info_get_200_response_inner_current_baskets_inner; +pub use self::_sapi_v1_blvt_token_info_get_200_response_inner_current_baskets_inner::SapiV1BlvtTokenInfoGet200ResponseInnerCurrentBasketsInner; +pub mod _sapi_v1_blvt_user_limit_get_200_response_inner; +pub use self::_sapi_v1_blvt_user_limit_get_200_response_inner::SapiV1BlvtUserLimitGet200ResponseInner; +pub mod _sapi_v1_c2c_order_match_list_user_order_history_get_200_response; +pub use self::_sapi_v1_c2c_order_match_list_user_order_history_get_200_response::SapiV1C2cOrderMatchListUserOrderHistoryGet200Response; +pub mod _sapi_v1_c2c_order_match_list_user_order_history_get_200_response_data_inner; +pub use self::_sapi_v1_c2c_order_match_list_user_order_history_get_200_response_data_inner::SapiV1C2cOrderMatchListUserOrderHistoryGet200ResponseDataInner; +pub mod _sapi_v1_capital_config_getall_get_200_response_inner; +pub use self::_sapi_v1_capital_config_getall_get_200_response_inner::SapiV1CapitalConfigGetallGet200ResponseInner; +pub mod _sapi_v1_capital_config_getall_get_200_response_inner_network_list_inner; +pub use self::_sapi_v1_capital_config_getall_get_200_response_inner_network_list_inner::SapiV1CapitalConfigGetallGet200ResponseInnerNetworkListInner; +pub mod _sapi_v1_capital_contract_convertible_coins_get_200_response; +pub use self::_sapi_v1_capital_contract_convertible_coins_get_200_response::SapiV1CapitalContractConvertibleCoinsGet200Response; +pub mod _sapi_v1_capital_contract_convertible_coins_get_200_response_exchange_rates; +pub use self::_sapi_v1_capital_contract_convertible_coins_get_200_response_exchange_rates::SapiV1CapitalContractConvertibleCoinsGet200ResponseExchangeRates; +pub mod _sapi_v1_capital_deposit_address_get_200_response; +pub use self::_sapi_v1_capital_deposit_address_get_200_response::SapiV1CapitalDepositAddressGet200Response; +pub mod _sapi_v1_capital_deposit_address_list_get_200_response_inner; +pub use self::_sapi_v1_capital_deposit_address_list_get_200_response_inner::SapiV1CapitalDepositAddressListGet200ResponseInner; +pub mod _sapi_v1_capital_deposit_credit_apply_post_200_response; +pub use self::_sapi_v1_capital_deposit_credit_apply_post_200_response::SapiV1CapitalDepositCreditApplyPost200Response; +pub mod _sapi_v1_capital_deposit_hisrec_get_200_response_inner; +pub use self::_sapi_v1_capital_deposit_hisrec_get_200_response_inner::SapiV1CapitalDepositHisrecGet200ResponseInner; +pub mod _sapi_v1_capital_deposit_sub_address_get_200_response; +pub use self::_sapi_v1_capital_deposit_sub_address_get_200_response::SapiV1CapitalDepositSubAddressGet200Response; +pub mod _sapi_v1_capital_deposit_sub_hisrec_get_200_response_inner; +pub use self::_sapi_v1_capital_deposit_sub_hisrec_get_200_response_inner::SapiV1CapitalDepositSubHisrecGet200ResponseInner; +pub mod _sapi_v1_capital_withdraw_address_list_get_200_response_inner; +pub use self::_sapi_v1_capital_withdraw_address_list_get_200_response_inner::SapiV1CapitalWithdrawAddressListGet200ResponseInner; +pub mod _sapi_v1_capital_withdraw_apply_post_200_response; +pub use self::_sapi_v1_capital_withdraw_apply_post_200_response::SapiV1CapitalWithdrawApplyPost200Response; +pub mod _sapi_v1_capital_withdraw_history_get_200_response_inner; +pub use self::_sapi_v1_capital_withdraw_history_get_200_response_inner::SapiV1CapitalWithdrawHistoryGet200ResponseInner; +pub mod _sapi_v1_convert_accept_quote_post_200_response; +pub use self::_sapi_v1_convert_accept_quote_post_200_response::SapiV1ConvertAcceptQuotePost200Response; +pub mod _sapi_v1_convert_asset_info_get_200_response_inner; +pub use self::_sapi_v1_convert_asset_info_get_200_response_inner::SapiV1ConvertAssetInfoGet200ResponseInner; +pub mod _sapi_v1_convert_exchange_info_get_200_response_inner; +pub use self::_sapi_v1_convert_exchange_info_get_200_response_inner::SapiV1ConvertExchangeInfoGet200ResponseInner; +pub mod _sapi_v1_convert_get_quote_post_200_response; +pub use self::_sapi_v1_convert_get_quote_post_200_response::SapiV1ConvertGetQuotePost200Response; +pub mod _sapi_v1_convert_limit_cancel_order_post_200_response; +pub use self::_sapi_v1_convert_limit_cancel_order_post_200_response::SapiV1ConvertLimitCancelOrderPost200Response; +pub mod _sapi_v1_convert_limit_place_order_post_200_response; +pub use self::_sapi_v1_convert_limit_place_order_post_200_response::SapiV1ConvertLimitPlaceOrderPost200Response; +pub mod _sapi_v1_convert_limit_query_open_orders_get_200_response; +pub use self::_sapi_v1_convert_limit_query_open_orders_get_200_response::SapiV1ConvertLimitQueryOpenOrdersGet200Response; +pub mod _sapi_v1_convert_limit_query_open_orders_get_200_response_list_inner; +pub use self::_sapi_v1_convert_limit_query_open_orders_get_200_response_list_inner::SapiV1ConvertLimitQueryOpenOrdersGet200ResponseListInner; +pub mod _sapi_v1_convert_order_status_get_200_response; +pub use self::_sapi_v1_convert_order_status_get_200_response::SapiV1ConvertOrderStatusGet200Response; +pub mod _sapi_v1_convert_trade_flow_get_200_response; +pub use self::_sapi_v1_convert_trade_flow_get_200_response::SapiV1ConvertTradeFlowGet200Response; +pub mod _sapi_v1_convert_trade_flow_get_200_response_list_inner; +pub use self::_sapi_v1_convert_trade_flow_get_200_response_list_inner::SapiV1ConvertTradeFlowGet200ResponseListInner; +pub mod _sapi_v1_dci_product_accounts_get_200_response; +pub use self::_sapi_v1_dci_product_accounts_get_200_response::SapiV1DciProductAccountsGet200Response; +pub mod _sapi_v1_dci_product_auto_compound_edit_status_post_200_response; +pub use self::_sapi_v1_dci_product_auto_compound_edit_status_post_200_response::SapiV1DciProductAutoCompoundEditStatusPost200Response; +pub mod _sapi_v1_dci_product_list_get_200_response; +pub use self::_sapi_v1_dci_product_list_get_200_response::SapiV1DciProductListGet200Response; +pub mod _sapi_v1_dci_product_list_get_200_response_list_inner; +pub use self::_sapi_v1_dci_product_list_get_200_response_list_inner::SapiV1DciProductListGet200ResponseListInner; +pub mod _sapi_v1_dci_product_positions_get_200_response; +pub use self::_sapi_v1_dci_product_positions_get_200_response::SapiV1DciProductPositionsGet200Response; +pub mod _sapi_v1_dci_product_positions_get_200_response_list_inner; +pub use self::_sapi_v1_dci_product_positions_get_200_response_list_inner::SapiV1DciProductPositionsGet200ResponseListInner; +pub mod _sapi_v1_dci_product_subscribe_post_200_response; +pub use self::_sapi_v1_dci_product_subscribe_post_200_response::SapiV1DciProductSubscribePost200Response; +pub mod _sapi_v1_eth_staking_eth_history_rate_history_get_200_response; +pub use self::_sapi_v1_eth_staking_eth_history_rate_history_get_200_response::SapiV1EthStakingEthHistoryRateHistoryGet200Response; +pub mod _sapi_v1_eth_staking_eth_history_rate_history_get_200_response_rows_inner; +pub use self::_sapi_v1_eth_staking_eth_history_rate_history_get_200_response_rows_inner::SapiV1EthStakingEthHistoryRateHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_eth_staking_eth_history_redemption_history_get_200_response; +pub use self::_sapi_v1_eth_staking_eth_history_redemption_history_get_200_response::SapiV1EthStakingEthHistoryRedemptionHistoryGet200Response; +pub mod _sapi_v1_eth_staking_eth_history_redemption_history_get_200_response_rows_inner; +pub use self::_sapi_v1_eth_staking_eth_history_redemption_history_get_200_response_rows_inner::SapiV1EthStakingEthHistoryRedemptionHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_eth_staking_eth_history_rewards_history_get_200_response; +pub use self::_sapi_v1_eth_staking_eth_history_rewards_history_get_200_response::SapiV1EthStakingEthHistoryRewardsHistoryGet200Response; +pub mod _sapi_v1_eth_staking_eth_history_rewards_history_get_200_response_rows_inner; +pub use self::_sapi_v1_eth_staking_eth_history_rewards_history_get_200_response_rows_inner::SapiV1EthStakingEthHistoryRewardsHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_eth_staking_eth_history_staking_history_get_200_response; +pub use self::_sapi_v1_eth_staking_eth_history_staking_history_get_200_response::SapiV1EthStakingEthHistoryStakingHistoryGet200Response; +pub mod _sapi_v1_eth_staking_eth_history_staking_history_get_200_response_rows_inner; +pub use self::_sapi_v1_eth_staking_eth_history_staking_history_get_200_response_rows_inner::SapiV1EthStakingEthHistoryStakingHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response; +pub use self::_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response::SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200Response; +pub mod _sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response_rows_inner; +pub use self::_sapi_v1_eth_staking_eth_history_wbeth_rewards_history_get_200_response_rows_inner::SapiV1EthStakingEthHistoryWbethRewardsHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_eth_staking_eth_quota_get_200_response; +pub use self::_sapi_v1_eth_staking_eth_quota_get_200_response::SapiV1EthStakingEthQuotaGet200Response; +pub mod _sapi_v1_eth_staking_eth_redeem_post_200_response; +pub use self::_sapi_v1_eth_staking_eth_redeem_post_200_response::SapiV1EthStakingEthRedeemPost200Response; +pub mod _sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response; +pub use self::_sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response::SapiV1EthStakingWbethHistoryUnwrapHistoryGet200Response; +pub mod _sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response_rows_inner; +pub use self::_sapi_v1_eth_staking_wbeth_history_unwrap_history_get_200_response_rows_inner::SapiV1EthStakingWbethHistoryUnwrapHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response; +pub use self::_sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response::SapiV1EthStakingWbethHistoryWrapHistoryGet200Response; +pub mod _sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response_rows_inner; +pub use self::_sapi_v1_eth_staking_wbeth_history_wrap_history_get_200_response_rows_inner::SapiV1EthStakingWbethHistoryWrapHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_eth_staking_wbeth_wrap_post_200_response; +pub use self::_sapi_v1_eth_staking_wbeth_wrap_post_200_response::SapiV1EthStakingWbethWrapPost200Response; +pub mod _sapi_v1_fiat_orders_get_200_response; +pub use self::_sapi_v1_fiat_orders_get_200_response::SapiV1FiatOrdersGet200Response; +pub mod _sapi_v1_fiat_orders_get_200_response_data_inner; +pub use self::_sapi_v1_fiat_orders_get_200_response_data_inner::SapiV1FiatOrdersGet200ResponseDataInner; +pub mod _sapi_v1_fiat_payments_get_200_response; +pub use self::_sapi_v1_fiat_payments_get_200_response::SapiV1FiatPaymentsGet200Response; +pub mod _sapi_v1_fiat_payments_get_200_response_data_inner; +pub use self::_sapi_v1_fiat_payments_get_200_response_data_inner::SapiV1FiatPaymentsGet200ResponseDataInner; +pub mod _sapi_v1_futures_hist_data_link_get_200_response; +pub use self::_sapi_v1_futures_hist_data_link_get_200_response::SapiV1FuturesHistDataLinkGet200Response; +pub mod _sapi_v1_futures_hist_data_link_get_200_response_data_inner; +pub use self::_sapi_v1_futures_hist_data_link_get_200_response_data_inner::SapiV1FuturesHistDataLinkGet200ResponseDataInner; +pub mod _sapi_v1_futures_transfer_get_200_response; +pub use self::_sapi_v1_futures_transfer_get_200_response::SapiV1FuturesTransferGet200Response; +pub mod _sapi_v1_futures_transfer_get_200_response_rows_inner; +pub use self::_sapi_v1_futures_transfer_get_200_response_rows_inner::SapiV1FuturesTransferGet200ResponseRowsInner; +pub mod _sapi_v1_giftcard_buy_code_token_limit_get_200_response; +pub use self::_sapi_v1_giftcard_buy_code_token_limit_get_200_response::SapiV1GiftcardBuyCodeTokenLimitGet200Response; +pub mod _sapi_v1_giftcard_buy_code_token_limit_get_200_response_data; +pub use self::_sapi_v1_giftcard_buy_code_token_limit_get_200_response_data::SapiV1GiftcardBuyCodeTokenLimitGet200ResponseData; +pub mod _sapi_v1_giftcard_create_code_post_200_response; +pub use self::_sapi_v1_giftcard_create_code_post_200_response::SapiV1GiftcardCreateCodePost200Response; +pub mod _sapi_v1_giftcard_create_code_post_200_response_data; +pub use self::_sapi_v1_giftcard_create_code_post_200_response_data::SapiV1GiftcardCreateCodePost200ResponseData; +pub mod _sapi_v1_giftcard_cryptography_rsa_public_key_get_200_response; +pub use self::_sapi_v1_giftcard_cryptography_rsa_public_key_get_200_response::SapiV1GiftcardCryptographyRsaPublicKeyGet200Response; +pub mod _sapi_v1_giftcard_redeem_code_post_200_response; +pub use self::_sapi_v1_giftcard_redeem_code_post_200_response::SapiV1GiftcardRedeemCodePost200Response; +pub mod _sapi_v1_giftcard_redeem_code_post_200_response_data; +pub use self::_sapi_v1_giftcard_redeem_code_post_200_response_data::SapiV1GiftcardRedeemCodePost200ResponseData; +pub mod _sapi_v1_giftcard_verify_get_200_response; +pub use self::_sapi_v1_giftcard_verify_get_200_response::SapiV1GiftcardVerifyGet200Response; +pub mod _sapi_v1_giftcard_verify_get_200_response_data; +pub use self::_sapi_v1_giftcard_verify_get_200_response_data::SapiV1GiftcardVerifyGet200ResponseData; +pub mod _sapi_v1_lending_auto_invest_all_asset_get_200_response; +pub use self::_sapi_v1_lending_auto_invest_all_asset_get_200_response::SapiV1LendingAutoInvestAllAssetGet200Response; +pub mod _sapi_v1_lending_auto_invest_history_list_get_200_response_inner; +pub use self::_sapi_v1_lending_auto_invest_history_list_get_200_response_inner::SapiV1LendingAutoInvestHistoryListGet200ResponseInner; +pub mod _sapi_v1_lending_auto_invest_index_info_get_200_response; +pub use self::_sapi_v1_lending_auto_invest_index_info_get_200_response::SapiV1LendingAutoInvestIndexInfoGet200Response; +pub mod _sapi_v1_lending_auto_invest_index_info_get_200_response_asset_allocation_inner; +pub use self::_sapi_v1_lending_auto_invest_index_info_get_200_response_asset_allocation_inner::SapiV1LendingAutoInvestIndexInfoGet200ResponseAssetAllocationInner; +pub mod _sapi_v1_lending_auto_invest_index_user_summary_get_200_response; +pub use self::_sapi_v1_lending_auto_invest_index_user_summary_get_200_response::SapiV1LendingAutoInvestIndexUserSummaryGet200Response; +pub mod _sapi_v1_lending_auto_invest_index_user_summary_get_200_response_asset_allocation_inner; +pub use self::_sapi_v1_lending_auto_invest_index_user_summary_get_200_response_asset_allocation_inner::SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseAssetAllocationInner; +pub mod _sapi_v1_lending_auto_invest_index_user_summary_get_200_response_details_inner; +pub use self::_sapi_v1_lending_auto_invest_index_user_summary_get_200_response_details_inner::SapiV1LendingAutoInvestIndexUserSummaryGet200ResponseDetailsInner; +pub mod _sapi_v1_lending_auto_invest_one_off_post_200_response; +pub use self::_sapi_v1_lending_auto_invest_one_off_post_200_response::SapiV1LendingAutoInvestOneOffPost200Response; +pub mod _sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner; +pub use self::_sapi_v1_lending_auto_invest_one_off_post_details_parameter_inner::SapiV1LendingAutoInvestOneOffPostDetailsParameterInner; +pub mod _sapi_v1_lending_auto_invest_one_off_status_get_200_response; +pub use self::_sapi_v1_lending_auto_invest_one_off_status_get_200_response::SapiV1LendingAutoInvestOneOffStatusGet200Response; +pub mod _sapi_v1_lending_auto_invest_plan_add_post_200_response; +pub use self::_sapi_v1_lending_auto_invest_plan_add_post_200_response::SapiV1LendingAutoInvestPlanAddPost200Response; +pub mod _sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner; +pub use self::_sapi_v1_lending_auto_invest_plan_add_post_details_parameter_inner::SapiV1LendingAutoInvestPlanAddPostDetailsParameterInner; +pub mod _sapi_v1_lending_auto_invest_plan_edit_status_post_200_response; +pub use self::_sapi_v1_lending_auto_invest_plan_edit_status_post_200_response::SapiV1LendingAutoInvestPlanEditStatusPost200Response; +pub mod _sapi_v1_lending_auto_invest_plan_id_get_200_response; +pub use self::_sapi_v1_lending_auto_invest_plan_id_get_200_response::SapiV1LendingAutoInvestPlanIdGet200Response; +pub mod _sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner; +pub use self::_sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner::SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInner; +pub mod _sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner_details_inner; +pub use self::_sapi_v1_lending_auto_invest_plan_id_get_200_response_plan_inner_details_inner::SapiV1LendingAutoInvestPlanIdGet200ResponsePlanInnerDetailsInner; +pub mod _sapi_v1_lending_auto_invest_plan_list_get_200_response; +pub use self::_sapi_v1_lending_auto_invest_plan_list_get_200_response::SapiV1LendingAutoInvestPlanListGet200Response; +pub mod _sapi_v1_lending_auto_invest_plan_list_get_200_response_plan_inner; +pub use self::_sapi_v1_lending_auto_invest_plan_list_get_200_response_plan_inner::SapiV1LendingAutoInvestPlanListGet200ResponsePlanInner; +pub mod _sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner; +pub use self::_sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner::SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInner; +pub mod _sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner_transaction_details_inner; +pub use self::_sapi_v1_lending_auto_invest_rebalance_history_get_200_response_inner_transaction_details_inner::SapiV1LendingAutoInvestRebalanceHistoryGet200ResponseInnerTransactionDetailsInner; +pub mod _sapi_v1_lending_auto_invest_redeem_history_get_200_response_inner; +pub use self::_sapi_v1_lending_auto_invest_redeem_history_get_200_response_inner::SapiV1LendingAutoInvestRedeemHistoryGet200ResponseInner; +pub mod _sapi_v1_lending_auto_invest_redeem_post_200_response; +pub use self::_sapi_v1_lending_auto_invest_redeem_post_200_response::SapiV1LendingAutoInvestRedeemPost200Response; +pub mod _sapi_v1_lending_auto_invest_source_asset_list_get_200_response; +pub use self::_sapi_v1_lending_auto_invest_source_asset_list_get_200_response::SapiV1LendingAutoInvestSourceAssetListGet200Response; +pub mod _sapi_v1_lending_auto_invest_source_asset_list_get_200_response_source_assets_inner; +pub use self::_sapi_v1_lending_auto_invest_source_asset_list_get_200_response_source_assets_inner::SapiV1LendingAutoInvestSourceAssetListGet200ResponseSourceAssetsInner; +pub mod _sapi_v1_lending_auto_invest_target_asset_list_get_200_response; +pub use self::_sapi_v1_lending_auto_invest_target_asset_list_get_200_response::SapiV1LendingAutoInvestTargetAssetListGet200Response; +pub mod _sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner; +pub use self::_sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner::SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInner; +pub mod _sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner; +pub use self::_sapi_v1_lending_auto_invest_target_asset_list_get_200_response_auto_invest_asset_list_inner_roi_and_dimension_type_list_inner::SapiV1LendingAutoInvestTargetAssetListGet200ResponseAutoInvestAssetListInnerRoiAndDimensionTypeListInner; +pub mod _sapi_v1_lending_auto_invest_target_asset_roi_list_get_200_response_inner; +pub use self::_sapi_v1_lending_auto_invest_target_asset_roi_list_get_200_response_inner::SapiV1LendingAutoInvestTargetAssetRoiListGet200ResponseInner; +pub mod _sapi_v1_lending_customized_fixed_purchase_post_200_response; +pub use self::_sapi_v1_lending_customized_fixed_purchase_post_200_response::SapiV1LendingCustomizedFixedPurchasePost200Response; +pub mod _sapi_v1_lending_position_changed_post_200_response; +pub use self::_sapi_v1_lending_position_changed_post_200_response::SapiV1LendingPositionChangedPost200Response; +pub mod _sapi_v1_lending_project_list_get_200_response_inner; +pub use self::_sapi_v1_lending_project_list_get_200_response_inner::SapiV1LendingProjectListGet200ResponseInner; +pub mod _sapi_v1_lending_project_position_list_get_200_response_inner; +pub use self::_sapi_v1_lending_project_position_list_get_200_response_inner::SapiV1LendingProjectPositionListGet200ResponseInner; +pub mod _sapi_v1_loan_adjust_ltv_post_200_response; +pub use self::_sapi_v1_loan_adjust_ltv_post_200_response::SapiV1LoanAdjustLtvPost200Response; +pub mod _sapi_v1_loan_borrow_history_get_200_response; +pub use self::_sapi_v1_loan_borrow_history_get_200_response::SapiV1LoanBorrowHistoryGet200Response; +pub mod _sapi_v1_loan_borrow_history_get_200_response_rows_inner; +pub use self::_sapi_v1_loan_borrow_history_get_200_response_rows_inner::SapiV1LoanBorrowHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_loan_borrow_post_200_response; +pub use self::_sapi_v1_loan_borrow_post_200_response::SapiV1LoanBorrowPost200Response; +pub mod _sapi_v1_loan_collateral_data_get_200_response; +pub use self::_sapi_v1_loan_collateral_data_get_200_response::SapiV1LoanCollateralDataGet200Response; +pub mod _sapi_v1_loan_collateral_data_get_200_response_rows_inner; +pub use self::_sapi_v1_loan_collateral_data_get_200_response_rows_inner::SapiV1LoanCollateralDataGet200ResponseRowsInner; +pub mod _sapi_v1_loan_customize_margin_call_post_200_response; +pub use self::_sapi_v1_loan_customize_margin_call_post_200_response::SapiV1LoanCustomizeMarginCallPost200Response; +pub mod _sapi_v1_loan_customize_margin_call_post_200_response_rows_inner; +pub use self::_sapi_v1_loan_customize_margin_call_post_200_response_rows_inner::SapiV1LoanCustomizeMarginCallPost200ResponseRowsInner; +pub mod _sapi_v1_loan_income_get_200_response_inner; +pub use self::_sapi_v1_loan_income_get_200_response_inner::SapiV1LoanIncomeGet200ResponseInner; +pub mod _sapi_v1_loan_loanable_data_get_200_response; +pub use self::_sapi_v1_loan_loanable_data_get_200_response::SapiV1LoanLoanableDataGet200Response; +pub mod _sapi_v1_loan_loanable_data_get_200_response_rows_inner; +pub use self::_sapi_v1_loan_loanable_data_get_200_response_rows_inner::SapiV1LoanLoanableDataGet200ResponseRowsInner; +pub mod _sapi_v1_loan_ltv_adjustment_history_get_200_response; +pub use self::_sapi_v1_loan_ltv_adjustment_history_get_200_response::SapiV1LoanLtvAdjustmentHistoryGet200Response; +pub mod _sapi_v1_loan_ltv_adjustment_history_get_200_response_rows_inner; +pub use self::_sapi_v1_loan_ltv_adjustment_history_get_200_response_rows_inner::SapiV1LoanLtvAdjustmentHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_loan_ongoing_orders_get_200_response; +pub use self::_sapi_v1_loan_ongoing_orders_get_200_response::SapiV1LoanOngoingOrdersGet200Response; +pub mod _sapi_v1_loan_ongoing_orders_get_200_response_rows_inner; +pub use self::_sapi_v1_loan_ongoing_orders_get_200_response_rows_inner::SapiV1LoanOngoingOrdersGet200ResponseRowsInner; +pub mod _sapi_v1_loan_repay_collateral_rate_get_200_response; +pub use self::_sapi_v1_loan_repay_collateral_rate_get_200_response::SapiV1LoanRepayCollateralRateGet200Response; +pub mod _sapi_v1_loan_repay_history_get_200_response; +pub use self::_sapi_v1_loan_repay_history_get_200_response::SapiV1LoanRepayHistoryGet200Response; +pub mod _sapi_v1_loan_repay_history_get_200_response_rows_inner; +pub use self::_sapi_v1_loan_repay_history_get_200_response_rows_inner::SapiV1LoanRepayHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_loan_repay_post_200_response; +pub use self::_sapi_v1_loan_repay_post_200_response::SapiV1LoanRepayPost200Response; +pub mod _sapi_v1_loan_vip_borrow_post_200_response; +pub use self::_sapi_v1_loan_vip_borrow_post_200_response::SapiV1LoanVipBorrowPost200Response; +pub mod _sapi_v1_loan_vip_collateral_account_get_200_response; +pub use self::_sapi_v1_loan_vip_collateral_account_get_200_response::SapiV1LoanVipCollateralAccountGet200Response; +pub mod _sapi_v1_loan_vip_collateral_account_get_200_response_rows_inner; +pub use self::_sapi_v1_loan_vip_collateral_account_get_200_response_rows_inner::SapiV1LoanVipCollateralAccountGet200ResponseRowsInner; +pub mod _sapi_v1_loan_vip_collateral_data_get_200_response; +pub use self::_sapi_v1_loan_vip_collateral_data_get_200_response::SapiV1LoanVipCollateralDataGet200Response; +pub mod _sapi_v1_loan_vip_collateral_data_get_200_response_rows_inner; +pub use self::_sapi_v1_loan_vip_collateral_data_get_200_response_rows_inner::SapiV1LoanVipCollateralDataGet200ResponseRowsInner; +pub mod _sapi_v1_loan_vip_loanable_data_get_200_response; +pub use self::_sapi_v1_loan_vip_loanable_data_get_200_response::SapiV1LoanVipLoanableDataGet200Response; +pub mod _sapi_v1_loan_vip_loanable_data_get_200_response_rows_inner; +pub use self::_sapi_v1_loan_vip_loanable_data_get_200_response_rows_inner::SapiV1LoanVipLoanableDataGet200ResponseRowsInner; +pub mod _sapi_v1_loan_vip_ongoing_orders_get_200_response; +pub use self::_sapi_v1_loan_vip_ongoing_orders_get_200_response::SapiV1LoanVipOngoingOrdersGet200Response; +pub mod _sapi_v1_loan_vip_ongoing_orders_get_200_response_rows_inner; +pub use self::_sapi_v1_loan_vip_ongoing_orders_get_200_response_rows_inner::SapiV1LoanVipOngoingOrdersGet200ResponseRowsInner; +pub mod _sapi_v1_loan_vip_renew_post_200_response; +pub use self::_sapi_v1_loan_vip_renew_post_200_response::SapiV1LoanVipRenewPost200Response; +pub mod _sapi_v1_loan_vip_repay_history_get_200_response; +pub use self::_sapi_v1_loan_vip_repay_history_get_200_response::SapiV1LoanVipRepayHistoryGet200Response; +pub mod _sapi_v1_loan_vip_repay_history_get_200_response_rows_inner; +pub use self::_sapi_v1_loan_vip_repay_history_get_200_response_rows_inner::SapiV1LoanVipRepayHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_loan_vip_repay_post_200_response; +pub use self::_sapi_v1_loan_vip_repay_post_200_response::SapiV1LoanVipRepayPost200Response; +pub mod _sapi_v1_loan_vip_request_data_get_200_response; +pub use self::_sapi_v1_loan_vip_request_data_get_200_response::SapiV1LoanVipRequestDataGet200Response; +pub mod _sapi_v1_loan_vip_request_data_get_200_response_rows_inner; +pub use self::_sapi_v1_loan_vip_request_data_get_200_response_rows_inner::SapiV1LoanVipRequestDataGet200ResponseRowsInner; +pub mod _sapi_v1_loan_vip_request_interest_rate_get_200_response_inner; +pub use self::_sapi_v1_loan_vip_request_interest_rate_get_200_response_inner::SapiV1LoanVipRequestInterestRateGet200ResponseInner; +pub mod _sapi_v1_managed_subaccount_account_snapshot_get_200_response; +pub use self::_sapi_v1_managed_subaccount_account_snapshot_get_200_response::SapiV1ManagedSubaccountAccountSnapshotGet200Response; +pub mod _sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner; +pub use self::_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner::SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInner; +pub mod _sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data; +pub use self::_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data::SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerData; +pub mod _sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data_balances_inner; +pub use self::_sapi_v1_managed_subaccount_account_snapshot_get_200_response_snapshot_vos_inner_data_balances_inner::SapiV1ManagedSubaccountAccountSnapshotGet200ResponseSnapshotVosInnerDataBalancesInner; +pub mod _sapi_v1_managed_subaccount_asset_get_200_response_inner; +pub use self::_sapi_v1_managed_subaccount_asset_get_200_response_inner::SapiV1ManagedSubaccountAssetGet200ResponseInner; +pub mod _sapi_v1_managed_subaccount_deposit_address_get_200_response; +pub use self::_sapi_v1_managed_subaccount_deposit_address_get_200_response::SapiV1ManagedSubaccountDepositAddressGet200Response; +pub mod _sapi_v1_managed_subaccount_deposit_post_200_response; +pub use self::_sapi_v1_managed_subaccount_deposit_post_200_response::SapiV1ManagedSubaccountDepositPost200Response; +pub mod _sapi_v1_managed_subaccount_fetch_future_asset_get_200_response; +pub use self::_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response::SapiV1ManagedSubaccountFetchFutureAssetGet200Response; +pub mod _sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner; +pub use self::_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner::SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInner; +pub mod _sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data; +pub use self::_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data::SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerData; +pub mod _sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_assets_inner; +pub use self::_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_assets_inner::SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataAssetsInner; +pub mod _sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_position_inner; +pub use self::_sapi_v1_managed_subaccount_fetch_future_asset_get_200_response_snapshot_vos_inner_data_position_inner::SapiV1ManagedSubaccountFetchFutureAssetGet200ResponseSnapshotVosInnerDataPositionInner; +pub mod _sapi_v1_managed_subaccount_info_get_200_response; +pub use self::_sapi_v1_managed_subaccount_info_get_200_response::SapiV1ManagedSubaccountInfoGet200Response; +pub mod _sapi_v1_managed_subaccount_info_get_200_response_manager_sub_user_info_vo_list_inner; +pub use self::_sapi_v1_managed_subaccount_info_get_200_response_manager_sub_user_info_vo_list_inner::SapiV1ManagedSubaccountInfoGet200ResponseManagerSubUserInfoVoListInner; +pub mod _sapi_v1_managed_subaccount_margin_asset_get_200_response; +pub use self::_sapi_v1_managed_subaccount_margin_asset_get_200_response::SapiV1ManagedSubaccountMarginAssetGet200Response; +pub mod _sapi_v1_managed_subaccount_margin_asset_get_200_response_user_assets_inner; +pub use self::_sapi_v1_managed_subaccount_margin_asset_get_200_response_user_assets_inner::SapiV1ManagedSubaccountMarginAssetGet200ResponseUserAssetsInner; +pub mod _sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response; +pub use self::_sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response::SapiV1ManagedSubaccountQueryTransLogForInvestorGet200Response; +pub mod _sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response_manager_sub_transfer_history_vos_inner; +pub use self::_sapi_v1_managed_subaccount_query_trans_log_for_investor_get_200_response_manager_sub_transfer_history_vos_inner::SapiV1ManagedSubaccountQueryTransLogForInvestorGet200ResponseManagerSubTransferHistoryVosInner; +pub mod _sapi_v1_managed_subaccount_query_trans_log_get_200_response; +pub use self::_sapi_v1_managed_subaccount_query_trans_log_get_200_response::SapiV1ManagedSubaccountQueryTransLogGet200Response; +pub mod _sapi_v1_managed_subaccount_query_trans_log_get_200_response_manager_sub_transfer_history_vos_inner; +pub use self::_sapi_v1_managed_subaccount_query_trans_log_get_200_response_manager_sub_transfer_history_vos_inner::SapiV1ManagedSubaccountQueryTransLogGet200ResponseManagerSubTransferHistoryVosInner; +pub mod _sapi_v1_margin_account_get_200_response; +pub use self::_sapi_v1_margin_account_get_200_response::SapiV1MarginAccountGet200Response; +pub mod _sapi_v1_margin_account_get_200_response_user_assets_inner; +pub use self::_sapi_v1_margin_account_get_200_response_user_assets_inner::SapiV1MarginAccountGet200ResponseUserAssetsInner; +pub mod _sapi_v1_margin_all_assets_get_200_response_inner; +pub use self::_sapi_v1_margin_all_assets_get_200_response_inner::SapiV1MarginAllAssetsGet200ResponseInner; +pub mod _sapi_v1_margin_all_pairs_get_200_response_inner; +pub use self::_sapi_v1_margin_all_pairs_get_200_response_inner::SapiV1MarginAllPairsGet200ResponseInner; +pub mod _sapi_v1_margin_available_inventory_get_200_response; +pub use self::_sapi_v1_margin_available_inventory_get_200_response::SapiV1MarginAvailableInventoryGet200Response; +pub mod _sapi_v1_margin_available_inventory_get_200_response_assets; +pub use self::_sapi_v1_margin_available_inventory_get_200_response_assets::SapiV1MarginAvailableInventoryGet200ResponseAssets; +pub mod _sapi_v1_margin_borrow_repay_get_200_response; +pub use self::_sapi_v1_margin_borrow_repay_get_200_response::SapiV1MarginBorrowRepayGet200Response; +pub mod _sapi_v1_margin_borrow_repay_get_200_response_rows_inner; +pub use self::_sapi_v1_margin_borrow_repay_get_200_response_rows_inner::SapiV1MarginBorrowRepayGet200ResponseRowsInner; +pub mod _sapi_v1_margin_borrow_repay_post_200_response; +pub use self::_sapi_v1_margin_borrow_repay_post_200_response::SapiV1MarginBorrowRepayPost200Response; +pub mod _sapi_v1_margin_capital_flow_get_200_response_inner; +pub use self::_sapi_v1_margin_capital_flow_get_200_response_inner::SapiV1MarginCapitalFlowGet200ResponseInner; +pub mod _sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner; +pub use self::_sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner::SapiV1MarginCrossMarginCollateralRatioGet200ResponseInner; +pub mod _sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner_collaterals_inner; +pub use self::_sapi_v1_margin_cross_margin_collateral_ratio_get_200_response_inner_collaterals_inner::SapiV1MarginCrossMarginCollateralRatioGet200ResponseInnerCollateralsInner; +pub mod _sapi_v1_margin_cross_margin_data_get_200_response_inner; +pub use self::_sapi_v1_margin_cross_margin_data_get_200_response_inner::SapiV1MarginCrossMarginDataGet200ResponseInner; +pub mod _sapi_v1_margin_delist_schedule_get_200_response_inner; +pub use self::_sapi_v1_margin_delist_schedule_get_200_response_inner::SapiV1MarginDelistScheduleGet200ResponseInner; +pub mod _sapi_v1_margin_exchange_small_liability_get_200_response_inner; +pub use self::_sapi_v1_margin_exchange_small_liability_get_200_response_inner::SapiV1MarginExchangeSmallLiabilityGet200ResponseInner; +pub mod _sapi_v1_margin_exchange_small_liability_history_get_200_response; +pub use self::_sapi_v1_margin_exchange_small_liability_history_get_200_response::SapiV1MarginExchangeSmallLiabilityHistoryGet200Response; +pub mod _sapi_v1_margin_exchange_small_liability_history_get_200_response_rows_inner; +pub use self::_sapi_v1_margin_exchange_small_liability_history_get_200_response_rows_inner::SapiV1MarginExchangeSmallLiabilityHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_margin_force_liquidation_rec_get_200_response; +pub use self::_sapi_v1_margin_force_liquidation_rec_get_200_response::SapiV1MarginForceLiquidationRecGet200Response; +pub mod _sapi_v1_margin_force_liquidation_rec_get_200_response_rows_inner; +pub use self::_sapi_v1_margin_force_liquidation_rec_get_200_response_rows_inner::SapiV1MarginForceLiquidationRecGet200ResponseRowsInner; +pub mod _sapi_v1_margin_interest_history_get_200_response; +pub use self::_sapi_v1_margin_interest_history_get_200_response::SapiV1MarginInterestHistoryGet200Response; +pub mod _sapi_v1_margin_interest_history_get_200_response_rows_inner; +pub use self::_sapi_v1_margin_interest_history_get_200_response_rows_inner::SapiV1MarginInterestHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_margin_interest_rate_history_get_200_response_inner; +pub use self::_sapi_v1_margin_interest_rate_history_get_200_response_inner::SapiV1MarginInterestRateHistoryGet200ResponseInner; +pub mod _sapi_v1_margin_isolated_account_limit_get_200_response; +pub use self::_sapi_v1_margin_isolated_account_limit_get_200_response::SapiV1MarginIsolatedAccountLimitGet200Response; +pub mod _sapi_v1_margin_isolated_account_post_200_response; +pub use self::_sapi_v1_margin_isolated_account_post_200_response::SapiV1MarginIsolatedAccountPost200Response; +pub mod _sapi_v1_margin_isolated_all_pairs_get_200_response_inner; +pub use self::_sapi_v1_margin_isolated_all_pairs_get_200_response_inner::SapiV1MarginIsolatedAllPairsGet200ResponseInner; +pub mod _sapi_v1_margin_isolated_margin_data_get_200_response_inner; +pub use self::_sapi_v1_margin_isolated_margin_data_get_200_response_inner::SapiV1MarginIsolatedMarginDataGet200ResponseInner; +pub mod _sapi_v1_margin_isolated_margin_data_get_200_response_inner_data_inner; +pub use self::_sapi_v1_margin_isolated_margin_data_get_200_response_inner_data_inner::SapiV1MarginIsolatedMarginDataGet200ResponseInnerDataInner; +pub mod _sapi_v1_margin_isolated_margin_tier_get_200_response_inner; +pub use self::_sapi_v1_margin_isolated_margin_tier_get_200_response_inner::SapiV1MarginIsolatedMarginTierGet200ResponseInner; +pub mod _sapi_v1_margin_leverage_bracket_get_200_response_inner; +pub use self::_sapi_v1_margin_leverage_bracket_get_200_response_inner::SapiV1MarginLeverageBracketGet200ResponseInner; +pub mod _sapi_v1_margin_leverage_bracket_get_200_response_inner_brackets_inner; +pub use self::_sapi_v1_margin_leverage_bracket_get_200_response_inner_brackets_inner::SapiV1MarginLeverageBracketGet200ResponseInnerBracketsInner; +pub mod _sapi_v1_margin_max_borrowable_get_200_response; +pub use self::_sapi_v1_margin_max_borrowable_get_200_response::SapiV1MarginMaxBorrowableGet200Response; +pub mod _sapi_v1_margin_max_leverage_post_200_response; +pub use self::_sapi_v1_margin_max_leverage_post_200_response::SapiV1MarginMaxLeveragePost200Response; +pub mod _sapi_v1_margin_max_transferable_get_200_response; +pub use self::_sapi_v1_margin_max_transferable_get_200_response::SapiV1MarginMaxTransferableGet200Response; +pub mod _sapi_v1_margin_next_hourly_interest_rate_get_200_response_inner; +pub use self::_sapi_v1_margin_next_hourly_interest_rate_get_200_response_inner::SapiV1MarginNextHourlyInterestRateGet200ResponseInner; +pub mod _sapi_v1_margin_open_order_list_get_200_response_inner; +pub use self::_sapi_v1_margin_open_order_list_get_200_response_inner::SapiV1MarginOpenOrderListGet200ResponseInner; +pub mod _sapi_v1_margin_open_orders_delete_200_response_inner; +pub use self::_sapi_v1_margin_open_orders_delete_200_response_inner::SapiV1MarginOpenOrdersDelete200ResponseInner; +pub mod _sapi_v1_margin_order_list_get_200_response; +pub use self::_sapi_v1_margin_order_list_get_200_response::SapiV1MarginOrderListGet200Response; +pub mod _sapi_v1_margin_order_oco_post_200_response; +pub use self::_sapi_v1_margin_order_oco_post_200_response::SapiV1MarginOrderOcoPost200Response; +pub mod _sapi_v1_margin_order_oco_post_200_response_order_reports_inner; +pub use self::_sapi_v1_margin_order_oco_post_200_response_order_reports_inner::SapiV1MarginOrderOcoPost200ResponseOrderReportsInner; +pub mod _sapi_v1_margin_order_oco_post_200_response_orders_inner; +pub use self::_sapi_v1_margin_order_oco_post_200_response_orders_inner::SapiV1MarginOrderOcoPost200ResponseOrdersInner; +pub mod _sapi_v1_margin_order_post_200_response; +pub use self::_sapi_v1_margin_order_post_200_response::SapiV1MarginOrderPost200Response; +pub mod _sapi_v1_margin_price_index_get_200_response; +pub use self::_sapi_v1_margin_price_index_get_200_response::SapiV1MarginPriceIndexGet200Response; +pub mod _sapi_v1_margin_rate_limit_order_get_200_response_inner; +pub use self::_sapi_v1_margin_rate_limit_order_get_200_response_inner::SapiV1MarginRateLimitOrderGet200ResponseInner; +pub mod _sapi_v1_margin_trade_coeff_get_200_response; +pub use self::_sapi_v1_margin_trade_coeff_get_200_response::SapiV1MarginTradeCoeffGet200Response; +pub mod _sapi_v1_margin_transfer_get_200_response; +pub use self::_sapi_v1_margin_transfer_get_200_response::SapiV1MarginTransferGet200Response; +pub mod _sapi_v1_margin_transfer_get_200_response_rows_inner; +pub use self::_sapi_v1_margin_transfer_get_200_response_rows_inner::SapiV1MarginTransferGet200ResponseRowsInner; +pub mod _sapi_v1_mining_hash_transfer_config_cancel_post_200_response; +pub use self::_sapi_v1_mining_hash_transfer_config_cancel_post_200_response::SapiV1MiningHashTransferConfigCancelPost200Response; +pub mod _sapi_v1_mining_hash_transfer_config_details_list_get_200_response; +pub use self::_sapi_v1_mining_hash_transfer_config_details_list_get_200_response::SapiV1MiningHashTransferConfigDetailsListGet200Response; +pub mod _sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data; +pub use self::_sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data::SapiV1MiningHashTransferConfigDetailsListGet200ResponseData; +pub mod _sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_config_details_inner; +pub use self::_sapi_v1_mining_hash_transfer_config_details_list_get_200_response_data_config_details_inner::SapiV1MiningHashTransferConfigDetailsListGet200ResponseDataConfigDetailsInner; +pub mod _sapi_v1_mining_hash_transfer_config_post_200_response; +pub use self::_sapi_v1_mining_hash_transfer_config_post_200_response::SapiV1MiningHashTransferConfigPost200Response; +pub mod _sapi_v1_mining_hash_transfer_profit_details_get_200_response; +pub use self::_sapi_v1_mining_hash_transfer_profit_details_get_200_response::SapiV1MiningHashTransferProfitDetailsGet200Response; +pub mod _sapi_v1_mining_hash_transfer_profit_details_get_200_response_data; +pub use self::_sapi_v1_mining_hash_transfer_profit_details_get_200_response_data::SapiV1MiningHashTransferProfitDetailsGet200ResponseData; +pub mod _sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profit_transfer_details_inner; +pub use self::_sapi_v1_mining_hash_transfer_profit_details_get_200_response_data_profit_transfer_details_inner::SapiV1MiningHashTransferProfitDetailsGet200ResponseDataProfitTransferDetailsInner; +pub mod _sapi_v1_mining_payment_list_get_200_response; +pub use self::_sapi_v1_mining_payment_list_get_200_response::SapiV1MiningPaymentListGet200Response; +pub mod _sapi_v1_mining_payment_list_get_200_response_data; +pub use self::_sapi_v1_mining_payment_list_get_200_response_data::SapiV1MiningPaymentListGet200ResponseData; +pub mod _sapi_v1_mining_payment_list_get_200_response_data_account_profits_inner; +pub use self::_sapi_v1_mining_payment_list_get_200_response_data_account_profits_inner::SapiV1MiningPaymentListGet200ResponseDataAccountProfitsInner; +pub mod _sapi_v1_mining_payment_other_get_200_response; +pub use self::_sapi_v1_mining_payment_other_get_200_response::SapiV1MiningPaymentOtherGet200Response; +pub mod _sapi_v1_mining_payment_other_get_200_response_data; +pub use self::_sapi_v1_mining_payment_other_get_200_response_data::SapiV1MiningPaymentOtherGet200ResponseData; +pub mod _sapi_v1_mining_payment_other_get_200_response_data_other_profits_inner; +pub use self::_sapi_v1_mining_payment_other_get_200_response_data_other_profits_inner::SapiV1MiningPaymentOtherGet200ResponseDataOtherProfitsInner; +pub mod _sapi_v1_mining_payment_uid_get_200_response; +pub use self::_sapi_v1_mining_payment_uid_get_200_response::SapiV1MiningPaymentUidGet200Response; +pub mod _sapi_v1_mining_payment_uid_get_200_response_data; +pub use self::_sapi_v1_mining_payment_uid_get_200_response_data::SapiV1MiningPaymentUidGet200ResponseData; +pub mod _sapi_v1_mining_payment_uid_get_200_response_data_account_profits_inner; +pub use self::_sapi_v1_mining_payment_uid_get_200_response_data_account_profits_inner::SapiV1MiningPaymentUidGet200ResponseDataAccountProfitsInner; +pub mod _sapi_v1_mining_pub_algo_list_get_200_response; +pub use self::_sapi_v1_mining_pub_algo_list_get_200_response::SapiV1MiningPubAlgoListGet200Response; +pub mod _sapi_v1_mining_pub_algo_list_get_200_response_data_inner; +pub use self::_sapi_v1_mining_pub_algo_list_get_200_response_data_inner::SapiV1MiningPubAlgoListGet200ResponseDataInner; +pub mod _sapi_v1_mining_pub_coin_list_get_200_response; +pub use self::_sapi_v1_mining_pub_coin_list_get_200_response::SapiV1MiningPubCoinListGet200Response; +pub mod _sapi_v1_mining_pub_coin_list_get_200_response_data_inner; +pub use self::_sapi_v1_mining_pub_coin_list_get_200_response_data_inner::SapiV1MiningPubCoinListGet200ResponseDataInner; +pub mod _sapi_v1_mining_statistics_user_list_get_200_response; +pub use self::_sapi_v1_mining_statistics_user_list_get_200_response::SapiV1MiningStatisticsUserListGet200Response; +pub mod _sapi_v1_mining_statistics_user_list_get_200_response_data_inner; +pub use self::_sapi_v1_mining_statistics_user_list_get_200_response_data_inner::SapiV1MiningStatisticsUserListGet200ResponseDataInner; +pub mod _sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner; +pub use self::_sapi_v1_mining_statistics_user_list_get_200_response_data_inner_list_inner::SapiV1MiningStatisticsUserListGet200ResponseDataInnerListInner; +pub mod _sapi_v1_mining_statistics_user_status_get_200_response; +pub use self::_sapi_v1_mining_statistics_user_status_get_200_response::SapiV1MiningStatisticsUserStatusGet200Response; +pub mod _sapi_v1_mining_statistics_user_status_get_200_response_data; +pub use self::_sapi_v1_mining_statistics_user_status_get_200_response_data::SapiV1MiningStatisticsUserStatusGet200ResponseData; +pub mod _sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today; +pub use self::_sapi_v1_mining_statistics_user_status_get_200_response_data_profit_today::SapiV1MiningStatisticsUserStatusGet200ResponseDataProfitToday; +pub mod _sapi_v1_mining_worker_detail_get_200_response; +pub use self::_sapi_v1_mining_worker_detail_get_200_response::SapiV1MiningWorkerDetailGet200Response; +pub mod _sapi_v1_mining_worker_detail_get_200_response_data_inner; +pub use self::_sapi_v1_mining_worker_detail_get_200_response_data_inner::SapiV1MiningWorkerDetailGet200ResponseDataInner; +pub mod _sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrate_datas_inner; +pub use self::_sapi_v1_mining_worker_detail_get_200_response_data_inner_hashrate_datas_inner::SapiV1MiningWorkerDetailGet200ResponseDataInnerHashrateDatasInner; +pub mod _sapi_v1_mining_worker_list_get_200_response; +pub use self::_sapi_v1_mining_worker_list_get_200_response::SapiV1MiningWorkerListGet200Response; +pub mod _sapi_v1_mining_worker_list_get_200_response_data; +pub use self::_sapi_v1_mining_worker_list_get_200_response_data::SapiV1MiningWorkerListGet200ResponseData; +pub mod _sapi_v1_mining_worker_list_get_200_response_data_worker_datas_inner; +pub use self::_sapi_v1_mining_worker_list_get_200_response_data_worker_datas_inner::SapiV1MiningWorkerListGet200ResponseDataWorkerDatasInner; +pub mod _sapi_v1_nft_history_deposit_get_200_response; +pub use self::_sapi_v1_nft_history_deposit_get_200_response::SapiV1NftHistoryDepositGet200Response; +pub mod _sapi_v1_nft_history_deposit_get_200_response_list_inner; +pub use self::_sapi_v1_nft_history_deposit_get_200_response_list_inner::SapiV1NftHistoryDepositGet200ResponseListInner; +pub mod _sapi_v1_nft_history_transactions_get_200_response; +pub use self::_sapi_v1_nft_history_transactions_get_200_response::SapiV1NftHistoryTransactionsGet200Response; +pub mod _sapi_v1_nft_history_transactions_get_200_response_list_inner; +pub use self::_sapi_v1_nft_history_transactions_get_200_response_list_inner::SapiV1NftHistoryTransactionsGet200ResponseListInner; +pub mod _sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner; +pub use self::_sapi_v1_nft_history_transactions_get_200_response_list_inner_tokens_inner::SapiV1NftHistoryTransactionsGet200ResponseListInnerTokensInner; +pub mod _sapi_v1_nft_history_withdraw_get_200_response; +pub use self::_sapi_v1_nft_history_withdraw_get_200_response::SapiV1NftHistoryWithdrawGet200Response; +pub mod _sapi_v1_nft_history_withdraw_get_200_response_list_inner; +pub use self::_sapi_v1_nft_history_withdraw_get_200_response_list_inner::SapiV1NftHistoryWithdrawGet200ResponseListInner; +pub mod _sapi_v1_nft_user_get_asset_get_200_response; +pub use self::_sapi_v1_nft_user_get_asset_get_200_response::SapiV1NftUserGetAssetGet200Response; +pub mod _sapi_v1_nft_user_get_asset_get_200_response_list_inner; +pub use self::_sapi_v1_nft_user_get_asset_get_200_response_list_inner::SapiV1NftUserGetAssetGet200ResponseListInner; +pub mod _sapi_v1_pay_transactions_get_200_response; +pub use self::_sapi_v1_pay_transactions_get_200_response::SapiV1PayTransactionsGet200Response; +pub mod _sapi_v1_pay_transactions_get_200_response_data_inner; +pub use self::_sapi_v1_pay_transactions_get_200_response_data_inner::SapiV1PayTransactionsGet200ResponseDataInner; +pub mod _sapi_v1_pay_transactions_get_200_response_data_inner_funds_detail_inner; +pub use self::_sapi_v1_pay_transactions_get_200_response_data_inner_funds_detail_inner::SapiV1PayTransactionsGet200ResponseDataInnerFundsDetailInner; +pub mod _sapi_v1_pay_transactions_get_200_response_data_inner_payer_info; +pub use self::_sapi_v1_pay_transactions_get_200_response_data_inner_payer_info::SapiV1PayTransactionsGet200ResponseDataInnerPayerInfo; +pub mod _sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info; +pub use self::_sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info::SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfo; +pub mod _sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info_extend_inner; +pub use self::_sapi_v1_pay_transactions_get_200_response_data_inner_receiver_info_extend_inner::SapiV1PayTransactionsGet200ResponseDataInnerReceiverInfoExtendInner; +pub mod _sapi_v1_portfolio_account_get_200_response; +pub use self::_sapi_v1_portfolio_account_get_200_response::SapiV1PortfolioAccountGet200Response; +pub mod _sapi_v1_portfolio_asset_index_price_get_200_response_inner; +pub use self::_sapi_v1_portfolio_asset_index_price_get_200_response_inner::SapiV1PortfolioAssetIndexPriceGet200ResponseInner; +pub mod _sapi_v1_portfolio_auto_collection_post_200_response; +pub use self::_sapi_v1_portfolio_auto_collection_post_200_response::SapiV1PortfolioAutoCollectionPost200Response; +pub mod _sapi_v1_portfolio_collateral_rate_get_200_response_inner; +pub use self::_sapi_v1_portfolio_collateral_rate_get_200_response_inner::SapiV1PortfolioCollateralRateGet200ResponseInner; +pub mod _sapi_v1_portfolio_interest_history_get_200_response_inner; +pub use self::_sapi_v1_portfolio_interest_history_get_200_response_inner::SapiV1PortfolioInterestHistoryGet200ResponseInner; +pub mod _sapi_v1_portfolio_margin_asset_leverage_get_200_response_inner; +pub use self::_sapi_v1_portfolio_margin_asset_leverage_get_200_response_inner::SapiV1PortfolioMarginAssetLeverageGet200ResponseInner; +pub mod _sapi_v1_portfolio_pm_loan_get_200_response; +pub use self::_sapi_v1_portfolio_pm_loan_get_200_response::SapiV1PortfolioPmLoanGet200Response; +pub mod _sapi_v1_portfolio_repay_futures_switch_get_200_response; +pub use self::_sapi_v1_portfolio_repay_futures_switch_get_200_response::SapiV1PortfolioRepayFuturesSwitchGet200Response; +pub mod _sapi_v1_portfolio_repay_post_200_response; +pub use self::_sapi_v1_portfolio_repay_post_200_response::SapiV1PortfolioRepayPost200Response; +pub mod _sapi_v1_rebate_tax_query_get_200_response; +pub use self::_sapi_v1_rebate_tax_query_get_200_response::SapiV1RebateTaxQueryGet200Response; +pub mod _sapi_v1_rebate_tax_query_get_200_response_data; +pub use self::_sapi_v1_rebate_tax_query_get_200_response_data::SapiV1RebateTaxQueryGet200ResponseData; +pub mod _sapi_v1_rebate_tax_query_get_200_response_data_data_inner; +pub use self::_sapi_v1_rebate_tax_query_get_200_response_data_data_inner::SapiV1RebateTaxQueryGet200ResponseDataDataInner; +pub mod _sapi_v1_simple_earn_account_get_200_response; +pub use self::_sapi_v1_simple_earn_account_get_200_response::SapiV1SimpleEarnAccountGet200Response; +pub mod _sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response; +pub use self::_sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response::SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200Response; +pub mod _sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response_rows_inner; +pub use self::_sapi_v1_simple_earn_flexible_history_collateral_record_get_200_response_rows_inner::SapiV1SimpleEarnFlexibleHistoryCollateralRecordGet200ResponseRowsInner; +pub mod _sapi_v1_simple_earn_flexible_history_rate_history_get_200_response; +pub use self::_sapi_v1_simple_earn_flexible_history_rate_history_get_200_response::SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200Response; +pub mod _sapi_v1_simple_earn_flexible_history_rate_history_get_200_response_rows_inner; +pub use self::_sapi_v1_simple_earn_flexible_history_rate_history_get_200_response_rows_inner::SapiV1SimpleEarnFlexibleHistoryRateHistoryGet200ResponseRowsInner; +pub mod _sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response; +pub use self::_sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response::SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200Response; +pub mod _sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response_rows_inner; +pub use self::_sapi_v1_simple_earn_flexible_history_redemption_record_get_200_response_rows_inner::SapiV1SimpleEarnFlexibleHistoryRedemptionRecordGet200ResponseRowsInner; +pub mod _sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response; +pub use self::_sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response::SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200Response; +pub mod _sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response_rows_inner; +pub use self::_sapi_v1_simple_earn_flexible_history_rewards_record_get_200_response_rows_inner::SapiV1SimpleEarnFlexibleHistoryRewardsRecordGet200ResponseRowsInner; +pub mod _sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response; +pub use self::_sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response::SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200Response; +pub mod _sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response_rows_inner; +pub use self::_sapi_v1_simple_earn_flexible_history_subscription_record_get_200_response_rows_inner::SapiV1SimpleEarnFlexibleHistorySubscriptionRecordGet200ResponseRowsInner; +pub mod _sapi_v1_simple_earn_flexible_list_get_200_response; +pub use self::_sapi_v1_simple_earn_flexible_list_get_200_response::SapiV1SimpleEarnFlexibleListGet200Response; +pub mod _sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner; +pub use self::_sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner::SapiV1SimpleEarnFlexibleListGet200ResponseRowsInner; +pub mod _sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate; +pub use self::_sapi_v1_simple_earn_flexible_list_get_200_response_rows_inner_tier_annual_percentage_rate::SapiV1SimpleEarnFlexibleListGet200ResponseRowsInnerTierAnnualPercentageRate; +pub mod _sapi_v1_simple_earn_flexible_personal_left_quota_get_200_response; +pub use self::_sapi_v1_simple_earn_flexible_personal_left_quota_get_200_response::SapiV1SimpleEarnFlexiblePersonalLeftQuotaGet200Response; +pub mod _sapi_v1_simple_earn_flexible_position_get_200_response; +pub use self::_sapi_v1_simple_earn_flexible_position_get_200_response::SapiV1SimpleEarnFlexiblePositionGet200Response; +pub mod _sapi_v1_simple_earn_flexible_position_get_200_response_rows_inner; +pub use self::_sapi_v1_simple_earn_flexible_position_get_200_response_rows_inner::SapiV1SimpleEarnFlexiblePositionGet200ResponseRowsInner; +pub mod _sapi_v1_simple_earn_flexible_redeem_post_200_response; +pub use self::_sapi_v1_simple_earn_flexible_redeem_post_200_response::SapiV1SimpleEarnFlexibleRedeemPost200Response; +pub mod _sapi_v1_simple_earn_flexible_subscribe_post_200_response; +pub use self::_sapi_v1_simple_earn_flexible_subscribe_post_200_response::SapiV1SimpleEarnFlexibleSubscribePost200Response; +pub mod _sapi_v1_simple_earn_flexible_subscription_preview_get_200_response; +pub use self::_sapi_v1_simple_earn_flexible_subscription_preview_get_200_response::SapiV1SimpleEarnFlexibleSubscriptionPreviewGet200Response; +pub mod _sapi_v1_simple_earn_locked_history_redemption_record_get_200_response; +pub use self::_sapi_v1_simple_earn_locked_history_redemption_record_get_200_response::SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200Response; +pub mod _sapi_v1_simple_earn_locked_history_redemption_record_get_200_response_rows_inner; +pub use self::_sapi_v1_simple_earn_locked_history_redemption_record_get_200_response_rows_inner::SapiV1SimpleEarnLockedHistoryRedemptionRecordGet200ResponseRowsInner; +pub mod _sapi_v1_simple_earn_locked_history_rewards_record_get_200_response; +pub use self::_sapi_v1_simple_earn_locked_history_rewards_record_get_200_response::SapiV1SimpleEarnLockedHistoryRewardsRecordGet200Response; +pub mod _sapi_v1_simple_earn_locked_history_rewards_record_get_200_response_rows_inner; +pub use self::_sapi_v1_simple_earn_locked_history_rewards_record_get_200_response_rows_inner::SapiV1SimpleEarnLockedHistoryRewardsRecordGet200ResponseRowsInner; +pub mod _sapi_v1_simple_earn_locked_history_subscription_record_get_200_response; +pub use self::_sapi_v1_simple_earn_locked_history_subscription_record_get_200_response::SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200Response; +pub mod _sapi_v1_simple_earn_locked_history_subscription_record_get_200_response_rows_inner; +pub use self::_sapi_v1_simple_earn_locked_history_subscription_record_get_200_response_rows_inner::SapiV1SimpleEarnLockedHistorySubscriptionRecordGet200ResponseRowsInner; +pub mod _sapi_v1_simple_earn_locked_list_get_200_response; +pub use self::_sapi_v1_simple_earn_locked_list_get_200_response::SapiV1SimpleEarnLockedListGet200Response; +pub mod _sapi_v1_simple_earn_locked_list_get_200_response_rows_inner; +pub use self::_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner::SapiV1SimpleEarnLockedListGet200ResponseRowsInner; +pub mod _sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail; +pub use self::_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_detail::SapiV1SimpleEarnLockedListGet200ResponseRowsInnerDetail; +pub mod _sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota; +pub use self::_sapi_v1_simple_earn_locked_list_get_200_response_rows_inner_quota::SapiV1SimpleEarnLockedListGet200ResponseRowsInnerQuota; +pub mod _sapi_v1_simple_earn_locked_position_get_200_response; +pub use self::_sapi_v1_simple_earn_locked_position_get_200_response::SapiV1SimpleEarnLockedPositionGet200Response; +pub mod _sapi_v1_simple_earn_locked_position_get_200_response_rows_inner; +pub use self::_sapi_v1_simple_earn_locked_position_get_200_response_rows_inner::SapiV1SimpleEarnLockedPositionGet200ResponseRowsInner; +pub mod _sapi_v1_simple_earn_locked_subscribe_post_200_response; +pub use self::_sapi_v1_simple_earn_locked_subscribe_post_200_response::SapiV1SimpleEarnLockedSubscribePost200Response; +pub mod _sapi_v1_simple_earn_locked_subscription_preview_get_200_response_inner; +pub use self::_sapi_v1_simple_earn_locked_subscription_preview_get_200_response_inner::SapiV1SimpleEarnLockedSubscriptionPreviewGet200ResponseInner; +pub mod _sapi_v1_spot_delist_schedule_get_200_response_inner; +pub use self::_sapi_v1_spot_delist_schedule_get_200_response_inner::SapiV1SpotDelistScheduleGet200ResponseInner; +pub mod _sapi_v1_sub_account_blvt_enable_post_200_response; +pub use self::_sapi_v1_sub_account_blvt_enable_post_200_response::SapiV1SubAccountBlvtEnablePost200Response; +pub mod _sapi_v1_sub_account_eoptions_enable_post_200_response; +pub use self::_sapi_v1_sub_account_eoptions_enable_post_200_response::SapiV1SubAccountEoptionsEnablePost200Response; +pub mod _sapi_v1_sub_account_futures_account_get_200_response; +pub use self::_sapi_v1_sub_account_futures_account_get_200_response::SapiV1SubAccountFuturesAccountGet200Response; +pub mod _sapi_v1_sub_account_futures_account_get_200_response_assets_inner; +pub use self::_sapi_v1_sub_account_futures_account_get_200_response_assets_inner::SapiV1SubAccountFuturesAccountGet200ResponseAssetsInner; +pub mod _sapi_v1_sub_account_futures_account_summary_get_200_response; +pub use self::_sapi_v1_sub_account_futures_account_summary_get_200_response::SapiV1SubAccountFuturesAccountSummaryGet200Response; +pub mod _sapi_v1_sub_account_futures_account_summary_get_200_response_sub_account_list_inner; +pub use self::_sapi_v1_sub_account_futures_account_summary_get_200_response_sub_account_list_inner::SapiV1SubAccountFuturesAccountSummaryGet200ResponseSubAccountListInner; +pub mod _sapi_v1_sub_account_futures_enable_post_200_response; +pub use self::_sapi_v1_sub_account_futures_enable_post_200_response::SapiV1SubAccountFuturesEnablePost200Response; +pub mod _sapi_v1_sub_account_futures_internal_transfer_get_200_response; +pub use self::_sapi_v1_sub_account_futures_internal_transfer_get_200_response::SapiV1SubAccountFuturesInternalTransferGet200Response; +pub mod _sapi_v1_sub_account_futures_internal_transfer_get_200_response_transfers_inner; +pub use self::_sapi_v1_sub_account_futures_internal_transfer_get_200_response_transfers_inner::SapiV1SubAccountFuturesInternalTransferGet200ResponseTransfersInner; +pub mod _sapi_v1_sub_account_futures_internal_transfer_post_200_response; +pub use self::_sapi_v1_sub_account_futures_internal_transfer_post_200_response::SapiV1SubAccountFuturesInternalTransferPost200Response; +pub mod _sapi_v1_sub_account_futures_position_risk_get_200_response_inner; +pub use self::_sapi_v1_sub_account_futures_position_risk_get_200_response_inner::SapiV1SubAccountFuturesPositionRiskGet200ResponseInner; +pub mod _sapi_v1_sub_account_futures_transfer_post_200_response; +pub use self::_sapi_v1_sub_account_futures_transfer_post_200_response::SapiV1SubAccountFuturesTransferPost200Response; +pub mod _sapi_v1_sub_account_list_get_200_response; +pub use self::_sapi_v1_sub_account_list_get_200_response::SapiV1SubAccountListGet200Response; +pub mod _sapi_v1_sub_account_list_get_200_response_sub_accounts_inner; +pub use self::_sapi_v1_sub_account_list_get_200_response_sub_accounts_inner::SapiV1SubAccountListGet200ResponseSubAccountsInner; +pub mod _sapi_v1_sub_account_margin_account_get_200_response; +pub use self::_sapi_v1_sub_account_margin_account_get_200_response::SapiV1SubAccountMarginAccountGet200Response; +pub mod _sapi_v1_sub_account_margin_account_get_200_response_margin_trade_coeff_vo; +pub use self::_sapi_v1_sub_account_margin_account_get_200_response_margin_trade_coeff_vo::SapiV1SubAccountMarginAccountGet200ResponseMarginTradeCoeffVo; +pub mod _sapi_v1_sub_account_margin_account_summary_get_200_response; +pub use self::_sapi_v1_sub_account_margin_account_summary_get_200_response::SapiV1SubAccountMarginAccountSummaryGet200Response; +pub mod _sapi_v1_sub_account_margin_account_summary_get_200_response_sub_account_list_inner; +pub use self::_sapi_v1_sub_account_margin_account_summary_get_200_response_sub_account_list_inner::SapiV1SubAccountMarginAccountSummaryGet200ResponseSubAccountListInner; +pub mod _sapi_v1_sub_account_margin_enable_post_200_response; +pub use self::_sapi_v1_sub_account_margin_enable_post_200_response::SapiV1SubAccountMarginEnablePost200Response; +pub mod _sapi_v1_sub_account_spot_summary_get_200_response; +pub use self::_sapi_v1_sub_account_spot_summary_get_200_response::SapiV1SubAccountSpotSummaryGet200Response; +pub mod _sapi_v1_sub_account_spot_summary_get_200_response_spot_sub_user_asset_btc_vo_list_inner; +pub use self::_sapi_v1_sub_account_spot_summary_get_200_response_spot_sub_user_asset_btc_vo_list_inner::SapiV1SubAccountSpotSummaryGet200ResponseSpotSubUserAssetBtcVoListInner; +pub mod _sapi_v1_sub_account_status_get_200_response_inner; +pub use self::_sapi_v1_sub_account_status_get_200_response_inner::SapiV1SubAccountStatusGet200ResponseInner; +pub mod _sapi_v1_sub_account_sub_account_api_ip_restriction_get_200_response; +pub use self::_sapi_v1_sub_account_sub_account_api_ip_restriction_get_200_response::SapiV1SubAccountSubAccountApiIpRestrictionGet200Response; +pub mod _sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete_200_response; +pub use self::_sapi_v1_sub_account_sub_account_api_ip_restriction_ip_list_delete_200_response::SapiV1SubAccountSubAccountApiIpRestrictionIpListDelete200Response; +pub mod _sapi_v1_sub_account_sub_transfer_history_get_200_response_inner; +pub use self::_sapi_v1_sub_account_sub_transfer_history_get_200_response_inner::SapiV1SubAccountSubTransferHistoryGet200ResponseInner; +pub mod _sapi_v1_sub_account_transaction_statistics_get_200_response; +pub use self::_sapi_v1_sub_account_transaction_statistics_get_200_response::SapiV1SubAccountTransactionStatisticsGet200Response; +pub mod _sapi_v1_sub_account_transaction_statistics_get_200_response_trade_info_vos_inner; +pub use self::_sapi_v1_sub_account_transaction_statistics_get_200_response_trade_info_vos_inner::SapiV1SubAccountTransactionStatisticsGet200ResponseTradeInfoVosInner; +pub mod _sapi_v1_sub_account_transfer_sub_user_history_get_200_response_inner; +pub use self::_sapi_v1_sub_account_transfer_sub_user_history_get_200_response_inner::SapiV1SubAccountTransferSubUserHistoryGet200ResponseInner; +pub mod _sapi_v1_sub_account_universal_transfer_get_200_response_inner; +pub use self::_sapi_v1_sub_account_universal_transfer_get_200_response_inner::SapiV1SubAccountUniversalTransferGet200ResponseInner; +pub mod _sapi_v1_sub_account_universal_transfer_post_200_response; +pub use self::_sapi_v1_sub_account_universal_transfer_post_200_response::SapiV1SubAccountUniversalTransferPost200Response; +pub mod _sapi_v1_sub_account_virtual_sub_account_post_200_response; +pub use self::_sapi_v1_sub_account_virtual_sub_account_post_200_response::SapiV1SubAccountVirtualSubAccountPost200Response; +pub mod _sapi_v1_system_status_get_200_response; +pub use self::_sapi_v1_system_status_get_200_response::SapiV1SystemStatusGet200Response; +pub mod _sapi_v1_user_data_stream_isolated_post_200_response; +pub use self::_sapi_v1_user_data_stream_isolated_post_200_response::SapiV1UserDataStreamIsolatedPost200Response; +pub mod _sapi_v2_eth_staking_account_get_200_response; +pub use self::_sapi_v2_eth_staking_account_get_200_response::SapiV2EthStakingAccountGet200Response; +pub mod _sapi_v2_eth_staking_account_get_200_response_holdings; +pub use self::_sapi_v2_eth_staking_account_get_200_response_holdings::SapiV2EthStakingAccountGet200ResponseHoldings; +pub mod _sapi_v2_eth_staking_account_get_200_response_profit; +pub use self::_sapi_v2_eth_staking_account_get_200_response_profit::SapiV2EthStakingAccountGet200ResponseProfit; +pub mod _sapi_v2_eth_staking_eth_stake_post_200_response; +pub use self::_sapi_v2_eth_staking_eth_stake_post_200_response::SapiV2EthStakingEthStakePost200Response; +pub mod _sapi_v2_loan_flexible_adjust_ltv_post_200_response; +pub use self::_sapi_v2_loan_flexible_adjust_ltv_post_200_response::SapiV2LoanFlexibleAdjustLtvPost200Response; +pub mod _sapi_v2_loan_flexible_borrow_history_get_200_response; +pub use self::_sapi_v2_loan_flexible_borrow_history_get_200_response::SapiV2LoanFlexibleBorrowHistoryGet200Response; +pub mod _sapi_v2_loan_flexible_borrow_history_get_200_response_rows_inner; +pub use self::_sapi_v2_loan_flexible_borrow_history_get_200_response_rows_inner::SapiV2LoanFlexibleBorrowHistoryGet200ResponseRowsInner; +pub mod _sapi_v2_loan_flexible_borrow_post_200_response; +pub use self::_sapi_v2_loan_flexible_borrow_post_200_response::SapiV2LoanFlexibleBorrowPost200Response; +pub mod _sapi_v2_loan_flexible_collateral_data_get_200_response; +pub use self::_sapi_v2_loan_flexible_collateral_data_get_200_response::SapiV2LoanFlexibleCollateralDataGet200Response; +pub mod _sapi_v2_loan_flexible_collateral_data_get_200_response_rows_inner; +pub use self::_sapi_v2_loan_flexible_collateral_data_get_200_response_rows_inner::SapiV2LoanFlexibleCollateralDataGet200ResponseRowsInner; +pub mod _sapi_v2_loan_flexible_loanable_data_get_200_response; +pub use self::_sapi_v2_loan_flexible_loanable_data_get_200_response::SapiV2LoanFlexibleLoanableDataGet200Response; +pub mod _sapi_v2_loan_flexible_loanable_data_get_200_response_rows_inner; +pub use self::_sapi_v2_loan_flexible_loanable_data_get_200_response_rows_inner::SapiV2LoanFlexibleLoanableDataGet200ResponseRowsInner; +pub mod _sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response; +pub use self::_sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response::SapiV2LoanFlexibleLtvAdjustmentHistoryGet200Response; +pub mod _sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response_rows_inner; +pub use self::_sapi_v2_loan_flexible_ltv_adjustment_history_get_200_response_rows_inner::SapiV2LoanFlexibleLtvAdjustmentHistoryGet200ResponseRowsInner; +pub mod _sapi_v2_loan_flexible_ongoing_orders_get_200_response; +pub use self::_sapi_v2_loan_flexible_ongoing_orders_get_200_response::SapiV2LoanFlexibleOngoingOrdersGet200Response; +pub mod _sapi_v2_loan_flexible_ongoing_orders_get_200_response_rows_inner; +pub use self::_sapi_v2_loan_flexible_ongoing_orders_get_200_response_rows_inner::SapiV2LoanFlexibleOngoingOrdersGet200ResponseRowsInner; +pub mod _sapi_v2_loan_flexible_repay_history_get_200_response; +pub use self::_sapi_v2_loan_flexible_repay_history_get_200_response::SapiV2LoanFlexibleRepayHistoryGet200Response; +pub mod _sapi_v2_loan_flexible_repay_history_get_200_response_rows_inner; +pub use self::_sapi_v2_loan_flexible_repay_history_get_200_response_rows_inner::SapiV2LoanFlexibleRepayHistoryGet200ResponseRowsInner; +pub mod _sapi_v2_loan_flexible_repay_post_200_response; +pub use self::_sapi_v2_loan_flexible_repay_post_200_response::SapiV2LoanFlexibleRepayPost200Response; +pub mod _sapi_v2_sub_account_futures_account_get_200_response; +pub use self::_sapi_v2_sub_account_futures_account_get_200_response::SapiV2SubAccountFuturesAccountGet200Response; +pub mod _sapi_v2_sub_account_futures_account_summary_get_200_response; +pub use self::_sapi_v2_sub_account_futures_account_summary_get_200_response::SapiV2SubAccountFuturesAccountSummaryGet200Response; +pub mod _sapi_v2_sub_account_futures_position_risk_get_200_response; +pub use self::_sapi_v2_sub_account_futures_position_risk_get_200_response::SapiV2SubAccountFuturesPositionRiskGet200Response; +pub mod _sapi_v2_sub_account_sub_account_api_ip_restriction_post_200_response; +pub use self::_sapi_v2_sub_account_sub_account_api_ip_restriction_post_200_response::SapiV2SubAccountSubAccountApiIpRestrictionPost200Response; +pub mod _sapi_v3_asset_get_user_asset_post_200_response_inner; +pub use self::_sapi_v3_asset_get_user_asset_post_200_response_inner::SapiV3AssetGetUserAssetPost200ResponseInner; +pub mod _sapi_v3_sub_account_assets_get_200_response; +pub use self::_sapi_v3_sub_account_assets_get_200_response::SapiV3SubAccountAssetsGet200Response; +pub mod _sapi_v3_sub_account_assets_get_200_response_balances_inner; +pub use self::_sapi_v3_sub_account_assets_get_200_response_balances_inner::SapiV3SubAccountAssetsGet200ResponseBalancesInner; +pub mod _sapi_v4_sub_account_assets_get_200_response; +pub use self::_sapi_v4_sub_account_assets_get_200_response::SapiV4SubAccountAssetsGet200Response; +pub mod _sapi_v4_sub_account_assets_get_200_response_balances_inner; +pub use self::_sapi_v4_sub_account_assets_get_200_response_balances_inner::SapiV4SubAccountAssetsGet200ResponseBalancesInner; +pub mod snapshot_futures; +pub use self::snapshot_futures::SnapshotFutures; +pub mod snapshot_futures_snapshot_vos_inner; +pub use self::snapshot_futures_snapshot_vos_inner::SnapshotFuturesSnapshotVosInner; +pub mod snapshot_futures_snapshot_vos_inner_data; +pub use self::snapshot_futures_snapshot_vos_inner_data::SnapshotFuturesSnapshotVosInnerData; +pub mod snapshot_futures_snapshot_vos_inner_data_assets_inner; +pub use self::snapshot_futures_snapshot_vos_inner_data_assets_inner::SnapshotFuturesSnapshotVosInnerDataAssetsInner; +pub mod snapshot_futures_snapshot_vos_inner_data_position_inner; +pub use self::snapshot_futures_snapshot_vos_inner_data_position_inner::SnapshotFuturesSnapshotVosInnerDataPositionInner; +pub mod snapshot_margin; +pub use self::snapshot_margin::SnapshotMargin; +pub mod snapshot_margin_snapshot_vos_inner; +pub use self::snapshot_margin_snapshot_vos_inner::SnapshotMarginSnapshotVosInner; +pub mod snapshot_margin_snapshot_vos_inner_data; +pub use self::snapshot_margin_snapshot_vos_inner_data::SnapshotMarginSnapshotVosInnerData; +pub mod snapshot_margin_snapshot_vos_inner_data_user_assets_inner; +pub use self::snapshot_margin_snapshot_vos_inner_data_user_assets_inner::SnapshotMarginSnapshotVosInnerDataUserAssetsInner; +pub mod snapshot_spot; +pub use self::snapshot_spot::SnapshotSpot; +pub mod snapshot_spot_snapshot_vos_inner; +pub use self::snapshot_spot_snapshot_vos_inner::SnapshotSpotSnapshotVosInner; +pub mod snapshot_spot_snapshot_vos_inner_data; +pub use self::snapshot_spot_snapshot_vos_inner_data::SnapshotSpotSnapshotVosInnerData; +pub mod snapshot_spot_snapshot_vos_inner_data_balances_inner; +pub use self::snapshot_spot_snapshot_vos_inner_data_balances_inner::SnapshotSpotSnapshotVosInnerDataBalancesInner; +pub mod sub_account_coin_futures_details; +pub use self::sub_account_coin_futures_details::SubAccountCoinFuturesDetails; +pub mod sub_account_coin_futures_details_assets_inner; +pub use self::sub_account_coin_futures_details_assets_inner::SubAccountCoinFuturesDetailsAssetsInner; +pub mod sub_account_coin_futures_position_risk; +pub use self::sub_account_coin_futures_position_risk::SubAccountCoinFuturesPositionRisk; +pub mod sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner; +pub use self::sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner::SubAccountCoinFuturesPositionRiskDeliveryPositionRiskVosInner; +pub mod sub_account_coin_futures_summary; +pub use self::sub_account_coin_futures_summary::SubAccountCoinFuturesSummary; +pub mod sub_account_coin_futures_summary_delivery_account_summary_resp; +pub use self::sub_account_coin_futures_summary_delivery_account_summary_resp::SubAccountCoinFuturesSummaryDeliveryAccountSummaryResp; +pub mod sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner; +pub use self::sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner::SubAccountCoinFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner; +pub mod sub_account_usdt_futures_details; +pub use self::sub_account_usdt_futures_details::SubAccountUsdtFuturesDetails; +pub mod sub_account_usdt_futures_details_future_account_resp; +pub use self::sub_account_usdt_futures_details_future_account_resp::SubAccountUsdtFuturesDetailsFutureAccountResp; +pub mod sub_account_usdt_futures_position_risk; +pub use self::sub_account_usdt_futures_position_risk::SubAccountUsdtFuturesPositionRisk; +pub mod sub_account_usdt_futures_summary; +pub use self::sub_account_usdt_futures_summary::SubAccountUsdtFuturesSummary; +pub mod sub_account_usdt_futures_summary_future_account_summary_resp; +pub use self::sub_account_usdt_futures_summary_future_account_summary_resp::SubAccountUsdtFuturesSummaryFutureAccountSummaryResp; +pub mod sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner; +pub use self::sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner::SubAccountUsdtFuturesSummaryFutureAccountSummaryRespSubAccountListInner; +pub mod ticker; +pub use self::ticker::Ticker; +pub mod trade; +pub use self::trade::Trade; +pub mod transaction; +pub use self::transaction::Transaction; diff --git a/test_rust/src/models/my_trade.rs b/test_rust/src/models/my_trade.rs new file mode 100644 index 0000000..29e83f4 --- /dev/null +++ b/test_rust/src/models/my_trade.rs @@ -0,0 +1,68 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MyTrade { + #[serde(rename = "symbol")] + pub symbol: String, + /// Trade id + #[serde(rename = "id")] + pub id: i64, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + /// Price + #[serde(rename = "price")] + pub price: String, + /// Amount of base asset + #[serde(rename = "qty")] + pub qty: String, + /// Amount of quote asset + #[serde(rename = "quoteQty")] + pub quote_qty: String, + #[serde(rename = "commission")] + pub commission: String, + #[serde(rename = "commissionAsset")] + pub commission_asset: String, + /// Trade timestamp + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "isBuyer")] + pub is_buyer: bool, + #[serde(rename = "isMaker")] + pub is_maker: bool, + #[serde(rename = "isBestMatch")] + pub is_best_match: bool, +} + +impl MyTrade { + pub fn new(symbol: String, id: i64, order_id: i64, order_list_id: i64, price: String, qty: String, quote_qty: String, commission: String, commission_asset: String, time: i64, is_buyer: bool, is_maker: bool, is_best_match: bool) -> MyTrade { + MyTrade { + symbol, + id, + order_id, + order_list_id, + price, + qty, + quote_qty, + commission, + commission_asset, + time, + is_buyer, + is_maker, + is_best_match, + } + } +} + diff --git a/test_rust/src/models/oco_order.rs b/test_rust/src/models/oco_order.rs new file mode 100644 index 0000000..ececad4 --- /dev/null +++ b/test_rust/src/models/oco_order.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OcoOrder { + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "contingencyType")] + pub contingency_type: String, + #[serde(rename = "listStatusType")] + pub list_status_type: String, + #[serde(rename = "listOrderStatus")] + pub list_order_status: String, + #[serde(rename = "listClientOrderId")] + pub list_client_order_id: String, + #[serde(rename = "transactionTime")] + pub transaction_time: i64, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orders")] + pub orders: Vec, + #[serde(rename = "orderReports")] + pub order_reports: Vec, +} + +impl OcoOrder { + pub fn new(order_list_id: i64, contingency_type: String, list_status_type: String, list_order_status: String, list_client_order_id: String, transaction_time: i64, symbol: String, orders: Vec, order_reports: Vec) -> OcoOrder { + OcoOrder { + order_list_id, + contingency_type, + list_status_type, + list_order_status, + list_client_order_id, + transaction_time, + symbol, + orders, + order_reports, + } + } +} + diff --git a/test_rust/src/models/oco_order_order_reports_inner.rs b/test_rust/src/models/oco_order_order_reports_inner.rs new file mode 100644 index 0000000..71e12f1 --- /dev/null +++ b/test_rust/src/models/oco_order_order_reports_inner.rs @@ -0,0 +1,72 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OcoOrderOrderReportsInner { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "origClientOrderId")] + pub orig_client_order_id: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "stopPrice")] + pub stop_price: String, + #[serde(rename = "selfTradePreventionMode")] + pub self_trade_prevention_mode: String, + #[serde(rename = "transactTime")] + pub transact_time: i64, +} + +impl OcoOrderOrderReportsInner { + pub fn new(symbol: String, orig_client_order_id: String, order_id: i64, order_list_id: i64, client_order_id: String, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String, stop_price: String, self_trade_prevention_mode: String, transact_time: i64) -> OcoOrderOrderReportsInner { + OcoOrderOrderReportsInner { + symbol, + orig_client_order_id, + order_id, + order_list_id, + client_order_id, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + stop_price, + self_trade_prevention_mode, + transact_time, + } + } +} + diff --git a/test_rust/src/models/order.rs b/test_rust/src/models/order.rs new file mode 100644 index 0000000..a3c0823 --- /dev/null +++ b/test_rust/src/models/order.rs @@ -0,0 +1,70 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Order { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "origClientOrderId")] + pub orig_client_order_id: String, + #[serde(rename = "orderId")] + pub order_id: i64, + /// Unless OCO, value will be -1 + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "transactTime")] + pub transact_time: i64, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "selfTradePreventionMode")] + pub self_trade_prevention_mode: String, +} + +impl Order { + pub fn new(symbol: String, orig_client_order_id: String, order_id: i64, order_list_id: i64, client_order_id: String, transact_time: i64, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String, self_trade_prevention_mode: String) -> Order { + Order { + symbol, + orig_client_order_id, + order_id, + order_list_id, + client_order_id, + transact_time, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + self_trade_prevention_mode, + } + } +} + diff --git a/test_rust/src/models/order_details.rs b/test_rust/src/models/order_details.rs new file mode 100644 index 0000000..e9858df --- /dev/null +++ b/test_rust/src/models/order_details.rs @@ -0,0 +1,91 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OrderDetails { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + /// Unless OCO, value will be -1 + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "stopPrice")] + pub stop_price: String, + #[serde(rename = "icebergQty")] + pub iceberg_qty: String, + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "updateTime")] + pub update_time: i64, + #[serde(rename = "isWorking")] + pub is_working: bool, + #[serde(rename = "workingTime")] + pub working_time: i64, + #[serde(rename = "origQuoteOrderQty")] + pub orig_quote_order_qty: String, + #[serde(rename = "selfTradePreventionMode")] + pub self_trade_prevention_mode: String, + #[serde(rename = "preventedMatchId", skip_serializing_if = "Option::is_none")] + pub prevented_match_id: Option, + #[serde(rename = "preventedQuantity", skip_serializing_if = "Option::is_none")] + pub prevented_quantity: Option, +} + +impl OrderDetails { + pub fn new(symbol: String, order_id: i64, order_list_id: i64, client_order_id: String, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String, stop_price: String, iceberg_qty: String, time: i64, update_time: i64, is_working: bool, working_time: i64, orig_quote_order_qty: String, self_trade_prevention_mode: String) -> OrderDetails { + OrderDetails { + symbol, + order_id, + order_list_id, + client_order_id, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + stop_price, + iceberg_qty, + time, + update_time, + is_working, + working_time, + orig_quote_order_qty, + self_trade_prevention_mode, + prevented_match_id: None, + prevented_quantity: None, + } + } +} + diff --git a/test_rust/src/models/order_response_ack.rs b/test_rust/src/models/order_response_ack.rs new file mode 100644 index 0000000..82cf844 --- /dev/null +++ b/test_rust/src/models/order_response_ack.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OrderResponseAck { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "transactTime")] + pub transact_time: i64, +} + +impl OrderResponseAck { + pub fn new(symbol: String, order_id: i64, order_list_id: i64, client_order_id: String, transact_time: i64) -> OrderResponseAck { + OrderResponseAck { + symbol, + order_id, + order_list_id, + client_order_id, + transact_time, + } + } +} + diff --git a/test_rust/src/models/order_response_full.rs b/test_rust/src/models/order_response_full.rs new file mode 100644 index 0000000..80cbcf8 --- /dev/null +++ b/test_rust/src/models/order_response_full.rs @@ -0,0 +1,78 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OrderResponseFull { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "transactTime")] + pub transact_time: i64, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "strategyId", skip_serializing_if = "Option::is_none")] + pub strategy_id: Option, + #[serde(rename = "strategyType", skip_serializing_if = "Option::is_none")] + pub strategy_type: Option, + #[serde(rename = "workingTime")] + pub working_time: i64, + #[serde(rename = "selfTradePreventionMode")] + pub self_trade_prevention_mode: String, + #[serde(rename = "fills")] + pub fills: Vec, +} + +impl OrderResponseFull { + pub fn new(symbol: String, order_id: i64, order_list_id: i64, client_order_id: String, transact_time: i64, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String, working_time: i64, self_trade_prevention_mode: String, fills: Vec) -> OrderResponseFull { + OrderResponseFull { + symbol, + order_id, + order_list_id, + client_order_id, + transact_time, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + strategy_id: None, + strategy_type: None, + working_time, + self_trade_prevention_mode, + fills, + } + } +} + diff --git a/test_rust/src/models/order_response_full_fills_inner.rs b/test_rust/src/models/order_response_full_fills_inner.rs new file mode 100644 index 0000000..bc595b1 --- /dev/null +++ b/test_rust/src/models/order_response_full_fills_inner.rs @@ -0,0 +1,36 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OrderResponseFullFillsInner { + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "qty")] + pub qty: String, + #[serde(rename = "commission")] + pub commission: String, + #[serde(rename = "commissionAsset")] + pub commission_asset: String, +} + +impl OrderResponseFullFillsInner { + pub fn new(price: String, qty: String, commission: String, commission_asset: String) -> OrderResponseFullFillsInner { + OrderResponseFullFillsInner { + price, + qty, + commission, + commission_asset, + } + } +} + diff --git a/test_rust/src/models/order_response_result.rs b/test_rust/src/models/order_response_result.rs new file mode 100644 index 0000000..b3f14d3 --- /dev/null +++ b/test_rust/src/models/order_response_result.rs @@ -0,0 +1,75 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct OrderResponseResult { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "orderId")] + pub order_id: i64, + #[serde(rename = "orderListId")] + pub order_list_id: i64, + #[serde(rename = "clientOrderId")] + pub client_order_id: String, + #[serde(rename = "transactTime")] + pub transact_time: i64, + #[serde(rename = "price")] + pub price: String, + #[serde(rename = "origQty")] + pub orig_qty: String, + #[serde(rename = "executedQty")] + pub executed_qty: String, + #[serde(rename = "cummulativeQuoteQty")] + pub cummulative_quote_qty: String, + #[serde(rename = "status")] + pub status: String, + #[serde(rename = "timeInForce")] + pub time_in_force: String, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "side")] + pub side: String, + #[serde(rename = "strategyId", skip_serializing_if = "Option::is_none")] + pub strategy_id: Option, + #[serde(rename = "strategyType", skip_serializing_if = "Option::is_none")] + pub strategy_type: Option, + #[serde(rename = "workingTime")] + pub working_time: i64, + #[serde(rename = "selfTradePreventionMode")] + pub self_trade_prevention_mode: String, +} + +impl OrderResponseResult { + pub fn new(symbol: String, order_id: i64, order_list_id: i64, client_order_id: String, transact_time: i64, price: String, orig_qty: String, executed_qty: String, cummulative_quote_qty: String, status: String, time_in_force: String, r#type: String, side: String, working_time: i64, self_trade_prevention_mode: String) -> OrderResponseResult { + OrderResponseResult { + symbol, + order_id, + order_list_id, + client_order_id, + transact_time, + price, + orig_qty, + executed_qty, + cummulative_quote_qty, + status, + time_in_force, + r#type, + side, + strategy_id: None, + strategy_type: None, + working_time, + self_trade_prevention_mode, + } + } +} + diff --git a/test_rust/src/models/price_ticker.rs b/test_rust/src/models/price_ticker.rs new file mode 100644 index 0000000..96c5187 --- /dev/null +++ b/test_rust/src/models/price_ticker.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PriceTicker { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "price")] + pub price: String, +} + +impl PriceTicker { + pub fn new(symbol: String, price: String) -> PriceTicker { + PriceTicker { + symbol, + price, + } + } +} + diff --git a/test_rust/src/models/repayment_info.rs b/test_rust/src/models/repayment_info.rs new file mode 100644 index 0000000..8934af7 --- /dev/null +++ b/test_rust/src/models/repayment_info.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RepaymentInfo { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "remainingPrincipal")] + pub remaining_principal: String, + #[serde(rename = "remainingInterest")] + pub remaining_interest: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "remainingCollateral")] + pub remaining_collateral: String, + #[serde(rename = "currentLTV")] + pub current_ltv: String, + #[serde(rename = "repayStatus")] + pub repay_status: String, +} + +impl RepaymentInfo { + pub fn new(loan_coin: String, remaining_principal: String, remaining_interest: String, collateral_coin: String, remaining_collateral: String, current_ltv: String, repay_status: String) -> RepaymentInfo { + RepaymentInfo { + loan_coin, + remaining_principal, + remaining_interest, + collateral_coin, + remaining_collateral, + current_ltv, + repay_status, + } + } +} + diff --git a/test_rust/src/models/repayment_info2.rs b/test_rust/src/models/repayment_info2.rs new file mode 100644 index 0000000..a162165 --- /dev/null +++ b/test_rust/src/models/repayment_info2.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RepaymentInfo2 { + #[serde(rename = "loanCoin")] + pub loan_coin: String, + #[serde(rename = "collateralCoin")] + pub collateral_coin: String, + #[serde(rename = "repayStatus")] + pub repay_status: String, +} + +impl RepaymentInfo2 { + pub fn new(loan_coin: String, collateral_coin: String, repay_status: String) -> RepaymentInfo2 { + RepaymentInfo2 { + loan_coin, + collateral_coin, + repay_status, + } + } +} + diff --git a/test_rust/src/models/snapshot_futures.rs b/test_rust/src/models/snapshot_futures.rs new file mode 100644 index 0000000..c68df47 --- /dev/null +++ b/test_rust/src/models/snapshot_futures.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotFutures { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "snapshotVos")] + pub snapshot_vos: Vec, +} + +impl SnapshotFutures { + pub fn new(code: i64, msg: String, snapshot_vos: Vec) -> SnapshotFutures { + SnapshotFutures { + code, + msg, + snapshot_vos, + } + } +} + diff --git a/test_rust/src/models/snapshot_futures_snapshot_vos_inner.rs b/test_rust/src/models/snapshot_futures_snapshot_vos_inner.rs new file mode 100644 index 0000000..86c0609 --- /dev/null +++ b/test_rust/src/models/snapshot_futures_snapshot_vos_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotFuturesSnapshotVosInner { + #[serde(rename = "data")] + pub data: Box, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "updateTime")] + pub update_time: i64, +} + +impl SnapshotFuturesSnapshotVosInner { + pub fn new(data: models::SnapshotFuturesSnapshotVosInnerData, r#type: String, update_time: i64) -> SnapshotFuturesSnapshotVosInner { + SnapshotFuturesSnapshotVosInner { + data: Box::new(data), + r#type, + update_time, + } + } +} + diff --git a/test_rust/src/models/snapshot_futures_snapshot_vos_inner_data.rs b/test_rust/src/models/snapshot_futures_snapshot_vos_inner_data.rs new file mode 100644 index 0000000..fa06a4f --- /dev/null +++ b/test_rust/src/models/snapshot_futures_snapshot_vos_inner_data.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotFuturesSnapshotVosInnerData { + #[serde(rename = "assets")] + pub assets: Vec, + #[serde(rename = "position")] + pub position: Vec, +} + +impl SnapshotFuturesSnapshotVosInnerData { + pub fn new(assets: Vec, position: Vec) -> SnapshotFuturesSnapshotVosInnerData { + SnapshotFuturesSnapshotVosInnerData { + assets, + position, + } + } +} + diff --git a/test_rust/src/models/snapshot_futures_snapshot_vos_inner_data_assets_inner.rs b/test_rust/src/models/snapshot_futures_snapshot_vos_inner_data_assets_inner.rs new file mode 100644 index 0000000..f65a86b --- /dev/null +++ b/test_rust/src/models/snapshot_futures_snapshot_vos_inner_data_assets_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotFuturesSnapshotVosInnerDataAssetsInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "marginBalance")] + pub margin_balance: String, + #[serde(rename = "walletBalance")] + pub wallet_balance: String, +} + +impl SnapshotFuturesSnapshotVosInnerDataAssetsInner { + pub fn new(asset: String, margin_balance: String, wallet_balance: String) -> SnapshotFuturesSnapshotVosInnerDataAssetsInner { + SnapshotFuturesSnapshotVosInnerDataAssetsInner { + asset, + margin_balance, + wallet_balance, + } + } +} + diff --git a/test_rust/src/models/snapshot_futures_snapshot_vos_inner_data_position_inner.rs b/test_rust/src/models/snapshot_futures_snapshot_vos_inner_data_position_inner.rs new file mode 100644 index 0000000..6aa7c5e --- /dev/null +++ b/test_rust/src/models/snapshot_futures_snapshot_vos_inner_data_position_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotFuturesSnapshotVosInnerDataPositionInner { + #[serde(rename = "entryPrice")] + pub entry_price: String, + #[serde(rename = "markPrice")] + pub mark_price: String, + #[serde(rename = "positionAmt")] + pub position_amt: String, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "unRealizedProfit")] + pub un_realized_profit: String, +} + +impl SnapshotFuturesSnapshotVosInnerDataPositionInner { + pub fn new(entry_price: String, mark_price: String, position_amt: String, symbol: String, un_realized_profit: String) -> SnapshotFuturesSnapshotVosInnerDataPositionInner { + SnapshotFuturesSnapshotVosInnerDataPositionInner { + entry_price, + mark_price, + position_amt, + symbol, + un_realized_profit, + } + } +} + diff --git a/test_rust/src/models/snapshot_margin.rs b/test_rust/src/models/snapshot_margin.rs new file mode 100644 index 0000000..4d20234 --- /dev/null +++ b/test_rust/src/models/snapshot_margin.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotMargin { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "snapshotVos")] + pub snapshot_vos: Vec, +} + +impl SnapshotMargin { + pub fn new(code: i64, msg: String, snapshot_vos: Vec) -> SnapshotMargin { + SnapshotMargin { + code, + msg, + snapshot_vos, + } + } +} + diff --git a/test_rust/src/models/snapshot_margin_snapshot_vos_inner.rs b/test_rust/src/models/snapshot_margin_snapshot_vos_inner.rs new file mode 100644 index 0000000..36cc642 --- /dev/null +++ b/test_rust/src/models/snapshot_margin_snapshot_vos_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotMarginSnapshotVosInner { + #[serde(rename = "data")] + pub data: Box, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "updateTime")] + pub update_time: i64, +} + +impl SnapshotMarginSnapshotVosInner { + pub fn new(data: models::SnapshotMarginSnapshotVosInnerData, r#type: String, update_time: i64) -> SnapshotMarginSnapshotVosInner { + SnapshotMarginSnapshotVosInner { + data: Box::new(data), + r#type, + update_time, + } + } +} + diff --git a/test_rust/src/models/snapshot_margin_snapshot_vos_inner_data.rs b/test_rust/src/models/snapshot_margin_snapshot_vos_inner_data.rs new file mode 100644 index 0000000..a7f744d --- /dev/null +++ b/test_rust/src/models/snapshot_margin_snapshot_vos_inner_data.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotMarginSnapshotVosInnerData { + #[serde(rename = "marginLevel")] + pub margin_level: String, + #[serde(rename = "totalAssetOfBtc")] + pub total_asset_of_btc: String, + #[serde(rename = "totalLiabilityOfBtc")] + pub total_liability_of_btc: String, + #[serde(rename = "totalNetAssetOfBtc")] + pub total_net_asset_of_btc: String, + #[serde(rename = "userAssets")] + pub user_assets: Vec, +} + +impl SnapshotMarginSnapshotVosInnerData { + pub fn new(margin_level: String, total_asset_of_btc: String, total_liability_of_btc: String, total_net_asset_of_btc: String, user_assets: Vec) -> SnapshotMarginSnapshotVosInnerData { + SnapshotMarginSnapshotVosInnerData { + margin_level, + total_asset_of_btc, + total_liability_of_btc, + total_net_asset_of_btc, + user_assets, + } + } +} + diff --git a/test_rust/src/models/snapshot_margin_snapshot_vos_inner_data_user_assets_inner.rs b/test_rust/src/models/snapshot_margin_snapshot_vos_inner_data_user_assets_inner.rs new file mode 100644 index 0000000..0335585 --- /dev/null +++ b/test_rust/src/models/snapshot_margin_snapshot_vos_inner_data_user_assets_inner.rs @@ -0,0 +1,42 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotMarginSnapshotVosInnerDataUserAssetsInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "borrowed")] + pub borrowed: String, + #[serde(rename = "free")] + pub free: String, + #[serde(rename = "interest")] + pub interest: String, + #[serde(rename = "locked")] + pub locked: String, + #[serde(rename = "netAsset")] + pub net_asset: String, +} + +impl SnapshotMarginSnapshotVosInnerDataUserAssetsInner { + pub fn new(asset: String, borrowed: String, free: String, interest: String, locked: String, net_asset: String) -> SnapshotMarginSnapshotVosInnerDataUserAssetsInner { + SnapshotMarginSnapshotVosInnerDataUserAssetsInner { + asset, + borrowed, + free, + interest, + locked, + net_asset, + } + } +} + diff --git a/test_rust/src/models/snapshot_spot.rs b/test_rust/src/models/snapshot_spot.rs new file mode 100644 index 0000000..3e2c5ec --- /dev/null +++ b/test_rust/src/models/snapshot_spot.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotSpot { + #[serde(rename = "code")] + pub code: i64, + #[serde(rename = "msg")] + pub msg: String, + #[serde(rename = "snapshotVos")] + pub snapshot_vos: Vec, +} + +impl SnapshotSpot { + pub fn new(code: i64, msg: String, snapshot_vos: Vec) -> SnapshotSpot { + SnapshotSpot { + code, + msg, + snapshot_vos, + } + } +} + diff --git a/test_rust/src/models/snapshot_spot_snapshot_vos_inner.rs b/test_rust/src/models/snapshot_spot_snapshot_vos_inner.rs new file mode 100644 index 0000000..3001f79 --- /dev/null +++ b/test_rust/src/models/snapshot_spot_snapshot_vos_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotSpotSnapshotVosInner { + #[serde(rename = "data")] + pub data: Box, + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "updateTime")] + pub update_time: i64, +} + +impl SnapshotSpotSnapshotVosInner { + pub fn new(data: models::SnapshotSpotSnapshotVosInnerData, r#type: String, update_time: i64) -> SnapshotSpotSnapshotVosInner { + SnapshotSpotSnapshotVosInner { + data: Box::new(data), + r#type, + update_time, + } + } +} + diff --git a/test_rust/src/models/snapshot_spot_snapshot_vos_inner_data.rs b/test_rust/src/models/snapshot_spot_snapshot_vos_inner_data.rs new file mode 100644 index 0000000..06ed8d0 --- /dev/null +++ b/test_rust/src/models/snapshot_spot_snapshot_vos_inner_data.rs @@ -0,0 +1,30 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotSpotSnapshotVosInnerData { + #[serde(rename = "balances")] + pub balances: Vec, + #[serde(rename = "totalAssetOfBtc")] + pub total_asset_of_btc: String, +} + +impl SnapshotSpotSnapshotVosInnerData { + pub fn new(balances: Vec, total_asset_of_btc: String) -> SnapshotSpotSnapshotVosInnerData { + SnapshotSpotSnapshotVosInnerData { + balances, + total_asset_of_btc, + } + } +} + diff --git a/test_rust/src/models/snapshot_spot_snapshot_vos_inner_data_balances_inner.rs b/test_rust/src/models/snapshot_spot_snapshot_vos_inner_data_balances_inner.rs new file mode 100644 index 0000000..3683150 --- /dev/null +++ b/test_rust/src/models/snapshot_spot_snapshot_vos_inner_data_balances_inner.rs @@ -0,0 +1,33 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotSpotSnapshotVosInnerDataBalancesInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "free")] + pub free: String, + #[serde(rename = "locked")] + pub locked: String, +} + +impl SnapshotSpotSnapshotVosInnerDataBalancesInner { + pub fn new(asset: String, free: String, locked: String) -> SnapshotSpotSnapshotVosInnerDataBalancesInner { + SnapshotSpotSnapshotVosInnerDataBalancesInner { + asset, + free, + locked, + } + } +} + diff --git a/test_rust/src/models/sub_account_coin_futures_details.rs b/test_rust/src/models/sub_account_coin_futures_details.rs new file mode 100644 index 0000000..aaa66a4 --- /dev/null +++ b/test_rust/src/models/sub_account_coin_futures_details.rs @@ -0,0 +1,45 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SubAccountCoinFuturesDetails { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "assets")] + pub assets: Vec, + #[serde(rename = "canDeposit")] + pub can_deposit: bool, + #[serde(rename = "canTrade")] + pub can_trade: bool, + #[serde(rename = "canWithdraw")] + pub can_withdraw: bool, + #[serde(rename = "feeTier")] + pub fee_tier: i64, + #[serde(rename = "updateTime")] + pub update_time: i64, +} + +impl SubAccountCoinFuturesDetails { + pub fn new(email: String, assets: Vec, can_deposit: bool, can_trade: bool, can_withdraw: bool, fee_tier: i64, update_time: i64) -> SubAccountCoinFuturesDetails { + SubAccountCoinFuturesDetails { + email, + assets, + can_deposit, + can_trade, + can_withdraw, + fee_tier, + update_time, + } + } +} + diff --git a/test_rust/src/models/sub_account_coin_futures_details_assets_inner.rs b/test_rust/src/models/sub_account_coin_futures_details_assets_inner.rs new file mode 100644 index 0000000..92b8c09 --- /dev/null +++ b/test_rust/src/models/sub_account_coin_futures_details_assets_inner.rs @@ -0,0 +1,51 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SubAccountCoinFuturesDetailsAssetsInner { + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "initialMargin")] + pub initial_margin: String, + #[serde(rename = "maintenanceMargin")] + pub maintenance_margin: String, + #[serde(rename = "marginBalance")] + pub margin_balance: String, + #[serde(rename = "maxWithdrawAmount")] + pub max_withdraw_amount: String, + #[serde(rename = "openOrderInitialMargin")] + pub open_order_initial_margin: String, + #[serde(rename = "positionInitialMargin")] + pub position_initial_margin: String, + #[serde(rename = "unrealizedProfit")] + pub unrealized_profit: String, + #[serde(rename = "walletBalance")] + pub wallet_balance: String, +} + +impl SubAccountCoinFuturesDetailsAssetsInner { + pub fn new(asset: String, initial_margin: String, maintenance_margin: String, margin_balance: String, max_withdraw_amount: String, open_order_initial_margin: String, position_initial_margin: String, unrealized_profit: String, wallet_balance: String) -> SubAccountCoinFuturesDetailsAssetsInner { + SubAccountCoinFuturesDetailsAssetsInner { + asset, + initial_margin, + maintenance_margin, + margin_balance, + max_withdraw_amount, + open_order_initial_margin, + position_initial_margin, + unrealized_profit, + wallet_balance, + } + } +} + diff --git a/test_rust/src/models/sub_account_coin_futures_position_risk.rs b/test_rust/src/models/sub_account_coin_futures_position_risk.rs new file mode 100644 index 0000000..90bd914 --- /dev/null +++ b/test_rust/src/models/sub_account_coin_futures_position_risk.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SubAccountCoinFuturesPositionRisk { + #[serde(rename = "deliveryPositionRiskVos")] + pub delivery_position_risk_vos: Vec, +} + +impl SubAccountCoinFuturesPositionRisk { + pub fn new(delivery_position_risk_vos: Vec) -> SubAccountCoinFuturesPositionRisk { + SubAccountCoinFuturesPositionRisk { + delivery_position_risk_vos, + } + } +} + diff --git a/test_rust/src/models/sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.rs b/test_rust/src/models/sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.rs new file mode 100644 index 0000000..0a5e0c2 --- /dev/null +++ b/test_rust/src/models/sub_account_coin_futures_position_risk_delivery_position_risk_vos_inner.rs @@ -0,0 +1,57 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SubAccountCoinFuturesPositionRiskDeliveryPositionRiskVosInner { + #[serde(rename = "entryPrice")] + pub entry_price: String, + #[serde(rename = "markPrice")] + pub mark_price: String, + #[serde(rename = "leverage")] + pub leverage: String, + #[serde(rename = "isolated")] + pub isolated: String, + #[serde(rename = "isolatedWallet")] + pub isolated_wallet: String, + #[serde(rename = "isolatedMargin")] + pub isolated_margin: String, + #[serde(rename = "isAutoAddMargin")] + pub is_auto_add_margin: String, + #[serde(rename = "positionSide")] + pub position_side: String, + #[serde(rename = "positionAmount")] + pub position_amount: String, + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "unrealizedProfit")] + pub unrealized_profit: String, +} + +impl SubAccountCoinFuturesPositionRiskDeliveryPositionRiskVosInner { + pub fn new(entry_price: String, mark_price: String, leverage: String, isolated: String, isolated_wallet: String, isolated_margin: String, is_auto_add_margin: String, position_side: String, position_amount: String, symbol: String, unrealized_profit: String) -> SubAccountCoinFuturesPositionRiskDeliveryPositionRiskVosInner { + SubAccountCoinFuturesPositionRiskDeliveryPositionRiskVosInner { + entry_price, + mark_price, + leverage, + isolated, + isolated_wallet, + isolated_margin, + is_auto_add_margin, + position_side, + position_amount, + symbol, + unrealized_profit, + } + } +} + diff --git a/test_rust/src/models/sub_account_coin_futures_summary.rs b/test_rust/src/models/sub_account_coin_futures_summary.rs new file mode 100644 index 0000000..babfeba --- /dev/null +++ b/test_rust/src/models/sub_account_coin_futures_summary.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SubAccountCoinFuturesSummary { + #[serde(rename = "deliveryAccountSummaryResp")] + pub delivery_account_summary_resp: Box, +} + +impl SubAccountCoinFuturesSummary { + pub fn new(delivery_account_summary_resp: models::SubAccountCoinFuturesSummaryDeliveryAccountSummaryResp) -> SubAccountCoinFuturesSummary { + SubAccountCoinFuturesSummary { + delivery_account_summary_resp: Box::new(delivery_account_summary_resp), + } + } +} + diff --git a/test_rust/src/models/sub_account_coin_futures_summary_delivery_account_summary_resp.rs b/test_rust/src/models/sub_account_coin_futures_summary_delivery_account_summary_resp.rs new file mode 100644 index 0000000..f416a00 --- /dev/null +++ b/test_rust/src/models/sub_account_coin_futures_summary_delivery_account_summary_resp.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SubAccountCoinFuturesSummaryDeliveryAccountSummaryResp { + #[serde(rename = "totalMarginBalanceOfBTC")] + pub total_margin_balance_of_btc: String, + #[serde(rename = "totalUnrealizedProfitOfBTC")] + pub total_unrealized_profit_of_btc: String, + #[serde(rename = "totalWalletBalanceOfBTC")] + pub total_wallet_balance_of_btc: String, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "subAccountList")] + pub sub_account_list: Vec, +} + +impl SubAccountCoinFuturesSummaryDeliveryAccountSummaryResp { + pub fn new(total_margin_balance_of_btc: String, total_unrealized_profit_of_btc: String, total_wallet_balance_of_btc: String, asset: String, sub_account_list: Vec) -> SubAccountCoinFuturesSummaryDeliveryAccountSummaryResp { + SubAccountCoinFuturesSummaryDeliveryAccountSummaryResp { + total_margin_balance_of_btc, + total_unrealized_profit_of_btc, + total_wallet_balance_of_btc, + asset, + sub_account_list, + } + } +} + diff --git a/test_rust/src/models/sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.rs b/test_rust/src/models/sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.rs new file mode 100644 index 0000000..d848bb4 --- /dev/null +++ b/test_rust/src/models/sub_account_coin_futures_summary_delivery_account_summary_resp_sub_account_list_inner.rs @@ -0,0 +1,39 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SubAccountCoinFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "totalMarginBalance")] + pub total_margin_balance: String, + #[serde(rename = "totalUnrealizedProfit")] + pub total_unrealized_profit: String, + #[serde(rename = "totalWalletBalance")] + pub total_wallet_balance: String, + #[serde(rename = "asset")] + pub asset: String, +} + +impl SubAccountCoinFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner { + pub fn new(email: String, total_margin_balance: String, total_unrealized_profit: String, total_wallet_balance: String, asset: String) -> SubAccountCoinFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner { + SubAccountCoinFuturesSummaryDeliveryAccountSummaryRespSubAccountListInner { + email, + total_margin_balance, + total_unrealized_profit, + total_wallet_balance, + asset, + } + } +} + diff --git a/test_rust/src/models/sub_account_usdt_futures_details.rs b/test_rust/src/models/sub_account_usdt_futures_details.rs new file mode 100644 index 0000000..899d758 --- /dev/null +++ b/test_rust/src/models/sub_account_usdt_futures_details.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SubAccountUsdtFuturesDetails { + #[serde(rename = "futureAccountResp")] + pub future_account_resp: Box, +} + +impl SubAccountUsdtFuturesDetails { + pub fn new(future_account_resp: models::SubAccountUsdtFuturesDetailsFutureAccountResp) -> SubAccountUsdtFuturesDetails { + SubAccountUsdtFuturesDetails { + future_account_resp: Box::new(future_account_resp), + } + } +} + diff --git a/test_rust/src/models/sub_account_usdt_futures_details_future_account_resp.rs b/test_rust/src/models/sub_account_usdt_futures_details_future_account_resp.rs new file mode 100644 index 0000000..db4c48e --- /dev/null +++ b/test_rust/src/models/sub_account_usdt_futures_details_future_account_resp.rs @@ -0,0 +1,69 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SubAccountUsdtFuturesDetailsFutureAccountResp { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "assets")] + pub assets: Vec, + #[serde(rename = "canDeposit")] + pub can_deposit: bool, + #[serde(rename = "canTrade")] + pub can_trade: bool, + #[serde(rename = "canWithdraw")] + pub can_withdraw: bool, + #[serde(rename = "feeTier")] + pub fee_tier: i64, + #[serde(rename = "maxWithdrawAmount")] + pub max_withdraw_amount: String, + #[serde(rename = "totalInitialMargin")] + pub total_initial_margin: String, + #[serde(rename = "totalMaintenanceMargin")] + pub total_maintenance_margin: String, + #[serde(rename = "totalMarginBalance")] + pub total_margin_balance: String, + #[serde(rename = "totalOpenOrderInitialMargin")] + pub total_open_order_initial_margin: String, + #[serde(rename = "totalPositionInitialMargin")] + pub total_position_initial_margin: String, + #[serde(rename = "totalUnrealizedProfit")] + pub total_unrealized_profit: String, + #[serde(rename = "totalWalletBalance")] + pub total_wallet_balance: String, + #[serde(rename = "updateTime")] + pub update_time: i64, +} + +impl SubAccountUsdtFuturesDetailsFutureAccountResp { + pub fn new(email: String, assets: Vec, can_deposit: bool, can_trade: bool, can_withdraw: bool, fee_tier: i64, max_withdraw_amount: String, total_initial_margin: String, total_maintenance_margin: String, total_margin_balance: String, total_open_order_initial_margin: String, total_position_initial_margin: String, total_unrealized_profit: String, total_wallet_balance: String, update_time: i64) -> SubAccountUsdtFuturesDetailsFutureAccountResp { + SubAccountUsdtFuturesDetailsFutureAccountResp { + email, + assets, + can_deposit, + can_trade, + can_withdraw, + fee_tier, + max_withdraw_amount, + total_initial_margin, + total_maintenance_margin, + total_margin_balance, + total_open_order_initial_margin, + total_position_initial_margin, + total_unrealized_profit, + total_wallet_balance, + update_time, + } + } +} + diff --git a/test_rust/src/models/sub_account_usdt_futures_position_risk.rs b/test_rust/src/models/sub_account_usdt_futures_position_risk.rs new file mode 100644 index 0000000..9aca274 --- /dev/null +++ b/test_rust/src/models/sub_account_usdt_futures_position_risk.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SubAccountUsdtFuturesPositionRisk { + #[serde(rename = "futurePositionRiskVos")] + pub future_position_risk_vos: Vec, +} + +impl SubAccountUsdtFuturesPositionRisk { + pub fn new(future_position_risk_vos: Vec) -> SubAccountUsdtFuturesPositionRisk { + SubAccountUsdtFuturesPositionRisk { + future_position_risk_vos, + } + } +} + diff --git a/test_rust/src/models/sub_account_usdt_futures_summary.rs b/test_rust/src/models/sub_account_usdt_futures_summary.rs new file mode 100644 index 0000000..b0372b9 --- /dev/null +++ b/test_rust/src/models/sub_account_usdt_futures_summary.rs @@ -0,0 +1,27 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SubAccountUsdtFuturesSummary { + #[serde(rename = "futureAccountSummaryResp")] + pub future_account_summary_resp: Box, +} + +impl SubAccountUsdtFuturesSummary { + pub fn new(future_account_summary_resp: models::SubAccountUsdtFuturesSummaryFutureAccountSummaryResp) -> SubAccountUsdtFuturesSummary { + SubAccountUsdtFuturesSummary { + future_account_summary_resp: Box::new(future_account_summary_resp), + } + } +} + diff --git a/test_rust/src/models/sub_account_usdt_futures_summary_future_account_summary_resp.rs b/test_rust/src/models/sub_account_usdt_futures_summary_future_account_summary_resp.rs new file mode 100644 index 0000000..eefcf04 --- /dev/null +++ b/test_rust/src/models/sub_account_usdt_futures_summary_future_account_summary_resp.rs @@ -0,0 +1,52 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SubAccountUsdtFuturesSummaryFutureAccountSummaryResp { + #[serde(rename = "totalInitialMargin")] + pub total_initial_margin: String, + #[serde(rename = "totalMaintenanceMargin")] + pub total_maintenance_margin: String, + #[serde(rename = "totalMarginBalance")] + pub total_margin_balance: String, + #[serde(rename = "totalOpenOrderInitialMargin")] + pub total_open_order_initial_margin: String, + #[serde(rename = "totalPositionInitialMargin")] + pub total_position_initial_margin: String, + #[serde(rename = "totalUnrealizedProfit")] + pub total_unrealized_profit: String, + #[serde(rename = "totalWalletBalance")] + pub total_wallet_balance: String, + /// The sum of BUSD and USDT + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "subAccountList")] + pub sub_account_list: Vec, +} + +impl SubAccountUsdtFuturesSummaryFutureAccountSummaryResp { + pub fn new(total_initial_margin: String, total_maintenance_margin: String, total_margin_balance: String, total_open_order_initial_margin: String, total_position_initial_margin: String, total_unrealized_profit: String, total_wallet_balance: String, asset: String, sub_account_list: Vec) -> SubAccountUsdtFuturesSummaryFutureAccountSummaryResp { + SubAccountUsdtFuturesSummaryFutureAccountSummaryResp { + total_initial_margin, + total_maintenance_margin, + total_margin_balance, + total_open_order_initial_margin, + total_position_initial_margin, + total_unrealized_profit, + total_wallet_balance, + asset, + sub_account_list, + } + } +} + diff --git a/test_rust/src/models/sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.rs b/test_rust/src/models/sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.rs new file mode 100644 index 0000000..44bb132 --- /dev/null +++ b/test_rust/src/models/sub_account_usdt_futures_summary_future_account_summary_resp_sub_account_list_inner.rs @@ -0,0 +1,52 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SubAccountUsdtFuturesSummaryFutureAccountSummaryRespSubAccountListInner { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "totalInitialMargin")] + pub total_initial_margin: String, + #[serde(rename = "totalMaintenanceMargin")] + pub total_maintenance_margin: String, + #[serde(rename = "totalMarginBalance")] + pub total_margin_balance: String, + #[serde(rename = "totalOpenOrderInitialMargin")] + pub total_open_order_initial_margin: String, + #[serde(rename = "totalPositionInitialMargin")] + pub total_position_initial_margin: String, + #[serde(rename = "totalUnrealizedProfit")] + pub total_unrealized_profit: String, + #[serde(rename = "totalWalletBalance")] + pub total_wallet_balance: String, + /// The sum of BUSD and USDT + #[serde(rename = "asset")] + pub asset: String, +} + +impl SubAccountUsdtFuturesSummaryFutureAccountSummaryRespSubAccountListInner { + pub fn new(email: String, total_initial_margin: String, total_maintenance_margin: String, total_margin_balance: String, total_open_order_initial_margin: String, total_position_initial_margin: String, total_unrealized_profit: String, total_wallet_balance: String, asset: String) -> SubAccountUsdtFuturesSummaryFutureAccountSummaryRespSubAccountListInner { + SubAccountUsdtFuturesSummaryFutureAccountSummaryRespSubAccountListInner { + email, + total_initial_margin, + total_maintenance_margin, + total_margin_balance, + total_open_order_initial_margin, + total_position_initial_margin, + total_unrealized_profit, + total_wallet_balance, + asset, + } + } +} + diff --git a/test_rust/src/models/ticker.rs b/test_rust/src/models/ticker.rs new file mode 100644 index 0000000..5768590 --- /dev/null +++ b/test_rust/src/models/ticker.rs @@ -0,0 +1,81 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Ticker { + #[serde(rename = "symbol")] + pub symbol: String, + #[serde(rename = "priceChange")] + pub price_change: String, + #[serde(rename = "priceChangePercent")] + pub price_change_percent: String, + #[serde(rename = "prevClosePrice")] + pub prev_close_price: String, + #[serde(rename = "lastPrice")] + pub last_price: String, + #[serde(rename = "bidPrice")] + pub bid_price: String, + #[serde(rename = "bidQty")] + pub bid_qty: String, + #[serde(rename = "askPrice")] + pub ask_price: String, + #[serde(rename = "askQty")] + pub ask_qty: String, + #[serde(rename = "openPrice")] + pub open_price: String, + #[serde(rename = "highPrice")] + pub high_price: String, + #[serde(rename = "lowPrice")] + pub low_price: String, + #[serde(rename = "volume")] + pub volume: String, + #[serde(rename = "quoteVolume")] + pub quote_volume: String, + #[serde(rename = "openTime")] + pub open_time: i64, + #[serde(rename = "closeTime")] + pub close_time: i64, + #[serde(rename = "firstId")] + pub first_id: i64, + #[serde(rename = "lastId")] + pub last_id: i64, + #[serde(rename = "count")] + pub count: i64, +} + +impl Ticker { + pub fn new(symbol: String, price_change: String, price_change_percent: String, prev_close_price: String, last_price: String, bid_price: String, bid_qty: String, ask_price: String, ask_qty: String, open_price: String, high_price: String, low_price: String, volume: String, quote_volume: String, open_time: i64, close_time: i64, first_id: i64, last_id: i64, count: i64) -> Ticker { + Ticker { + symbol, + price_change, + price_change_percent, + prev_close_price, + last_price, + bid_price, + bid_qty, + ask_price, + ask_qty, + open_price, + high_price, + low_price, + volume, + quote_volume, + open_time, + close_time, + first_id, + last_id, + count, + } + } +} + diff --git a/test_rust/src/models/trade.rs b/test_rust/src/models/trade.rs new file mode 100644 index 0000000..c68deff --- /dev/null +++ b/test_rust/src/models/trade.rs @@ -0,0 +1,50 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Trade { + /// trade id + #[serde(rename = "id")] + pub id: i64, + /// price + #[serde(rename = "price")] + pub price: String, + /// amount of base asset + #[serde(rename = "qty")] + pub qty: String, + /// amount of quote asset + #[serde(rename = "quoteQty")] + pub quote_qty: String, + /// Trade executed timestamp, as same as `T` in the stream + #[serde(rename = "time")] + pub time: i64, + #[serde(rename = "isBuyerMaker")] + pub is_buyer_maker: bool, + #[serde(rename = "isBestMatch")] + pub is_best_match: bool, +} + +impl Trade { + pub fn new(id: i64, price: String, qty: String, quote_qty: String, time: i64, is_buyer_maker: bool, is_best_match: bool) -> Trade { + Trade { + id, + price, + qty, + quote_qty, + time, + is_buyer_maker, + is_best_match, + } + } +} + diff --git a/test_rust/src/models/transaction.rs b/test_rust/src/models/transaction.rs new file mode 100644 index 0000000..d88c6a8 --- /dev/null +++ b/test_rust/src/models/transaction.rs @@ -0,0 +1,28 @@ +/* + * Binance Public Spot API + * + * OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * + * The version of the OpenAPI document: 1.0 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Transaction { + /// transaction id + #[serde(rename = "tranId")] + pub tran_id: i64, +} + +impl Transaction { + pub fn new(tran_id: i64) -> Transaction { + Transaction { + tran_id, + } + } +} +